4 Replies Latest reply on Feb 6, 2004 10:30 PM by Juha Lindfors

    Help with deploying a simple jar file.

    avvaris Newbie

      Hi! I am very new to JBoss. I just tried deploying one sample application. Here is my ejb-jar.xml file:
      <?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>
      My First EJB Application
      <display-name>Adder Application </display-name>
      <enterprise-beans>

      <ejb-name>Adder</ejb-name>
      com.srinisoft.ejb.AdderHome
      com.srinisoft.ejb.Adder
      <ejb-class>com.srinisoft.ejb.AdderBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>

      </enterprise-beans>
      </ejb-jar>

      When I deploy my jar file from C:\jboss-3.2.3\server\default\deploy, I get these errors:

      2004-02-03 14:32:40,632 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.3/server/default/deploy/adder.jar
      2004-02-03 14:32:40,712 INFO [org.jboss.ejb.EJBDeployer] nested deployment: file:/C:/jboss-3.2.3/server/default/tmp/deploy/tmp36460adder.jar-contents/com/srinisoft/ejb/adder.jar
      2004-02-03 14:32:42,124 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : Adder
      Section: 22.2
      Warning: The bean provider must specify the fully-qualified name of the enterprise bean's remote interface, if any, in the element.
      Info : Class not found on 'com.srinisoft.ejb.Adder': Unexpected error during load of: com.srinisoft.ejb.Adder, msg=com/srinisoft/ejb/Adder (Bad magic number)

      2004-02-03 14:32:42,194 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : Adder
      Section: 7.10.1
      Warning: The session bean must implement either a remote home and remote, or a local home and a local interface.

      2004-02-03 14:32:42,244 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/jboss-3.2.3/server/default/deploy/adder.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

      Just to check I unjarred the jar file and all the classes are found in com/srinisoft/ejb directory. Help me please!!!!