16:35:48,011 ERROR [OrganizationUnit] Error checking if entity exists
java.sql.SQLSyntaxErrorException: ORA-01722: número inválido
16:35:48,015 ERROR [EJBExceptionHandler] Could not create an instance of OrganizationUnit! OrganizationUnit ‘MarcTeste’ will not be persisted!
br.com.TemplatesManagerException: Could not create an instance of OrganizationUnit! OrganizationUnit ‘MarcTeste’ will not be persisted!
CODES:
EJB-JAR.XML
<description><![CDATA[Business object persistence Bean for OrganizationUnit]]></description> <display-name>OrganizationUnit CMP Bean</display-name> <ejb-name>OrganizationUnit</ejb-name> <local-home>interfaces.OrganizationUnitLocalHome</local-home> <local>interfaces.OrganizationUnitLocal</local> <ejb-class>core.template.cmp.OrganizationUnitBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.lang.String</prim-key-class> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version> <abstract-schema-name>OrganizationUnitSchema</abstract-schema-name> <cmp-field > <description><![CDATA[Obtém o código de <i>hash</i> representando o identificador do campo de formatação.]]></description> <field-name>id</field-name> </cmp-field> <cmp-field > <description><![CDATA[Obtém a descrição do campo de formatação.]]></description> <field-name>descricaoOu</field-name> </cmp-field> <cmp-field > <description><![CDATA[Obtém o código de <i>hash</i> representando o identificador do campo de formatação.]]></description> <field-name>crtId</field-name> </cmp-field> <cmp-field > <description><![CDATA[Obtém o código de <i>hash</i> representando o identificador do campo de formatação.]]></description> <field-name>ordemOu</field-name> </cmp-field> <primkey-field>id</primkey-field> <query> <query-method> <method-name>findAll</method-name> <method-params> </method-params> </query-method> <ejb-ql><![CDATA[SELECT OBJECT(o) FROM OrganizationUnitSchema o]]></ejb-ql> </query> <query> <query-method> <method-name>findByDescription</method-name> <method-params> <method-param>java.lang.String</method-param> </method-params> </query-method> <ejb-ql><![CDATA[SELECT OBJECT(o) FROM OrganizationUnitSchema o WHERE o.descricaoOu = ?1]]></ejb-ql> </query>package br.com.core.template.cmp;
import java.math.BigDecimal; import java.rmi.RemoteException; import java.util.Collection;import javax.ejb.EJBException; import javax.ejb.EntityBean; import javax.ejb.EntityContext; import javax.ejb.RemoveException;import br.com.support.IdGenerator;
public abstract class OrganizationUnitBean implements EntityBean {
public void setEntityContext(EntityContext ctx) throws EJBException, RemoteException { } public void unsetEntityContext() throws EJBException, RemoteException { } public void ejbRemove() throws RemoveException, EJBException, RemoteException { } public void ejbActivate() throws EJBException, RemoteException { } public void ejbPassivate() throws EJBException, RemoteException { } public void ejbLoad() throws EJBException, RemoteException { } public void ejbStore() throws EJBException, RemoteException { } public String ejbCreate(String id, String crtId, String descricaoOu, BigDecimal ordem) throws javax.ejb.CreateException { id = IdGenerator.generateGUID( this ); this.setId(id); this.setCrtId( crtId ); this.setDescricaoOu( descricaoOu ); this.setOrdemOu( ordem ); return id; } public void ejbPostCreate(String id, String crtId, String descricaoOu, BigDecimal ordem) throws javax.ejb.CreateException { } public abstract String getId(); public abstract void setId(String id); public abstract String getDescricaoOu(); public abstract void setDescricaoOu(String value); public abstract String getCrtId(); public abstract void setCrtId(String value); public abstract BigDecimal getOrdemOu(); public abstract void setOrdemOu(BigDecimal value);}