0 Replies Latest reply on Oct 5, 2001 12:47 PM by maruthi_kuchi

    Jboss Example HelloListener is not deployed.

    maruthi_kuchi Newbie

      I have copied HelloListener example but it is not deployed .It complains a serious error ClassFormatError:Bad magic number.
      Here i am giving The out put and ejb-jar and jboss-jar deployment discriptors.
      I am using jboss-2.2.2 version

      Please help me out......

      [Container factory] Deploying:file:/C:/JBoss_dist/jboss/tmp/deploy/Default/New1.
      jar
      [Verifier] Verifying file:/C:/JBoss_dist/jboss/tmp/deploy/Default/New1.jar/ejb10
      17.jar
      [Container factory] Deploying HelloWorkerBean
      [Container factory] Deploying HelloListener
      [Container factory] Serious error in init: java.lang.ClassFormatError: HelloList
      ener (Bad magic number)
      [Container factory] java.lang.Exception: java.lang.ClassFormatError: HelloListen
      er (Bad magic number)
      [Container factory] at org.jboss.ejb.MessageDrivenContainer.init(MessageDriv
      enContainer.java:156)
      [Container factory] at org.jboss.ejb.Application.init(Application.java:183)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:337)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:275)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startApplication(J2
      eeDeployer.java:415)
      [Container factory] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer
      .java:178)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:3
      58)
      [Container factory] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)

      [Container factory] at java.lang.Thread.run(Thread.java:484)
      [Container factory] Could not stop JMSContainerInvoker consumer:java.lang.NullPo
      interException
      [J2EE Deployer Default] Starting New1.jar failed!
      [Auto deploy] org.jboss.ejb.DeploymentException: Could not deploy file:/C:/JBoss
      _dist/jboss/tmp/deploy/Default/New1.jar, Cause:java.lang.Exception: java.lang.Cl
      assFormatError: HelloListener (Bad magic number)
      [Auto deploy] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:3
      65)
      [Auto deploy] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:2
      75)
      [Auto deploy] at java.lang.reflect.Method.invoke(Native Method)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Auto deploy] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:415)
      [Auto deploy] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:17
      8)
      [Auto deploy] at java.lang.reflect.Method.invoke(Native Method)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Auto deploy] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
      [Auto deploy] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)
      [Auto deploy] at java.lang.Thread.run(Thread.java:484)
      [J2EE Deployer Default] Module New1.jar is not running
      [J2EE Deployer Default] Destroying application New1.jar
      [Auto deploy] Deployment failed:file:/C:/JBoss_dist/jboss/deploy/New1.jar
      [Auto deploy] org.jboss.deployment.J2eeDeploymentException: Error while starting
      New1.jar: Could not deploy file:/C:/JBoss_dist/jboss/tmp/deploy/Default/New1.ja
      r
      [Auto deploy] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:442)
      [Auto deploy] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:17
      8)
      [Auto deploy] at java.lang.reflect.Method.invoke(Native Method)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Auto deploy] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
      [Auto deploy] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)
      [Auto deploy] at java.lang.Thread.run(Thread.java:484)



      ejb-jar.xml
      <?xml version="1.0"?>
      <!DOCTYPE ejb-jar>
      <ejb-jar>
      <enterprise-beans>
      <message-driven>
      <ejb-name>HelloListener</ejb-name>
      <ejb-class>HelloListener</ejb-class>
      <message-selector></message-selector>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
      The Workers home
      <ejb-ref-name>ejb/worker</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <ejb-link>HelloWorkerBean</ejb-link>
      HelloWorkerHome
      interfaces.HelloWorker
      </ejb-ref>
      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      <subscription-durability>NonDurable</subscription-durability>
      </message-driven-destination>
      </message-driven>

      Worker bean
      <display-name>HelloWorkerBean</display-name>
      <ejb-name>HelloWorkerBean</ejb-name>
      HelloWorkerHome
      HelloWorker
      <ejb-class>HelloWorkerBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>HelloListener</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>HelloWorkerBean</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>

      jboss.xml

      <?xml version="1.0"?>

      <enterprise-beans>
      <message-driven>
      <ejb-name>HelloListener</ejb-name>
      <configuration-name>Standard Message Driven

      Bean</configuration-name>


      <destination-jndi-name>topic/testTopic</destination-jndi-name>
      </message-driven>
      false
      </enterprise-beans>


      You can contact me at mskuchi@uncc.edu