Note that there are some explanatory texts on larger screens.

plurals
  1. POPackaging ejb3 swing client
    text
    copied!<p>I get the "java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac tory" error while running my packaged ejb3 swing client jar. Here's the stack trace.</p> <pre><code>G:\Courses\OSUMC\Installables\June 5\New&gt;java -jar MetaDB-Client.jar javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o rg.jnp.interfaces.NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.&lt;init&gt;(Unknown Source) at net.massmatrix.metadb.ui.facade.BaseEJBFacade.getInitialContext(BaseE JBFacade.java:26) at net.massmatrix.metadb.ui.facade.UserManagerFacade.getUserManager(User ManagerFacade.java:24) at net.massmatrix.metadb.ui.facade.UserManagerFacade.isUserNameAvailable (UserManagerFacade.java:44) at net.massmatrix.metadb.ui.MainFrame.main(MainFrame.java:269) Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac tory 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.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source) ... 8 more Exception in thread "main" java.lang.NullPointerException at net.massmatrix.metadb.ui.facade.UserManagerFacade.isUserNameAvailable (UserManagerFacade.java:44) at net.massmatrix.metadb.ui.MainFrame.main(MainFrame.java:269) </code></pre> <p>Here are my packaged swing client Jar contents:-</p> <pre><code>MetaDB-Client.jar \net\.. - contains class files(from both client and server) META-INF MANIFEST.MF jndi.properties </code></pre> <p>Here's my jndi.properties:-</p> <pre><code>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1099 </code></pre> <p>Here's my MANIFEST.MF:-</p> <pre><code>Manifest-Version: 1.0 Main-Class: net.massmatrix.metadb.ui.MainFrame Class-Path: jbossall-client.jar </code></pre> <p>Manifest contents from my jar:-</p> <pre><code>Manifest-Version: 1.0 Created-By: 1.6.0_18 (Sun Microsystems Inc.) Main-Class: net.massmatrix.metadb.ui.MainFrame </code></pre> <p>Command used to create the jar:-</p> <pre><code>jar cfm MetaDB-Client.jar MANIFEST.MF net\* jndi.properties </code></pre> <p>Command used to run the jar:-</p> <pre><code>java -jar MetaDB-Client.jar </code></pre> <p>I have the jbossall-client.jar in my classpath</p> <pre><code>G:\Courses\OSUMC\Installables\June 5\New&gt;echo %CLASSPATH% .;G:\Courses\OSUMC\WORK\Software - New\jboss-5.0.1.GA\client </code></pre> <p>What else am i missing ?</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload