0 Replies Latest reply on Jan 16, 2007 4:06 AM by pc leong

    JBoss5 war file deployment

    pc leong Newbie

      Hi, I been trying to deploy a war file (which work fine in JBoss4.0.5) into JBoss5.0 Beta

      I got this error:

      14:20:45,065 ERROR [BaseModelMBean] Exception invoking method addChild
      java.lang.RuntimeException: mapped-name is required for mail/Session of deployment csvlite.war
       at org.jboss.injection.ResourceHandler.loadXmlResourceRefs(ResourceHandler.java:89)
       at org.jboss.injection.ResourceHandler.loadXml(ResourceHandler.java:141)
      
       at org.jboss.web.tomcat.tc6.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:289)
       at org.jboss.web.tomcat.tc6.WebAppLoader.start(WebAppLoader.java:104)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4198)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5285)
       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:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:302)
       at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:129)
       at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:355)
       at org.jboss.web.deployers.WebModule.startModule(WebModule.java:88)
       at org.jboss.web.deployers.WebModule.start(WebModule.java:66)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
       at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextAction.java:46)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:198)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:320)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
       at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
       at org.jboss.system.ServiceController.start(ServiceController.java:431)
       at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:124)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:85)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:44)
       at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:53)
       at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
       at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
       at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
       at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
       at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
       at org.jboss.Main.boot(Main.java:210)
       at org.jboss.Main$1.run(Main.java:508)
       at java.lang.Thread.run(Thread.java:595)
      


      my jboss-web.xml:
      <jboss-web>
       <resource-ref>
       <res-ref-name>crd/connection</res-ref-name>
       <jndi-name>java:crd/connection</jndi-name>
       </resource-ref>
       <resource-ref>
       <res-ref-name>csvlite/connection</res-ref-name>
       <jndi-name>java:csvlite/connection</jndi-name>
       </resource-ref>
       <resource-ref>
       <res-ref-name>mail/Session</res-ref-name>
       <jndi-name>java:/mail/Session</jndi-name>
       </resource-ref>
      </jboss-web>
      


      What is the problem?
      Do I need to add @Resource in my servlet? Currently my servlet's codes are still compliant to j2ee 1.4