1 Reply Latest reply on Oct 6, 2003 8:33 PM by andy999

    ejb-local-ref problem

    andy999 Newbie

      Hi

      When I'm deploying an application with a web component and an ejb component, I am getting an exception on deployment.

      11:33:09,483 WARN [jbossweb] WARNING: ERROR@file:/private/tmp/Jetty_0_0_0_0_8080__trafficlite/webapp/WEB-INF/web.xml line:20 col:24 : org.xml.sax.SAXParseException: Element type "ejb-local-ref" must be declared.
      11:33:09,487 WARN [jbossweb] WARNING: ERROR@file:/private/tmp/Jetty_0_0_0_0_8080__trafficlite/webapp/WEB-INF/web.xml line:25 col:15 : org.xml.sax.SAXParseException: Element type "local-home" must be declared.
      11:33:09,490 WARN [jbossweb] WARNING: ERROR@file:/private/tmp/Jetty_0_0_0_0_8080__trafficlite/webapp/WEB-INF/web.xml line:28 col:10 : org.xml.sax.SAXParseException: Element type "local" must be declared.
      11:33:09,493 WARN [jbossweb] WARNING: ERROR@file:/private/tmp/Jetty_0_0_0_0_8080__trafficlite/webapp/WEB-INF/web.xml line:32 col:11 : org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
      11:33:09,498 WARN [jbossweb] WARNING: Configuration error on jar:file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/35.trafficlite.ear-contents/trafficlite.war!/
      org.xml.sax.SAXParseException: Element type "ejb-local-ref" must be declared.
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
      at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:2874)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:792)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:752)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
      at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)
      at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)
      at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
      at org.mortbay.xml.XmlParser.parse(XmlParser.java:125)
      at org.mortbay.xml.XmlParser.parse(XmlParser.java:140)
      at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:387)
      at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
      at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
      at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
      at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor27.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:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)


      Here is my web.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
      <web-app>
      <display-name>Traffic Lite</display-name>
      Business delgate clients for trafficLite EJB's


      <servlet-name>FlashGatewayServlet</servlet-name>
      <display-name>Flash Remoting MX Servlet</display-name>
      Servlet-based plugin to Flash Remoting
      <servlet-class>flashgateway.controller.GatewayServlet</servlet-class>
      <load-on-startup>10</load-on-startup>


      <servlet-mapping>
      <servlet-name>FlashGatewayServlet</servlet-name>
      <url-pattern>/gateway</url-pattern>
      </servlet-mapping>

      <ejb-local-ref>
      <ejb-ref-name>
      com.generator.ejb.organization.OrganizationLocalHome
      </ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>
      com.generator.ejb.organization.OrganizationLocalHome
      </local-home>

      com.generator.ejb.organization.OrganizationLocal

      <ejb-link>OrganizationBean</ejb-link>
      </ejb-local-ref>
      </web-app>

      Any help would be greatly appreciated

      cheers
      andy