4 Replies Latest reply on May 15, 2003 7:31 AM by substring

    Invalid encoding name

    substring Newbie

      Hello All,

      I have successfully compiled my HelloWorld EJB program with JBoss3.2.1_Tomcat4.1.24 bundle. However, when I run it on my browser, the call method does not work, but there is no error message on the browser. I looked at the messages displayed in my JBoss console, I saw the followings:

      //scripts begin----------------------------------
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190) + nested throwable:org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".

      14:18:35,804 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/HelloClient.war
      14:30:07,124 INFO [Engine] action: Processing a GET for /getEJB
      14:30:07,155 INFO [Engine] action: Setting locale 'en_US'
      14:30:07,155 INFO [Engine] action: Looking for Action instance for class com.masslight.actions.GetBeanAction
      14:30:07,155 INFO [Engine] action: Double checking for Action instance already there
      14:30:07,155 INFO [Engine] action: Creating new Action instance
      14:30:07,171 INFO [STDOUT] Got context
      14:30:07,186 INFO [STDOUT] javax.naming.NameNotFoundException: Hello not bound
      14:30:07,186 INFO [STDOUT] java.lang.NullPointerException
      14:30:07,671 INFO [Engine] Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/app.tld: (line 13, col 10): The content of element type "taglib" is incomplete, it must match "(tlibversion,jspversion?,shortname,uri?,info?,tag+)".
      //scripts end----------------------------------

      What does it mean?

      Thank you very much.

        • 1. Re: Invalid encoding name
          Adrian Brock Master

          The version of xerces included in 3.2.1
          doesn't like
          <?xml version="1.0" encoding="Cp1252"?>

          Change it to UTF-8


          • 2. Re: Invalid encoding name
            substring Newbie

            Thanks for the reply.

            But I am pretty new to this and I don't understand. What is xerces? Is it a file in the JBoss installation? I did a search for xerces and came up with nothing.

            Please explain. Thank you very much.

            • 3. Re: Invalid encoding name
              Jon Barnett Master

              Xerces is the XML parser that pulls apart the XML files in deployment descriptors read by JBoss. The parser comes from the Apache XML project at http://xml.apache.org. Anyway, Xerces doesn't like your XML because of the character encoding you've chosen. I think the Xerces file is called XercesImpl.jar or something like that.

              • 4. Re: Invalid encoding name
                substring Newbie

                I gone thru all the xml files in my project folder, and I found a ejb-jar.xml in the META-INF folder that has the encoding entry. As suggested by previous poster, I changed it to:
                <?xml version="1.0" encoding="UTF-8"?>

                I restarted JBoss and run "ant all" again. Now I got different error messages:
                //messages start------------------------------------
                08:02:29,161 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@416616b2{ url=file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/HelloEJB.jar, deployedLastModified=0 }org.jboss.deployment.DeploymentException: The processing instruction target matching "[xX][mM][lL]" is not allowed.; - nested throwable: (org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.)

                08:02:31,676 ERROR [Digester] Parse Error at line 13 column 10: The content of element type "taglib" is incomplete, it must match "(tlibversion,jspversion?,shortname,uri?,info?,tag+)".org.xml.sax.SAXParseException: The content of element type "taglib" is incomplete, it must match "(tlibversion,jspversion?,shortname,uri?,info?,tag+)".
                //messages end------------------------------------

                What does that mean? The 2nd error message even point out the line of code where the error is, but where can I find that line of code? It seems most of these definition files are zipped up as jar files.

                Also, how can I check the status of the beans from the JBoss JMX Agent View?

                Any help will be very much appreciated.