Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!

fahad siddiqui

Ranch Hand
+ Follow
since Jun 14, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by fahad siddiqui

I am trying to use jconn4.jar in weblogic (jconnect 7), the latest driver for Sybase database.
When i start weblogic, it throws the following stack:

Any advice would be helpful.
10 years ago
I have a stored procedure in which i define a cursor in the start like so:

After this, i iterate the loop and upon some conditions, i change the ACTIVE_STATUS and ERROR_FLAG to different values. Upon such an updation, that record should get erased from my cursor.
Hence, after the loop completes, i want to refresh my cursor, so that all such records which i updated during the loop, should now not be present in the cursor anymore.

Please advise urgently. I am using Oracle 8i.
Thanks in advance.
I am using the code:

to connect to the boa url. But i get a connection timeout exception.

What am i doing wrong?
Please advise.
DO i need an authenticator to connect to ?
What are the my proxy host and port? Why do i need to define these?
How do i define this? localhost and any random port?
I had a couple of clarifications in this respect:

If i am connecting to an https site such as verisign then, it doesn't need authentication to open up. So, do i need to setup an authenticator?
What are proxies which i need to setup? How do i find my proxy host?
Why are they needed?

Please advise. I am getting a Connection refused on connecting to the site.
I am trying to communicate with a https server using a core java code.
Please provide some leads or sample codes on how to approach this.

I would need to do some authentication with this server as well.

Please advise.
I am converting an xls into csv using jxl.
I have a rate column in excel which displays something like 0.86%

When i read it into jxl, i get the value as .009.
How to overcome this?
Following is the code:

12 years ago
will work? the type of the column is varchar and the data is also varchar.

the case statement does work. thanks.
the ids were an example. I need to fetch all the rows in a similar fashion.
i little mistake in my analysis:

i want to select unique with a good value of
good value means, C123.. kind of string in case values are 0 and C123..
0 in case all the values are 0.
Other than zero, the other string value will always be same.
i have a table with these are not unique.
so, i have multiple rows of such as shown below:

I hope you got the idea of the data in the table.
I want to fetch all the rows from this table with unique
so the fetch should display data something like this

Can you give me a query for this kind of result fetching?
thanks in advance
I am creating an instance of tomcat via java code using the following snippet.

This uses the catlina jar.
My concern is, can i use this instance as a normal tomcat instance for deploying my war files?
I ran this and got an instance of tomcat running on 8080.
Now, i want some other program to deploy a war file on this running server. Is it possible? Because i am not able to.
Please advise on how to?

If i register a war in this class only right after starting the tomcat, it works, but can't i do this from some other class or something at a later point of time?

I use the following snippet for registering the war:
12 years ago
FileChannel's lock is not possible, as the operation which provides the live file does not create any lock over the file and so, FileChannel does get a lock over the file which in turn disrupts the writing process.

renameTo, i cant use as the live file cannot be tinkered with. I just need to get a local copy of it for further processing.

Isn't there some unix funda of managing this kind of locking on its own? The live file comes on a unix box.
I have a live location where a file is written. I don't know by what process, could be manual aur programmed.

My process runs and checks the file to modified time changes. and if it changes, i transfer a copy of the file to another location for further processing.
Currently, while the live file is being written, my application picks up and copies the file (this copy is partly, as the file wasnt written completely).

How do i work around this such a lock or something? I dont have any control over the process which creates the live file.

Please advise.
So, then in such a kind of scenario, i cant take it for granted that only one of the reader threads will be notified.

But why does it work properly in the current version, when i have made calculator implements Runnable. Such a variable behaviour should be found in this case also, but it never happens. I tried it on couple of machines. It always notifies a single time.