This content has been marked as final.
Show 1 reply
-
1. Re: MC archives vs. directories
tzman Jan 19, 2006 7:44 AM (in response to tzman)In an attempt to make this simpler I think I made it more confusing. The code I am using is from various examples/tutorials.
URL url = new File( "pathToMyBuildOutputDir" ).toURL(); EJB3StandaloneBootstrap.boot(null); EJB3StandaloneBootstrap.deployXmlResource( "coeds-beans.xml" ); deployer = new EJB3StandaloneDeployer(); // // Is this possible/correct?? deployer.getDeployDirs().add( url ); deployer.getArchivesByResource().add( "META-INF/persistence.xml" ); deployer.create(); deployer.start(); initialContext = new InitialContext();
Here is the error I recieve. The error is initiated from deployer.create();
Fron debug, I can see that the file does exist, it is a directory and it does create a valid local URL. Withouth the added line in question, everything works correctly.Caused by: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:507) at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:264) at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.create(EJB3StandaloneDeployer.java:381) at edu.uno.coeds.test.Ejb3Container.startup(Ejb3Container.java:84)
Thanks again for the help/clarification.