Embeddable EJB Container JBoss 7.1.1
calb May 17, 2012 9:41 AMHas anyone been able to get EJB 3.1 Embeddable to work with JBoss 7.1.1.Final yet?
Following instructions on https://community.jboss.org/wiki/EJB31Embeddable#comment-1206 I made an JBoss instance boot up in JVM.
For testing and deploying I also created a very simple test-ejb.jar, containing nothing more than a single stateless ejb class.
JBoss is starting up succesfully. The test-ejb.jar is been recognized as an ejb-jar and JBoss wants to start deployment when an error is coming up.
import java.io.File; import java.util.*; import javax.ejb.embeddable.EJBContainer; public class TestEJBEmb { public TestEJBEmb() { System.setProperty("org.jboss.as.embedded.ejb3.BARREN", "true"); System.setProperty("jboss.home", "C:/Programme/jboss-as-7.1.1.Final"); System.setProperty("jboss.home.dir", "C:/Programme/jboss-as-7.1.1.Final"); Map<String, Object> props = new HashMap<String, Object>(); File[] ejbModules = new File[1]; ejbModules[0] = new File("c:/Users/ca/Desktop/test-ejb.jar"); props.put(EJBContainer.MODULES, ejbModules); EJBContainer container = EJBContainer.createEJBContainer(props); } public static void main(String[] args) { new TestEJBEmb(); } }
14:43:18,490 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3446ms - Started 149 of 227 services (76 services are passive or on-demand) 14:43:18,801 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "test-ejb.jar" 14:43:19,445 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.module.service."deployment.test-ejb.jar".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.test-ejb.jar".main: Failed to load module: deployment.test-ejb.jar:main at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_31] at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_31] Caused by: org.jboss.modules.ModuleNotFoundException: Module Classpath:main is not found in local module loader @7c4c51 (roots: C:\Programme\jboss-as-7.1.1.Final\modules) at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.Module.addPaths(Module.java:851) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.Module.link(Module.java:1206) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.Module.relinkIfNecessary(Module.java:1235) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208) [jboss-modules-1.1.2.GA.jar:1.1.2.GA] at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) ... 5 more 14:43:19,668 INFO [org.jboss.as.server] (pool-9-thread-1) JBAS015870: Deploy of deployment "test-ejb.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.test-ejb.jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.test-ejb.jar\".main: Failed to load module: deployment.test-ejb.jar:main"}} 14:43:19,690 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment test-ejb.jar in 21ms 14:43:19,693 INFO [org.jboss.as.controller] (pool-9-thread-1) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.module.service."deployment.test-ejb.jar".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.test-ejb.jar".main: Failed to load module: deployment.test-ejb.jar:main
Any clues? Any help is very much appreciated.
Related discussions: https://community.jboss.org/message/732179
Thanks in advance.