1 Reply Latest reply on Apr 28, 2002 10:19 PM by Emerson Cargnin

    Error when deploying

    Emerson Cargnin Newbie

      I'm getting errors when deploying to jboss an xdoclet app :

      here goes the log message and ejb-jar.xml:

      2002-04-28 22:38:16,515 ERROR [org.jboss.metadata.XmlFileLoader] Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).:-1:1
      org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).
      at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
      at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
      at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
      at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1009)
      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:486)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
      at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:260)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:229)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:148)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:324)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:626)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:620)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:506)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:470)
      at sun.reflect.GeneratedMethodAccessor11.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:492)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:350)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:530)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:410)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      2002-04-28 22:38:16,625 ERROR [org.jboss.ejb.EJBDeployer] Problem loading metaData
      org.jboss.deployment.DeploymentException: Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).; - nested throwable is: org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).
      org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (line number may be too low).
      at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)



      ejb-jar.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >

      No Description.
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <!-- Session Beans -->

      <![CDATA[Session Facade controlador das funções relativas ao cadastro]]>

      <ejb-name>CadastroFacadeEJB</ejb-name>

      br.com.sicredi.cadastro.ambos.ejbinterface.CadastroFacadeHome
      br.com.sicredi.cadastro.ambos.ejbinterface.CadastroFacade
      <ejb-class>br.com.sicredi.cadastro.servidor.ejb.CadastroFacadeEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>




      <![CDATA[Session Facade controlador das funções relativas à cobrança]]>

      <ejb-name>CobrancaFacadeEJB</ejb-name>

      br.com.sicredi.cobranca.ambos.ejbinterface.CobrancaFacadeHome
      br.com.sicredi.cobranca.ambos.ejbinterface.CobrancaFacade
      <ejb-class>br.com.sicredi.cobranca.servidor.ejb.CobrancaFacadeEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>



      <!--
      To add session beans that you have deployment descriptor info for, add
      a file to your merge directory called session-beans.xml that contains
      the markup for those beans.
      -->

      <!-- Entity Beans -->

      <![CDATA[No Description.]]>

      <ejb-name>BancoEJB</ejb-name>

      <local-home>br.com.sicredi.cadastro.servidor.ejb.BancoLocalHome</local-home>
      br.com.sicredi.cadastro.servidor.ejb.BancoLocal

      <ejb-class>br.com.sicredi.cadastro.servidor.ejb.BancoEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>BancoEJB</abstract-schema-name>
      <cmp-field >
      <![CDATA[]]>
      <field-name>oid</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna código]]>
      <field-name>codigo</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna nome]]>
      <field-name>nome</field-name>
      </cmp-field>
      <primkey-field>oid</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[select OBJECT(b) from Banco b]]></ejb-ql>





      <![CDATA[No Description.]]>

      <ejb-name>MunicipioEJB</ejb-name>

      <local-home>br.com.sicredi.cadastro.servidor.ejb.MunicipioLocalHome</local-home>
      br.com.sicredi.cadastro.servidor.ejb.MunicipioLocal

      <ejb-class>br.com.sicredi.cadastro.servidor.ejb.MunicipioEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>MunicipioEJB</abstract-schema-name>
      <cmp-field >
      <![CDATA[retorna Oid]]>
      <field-name>oid</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>sigla</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>nome</field-name>
      </cmp-field>
      <primkey-field>oid</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[select OBJECT(b) from Municipio b]]></ejb-ql>





      <![CDATA[No Description.]]>

      <ejb-name>UFEJB</ejb-name>

      <local-home>br.com.sicredi.cadastro.servidor.ejb.UFLocalHome</local-home>
      br.com.sicredi.cadastro.servidor.ejb.UFLocal

      <ejb-class>br.com.sicredi.cadastro.servidor.ejb.UFEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>UFEJB</abstract-schema-name>
      <cmp-field >
      <![CDATA[Method getSigla.]]>
      <field-name>sigla</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Method getNome.]]>
      <field-name>nome</field-name>
      </cmp-field>
      <primkey-field>oid</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[select OBJECT(b) from UF b]]></ejb-ql>





      <![CDATA[No Description.]]>

      <ejb-name>PracaEJB</ejb-name>

      <local-home>br.com.sicredi.cobranca.servidor.ejb.PracaLocalHome</local-home>
      br.com.sicredi.cobranca.servidor.ejb.PracaLocal

      <ejb-class>br.com.sicredi.cobranca.servidor.ejb.PracaEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>PracaEJB</abstract-schema-name>
      <cmp-field >
      <![CDATA[retorna oid]]>
      <field-name>oid</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna situação]]>
      <field-name>situacao</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna Endereço]]>
      <field-name>endereco</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna CEP]]>
      <field-name>cepInicial</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[retorna CEP Final]]>
      <field-name>cepFinal</field-name>
      </cmp-field>
      <primkey-field>oid</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[select OBJECT(b) from Praca b]]></ejb-ql>


      <query-method>
      <method-name>findByFilter</method-name>
      <method-params>
      <method-param>java.lang.Long</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[select object(p) from Praca p where p.municipio.uf.oid = ?1]]></ejb-ql>




      <!--
      To add entity beans that you have deployment descriptor info for, add
      a file to your merge directory called entity-beans.xml that contains
      the markup for those beans.
      -->

      <!-- Message Driven Beans -->
      <!--
      To add message driven beans that you have deployment descriptor info for, add
      a file to your merge directory called message-driven-beans.xml that contains
      the <message-driven></message-driven> markup for those beans.
      -->

      </enterprise-beans>

      <!-- Relationships -->

      <ejb-relation >
      <ejb-relation-name>municipio-praca</ejb-relation-name>
      <!-- bidirectional -->
      <ejb-relationship-role >
      <ejb-relationship-role-name>MunicipioEJB</ejb-relationship-role-name>
      One
      <relationship-role-source >
      <ejb-name>MunicipioEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>pracas</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role >
      <ejb-relationship-role-name>PracaEJB</ejb-relationship-role-name>
      Many
      <relationship-role-source >
      <ejb-name>PracaEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>municipio</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      </ejb-relation>
      <ejb-relation >
      <ejb-relation-name>banco-pracas</ejb-relation-name>
      <!-- bidirectional -->
      <ejb-relationship-role >
      <ejb-relationship-role-name>BancoEJB</ejb-relationship-role-name>
      One
      <relationship-role-source >
      <ejb-name>BancoEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>pracas</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role >
      <ejb-relationship-role-name>PracaEJB</ejb-relationship-role-name>
      Many
      <relationship-role-source >
      <ejb-name>PracaEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>banco</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      </ejb-relation>
      <ejb-relation >
      <ejb-relation-name>municipio-uf</ejb-relation-name>
      <!-- bidirectional -->
      <ejb-relationship-role >
      <ejb-relationship-role-name>UFEJB</ejb-relationship-role-name>
      One
      <relationship-role-source >
      <ejb-name>UFEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>municipios</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role >
      <ejb-relationship-role-name>MunicipioEJB</ejb-relationship-role-name>
      Many
      <relationship-role-source >
      <ejb-name>MunicipioEJB</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>uF</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      </ejb-relation>


      <!-- Assembly Descriptor -->
      <assembly-descriptor >

      <!-- finder permissions -->

      <method-permission >
      description not supported yet by ejbdoclet


      <ejb-name>BancoEJB</ejb-name>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>

      </method-permission>

      <!-- finder permissions -->

      <!-- finder permissions -->

      <method-permission >
      description not supported yet by ejbdoclet


      <ejb-name>MunicipioEJB</ejb-name>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>

      </method-permission>

      <!-- finder permissions -->

      <method-permission >
      description not supported yet by ejbdoclet


      <ejb-name>UFEJB</ejb-name>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>

      </method-permission>

      <!-- finder permissions -->

      <!-- finder permissions -->

      <method-permission >
      description not supported yet by ejbdoclet


      <ejb-name>PracaEJB</ejb-name>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>

      </method-permission>

      <method-permission >
      description not supported yet by ejbdoclet


      <ejb-name>PracaEJB</ejb-name>
      <method-name>findByFilter</method-name>
      <method-params>
      <method-param>java.lang.Long</method-param>
      </method-params>

      </method-permission>

      <!-- transactions -->

      <!-- finder transactions -->
      </assembly-descriptor>

      </ejb-jar>