Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

java exception error in using postcrossplot code.....

Please login with a confirmed email address before reporting spam

Hi

I am working in windows xp os and with Comsol 3.5a with matlab R2008b

I am exporting model file form comsol to matlab as fem and is saved in fem file in workspace. when iam using postcrossplot in order to save it and use it for meshintegrate code for integration on a particular cross section in a domain.

but when iam using code postcrossplot in matlab command window as follows

pd = postcrossplot(fem,2,[0.015 0 0;0.015 0 0.03;0 0.015 0]','surfdata','T')

extracting temperature data from subdomian in a particular cross section and storing it in pd variable....

it gives error as

??? Error using ==> figure
Error using ==> figure
Java exception occurred:
java.lang.NoClassDefFoundError: javax/media/j3d/BoundingBox

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetPublicMethods(Unknown Source)

at java.lang.Class.getMethods(Unknown Source)

at com.mathworks.jmi.OpaqueJavaInterface.doesMethodExist(OpaqueJavaInterface.java:407)

Caused by: java.lang.ClassNotFoundException: javax.media.j3d.BoundingBox

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

... 5 more


Error in ==> gcf at 33
h = figure;

Error in ==> postnewplot>l_newplot at 27
currax = gca;

Error in ==> postnewplot at 15
hAx = l_newplot(vers);

Error in ==> postcrossplot at 368
ax = postnewplot;


I think it is problem with java files and help me regarding this.

thanks for your precious help in advance.

cheers

shanu

6 Replies Last Post 11 juin 2013, 08:10 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26 mars 2010, 04:22 UTC−4
hiiiiiiiiiiiiii

I found at last whats the error.............

by starting matlab first..... i have to first run the command "figure" in command line so that matlab reads java jar files in matlab defalut directory after which we can run our command file which can be in some other directory ...................

thanks

cheers
bye
shanu
hiiiiiiiiiiiiii I found at last whats the error............. by starting matlab first..... i have to first run the command "figure" in command line so that matlab reads java jar files in matlab defalut directory after which we can run our command file which can be in some other directory ................... thanks cheers bye shanu

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 janv. 2011, 14:22 UTC−5
hey,
i have the same problem right now and dont understand the solution. I will be glad if you share it again...
Thanks
hey, i have the same problem right now and dont understand the solution. I will be glad if you share it again... Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2013, 05:29 UTC−5
Hello,

I have the same problem too, and don't find the solution. I don't understand how you fix this problem. (My file .m worked correctly since this morning and now I have this error, and I really don't understand why.... I have changed nothing !!)

Thanks to explain more the solution you use...

Cheers,

Laetitia.
Hello, I have the same problem too, and don't find the solution. I don't understand how you fix this problem. (My file .m worked correctly since this morning and now I have this error, and I really don't understand why.... I have changed nothing !!) Thanks to explain more the solution you use... Cheers, Laetitia.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2013, 05:54 UTC−5
Realy strange...

I had this error yesterday evening so I turned off my computer. This morning after turning it on, the same error...

I closed Comsol and Matlab, and then opened them again.... And it works... I don't understand what was the problem...

If someone knows a solution, I will be glad to know why this error arrive for the future (in case).

Thanks.
Realy strange... I had this error yesterday evening so I turned off my computer. This morning after turning it on, the same error... I closed Comsol and Matlab, and then opened them again.... And it works... I don't understand what was the problem... If someone knows a solution, I will be glad to know why this error arrive for the future (in case). Thanks.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2013, 09:08 UTC−5
This afternoon, same error without reason...

What I did (in fact as Shanu said):
1) Disconnect Comsol to Matlab
2) Open a new Matlab (only Matlab, not Comsol)
3) Run the command "figure" in command line in Matlab
4) Connect Comsol to Matlab (without close the first Matlab)
5) Close the first Matlab

Normally, your code runs and you don't have anymore this error

NB: I did this operation twice before it works, so I'm not sure it's THE solution. Moreover, before this day Matlab/Comsol worked correctly without do this manipulation.
This afternoon, same error without reason... What I did (in fact as Shanu said): 1) Disconnect Comsol to Matlab 2) Open a new Matlab (only Matlab, not Comsol) 3) Run the command "figure" in command line in Matlab 4) Connect Comsol to Matlab (without close the first Matlab) 5) Close the first Matlab Normally, your code runs and you don't have anymore this error NB: I did this operation twice before it works, so I'm not sure it's THE solution. Moreover, before this day Matlab/Comsol worked correctly without do this manipulation.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11 juin 2013, 08:10 UTC−4
after running the Comsol with matlab, add path of the java folder and its subfolder.
after running the Comsol with matlab, add path of the java folder and its subfolder.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.