Thanx for your answer
My embedded glassfish is started like this:
Map<String,Object> properties = new HashMap<String,Object>();
properties.put(EJBContainer.MODULES, new File[]{new File("")});
properties.put(EJBContainer.APP_NAME, "myapp"});
properties.put("org.glassfish.ejb.embedded.glassfish.configuration.file",
"myapp/test/domain.xml");
properties.put("org.glassfish.ejb.embedded.glassfish.installation.root",
"C:/Java/glassfish-3.1.1/glassfish"); ejbContainer =
EJBContainer.createEJBContainer(properties);
The only error I have before is:
13 déc. 2011 09:35:00 com.sun.ejb.containers.BaseContainer initializeHome
INFO: Portable JNDI names for EJB myapp : [java:global/myapp/classes/myapp,
java:global/myapp/classes/myapp!net.mycompany.myapp.dao.MyDAO] 13 déc. 2011
09:35:00 com.sun.ejb.containers.EjbContainerUtilImpl deployEJBTimerService
INFO: Loading EJBTimerService. Please wait. 13 déc. 2011 09:35:00
org.glassfish.api.ActionReport failure GRAVE: Exception lors du déploiement
de l’application [ejb-timer-service-app] 13 déc. 2011 09:35:00
com.sun.enterprise.v3.server.ApplicationLifecycle deploy GRAVE:
org.apache.jasper.xmlparser.ParserUtils.setSchemaResourcePrefix(Ljava/lang/String;)V
java.lang.NoSuchMethodError:
org.apache.jasper.xmlparser.ParserUtils.setSchemaResourcePrefix(Ljava/lang/String;)V
at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:408)
at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:93) at
com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:957)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:667)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
com.sun.ejb.containers.EjbContainerUtilImpl.deployEJBTimerService(EjbContainerUtilImpl.java:552)
at
com.sun.ejb.containers.EjbContainerUtilImpl.getEJBTimerService(EjbContainerUtilImpl.java:294)
at
com.sun.ejb.containers.EjbContainerUtilImpl.getEJBTimerService(EjbContainerUtilImpl.java:289)
at
com.sun.ejb.containers.EjbContainerUtilImpl.getEJBTimerService(EjbContainerUtilImpl.java:274)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:755) at
com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:155)
at
com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:149)
at
com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:105)
at
org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290) at
org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101) at
org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186) at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at
com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
at
org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:142)
at
org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:134)
at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127)
at net.mycompany.myapp.util.JeeHelper.createEJBContainer(JeeHelper.java:44)
at
net.mycompany.myapp.batch.MatchingProcessTest.setUpClass(MatchingProcessTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
classLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7_at_1fc9fee
--
[Message sent by forum member 'gquintana']
View Post: http://forums.java.net/node/873553