Muhammad Imad Qureshi

Ranch Hand
+ Follow
since Sep 13, 2005
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Muhammad Imad Qureshi

Thanks for all your replies. I found a script that I didn't know about, where I can modify environment variables so I can now set "java.io.tmpdir" property. but to answer some of your questions, I have looked up poi forums and this problem is resolved by changing this property. But I didn't know how to do it permanently, so I asked here. Changing the location of tmp folder will resolve the issue (though not tested yet) because the new "/tmp" folder will not be cleaned up by sysadmin.

Thanks again.
Imad
5 years ago
Jelle

Thanks for your reply. I think JAVA_OPTS idea is good. Since there is no other application running, this should resolve our issue. However, we already have startup scrips with JAVA_OPTS variable and we cannot change these startup scripts. I think I can create a new script and call my startup script from that script and set JAVA_OPTS variable. But that will be overridden by startup script. So I still have my problem.

Thanks
Imad
5 years ago
Hi

I support an application that uses apache poi. Apache poi creates a directory in "/tmp" folder called "/poifiles". System admin runs a job clears up "/tmp" directory. this deletes the "poifiles" folder and I start getting exceptions. When I create this folder manually, everything starts working fine. What I need to do is change the location of "poifiles" folder. I can do this by changing "java -Djava.io.tmpdir=/path/to/new/tmp/folder". However, I want to persist this so I don't have to do this whenever my application restarts or whenever the box is rebooted. What is the best way to set this property so it is permanent?

Thanks
Imad
5 years ago
Thanks Phil and Grdihar

That's what I realized that executeQuery won't work. Following on number 2 from Philip. My problem is that I have to return a ResultSet object to a client software and it blows up when it receives a null value. I want to make sure that I return a non null resultset value. Apparently from your reply, I cannot control that. So something needs to be done on the client side. Is that correct?

Thanks
Imad
Hi

I am calling a stored procedure. When the procedure returns zero rows, following line returns "NULL" according to the documentation.



I need to return a non null resultset object even if there are no rows found. I have two questions.

1. Does "getResultset()" returns a null object when no rows are found or posibbly something else is wrong?

2. If CallableStatement returns null when no rows are found then what's the easiest way to create a "Resultset" empty object. When I try to create a new ResultSet object eclipse implements all methods in the interface. Can I do something llike this instead?

Hi

We have DB2 datasource and I am calling a stored procedure. Caller to my java method passes query timeout which I set if its greater than 0. Please see code below. But my procedure completes without timing out and returns the result (two minute execution time for procedure where timeout is set to 5 to 10 seconds).



Can someone please help me with this.

Thanks
Imad
1. We are using 10.3

2. By stale I mean connection that is not good. We get connection closed error. Although the property "test connection on reserve" is "true". I also see in my database "select count(*) from dual" query run by weblogic user very often. And this connection drop happens only occasionally. Let's say two or three times a day. But it must be fixed. It may not be weblogic and something else (perhaps cluster or the driver), but I need to prove that. Any help is really appreciated.

Thanks
Imad
6 years ago
Hi

We have a weblogic server. We have following settings in our connection pool. The problem we are haing is that the connection pool is apparently giving stale connections (or so we think). Do you see anything that we can improve in the following xml file?

Thanks for your help
Imad

6 years ago
Please ignore this one. Accidentally created a reply.
6 years ago
JSF
I am new to JSF. I have a dataTable and it has some 4 columns. One of the columns is a link (commandLink). This commandLink should take me to a method in my java class. But instead when I place the mouse pointer on the link in firefox, it is pointing to the same page it is on. Here is a little code snippet.

(since I am typing code here, there might be some typos but please ignore those, there is no xml error).


Can you please point out my errors? Thanks. My managed bean was initially in request scope but I have also tried session scope (I am using annotations and not faces-config.xml to define scope)
6 years ago
JSF
What does the following error message means?

"PreparedStatement is not valid for this transaction context" ?

Thanks
Imad
Hi

Can you connect with a remote debugger if the client JVM is 32-bit and the server is 64-bit?

Would we run into issues like variable sizes, memory addressing difference etc?

Thanks
Imad
7 years ago
Guys, thanks for all your help. I have resolved most of the issues. The only issue still remains is that file is deleted after user clicks "Clear Data". "Clear Data" option is not even there on older version of android that I am using on my droid phone. But it does show up in emulator where I am using "Google level 8" API. I see in eclipse in DDMS File explorer that all folders are gone except for lib folder. Is it okay to use "assets" folder for this purpose?
7 years ago
Please see following write and read methods. When read the bytes and convert them to string, I don't see the same String that I wrote. I know its a basic file read question but how do I convert those bytes to same String as it was before I wrote it?

Thanks
Imad

7 years ago
Just in case if fie name makes any difference, I am using following file name.

" ;

The reason for choosing this file name is a poor attempt to prevent user figuring out that this file determines the trial period of my app. As you can see I am not specifying any location. Does that makes a difference?
7 years ago