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.

I get a NullPointerException in java

Please login with a confirmed email address before reporting spam

I get a NullPointerException in java while trying to compile the exported model. I'm currently using netbeans and I've already added all the jar files on the plugin folder. The stack trace is the following, where myClass is the class of the exported model:

Exception in thread "main" java.lang.NullPointerException
at com.comsol.util.methods.PluginUtil.g(Unknown Source)
at com.comsol.util.methods.PluginUtil.b(Unknown Source)
at com.comsol.util.methods.PluginUtil.a(Unknown Source)
at com.comsol.migration.c.i(Unknown Source)
at com.comsol.migration.c.<init>(Unknown Source)
at com.comsol.migration.c.f(Unknown Source)
at com.comsol.migration.c.a(Unknown Source)
at com.comsol.model.util.ModelUtil.create(Unknown Source)
at myClass.run(myClass.java:18)
at myClass.main(myClass.java:13)

I've double checked everything. I even reinstalled COMSOL just in case the java libraries are compiled on the installation (I don't know it seemed to me something plausible), but I can't get rid of this exception and I can't do anything since the exception is thrown un the run method. Any ideas?

0 Replies Last Post Oct 4, 2011, 1:25 a.m. EDT
COMSOL Moderator

Hello Rafael Gonzalez

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.