triet kha

Greenhorn
+ Follow
since Dec 15, 2009
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 triet kha

It turned out that I made a very stupid mistake. I had only focused on tuning the Java stack size and neglected the native thread stack size which was hidden by the internal thread wrapper, which has a default 64k stack size, I used. After changing the stack size to 256k, everything ran just fine.

Thanks to those who have tried to help out. I really appreciate it.
14 years ago
I did more testing and found that the observation regarding 32-bit was incorrect. The simple class finding program provided above ran fine in 32-bit, but when I added more complicated operations, such as doing some work with Apache JackRabbit, I would get StackOverflowError as well.
14 years ago
Hi ALL,

I have a C++ app that invokes Java classes on 64-bit Solaris 10 with 64-bit JVM.

Here is the problem:
The native non-main (not the thread that initializes the JVM) threads would not be able to find any user-define class and run into StackOverflowError.

Here are the symptoms and observations:
1. The "main thread" that instantiates the JVM has no problem finding and loading any class or method
2. But the other threads (non-main threads) would not be able to find the user-defined classes unless the classes were already loaded by the main thread.
3. The non-main threads can find the "standard" java classes with no problem
4. The same app ran fine on 32-bit system.
5. Except for the JVM reference is global, I already have each thread acquired JNIEnv by either GetEnv() or AttachCurrentThread().
6. JNIEnv::ExceptionDescribe() showed the following StackOverflowError:

7. Here is the sample code that reproduces the problem:

Any idea why it is a problem with 64-bit?

I really appreciate it if anyone can provide any help/suggestion.

Regards,

- Triet
14 years ago