ravin kacha

Greenhorn
+ Follow
since Jul 18, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ravin kacha

But do we need to create this kind of classes?? (I mean User Defined Error classes)
Can anybody give me an example or scenario??


Thanks in advance
Ravin Kacha
14 years ago
can we have User defined Errors like user defined Exception?
if yes How and if no Why?
14 years ago
I have tried storing a state in session variable and I am able to prevent the creation of new servlet threads, but now caught up in another problem.

When we click on download for the first time it creates a servlet thread and starts performing the download operation and in between we click the download again, it bypasses all the process of downloading through if-else loop. But I am not able to get the response of the first thread and now that thread is not getting killed after completion of the operation.


Looking for an ASAP reply
Thanks in advance

Ravin Kacha
14 years ago
Hi all,

I have came across a very strange bug in a functionality implemented by me only.

Ideal scenario:

In this web application I am downloading a file on a click of a button/command. This will start an applet and will download the files to the local machine from the server.
For this whole process I have written a jsp, which will start a thread and on the request receival this thread will start pinging to the server and this will in turn ping to the applet for performing download operation.
for this download process i have written 3 classes 1. TaskManager, 2. ServerDownloadHandler, 3. ClientDownloadHandler
TaskManager will get the request from JSP and will send the request to the ServerDownloadHandler this will download the files to a temp directory on the server and will send the request to the ClientDownloadHandler.
ClientDownloadHandler will download the files to the local machine and will send the response to the server back and success or failure of the operation comes to know from this response.

Scenario with the bug:

when I click on the download button this will start downloading the file and will show a progressbar on applet showing the % completion of the operation. Now if i click on the download button again it is creating another process on the server and leaving it on the server unattended, because after completion of the operation an alert will come for success or failure and clicking on that will close the first process originally created when button was hit for the first time.
and if you click twice or thrice or so on... it will create that much processes on the server. This will affect the thread limit of the server and after the limitation reached we will have to restart the server... which is a very scary scenario for us.

looking for an ASAP reply
Thanks in advance

Ravin Kacha
14 years ago
William

Can you please elaborate more on this? and if you can give some code example than that would be a great help to understand me.
One more thing, this code is a working one cause it is working for up to 4 to 5 MB of files, then why its getting timed out for larger than those files??

Ritchie,

I have gone through this article before posting this topic on Ranch. I got the idea of Michael, but could not get myself cleared that if its working for 4 to 5 MB size of file, then what is the problem with larger files???

if you can put some light on that then it would be great

Ravin Kacha
15 years ago
This is really very surprising for me. It's almost 3 days I have posted this question and I haven't got any reply till now on Ranch.
15 years ago
JDK 1.6.0_03

is there any concern with the JDK version and ANT as such??
15 years ago
I have checked the JDK versions, both are identical.

But the question which invokes my thought process again and again is, though I am giving HashMap<K,V> as data type and creating object of the same type how can compiler get confused in AbstractMap and HashMap???
15 years ago
Hi All,

I am getting across a very strange error. I have written a java file, it is getting compiled in Eclips without any error. Now I am compiling the whole package through an ANT script which is showing the below error for the code snippet while compiling

\com\holset\matrix\utils\QueryString.java - Classed method have been conflicted between two classes.

Error Prompted :-
com\holset\matrix\utils\QueryString.java:102: reference to putAll is ambiguous, both method putAll(java.util.Map<? extends K,? extends V>) in .AbstractMap<java.lang.String,capture#832 of ?> and method putAll(java.util.Map<? extends K,? extends V>) in java.util.HashMap<java.lang.String,capture#832 of ?> match
map.putAll((Map) requestMap.get("requestMap"));



can any buddy help me out to resolve this. Because this is a show stopper for me cause I am not able to create a jar because of this only.

Thanks in advance

Ravin Kacha
15 years ago
Hi All,

I am facing a problem while uploading a file on ftp, larger in size, through a secured file transfer application. it gives an error message like

Gateway Time-out
The proxy server did not receive a timely response from the upstream server.


below is the code snippet (not used the actual names of the jar and classes because of the security reasons)
all the variables used below are in place



what i found on some of the sites while finding a solution for this problem was like, because of the 'Process.waitFor()' method JVM goes hang because of the parent - child process deadlock.

I am not sure weather this is related with this problem or not.

please put some light on this if anybuddy have faced this problem before.


Thanks in advance

Ravin Kacha
15 years ago
ohhh yeah...
I know that, but is there any work arround for this problem??
15 years ago
Hey Everyone,

I have a very strange problem infront of me.
I have developed an enhancement in applet for my client on an existing applet application.
I don't have code for the existing application, only having a jar for that.
Now from the existing code i am using a base class called TaskClient which has a default access.
Problem starts from here, this class is in com.matrixone.applet package and my new classes i have put in the same package.
Now client wants that i must use their package say 'com.holset.apps.cdm.applet' for newly developed classes.
If I do this i'll not be able to access the base class and my whole functionality will fail.

can you suggest any workarround for this.

thanks in advance
Ravin Kacha.
15 years ago
yeah...
actually i am using the existing code and over that i am implementing my new classes. but i still need to compile this classes to make a jar and i was helpless when i didn't find the jars for this.

anyways i got jars from one of my source.
so thanks for all the suggestions.
15 years ago


above is the code snnipet i am using in a class which is on the client side(applet). Now the problem is, i am not able to compile the class because i don't have any jar or the source file for this security classes like

PolicyEngine

etc. what is the work arround for this??

please give some solution ASAP

Thanks in advance.
15 years ago
yes lalit you are right....

the only thing Amit stated wrong was 'private classes'.

class can't have private modifier (except they are inner classes)