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/)
-   -   FoamX not starting Javarelated error (http://www.cfd-online.com/Forums/openfoam-pre-processing/62107-foamx-not-starting-javarelated-error.html)

agrahn June 21, 2007 11:38

Although I have a Java-VM inst
 
Although I have a Java-VM installed in the system (sun-jdk-1.4.2.14) I put the recommended version (j2sdk1.4.2_05) into the `linux' subdirectory of $HOME/OpenFOAM and adjusted `JAVA_HOME' $HOME/OpenFOAM/OpenFOAM-1.4/.bashrc accordingly.

This is what foamInstallationTest outputs:
...

Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /home/grahn/OpenFOAM/OpenFOAM-1.4 yes yes yes

$FOAM_USER_APPBIN ...-1.4/applications/bin/linuxGcc4DPOpt yes yes no
$FOAM_APPBIN ...-1.4/applications/bin/linuxGcc4DPOpt yes yes yes
$WM_DIR /home/grahn/OpenFOAM/OpenFOAM-1.4/wmake yes yes yes
$FOAMX_PATH ...ations/utilities/preProcessing/FoamX yes no yes
$CEI_HOME /usr/local/ensight/CEI no no

$JAVA_PATH /home/grahn/OpenFOAM/linux/j2sdk1.4.2_05 yes yes no
$MICO_ARCH_PATH ...mico-2.3.12/platforms/linuxGcc4DPOpt yes yes yes
$LAM_ARCH_PATH ...c/lam-7.1.2/platforms/linuxGcc4DPOpt yes yes yes
$MPICH_ARCH_PATH --------- env variable not set --------- no
-------------------------------------------------------------------------------
...
...
Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.1.2 /usr/bin/gcc
java 1.4.2_05 /home/grahn/OpenFOAM/linux/j2sdk1.4.2_05/bin/java
gzip 1.3.12 /bin/gzip
tar 1.3.12 /usr/bin/tar
icoFoam ...M/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/icoFoam
-------------------------------------------------------------------------------
...

However, FoamX crashes soon after starting:

Starting NameServer with inet:fwss41:1234 ...
Starting FoamX Host Browser with inet:fwss41:1234 ...
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : FoamXHostBrowser
Date : Jun 21 2007
Time : 17:32:24
Host : fwss41
PID : 23329
Root :
Case :
Nprocs : 1
HostBrowser running.....
Setting LANG to en_EN
Using jar /home/grahn/OpenFOAM/OpenFOAM-1.4/applications/utilities/preProcessing
/FoamX/lib/FoamX.jar
Using jar /home/grahn/OpenFOAM/OpenFOAM-1.4/applications/utilities/preProcessing
/FoamX/lib/jlfgr-1_0.jar
Exception in thread "main" java.lang.NoClassDefFoundError: FoamX/App
/home/grahn/OpenFOAM/OpenFOAM-1.4/bin/runFoamXHB: line 139: 23329 Killed
FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 23325).
/home/grahn/OpenFOAM/OpenFOAM-1.4/bin/runFoamXHB: line 66: 23325 Killed
nsd -ORBIIOPAddr $myIOP --ior $FOAMX_CONFIG/ns.ref < /dev/null

What is wrong? Help is greatly appreciated.
(I am running Gentoo-Linux.)

Alexander

agrahn June 22, 2007 09:39

I could solve the problem by r
 
I could solve the problem by recompiling all Java stuff in the OpenFOAM source directory using the Java compiler of the Java-installation being in use (as configured by JAVA_HOME env variable):

For those who are interested in the required steps:

foam
find . -name '*.java' -print | xargs touch
Allwmake

Alexander

msrinath80 June 28, 2007 02:11

Thank you Alexander for report
 
Thank you Alexander for reporting the solution.

agrahn June 28, 2007 08:41

BTW, option `clean' would be a
 
BTW, option `clean' would be a _very_ useful addition to the Allwmake script. Or am I missing something?

Alexander

hjasak June 28, 2007 08:50

You are. http://www.cfd-online
 
You are. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif For cleaning, try wclean for a single app or library or at OpenFOAM level wcleanAll.

Enjoy,

Hrv

marhamat October 20, 2007 05:33

When i use Alexander suggestio
 
When i use Alexander suggestion i get below messages in konsole:
...
Making dependency list for source file writeFuns.C
could not open file interpolatePointToCell.H for source file writeFuns.C
Making dependency list for source file writePatchGeom.C
could not open file interpolatePointToCell.H for source file writePatchGeom.C
Making dependency list for source file writeFaceSet.C
could not open file interpolatePointToCell.H for source file writeFaceSet.C
Making dependency list for source file writePointSet.C
could not open file interpolatePointToCell.H for source file writePointSet.C
Making dependency list for source file writeSurfFields.C
could not open file interpolatePointToCell.H for source file writeSurfFields.C
Making dependency list for source file vtkMesh.C
Making dependency list for source file vtkTopo.C
make[3]: Leaving directory `/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/da taConversion/foamToVTK'
make[3]: Entering directory `/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/da taConversion/foamToVTK'
SOURCE=foamToVTK.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/src/lagrangian/basic/lnInclude -I/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/g raphics/PVFoamReader/vtkFoam/lnInclude -IlnInclude -I. -I/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/foamToVTK.o
In file included from writeFuns.H:244,
from foamToVTK.C:90:
writeFunsTemplates.C:30:36: error: interpolatePointToCell.H: No such file or directory
writeFunsTemplates.C: In static member function 'static void Foam::writeFuns::write(std::ostream&, bool, const Foam::GeometricField<type,>&, const Foam::vtkMesh&) [with Type = double]':
internalWriterTemplates.C:40: instantiated from 'void Foam::internalWriter::write(const Foam::PtrList<foam::geometricfield<type,> >&) [with Type = double, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]'
foamToVTK.C:518: instantiated from here
writeFunsTemplates.C:123: error: 'interpolatePointToCell' was not declared in this scope
writeFunsTemplates.C: In static member function 'static void Foam::writeFuns::write(std::ostream&, bool, const Foam::GeometricField<type,>&, const Foam::vtkMesh&) [with Type = Foam::Vector<double>]':
internalWriterTemplates.C:40: instantiated from 'void Foam::internalWriter::write(const Foam::PtrList<foam::geometricfield<type,> >&) [with Type = Foam::Vector<double>, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]'
foamToVTK.C:519: instantiated from here
writeFunsTemplates.C:123: error: 'interpolatePointToCell' was not declared in this scope
writeFunsTemplates.C: In static member function 'static void Foam::writeFuns::write(std::ostream&, bool, const Foam::GeometricField<type,>&, const Foam::vtkMesh&) [with Type = Foam::SphericalTensor<double>]':
internalWriterTemplates.C:40: instantiated from 'void Foam::internalWriter::write(const Foam::PtrList<foam::geometricfield<type,> >&) [with Type = Foam::SphericalTensor<double>, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]'
foamToVTK.C:520: instantiated from here
writeFunsTemplates.C:123: error: 'interpolatePointToCell' was not declared in this scope
writeFunsTemplates.C: In static member function 'static void Foam::writeFuns::write(std::ostream&, bool, const Foam::GeometricField<type,>&, const Foam::vtkMesh&) [with Type = Foam::SymmTensor<double>]':
internalWriterTemplates.C:40: instantiated from 'void Foam::internalWriter::write(const Foam::PtrList<foam::geometricfield<type,> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]'
foamToVTK.C:521: instantiated from here
writeFunsTemplates.C:123: error: 'interpolatePointToCell' was not declared in this scope
writeFunsTemplates.C: In static member function 'static void Foam::writeFuns::write(std::ostream&, bool, const Foam::GeometricField<type,>&, const Foam::vtkMesh&) [with Type = Foam::Tensor<double>]':
internalWriterTemplates.C:40: instantiated from 'void Foam::internalWriter::write(const Foam::PtrList<foam::geometricfield<type,> >&) [with Type = Foam::Tensor<double>, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]'
foamToVTK.C:522: instantiated from here
writeFunsTemplates.C:123: error: 'interpolatePointToCell' was not declared in this scope
make[3]: *** [Make/linux64GccDPOpt/foamToVTK.o] Error 1
make[3]: Leaving directory `/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/da taConversion/foamToVTK'
make[2]: *** [foamToVTK] Error 2
make[2]: Leaving directory `/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/da taConversion'
make[1]: *** [dataConversion] Error 2
make[1]: Leaving directory `/home/hydrolab/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing'
make: *** [postProcessing] Error 2
+ '[' 0 = 1 -a '' = doc ']'
hydrolab@linux-zah4:~/OpenFOAM/OpenFOAM-1.4.1>

Regards
Marhamat


All times are GMT -4. The time now is 12:05.