4 Replies Latest reply on Jan 14, 2010 12:19 AM by rohit.macherla

    Deploying EJB 2.1 on JBoss 5.1

    rohit.macherla

      Hi all,

       

      I am using JBoss 4.2.2.GA and want to migrate to JBoss 5.1. I have some vendor specific EAR files that I have to use (basically they are JAX-WS webservices implemented via stateless session beans). These are quite old and follow the EJB 2.1 specs. When I try to deploy them onto JBoss 5.1, I get the following exception :

       

      22:04:18,258 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/cla/clarity/jboss-5.1.0.GA/server/default/deploy/CustomerManagement.ear/ state=Not Installed mode=Manual requiredState=Parse
      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/cla/clarity/jboss-5.1.0.GA/server/default/deploy/CustomerManagement.ear/CustomerManagement-war.war/
      .

      .

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found st
      arting with element 'local-home'. One of '{"http://java.sun.com/xml/ns/javaee":ejb-link, "http://java.sun.com/xml/ns/javaee":m
      apped-name, "http://java.sun.com/xml/ns/javaee":injection-target}' is expected. @ vfszip:/cla/clarity/jboss-5.1.0.GA/server/de
      fault/deploy/CustomerManagement.ear/CustomerManagement-war.war/WEB-INF/web.xml[27,21]
              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
              at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
              at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)
              at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWi
      thOutput.java:348)
              ... 29 more
      Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'local-home'. One
      of '{"http://java.sun.com/xml/ns/javaee":ejb-link, "http://java.sun.com/xml/ns/javaee":mapped-name, "http://java.sun.com/xml/
      ns/javaee":injection-target}' is expected. @ vfszip:/cla/clarity/jboss-5.1.0.GA/server/default/deploy/CustomerManagemen
      t.ear/CustomerManagement-war.war/WEB-INF/web.xml[27,21]
              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)

       

      Looking at this I am under the impression that they are speaking about EJB3. I haven't still got in touch with EJB3. There are no annotations used in the vendor specific EAR files as they deal with EJB2.1

      Is there any way to migrate to JBoss 5.1 using my EJB2.1 compliant EJB's ?

       

      My App structure :

       

      CustomerManagement.ear

      |

      |--- META-INF

      |               |---application.xml

      |               |---jboss-app.xml

      |               |---Manifest.mf

      |

      |---CustomerManagement-ejb.jar

      |               |

      |               |--ejb-jar.xml

      |               |---jboss.xml

      |               |---Manifest.mf

      |               |---<other class files>

      |

      |---CustomerManagement-war

      |               |

      |               |--- META-INF

      |               |               |

      |               |               |---content.xml

      |               |               |---Manifest.mf

      |               |

      |               |--- WEB-INF

      |               |               |

      |               |               |---jboss-web.xml

      |               |               |---sun-jaxws.xml

      |               |               |---web.xml

      |               |               |

      |               |               |---classes

      |               |               |          |---<other class files>

      X              X              X

       

      Please help.

       

      Cheers

      Rohit M