2 Replies Latest reply on Sep 6, 2002 1:25 AM by Ganesh S

    Failed to load metadata

    Aron Fu Newbie

      I got the following error when I tried to deploy ejb:
      19:46:13,320 ERROR [MainDeployer] could not create deployment: njar:file:/export/home2/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/order.ear/123.order.ear^/order.jar
      org.jboss.deployment.DeploymentException: Failed to load metadata; - nested throwable: (java.lang.NullPointerException)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:331)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      + nested throwable:
      java.lang.NullPointerException
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:157)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:326)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

      My ejb-jar.xml looks like this:

      ejb-jar>
      <display-name>Order Bean</display-name>
      <enterprise-beans>

      Order Bean
      <ejb-name>OrderBean</ejb-name>
      org.jboss.order.interfaces.OrderHome
      org.jboss.order.interfaces.Order
      <ejb-class>org.jboss.order.ejb.OrderBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
      Order bean
      <ejb-ref-name>ejb/OrderHome</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      org.jboss.order.interfaces.OrderHome
      org.jboss.order.interfaces.Order
      </ejb-ref>

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

      And my jboss.xml looks like this:

      <?xml version="1.0"?>

      <enterprise-beans>


      <ejb-name>OrderBean</ejb-name>
      <jndi-name>ejb/OrderHome</jndi-name>
      <ejb-ref>
      <ejb-ref-name>ejb/OrderHome</ejb-ref-name>
      <jndi-name>jnp://gryphon:1099/ejbs/OrderBean</jndi-name>
      </ejb-ref>

      </enterprise-beans>


      What could go wrong here?

      Thanks,

      aron