4 Replies Latest reply on Dec 18, 2003 3:14 AM by Joshua Jackson

    Deployment problems

    Jboss JBoss Newbie

      hi all,

      i am trying to deploy a simple HelloEJB.jar file containing
      Hello.class, HelloHome.class, HelloBean.class and a ejb-jar.xml file.

      i am using Jboss3.2.0

      i started the server using the command
      C:\jboss-3.2.0\bin\run -c all

      i deployed the file to Jboss by copying the HelloEJB.jar file to
      C:\jboss-3.2.0\server\all\deploy

      Could anybody out there tell me why i get the following error:

      18:54:32,302 INFO [EJBDeployer] looking for nested deployments in : file:/C:/jboss-3.2.0/server/all
      /deploy/HelloEJB.jar
      18:54:32,317 ERROR [XmlFileLoader] Invalid encoding name "Cp1252".:40:1
      org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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(AbstractDeployme
      ntScanner.java:190)
      18:54:32,317 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar
      org.jboss.deployment.DeploymentException: Invalid encoding name "Cp1252".; - nested throwable: (org.
      xml.sax.SAXParseException: Invalid encoding name "Cp1252".)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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)
      Caused by: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      ... 18 more
      18:54:32,317 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeployme
      ntScanner$DeployedURL@79924716{ url=file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar, deployedLas
      tModified=1071667415492 }
      org.jboss.deployment.DeploymentException: Invalid encoding name "Cp1252".; - nested throwable: (org.
      xml.sax.SAXParseException: Invalid encoding name "Cp1252".)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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)
      Caused by: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      ... 18 more
      18:56:27,718 INFO [MainDeployer] Undeploying file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar
      18:56:27,718 WARN [ServiceController] Ignoring request to stop nonexistent service: null
      18:56:27,718 WARN [ServiceController] Ignoring request to destroy nonexistent service: null
      18:56:27,718 WARN [ServiceController] Ignoring request to remove nonexistent service: null
      18:56:27,733 WARN [DeploymentInfo] Could not delete directory file:/C:/jboss-3.2.0/server/all/tmp/d
      eploy/server/all/deploy/HelloEJB.jar/55.HelloEJB.jar restart will delete it
      18:56:27,733 INFO [MainDeployer] Undeployed file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar
      18:56:27,733 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.0/server/all/de
      ploy/HelloEJB.jar
      18:56:27,764 INFO [EJBDeployer] looking for nested deployments in : file:/C:/jboss-3.2.0/server/all
      /deploy/HelloEJB.jar
      18:56:27,780 ERROR [XmlFileLoader] Invalid encoding name "Cp1252".:40:1
      org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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)
      18:56:27,796 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar
      org.jboss.deployment.DeploymentException: Invalid encoding name "Cp1252".; - nested throwable: (org.
      xml.sax.SAXParseException: Invalid encoding name "Cp1252".)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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)
      Caused by: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      ... 18 more
      18:56:27,796 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeployme
      ntScanner$DeployedURL@79924716{ url=file:/C:/jboss-3.2.0/server/all/deploy/HelloEJB.jar, deployedLas
      tModified=1071667468692 }
      org.jboss.deployment.DeploymentException: Invalid encoding name "Cp1252".; - nested throwable: (org.
      xml.sax.SAXParseException: Invalid encoding name "Cp1252".)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:217)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:136)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:438)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor26.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:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:407)
      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)
      Caused by: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
      at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:248)
      ... 18 more


      thanks and regards
      kalpana

        • 1. Re: Deployment problems
          stanimir Newbie

          It seems like an error in your ejb-jar.xml file.
          Look at this file.
          I suggest you although no mandatory to create a jboss.xml file.
          This enables you to specify a JNDI name, that you choose.

          Cheers
          Stan.

          • 2. Re: Deployment problems
            Raja Master

            Are you using some kind of a wizard to create xmls? your xmls have the beginning tag something like

            <?xml version="1.0" encoding="cp1252"?>
            ....

            Remove the encoding attribute from the XML and redeploy it.

            -Raj

            • 3. Re: Deployment problems
              Adrian Brock Master

              Or change it to UTF-8

              Regards,
              Adrian

              • 4. Re: Deployment problems
                Joshua Jackson Master

                I am using JBoss 3.2.3 and I get one of this following error message:
                org.jboss.deployment.DeploymentException: ejb-jar.xml must define valid DOCTYPE!

                What must I add in ejb-jar.xml? In order to get this bean deployed and running?
                This is how my ejb-jar.xml looks like:

                <?xml version="1.0" encoding="UTF-8"?>
                <ejb-jar>
                Enterprise Java Lab
                <display-name>Enterprise Java Lab</display-name>
                <enterprise-beans>

                <ejb-name>SalamKeadilan</ejb-name>
                SalamKeadilanHome
                SalamKeadilan
                <ejb-class>SalamKeadilanBean</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Bean</transaction-type>

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