CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Java error while starting FoamX (http://www.cfd-online.com/Forums/openfoam-pre-processing/62183-java-error-while-starting-foamx.html)

cfdengineering September 16, 2005 12:58

I have installed OpenFOAM 1.2
 
I have installed OpenFOAM 1.2 on an AMD64 debian system today.

Installation is ok, but when I try to start FoamX I receive this error:

Exec : FoamXHostBrowser
Date : Sep 16 2005
Time : 18:52:09
Host : cfd8
PID : 13304
Root :
Case :
Nprocs : 1
HostBrowser running.....
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/FoamX: line 239: /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java: No such file or directory
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 131: 13304 Killed FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 13302).

The problem is that /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java exists!

If I edit ~/OpenFOAM/OpenFOAM-1.2/.bashrc and change $JAVA_HOME to /usr (I have java installed in /usr/bin/) I receive this error:

Exec : FoamXHostBrowser
Date : Sep 16 2005
Time : 18:55:34
Host : cfd8
PID : 15738
Root :
Case :
Nprocs : 1
HostBrowser running.....
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
java.lang.NullPointerException
at FoamX.CaseManagement.CaseBrowserPanel.CaseBrowserP anel (CaseBrowserPanel.java:213)
at FoamX.CaseManagement.CaseManager.CaseManager (CaseManager.java:95)
at FoamX.App.App (App.java:258)
at FoamX.App.main (App.java:184)
at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
at java.lang.VirtualMachine.main (VirtualMachine.java:108)

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed

(.:15829): Gdk-CRITICAL **: gdk_window_get_origin: assertion `window != NULL' failed
java.lang.NoSuchMethodError
at FoamX.App.initialiseHostBrowser (App.java:418)
at FoamX.App.initialise (App.java:343)
at FoamX.App.main (App.java:186)
at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
at java.lang.VirtualMachine.main (VirtualMachine.java:108)

and a window with title "class java.lang.Null" and two little buttons appears.

Has anyone an idea to solve this?

mattijs September 16, 2005 13:18

Never seen that one. I woul
 
Never seen that one.

I would double check that your /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java exists and is executable and no capitalization mistakes etc. Works fine over here.

Alternatively rebuild all of FoamX with your version.

cfdengineering September 16, 2005 13:34

I checked that file, and it sa
 
I checked that file, and it sadly exists http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif

here it is:
-rwxr-xr-x 1 claudio claudio 64940 2004-06-04 06:32 /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java

How can I rebuild FoamX without reinstalling all OpenFOAM stuff?

On this debian system I have java-sablevm installed and it usually lets me do all java-things I need.

If you have a suggestion for a FoamX rebuild I would be really happy to follow your instructions...

mattijs September 16, 2005 13:42

Check that all arguments to th
 
Check that all arguments to the java invocation (see the FoamX script) all exist etc. If I add 'set -x' to the FoamX script my invocation is:

/home/dm2/henry/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java -cp .:/home/dm2/henry/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/Foa mX/lib/FoamX.jar:/home/dm2/henry/OpenFOAM/OpenFOAM-1.2/applications/utilities/pr eProcessing/FoamX/lib/jlfgr-1_0.jar -DFoamX.SystemPath=/home/dm2/henry/OpenFOAM/OpenFOAM-1.2 -DFoamX.SystemConfigPath=/home/pinky2/mattijs/.OpenFOAM-1.2/apps/FoamX -DFoamX.UserConfigPath=/home/pinky2/mattijs/.OpenFOAM-1.2/apps/FoamX FoamX.App -ORBDefaultInitRef corbaloc:iiop:1.0:dm:1234


Rebuilding is a matter of (if you're lucky) just executing the ./Allwmake in the preProcessing/FoamX directory (after you've set the correct JAVA_HOME etc. vars)

You'll need to have idlj installed which I think comes with the sdk.

cfdengineering September 16, 2005 14:07

If I add set -x to the FoamX s
 
If I add set -x to the FoamX script this is the output:

HostBrowser running.....
+ jars=.
+ echo 'Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar'
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
+ jars=.:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/ FoamX/lib/FoamX.jar
+ echo 'Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar'
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
+ jars=.:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/ FoamX/lib/FoamX.jar:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/p reProcessing/FoamX/lib/jlfgr-1_0.jar
+ /usr/bin/java -cp .:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX /lib/FoamX.jar:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/prePro cessing/FoamX/lib/jlfgr-1_0.jar -DFoamX.SystemPath=/home/claudio/OpenFOAM/OpenFOAM-1.2 -DFoamX.SystemConfigPath=/home/claudio/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/apps/ FoamX -DFoamX.UserConfigPath=/home/claudio/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/apps/Fo amX FoamX.App -ORBDefaultInitRef corbaloc:iiop:1.0:cfd8:1234
java.lang.ClassNotFoundException: FoamX.App not found in java.lang.ClassLoader$1{urls=[file:/home/claudio/./,file:/home/claudio/OpenFOAM/ OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/lib/FoamX.jar,file:/home /claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/lib/jl fgr-1_0.jar], parent=null}
at java.net.URLClassLoader.findClass (URLClassLoader.java:841)
at java.lang.ClassLoader.loadClass (ClassLoader.java:360)
at java.lang.ClassLoader$1.loadClass (ClassLoader.java:1285)
at java.lang.ClassLoader.loadClass (ClassLoader.java:304)
at java.lang.VirtualMachine.main (VirtualMachine.java:99)
+ cleanup
+ trap 0 2 3 15
+ '[' 25025 ']'
+ killFoamX
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 131: 25042 Killed FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 25040).

This happens with JAVA_HOME set to /usr, with this var set to $WM_PROJECT_INST_DIR/$WM_ARCH/j2sdk1.4.2_05
I receive this:

HostBrowser running.....
+ jars=.
+ echo 'Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar'
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
+ jars=.:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/ FoamX/lib/FoamX.jar
+ echo 'Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar'
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
+ jars=.:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/ FoamX/lib/FoamX.jar:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/p reProcessing/FoamX/lib/jlfgr-1_0.jar
+ /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java -cp .:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX /lib/FoamX.jar:/home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/prePro cessing/FoamX/lib/jlfgr-1_0.jar -DFoamX.SystemPath=/home/claudio/OpenFOAM/OpenFOAM-1.2 -DFoamX.SystemConfigPath=/home/claudio/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/apps/ FoamX -DFoamX.UserConfigPath=/home/claudio/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/apps/Fo amXFoamX.App -ORBDefaultInitRef corbaloc:iiop:1.0:cfd8:1234
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/FoamX: line 240: /home/claudio/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java: No such file or directory
+ cleanup
+ trap 0 2 3 15
+ '[' 25330 ']'
+ killFoamX
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 131: 25347 Killed FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 25345).

I hope this makes sense for you.
Java is not my very best love http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

mattijs September 19, 2005 04:34

My advice would be to stick to
 
My advice would be to stick to the linuxAMD64/j2sdk1.4.2_05/bin/java and try running a simple test program with it. (sorry have none)

good luck.

cfdengineering September 19, 2005 06:53

My "file not found" problem is
 
My "file not found" problem is solved now!
I installed blackdown's sdk into $WM_PROJECT_INST_DIR/$WM_ARCH/j2sdk1.4.2_02/j2sdk1.4.2
and FoamX does not report this error anymore.

Now the problem is that the application does not start, reporting the following error:

HostBrowser running.....
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
Using jar /home/claudio/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
Exception in thread "main" java.lang.NoClassDefFoundError: FoamX/App
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 131: 32573 Killed FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 32569).
/home/claudio/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 1: 32569 Killed nsd -ORBIIOPAddr $myIOP --ior $FOAMX_CONFIG/ns.ref </dev/null

The "Exception in thread "main"" seems something critical, can you help me, guys?
Thanks

mattijs September 19, 2005 17:42

so what sdk was in $WM_PROJEC
 
so what sdk was in $WM_PROJECT_INST_DIR/$WM_ARCH/j2sdk1.4.2_02/j2sdk1.4.2 before? The one downloaded from the OpenFOAM site?

Check your lib/FoamX.jar (jar tvf lib/FoamX.jar) for whether the FoamX/app.class is there. Maybe try restoring it from the 'General' OpenFOAM pack?

cfdengineering September 21, 2005 03:42

I used the one downloaded from
 
I used the one downloaded from OpenFOAM.org in $WM_PROJECT_INST_DIR/$WM_ARCH/j2sdk1.4.2_05 as written in your instructions.
Now I installed an sdk downloaded from blackdown.org, but it's subversion is 02, instead of 05, so I changed JAVA_HOME conveniently.
I'm going to office now, I'll have a look to lib/FoamX.jar and I'll report here.

cfdengineering September 21, 2005 06:17

Ok, problem solved! In lib/Fo
 
Ok, problem solved!
In lib/FoamX.jar there is no app.class
I downloaded OpenFOAM-1.2.General.gtgz for linux 32, extracted FoamX.jar and overwritten it on the previous version.
Now it works!!!
Please regenerate the amd64 package.

mattijs September 22, 2005 05:00

Thanks for sorting it out.
 
Thanks for sorting it out.

Mattijs

misabel March 3, 2006 08:12

Hi to everybody! I have a 64b
 
Hi to everybody!
I have a 64bits processor and a 64bits Debian distribution. I have downloaded OpeanFOAM 3th march 2006.
When I put "FoamX", the following error message is obtained:

Using jar /home/misabel/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/FoamX.jar
Using jar /home/misabel/OpenFOAM/OpenFOAM-1.2/applications/utilities/preProcessing/FoamX/l ib/jlfgr-1_0.jar
current locale is not supported in X11, locale is set to CX locale modifiers are not supported, using defaultException in thread "main" java.lang.InternalError: Current locale is not supported
at sun.awt.motif.MWindowPeer.pSetTitle(Native Method)
at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:97 )
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:58 )
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:2 09)
at java.awt.Frame.addNotify(Frame.java:472)
at java.awt.Window.pack(Window.java:436)
at FoamX.App.initComponents(App.java:1333)
at FoamX.App.<init>(App.java:200)
at FoamX.App.main(App.java:184)
/home/misabel/OpenFOAM/OpenFOAM-1.2/bin/runFoamXHB: line 131: 30364 Terminado (killed) FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 30360).

What am I doing wrong?
I would be really grateful if someone could help me.
Best regards
Isa

mattijs March 6, 2006 05:25

Guess it has to do with locale
 
Guess it has to do with locale or language settings (search for 'LANG') in java. No idea how to solve it.

mdi June 21, 2006 04:13

Hello everybody, i am gett
 
Hello everybody,

i am getting a similar error message when i start FoamX:

HostBrowser running.....
Using jar /home/dienwiebel/OpenFOAM/OpenFOAM-1.3/applications/utilities/preProcessing/Foam X/lib/FoamX.jar
Using jar /home/dienwiebel/OpenFOAM/OpenFOAM-1.3/applications/utilities/preProcessing/Foam X/lib/jlfgr-1_0.jar
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
/home/dienwiebel/OpenFOAM/OpenFOAM-1.3/bin/runFoamXHB: line 131: 12174 Getötet FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 12170).


Has anybody an idea, what is wrong?

Thanks,
Martin

mdi June 22, 2006 07:32

....problem solved....
 
....problem solved....

msrinath80 June 22, 2006 20:13

how?
 
how?

msrinath80 June 28, 2006 20:02

I'm asking because if you post
 
I'm asking because if you post your solution here it can be useful for someone else. Thanks!


All times are GMT -4. The time now is 03:33.