10 Replies Latest reply on Jul 23, 2006 9:57 PM by seemap

    ejb deployment in jboss4

    seemap

      I am learning EJB from one of the book and got stuck on the deployment of first EJB . It is stateful Session Bean
      the jboss.xml is

      <?xml version="1.0" encoding = UTF-8" ?>
      
      <jboss>
      
       <enterprise-beans>
      <session>
       <ejb-name>SignOnEJB</ejb-name>
       <jndi-name>day05/SignOnHome</jndi-name>
      </session>
      </enterprise-beans>
      
      </jboss>



      ejb-jar.xml is

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!DOCTYPE ejb-jar
       PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise Javabeans 2.0//EN"
       "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
       <enterprise-beans>
      <session>
       <ejb-name>SignOnEJB</ejb-name>
       <home>day05.SignOnHome</home>
       <remote>day05.SignOn</remote>
      <ejb-class>day05.SignOnEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <env-entry>
       <env-entry-name>student</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>password</env-entry-value>
      </env-entry>
      <env-entry>
       <env-entry-name>student1</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>password1</env-entry-value>
      </env-entry>
      </session>
      
      </enterprise-beans>
      
      </ejb-jar>



      This book is using Jboss 3 and I am using JBoss 4.0.4

      when I deploy my ejb jar file (day05-signon.jar) which is having all class file and Meta-INf
      I got error message

      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@4c050b2b { url=file:/C:/jboss-4.0.4/jboss-4.
      0.4.GA/server/default/deploy/day05_Signon.jar }
      deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
      status: null
      state: FAILED
      watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.
      jar
      altDD: null
      lastDeployed: 1153249201578
      lastModified: 1153249201546
      mbeans:

      org.jboss.deployment.DeploymentInfo@592997e2 { url=file:/C:/jboss-4.0.4/jboss-4.
      0.4.GA/server/default/deploy/META-INF/ejb-jar.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/META-INF/ejb-
      jar.xml
      altDD: null
      lastDeployed: 1153249202656
      lastModified: 1153249202656
      mbeans:

      org.jboss.deployment.DeploymentInfo@2070e0ce { url=file:/C:/jboss-4.0.4/jboss-4.
      0.4.GA/server/default/deploy/META-INF/jboss.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/META-INF/jbos
      s.xml
      altDD: null
      lastDeployed: 1153249202656
      lastModified: 1153249202656
      mbeans:


      12:00:03,031 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
      -8080
      12:00:03,265 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      12:00:03,390 INFO [JkMain] Jk running ID=0 time=0/172 config=null
      12:00:03,406 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos


      Pls help .


        • 1. Re: ejb deployment in jboss4
          jaikiran

           

          org.jboss.deployment.DeploymentInfo@2070e0ce { url=file:/C:/jboss-4.0.4/jboss-4.
          0.4.GA/server/default/deploy/META-INF/jboss.xml }


          Looks like you have placed the META-INF directory, directly under the deploy folder. This META-INF directory(and its contents) should be placed in your day05_Signon.jar.

          How is your day05_Signon.jar packaged? Run the following command from your prompt and post the output:

          jar -tf day05_Signon.jar


          This command will display the contents of your jar file.





          • 2. Re: ejb deployment in jboss4
            seemap


            The output of jar -tf day05_signon.jar is

            META-INF/
            META-INF/MANIFEST.MF
            day05/
            day05/InvalidLoginException.class
            day05/SignOn.class
            day05/SignOnEJB.class
            day05/SignOnHome.class
            META-INF/ejb-jar.xml
            META-INF/jboss.xml

            • 3. Re: ejb deployment in jboss4
              jaikiran

              Your application packaging is correct. Looking at the exception stacktrace, i believe that in your C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/ deploy folder there is a META-INF folder which contains ejb-jar.xml and jboss.xml files. If thats the case, delete the META-INF folder and its contents and start jboss.

              • 4. Re: ejb deployment in jboss4
                seemap

                I have deleted the Meta-INF folder from deploy folder but still got error

                --- Incompletely deployed packages ---
                org.jboss.deployment.DeploymentInfo@4c050b2b { url=file:/C:/jboss-4.0.4/jboss-4.
                0.4.GA/server/default/deploy/day05_Signon.jar }
                deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
                status: null
                state: FAILED
                watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.
                jar
                altDD: null
                lastDeployed: 1153499535343
                lastModified: 1153499535312
                mbeans:



                what's wrong ?

                • 5. Re: ejb deployment in jboss4
                  jaikiran

                  After deleting the META-INF folder from the deploy directory, is this the only error that you are seeing. Are there any exception stacktraces when jboss is starting. If yes, post the same


                  • 6. Re: ejb deployment in jboss4
                    seemap

                    The whole message after running the JBoss server is shown below:


                    C:\jboss-4.0.4\jboss-4.0.4.GA\bin>set JAVA_HOME = c:\j2sdk1.4.2_10
                    ===============================================================================
                    .
                    JBoss Bootstrap Environment
                    .
                    JBOSS_HOME: C:\jboss-4.0.4\jboss-4.0.4.GA\bin\\..
                    .
                    JAVA: C:\j2sdk1.4.2_10\bin\java
                    .
                    JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcIn
                    terval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
                    .
                    CLASSPATH: C:\j2sdk1.4.2_10\lib\tools.jar;C:\jboss-4.0.4\jboss-4.0.4.GA\bin\\r
                    un.jar
                    .
                    ===============================================================================
                    .
                    16:29:27,375 INFO [Server] Starting JBoss (MX MicroKernel)...
                    16:29:27,375 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBo
                    ss_4_0_4_GA date=200605151000)
                    16:29:27,390 INFO [Server] Home Dir: C:\jboss-4.0.4\jboss-4.0.4.GA
                    16:29:27,390 INFO [Server] Home URL: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/
                    16:29:27,390 INFO [Server] Patch URL: null
                    16:29:27,390 INFO [Server] Server Name: default
                    16:29:27,390 INFO [Server] Server Home Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\serve
                    r\default
                    16:29:27,390 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4/jboss-4.0.4.GA
                    /server/default/
                    16:29:27,406 INFO [Server] Server Log Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\server
                    \default\log
                    16:29:27,406 INFO [Server] Server Temp Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\serve
                    r\default\tmp
                    16:29:27,406 INFO [Server] Root Deployment Filename: jboss-service.xml
                    16:29:28,765 INFO [ServerInfo] Java version: 1.4.2_10,Sun Microsystems Inc.
                    16:29:28,765 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_10-b03
                    ,Sun Microsystems Inc.
                    16:29:28,765 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                    16:29:30,343 INFO [Server] Core system initialized
                    16:29:38,171 INFO [WebService] Using RMI server codebase: http://xyz-ilsy4a436z
                    f:8083/
                    16:29:38,250 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
                    ce:log4j.xml
                    16:29:39,015 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.
                    0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jbos
                    s.net.sockets.DefaultSocketFactory
                    16:29:50,671 INFO [Embedded] Catalina naming disabled
                    16:29:50,843 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                    the classpath. Will load the default rule set.
                    16:29:50,843 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                    the classpath. Will load the default rule set.
                    16:29:51,750 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0
                    .0.0-8080
                    16:29:51,750 INFO [Catalina] Initialization processed in 907 ms
                    16:29:51,750 INFO [StandardService] Starting service jboss.web
                    16:29:51,765 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.1
                    7
                    16:29:51,875 INFO [StandardHost] XML validation disabled
                    16:29:51,937 INFO [Catalina] Server startup in 187 ms
                    16:29:52,390 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
                    http-invoker.sar/invoker.war/
                    16:29:53,328 INFO [WebappLoader] Dual registration of jndi stream handler: fact
                    ory already defined
                    16:29:55,078 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbosswe
                    b-tomcat55.sar/ROOT.war/
                    16:29:59,359 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/dep
                    loy/tmp5377jbossws-exp.war/
                    16:30:00,062 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDi
                    spatcher
                    16:30:00,734 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../
                    deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
                    16:30:06,359 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
                    loy/management/console-mgr.sar/web-console.war/
                    16:30:08,906 INFO [MailService] Mail Service bound to java:/Mail
                    16:30:09,609 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/jboss-ha-local-jdbc.rar
                    16:30:09,890 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/jboss-ha-xa-jdbc.rar
                    16:30:10,031 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/jboss-local-jdbc.rar
                    16:30:10,218 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/jboss-xa-jdbc.rar
                    16:30:10,453 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/jms/jms-ra.rar
                    16:30:10,640 INFO [RARDeployment] Required license terms exist, view META-INF/r
                    a.xml in .../deploy/mail-ra.rar
                    16:30:13,343 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                    oss.jca:name=DefaultDS,service=DataSourceBinding' to JNDI name 'java:DefaultDS'
                    16:30:14,015 INFO [A] Bound to JNDI name: queue/A
                    16:30:14,015 INFO [B] Bound to JNDI name: queue/B
                    16:30:14,031 INFO [C] Bound to JNDI name: queue/C
                    16:30:14,031 INFO [D] Bound to JNDI name: queue/D
                    16:30:14,031 INFO [ex] Bound to JNDI name: queue/ex
                    16:30:14,093 INFO [testTopic] Bound to JNDI name: topic/testTopic
                    16:30:14,093 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                    16:30:14,109 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

                    16:30:14,109 INFO [testQueue] Bound to JNDI name: queue/testQueue
                    16:30:14,328 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.
                    0.0:8093
                    16:30:14,421 INFO [DLQ] Bound to JNDI name: queue/DLQ
                    16:30:14,890 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                    oss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
                    16:30:14,968 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jbos
                    s-4.0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.jar
                    org.jboss.deployment.DeploymentException: Invalid XML: file=META-INF/jboss.xml@3
                    3:1; - nested throwable: (org.xml.sax.SAXParseException: The value following "en
                    coding" in the XML declaration must be a quoted string.)
                    at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:342)
                    at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:272)
                    at org.jboss.ejb.EJBDeployer.init(EJBDeployer.java:478)
                    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:324)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                    er.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                    or.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                    BeanOperationInterceptor.java:142)
                    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
                    .java:97)
                    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
                    rServiceMBeanSupport.java:238)
                    at org.jboss.deployment.SubDeployerInterceptorSupport.init(SubDeployerIn
                    terceptorSupport.java:119)
                    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
                    init(SubDeployerInterceptorSupport.java:172)
                    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
                    ptor.java:87)
                    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:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy26.init(Unknown Source)
                    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                    at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                    er.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                    or.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                    BeanOperationInterceptor.java:142)
                    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:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy8.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                    tScanner.java:421)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                    canner.java:634)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                    doScan(AbstractDeploymentScanner.java:263)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                    bstractDeploymentScanner.java:336)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
                    upport.java:289)
                    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
                    eanSupport.java:245)
                    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                    er.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                    java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                    ler.java:978)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:417)
                    at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                    er.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                    java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
                    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:324)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                    er.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                    or.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                    BeanOperationInterceptor.java:142)
                    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:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                    at org.jboss.Main.boot(Main.java:200)
                    at org.jboss.Main$1.run(Main.java:464)
                    at java.lang.Thread.run(Thread.java:534)
                    Caused by: org.xml.sax.SAXParseException: The value following "encoding" in the
                    XML declaration must be a quoted string.
                    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
                    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
                    at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:328)
                    ... 88 more
                    16:30:15,234 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
                    loy/jmx-console.war/
                    16:30:16,000 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

                    --- Incompletely deployed packages ---
                    org.jboss.deployment.DeploymentInfo@4c050b2b { url=file:/C:/jboss-4.0.4/jboss-4.
                    0.4.GA/server/default/deploy/day05_Signon.jar }
                    deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
                    status: null
                    state: FAILED
                    watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.
                    jar
                    altDD: null
                    lastDeployed: 1153524614968
                    lastModified: 1153524614937
                    mbeans:


                    16:30:16,312 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
                    -8080
                    16:30:16,546 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                    16:30:16,671 INFO [JkMain] Jk running ID=0 time=0/171 config=null
                    16:30:16,687 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos
                    s_4_0_4_GA date=200605151000)] Started in 49s:266ms

                    • 7. Re: ejb deployment in jboss4
                      visolvejboss

                      Hello,

                      <?xml version="1.0" encoding = UTF-8" ?>


                      It seems, you have missed the quotation mark (encoding = "UTF-8") in the jboss.xml file.



                      • 8. Re: ejb deployment in jboss4
                        seemap

                        Thanks my jboss.xml error has solved . Now I got ejb-jar.xml error . As I said I have copied this example from book those are using old version, I think that's why I got this error. The error is


                        C:\jboss-4.0.4\jboss-4.0.4.GA\bin>set JAVA_HOME = c:\j2sdk1.4.2_10
                        ===============================================================================
                        .
                        JBoss Bootstrap Environment
                        .
                        JBOSS_HOME: C:\jboss-4.0.4\jboss-4.0.4.GA\bin\\..
                        .
                        JAVA: C:\j2sdk1.4.2_10\bin\java
                        .
                        JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcIn
                        terval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
                        .
                        CLASSPATH: C:\j2sdk1.4.2_10\lib\tools.jar;C:\jboss-4.0.4\jboss-4.0.4.GA\bin\\r
                        un.jar
                        .
                        ===============================================================================
                        .
                        09:40:33,968 INFO [Server] Starting JBoss (MX MicroKernel)...
                        09:40:33,968 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBo
                        ss_4_0_4_GA date=200605151000)
                        09:40:33,984 INFO [Server] Home Dir: C:\jboss-4.0.4\jboss-4.0.4.GA
                        09:40:33,984 INFO [Server] Home URL: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/
                        09:40:33,984 INFO [Server] Patch URL: null
                        09:40:33,984 INFO [Server] Server Name: default
                        09:40:33,984 INFO [Server] Server Home Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\serve
                        r\default
                        09:40:33,984 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4/jboss-4.0.4.GA
                        /server/default/
                        09:40:33,984 INFO [Server] Server Log Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\server
                        \default\log
                        09:40:33,984 INFO [Server] Server Temp Dir: C:\jboss-4.0.4\jboss-4.0.4.GA\serve
                        r\default\tmp
                        09:40:34,000 INFO [Server] Root Deployment Filename: jboss-service.xml
                        09:40:34,937 INFO [ServerInfo] Java version: 1.4.2_10,Sun Microsystems Inc.
                        09:40:34,937 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_10-b03
                        ,Sun Microsystems Inc.
                        09:40:34,937 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                        09:40:36,265 INFO [Server] Core system initialized
                        09:40:42,031 INFO [WebService] Using RMI server codebase: http://xyz-ilsy4a436z
                        f:8083/
                        09:40:42,078 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
                        ce:log4j.xml
                        09:40:42,828 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.
                        0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jbos
                        s.net.sockets.DefaultSocketFactory
                        09:40:52,015 INFO [Embedded] Catalina naming disabled
                        09:40:52,156 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                        the classpath. Will load the default rule set.
                        09:40:52,171 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                        the classpath. Will load the default rule set.
                        09:40:52,953 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0
                        .0.0-8080
                        09:40:52,953 INFO [Catalina] Initialization processed in 782 ms
                        09:40:52,953 INFO [StandardService] Starting service jboss.web
                        09:40:52,968 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.1
                        7
                        09:40:53,078 INFO [StandardHost] XML validation disabled
                        09:40:53,156 INFO [Catalina] Server startup in 203 ms
                        09:40:53,453 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
                        http-invoker.sar/invoker.war/
                        09:40:54,265 INFO [WebappLoader] Dual registration of jndi stream handler: fact
                        ory already defined
                        09:40:55,718 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbosswe
                        b-tomcat55.sar/ROOT.war/
                        09:40:57,453 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/dep
                        loy/tmp54952jbossws-exp.war/
                        09:40:57,984 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDi
                        spatcher
                        09:40:58,453 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../
                        deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
                        09:41:02,906 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
                        loy/management/console-mgr.sar/web-console.war/
                        09:41:05,140 INFO [MailService] Mail Service bound to java:/Mail
                        09:41:05,656 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/jboss-ha-local-jdbc.rar
                        09:41:05,812 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/jboss-ha-xa-jdbc.rar
                        09:41:05,968 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/jboss-local-jdbc.rar
                        09:41:06,109 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/jboss-xa-jdbc.rar
                        09:41:06,312 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/jms/jms-ra.rar
                        09:41:06,468 INFO [RARDeployment] Required license terms exist, view META-INF/r
                        a.xml in .../deploy/mail-ra.rar
                        09:41:08,515 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                        oss.jca:name=DefaultDS,service=DataSourceBinding' to JNDI name 'java:DefaultDS'
                        09:41:09,156 INFO [A] Bound to JNDI name: queue/A
                        09:41:09,156 INFO [B] Bound to JNDI name: queue/B
                        09:41:09,156 INFO [C] Bound to JNDI name: queue/C
                        09:41:09,171 INFO [D] Bound to JNDI name: queue/D
                        09:41:09,171 INFO [ex] Bound to JNDI name: queue/ex
                        09:41:09,218 INFO [testTopic] Bound to JNDI name: topic/testTopic
                        09:41:09,234 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                        09:41:09,234 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

                        09:41:09,250 INFO [testQueue] Bound to JNDI name: queue/testQueue
                        09:41:09,406 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.
                        0.0:8093
                        09:41:09,500 INFO [DLQ] Bound to JNDI name: queue/DLQ
                        09:41:09,890 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
                        oss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
                        09:41:09,984 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.
                        0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.jar
                        org.jboss.deployment.DeploymentException: Unknown PUBLIC id in ejb-jar.xml: -//S
                        un Microsystems, Inc.//DTD Enterprise Javabeans 2.0//EN
                        at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMet
                        aData.java:365)
                        at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:166)
                        at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
                        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:324)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                        or.java:133)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                        BeanOperationInterceptor.java:142)
                        at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
                        .java:97)
                        at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
                        rServiceMBeanSupport.java:238)
                        at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
                        :99)
                        at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
                        create(SubDeployerInterceptorSupport.java:180)
                        at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
                        ptor.java:91)
                        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:659)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                        at $Proxy26.create(Unknown Source)
                        at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                        at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                        sorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                        or.java:133)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                        BeanOperationInterceptor.java:142)
                        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:659)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                        at $Proxy8.deploy(Unknown Source)
                        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                        tScanner.java:421)
                        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                        canner.java:634)
                        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                        doScan(AbstractDeploymentScanner.java:263)
                        at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                        bstractDeploymentScanner.java:336)
                        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
                        upport.java:289)
                        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
                        eanSupport.java:245)
                        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                        sorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                        java:264)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                        ler.java:978)
                        at $Proxy0.start(Unknown Source)
                        at org.jboss.system.ServiceController.start(ServiceController.java:417)
                        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                        sorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                        java:264)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                        at $Proxy4.start(Unknown Source)
                        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
                        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:324)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                        or.java:133)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                        BeanOperationInterceptor.java:142)
                        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:659)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                        at $Proxy5.deploy(Unknown Source)
                        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                        at org.jboss.Main.boot(Main.java:200)
                        at org.jboss.Main$1.run(Main.java:464)
                        at java.lang.Thread.run(Thread.java:534)
                        09:41:10,187 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
                        loy/jmx-console.war/
                        09:41:10,796 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

                        --- Incompletely deployed packages ---
                        org.jboss.deployment.DeploymentInfo@4c050b2b { url=file:/C:/jboss-4.0.4/jboss-4.
                        0.4.GA/server/default/deploy/day05_Signon.jar }
                        deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
                        status: Deployment FAILED reason: Unknown PUBLIC id in ejb-jar.xml: -//Sun Mic
                        rosystems, Inc.//DTD Enterprise Javabeans 2.0//EN
                        state: FAILED
                        watch: file:/C:/jboss-4.0.4/jboss-4.0.4.GA/server/default/deploy/day05_Signon.
                        jar
                        altDD: null
                        lastDeployed: 1153586469937
                        lastModified: 1153586469906
                        mbeans:


                        09:41:11,093 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
                        -8080
                        09:41:11,343 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                        09:41:11,468 INFO [JkMain] Jk running ID=0 time=0/172 config=null
                        09:41:11,484 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos
                        s_4_0_4_GA date=200605151000)] Started in 37s:484ms


                        Can u suggest me what is valid public id in ejb-jar.xml file ?

                        • 9. Re: ejb deployment in jboss4
                          peterj

                          In ejb-jar.xml, replace the lines

                          <!DOCTYPE ejb-jar
                           PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise Javabeans 2.0//EN"
                           "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
                          <ejb-jar>


                          with

                          <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                           http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
                          


                          • 10. Re: ejb deployment in jboss4
                            seemap

                            Thanks alot I got it