[jboss-user] [JBoss Seam] - Embedded Jboss Settings for 1.3.0.Alpha

wesleyhales do-not-reply at jboss.com
Sun Jun 17 21:47:51 EDT 2007


I think Gavin is working on the docs for this but I thought it would be good to go ahead and work through the embedded stuff.

After checking out the latest code from cvs, building then adding to my project, I have a few questions about getting Embedded Jboss working...

What beans should we be loading in the web.xml here (and how to do it):
<context-param>
  |       <param-name>jboss-kernel-deployments</param-name>
  |       <param-value>bootstrap-beans.xml</param-value>
  |    </context-param>
or should we still be using the old RC9 stuff?
<context-param>
  |       <param-name>jboss-kernel-deployments</param-name>
  |       <param-value>embedded-jboss-beans.xml,jboss-jms-beans.xml</param-value>
  |    </context-param>
  | 


and should we still use this when loading ejbs from a war (aka Jetty/Tomcat/etc)
<listener>
  |     <listener-class>org.jboss.ejb3.embedded.ServletBootstrapListener</listener-class>
  |     </listener>

I've tried a ton of different combos, checked out the embedded-jboss src and looked through every web.xml in the project but I couldn't find anything specific to my jetty(standalone war) needs. 

Soo, I think I got the closest when I added bootstrap-beans.xml as a kernel-deployment value and I got this stack trace:


org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/dev/freedom/ejb/target/classes/bootstrap-beans.xml
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:125)
  |         at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:114)
  |         at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:81)
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.deployXmlResource(ServletBootstrapListener.java:74)
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized(ServletBootstrapListener.java:174)
  |         at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
  |         at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
  |         at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
  |         at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
  |         at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
  |         at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
  |         at org.mortbay.jetty.Server.doStart(Server.java:220)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
  |         at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:345)
  |         at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:286)
  |         at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:204)
  |         at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
  |         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
  |         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
  |         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
  |         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
  |         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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
  |         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  |         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
  |         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {urn:jboss:bean-deployer:2.0}deployment is not bound as a global element.
  |         at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:395)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:269)
  |         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  |         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  |         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:121)
  |         ... 41 more
  | ERROR 17-06 21:39:23,931 [org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized():200] java.lang.RuntimeException: org.jboss.xb.binding.
  | JBossXBException: Failed to parse source: file:/C:/dev/freedom/ejb/target/classes/bootstrap-beans.xml
  | 2007-06-17 21:39:23.203::WARN:  Failed startup of context org.mortbay.jetty.webapp.WebAppContext at 166aab6{/,C:\dev\freedom\web\src\main\webapp}
  | java.lang.RuntimeException: java.lang.RuntimeException: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/dev/freedom/ejb/target
  | /classes/bootstrap-beans.xml
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized(ServletBootstrapListener.java:201)
  |         at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
  |         at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
  |         at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
  |         at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
  |         at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
  |         at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
  |         at org.mortbay.jetty.Server.doStart(Server.java:220)
  |         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  |         at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
  |         at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:345)
  |         at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:286)
  |         at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:204)
  |         at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
  |         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
  |         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
  |         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
  |         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
  |         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
  |         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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
  |         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  |         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
  |         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  | Caused by: java.lang.RuntimeException: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/dev/freedom/ejb/target/classes/bootstra
  | p-beans.xml
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.deployXmlResource(ServletBootstrapListener.java:81)
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.contextInitialized(ServletBootstrapListener.java:174)
  |         ... 37 more
  | Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/dev/freedom/ejb/target/classes/bootstrap-beans.xml
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:125)
  |         at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:114)
  |         at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:81)
  |         at org.jboss.ejb3.embedded.ServletBootstrapListener.deployXmlResource(ServletBootstrapListener.java:74)
  |         ... 38 more
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {urn:jboss:bean-deployer:2.0}deployment is not bound as a global element.
  |         at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:395)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:269)
  |         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  |         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  |         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:121)

This should be a pretty simple error to fix, i saw a jbossws post about it, but I'm not sure where to fix it...
anonymous wrote : JBossXBRuntimeException: Element {urn:jboss:bean-deployer:2.0}deploy
  | ment is not bound as a global element.

As a temp fix I changed the deployer back to 1.0 and got some AbstractController Null name error. blah... I'm spent, somebody throw me a life raft.

G - If you can shed any light, I greatly appreciate it and thanks for getting the new stuff in cvs. Even better, would be an example project!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055075#4055075

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055075



More information about the jboss-user mailing list