Problem with @OneToOne relationship in EJB 3.0

Hi,
I'm new to EJB 3.0. If i done any stupid thing please forgive me. Here is my doubt.
I would like to use one-to-one relationship between two entities like USER and ADDRESS.
I just did like this (the below code)to enable the relationship between these two entities.
@Entity
@Table(name="internalUser")
public class InternalUser implements Serializable{
.........//field entries of the User
private Address userAddress;// Field for address entity.
.......//setters and getters
@OneToOne(cascade={CascadeType.ALL})
@JoinColumn(name="id",table="user_address")
public Address getUserAddress() {
return userAddress;
public void setUserAddress(Address userAddress) {
this.userAddress = userAddress;
} and Here is the Address EntityBean
@Table(name="user_address")
@Entity
public class Address implements Serializable{
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
//setters and getters..
}Entire Ejb application is deployed success fully. But when i try to add a User entry along with address, it is not able to save the address entry, but able to save the User entry correctly. And also it is not able to build a relationship with Address table.
Here is my code which i write to save the User
InternalUser user=new InternalUser();
user.setName("Bharat");
user.setSignnum("bhak");
user.setDescription("Patel");
Address address= new Address();
address.setAreaCode("500032");
address.setState("AP");
address.setStreet("Prashanthi Nagar");
user.setUserAddress(address);
remote.saveUser(user); Here remote is SessionBeanInterface
I'm using Postgres as a database.
Please help me in this. What necessary steps need to follow in order to use @OneToOne relationship
Edited by: chanti12345 on Apr 29, 2009 12:09 AM
Edited by: chanti12345 on Apr 29, 2009 12:11 AM

hi i solved this query.
I made few changes in Both the entity classes. Here is the code for the Entites USER and ADDRESS
@Entity
@Table(name="internalUser")
public class InternalUser implements Serializable{
.......//field entries
private Address userAddress;//address entry
......//setters and getters
@OneToOne(cascade={CascadeType.ALL})
public Address getUserAddress() {
     return userAddress;
public void setUserAddress(Address userAddress) {
     this.userAddress = userAddress;
@Table(name="user_address")
@Entity
public class Address implements Serializable{
....//fields and setters and getters
}see the difference in the code . after making this change i'm able to save the User with relation ship with Address. No changes needed in client code.
Thanks a lot to every one.
Edited by: chanti12345 on Apr 29, 2009 2:22 AM

Similar Messages

  • Exists some problem with auto-relationship?

    Hi all,
    I'm getting the following exception when I make deploy.
    [14/May/2003:12:23:28] FINE ( 3132): Field: atributos
    [14/May/2003:12:23:28] FINE ( 3132): Field: coluna br.com.inttegra.infra.bean.tabela.ColunaTabelaLocal
    [14/May/2003:12:23:28] FINE ( 3132): -Methods: getColuna setColuna
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): manySide: false
    [14/May/2003:12:23:28] FINE ( 3132): Field: thisRelationshipFieldWasGeneratedByTheNameMapper67
    [14/May/2003:12:23:28] FINE ( 3132): Field: classe br.com.inttegra.infra.bean.classes.ClassesLocal
    [14/May/2003:12:23:28] FINE ( 3132): -Methods: getClasse setClasse
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): manySide: false
    [14/May/2003:12:23:28] FINE ( 3132): Field: thisRelationshipFieldWasGeneratedByTheNameMapper71
    [14/May/2003:12:23:28] FINE ( 3132): Finder: ejbFindByPrimaryKey
    [14/May/2003:12:23:28] FINE ( 3132): Finder: ejbFindAll
    [14/May/2003:12:23:28] FINER ( 3132): EJBQLC compile query
    Bean: ParseAtributo
    Method: java.util.Collection findAll()
    EJBQL: select object(pa) from ParseAtributoEJB pa
    [14/May/2003:12:23:28] FINER ( 3132): EJBQLC start syntax analysis
    [14/May/2003:12:23:28] FINEST ( 3132): EJBQLC dump tree (AST)
    QUERY [61, (0/0), null]
    from [5, (1/19), null]
    RANGE [62, (0/0), null]
    ParseAtributoEJB [46, (1/24), null]
    pa [46, (1/41), null]
    select [4, (1/1), null]
    object [8, (1/8), null]
    pa [46, (1/15), null]
    WHERE [6, (0/0), null]
    TRUE [10, (0/0), null]
    [14/May/2003:12:23:28] FINER ( 3132): EJBQLC start semantic analysis
    [14/May/2003:12:23:28] FINEST ( 3132): EJBQLC dump tree (typed AST)
    QUERY [61, (0/0), null]
    from [5, (1/19), null]
    RANGE [62, (0/0), null]
    ParseAtributoEJB [68, (1/24), ParseAtributo]
    pa [67, (1/41), ParseAtributo]
    select [4, (1/1), null]
    object [8, (1/8), ParseAtributo]
    pa [66, (1/15), ParseAtributo]
    WHERE [6, (0/0), null]
    TRUE [10, (0/0), boolean]
    [14/May/2003:12:23:28] FINER ( 3132): EJBQLC start code generation
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
    [14/May/2003:12:23:28] FINER ( 3132): EJBQLC result JDOQLElements(candidateClass: br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState, filter: true, result: this, resultType: br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState, isPCResult: true)
    [14/May/2003:12:23:28] FINE ( 3132): Selectors: 0
    [14/May/2003:12:23:28] FINE ( 3132): CreateMethod: br.com.inttegra.infra.bean.parse.ParseAtributoEJBcreate
    [14/May/2003:12:23:28] FINE ( 3132): ejbCreateMethod: ejbCreate
    [14/May/2003:12:23:28] FINE ( 3132): ejbPostCreateMethod: ejbPostCreate
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: unsetEntityContext
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.unsetEntityContext()
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbRemove
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbRemove() throws javax.ejb.RemoveException,javax.ejb.EJBException
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: beforeCompletion
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbLoad
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbLoad() throws javax.ejb.EJBException,java.rmi.RemoteException
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbStore
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbStore() throws javax.ejb.EJBException,java.rmi.RemoteException
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: jdoCleanAllRefs
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Processing method: setEntityContext
    [14/May/2003:12:23:28] FINE ( 3132): Known method: null
    [14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.setEntityContext(javax.ejb.EntityContext)
    [14/May/2003:12:23:28] FINE ( 3132): pkfield: idParseAtributo
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
    [14/May/2003:12:23:28] FINEST ( 3132): TP PCClassGen: generating 'br/com/inttegra/infra/bean/parse/ParseAtributoEJB789766943_JDOState'...
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseEJB_1482881505_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseEJB_1482881505_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
    [14/May/2003:12:23:28] FINEST ( 3132): TP PCClassGen: DONE generating 'br/com/inttegra/infra/bean/parse/ParseAtributoEJB789766943_JDOState'...
    [14/May/2003:12:23:28] FINE ( 3132): gen file in /u03/dds/dds/var/opt/SUNWappserver7/domains/domainCronos/ServerNC/generated/ejb/j2ee-modules/NC
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.identificacao.IdentificacaoEJB_1068400097_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.resposta.RespostaEJB670563865_JDOState
    [14/May/2003:12:23:28] FINE ( 3132): listCmrs identificacoes parse resposta
    [14/May/2003:12:23:28] FINE ( 3132): persistentClass br.com.inttegra.infra.bean.identificacao.IdentificacaoEJB
    [14/May/2003:12:23:28] SEVERE ( 3132): JDOCodeGenerator: Caught Exception in generating CMP:
    javax.ejb.EJBException: CMRFieldInfo not found for field identificacaoPai
    at com.sun.enterprise.deployment.PersistenceDescriptor.getCMRFieldInfoByName(PersistenceDescriptor.java:262)
    at com.iplanet.ias.persistence.internal.model.ejb.util.NameMapper.getRelatedEjbDescriptor(NameMapper.java:368)
    at com.iplanet.ias.persistence.internal.model.ejb.util.NameMapper.getEjbNameForLocalInterface(NameMapper.java:297)
    at com.sun.jdo.spi.persistence.support.ejb.model.util.NameMapper.getPersistenceClassForLocalInterface(NameMapper.java:284)
    at com.sun.jdo.spi.persistence.support.ejb.model.DeploymentDescriptorModel.getFieldType(DeploymentDescriptorModel.java:503)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.shouldBeRelationship(ModelValidator.java:2377)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.isLegalRelationship(ModelValidator.java:2384)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.getFieldsValidationList(ModelValidator.java:325)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.getBasicValidationList(ModelValidator.java:167)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.getFullValidationList(ModelValidator.java:183)
    at com.sun.jdo.api.persistence.model.util.ModelValidator.fullValidationCheck(ModelValidator.java:131)
    at com.sun.jdo.api.persistence.model.Model.validate(Model.java:1592)
    at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.validate(JDOCodeGenerator.java:189)
    at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.generate(JDOCodeGenerator.java:225)
    at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:155)
    at com.iplanet.ias.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:1029)
    at com.iplanet.ias.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:464)
    at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:181)
    at com.iplanet.ias.deployment.backend.EjbModuleDeployer.runEJBC(EjbModuleDeployer.java:246)
    at com.iplanet.ias.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:128)
    at com.iplanet.ias.deployment.backend.ModuleDeployer.doRequest(ModuleDeployer.java:77)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModuleArchiveOrDirectory(ManagedServerInstance.java:890)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModule(ManagedServerInstance.java:841)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
    at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
    at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callInvoke(AdminAPIEntryServlet.java:217)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callMBean(AdminAPIEntryServlet.java:176)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doGet(AdminAPIEntryServlet.java:101)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doPost(AdminAPIEntryServlet.java:83)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.S
    [14/May/2003:12:23:28] WARNING ( 3132): DPL5035:Error while running ejbc
    com.iplanet.ias.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    at com.iplanet.ias.deployment.backend.EJBCompiler.wrapException(EJBCompiler.java:589)
    at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:186)
    at com.iplanet.ias.deployment.backend.EjbModuleDeployer.runEJBC(EjbModuleDeployer.java:246)
    at com.iplanet.ias.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:128)
    at com.iplanet.ias.deployment.backend.ModuleDeployer.doRequest(ModuleDeployer.java:77)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModuleArchiveOrDirectory(ManagedServerInstance.java:890)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModule(ManagedServerInstance.java:841)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
    at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
    at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callInvoke(AdminAPIEntryServlet.java:217)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callMBean(AdminAPIEntryServlet.java:176)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doGet(AdminAPIEntryServlet.java:101)
    at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doPost(AdminAPIEntryServlet.java:83)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    Caused by: com.iplanet.ias.ejb.codegen.CmpCompilerException: Error while processing CMP beans.
    at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:198)
    at com.iplanet.ias.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:1029)
    at com.iplanet.ias.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:464)
    at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:181)
    ... 30 more
    Caused by: javax.ejb.EJBException: CMRFieldInfo not found for field identificacaoPai
    at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.generate(JDOCodeGenerator.java:264)
    at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:155)
    ... 33 more
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: get connection
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create connection
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: opening socket to [192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: server suggested 127.0.0.1:62189
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: using 192.168.200.9:0
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create call context
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: outbound call: [endpoint:[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5](remote),objID:[0:0:0, 2]] : sun.rmi.transport.DGCImpl_Stub[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: write remote call header...
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: getting output stream
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: execute call
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: getting input stream
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.dgc.Lease", codebase = ""
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.dgc.Lease" found via codebase, defined by null
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.dgc.VMID", codebase = ""
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.dgc.VMID" found via codebase, defined by null
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "[B", codebase = "" 
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "[B" found via codebase, defined by null 
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.server.UID", codebase = ""
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
    [14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.server.UID" found via codebase, defined by null
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: free connection (reuse = true)
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: reuse connection
    [14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create reaper
    my ejb-jar:
              <ejb-relation>
                   <ejb-relation-name>Identificacao-Identificacoes</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Identificacao-has-identificacoes</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>Identificacao</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>identificacoes</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>identificacoes-owned-by-Identificacao</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>Identificacao</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>identificacaoPai</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    my sun-cmp-mappgins
                   <cmr-field-mapping>
                        <cmr-field-name>resposta</cmr-field-name>
                        <column-pair>
                             <column-name>IDENTIFICACAO.ID_RESPOSTA</column-name>
                             <column-name>RESPOSTA.ID_RESPOSTA</column-name>
                        </column-pair>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>identificacaoPai</cmr-field-name>
                        <column-pair>
                             <column-name>IDENTIFICACAO.ID_IDENTIFICACAO_PAI</column-name>
                             <column-name>IDENTIFICACAO.ID_IDENTIFICACAO</column-name>
                        </column-pair>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>identificacoes</cmr-field-name>
                        <column-pair>
                             <column-name>IDENTIFICACAO.ID_IDENTIFICACAO</column-name>
                             <column-name>IDENTIFICACAO.ID_IDENTIFICACAO_PAI</column-name>
                        </column-pair>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>parse</cmr-field-name>
                        <column-pair>
                             <column-name>IDENTIFICACAO.ID_PARSE</column-name>
                             <column-name>PARSE.ID_PARSE</column-name>
                        </column-pair>
                   </cmr-field-mapping>
    somebody already got this exception?

    This question is identical to the thread=19208 and 19209.
    Please do not duplicate the threads.
    Regards,
    Marina

  • Problem with Oracle DB in EJB

    Hi experts,
            I am doing Oracle DB application with EJB. I have written in following connection method in EJB. I am using stateless session bean
      Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@<>:<>:<>", "<>","<>");
    While calling this method in webdynpro controller i got a following exception
    com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.io.NotSerializableException: com.sap.engine.services.dbpool.cci.ConnectionHandle :
    I have added project reference as well as webdynpro references!!!
    I am calling the connection method in controller
              String lookupString ="sap.com/<sampleBean>/<sampleEAR>";
              Object obj = ctx.lookup(lookupString);
              sampleHome ejbHome =(sampleHome ) javax.rmi.PortableRemoteObject.narrow(obj,sampleHome .class);
              sampleHome simpleEjb = ejbHome.connection ();
    The same scenario I successfully done in webdynpro itself.If i execute the above connection method in Webdynpro, it is successfully executed and access the Oracle DB!!
    If i Use EJB i got a above exception? how to resolve this issue? give your solutions!!
    Regards,
    Manivannan P

    Hi experts,
            Problem got resolved once restart the server
    Regards,
    Manivannan P

  • Problems with string literals in ejb-ql's

    I have a couple EJB-QL's that look like:
    <![CDATA[SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r']]>
    which used to work in Orion without a problem but in OC4J I get the following errors:
    com/sun/ejb/ejbql/StringLiteral
    EJB QL statement : 'SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r'
    EJB QL method : public abstract com.mongoosetech.reputation.ejb_entity.AssignedStatus com.mongoosetech.reputation.ejb_enti
    ty.AssignedStatusHome.findByRecipientIDAndStatusIDNotRevoked(java.lang.String,java.lang.String) throws javax.ejb.FinderExcept
    ion,java.rmi.RemoteException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse(EjbQLParser.java:226)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:628)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:270)
    at com.evermind.server.ejb.deployment.EJBPackage.init(EJBPackage.java:1947)
    at com.evermind.server.ServerComponent.init(ServerComponent.java:199)
    at com.evermind.server.ejb.EJBPackageDeployment.getPackage(EJBPackageDeployment.java:645)
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:513)
    at com.evermind.server.Application.postInit(Application.java:429)
    at com.evermind.server.Application.setConfig(Application.java:136)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1479)
    at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1436)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1099)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
    at java.lang.Thread.run(Thread.java:479)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:49)
    Error in application ACME Portal: Error loading package at file:/C:/dev/staging/portalstudio/ee/image/deploy/portal/portal-ej
    b.jar, Failure to initialize EJBQL descriptors: com/sun/ejb/ejbql/StringLiteral
    EJB QL statement : 'SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r'
    EJB QL method : public abstract com.mongoosetech.reputation.ejb_entity.AssignedStatus com.mongoosetech.reputation.ejb_enti
    ty.AssignedStatusHome.findByRecipientIDAndStatusIDNotRevoked(java.lang.String,java.lang.String) throws javax.ejb.FinderExcept
    ion,java.rmi.RemoteException
    Am I doing something wrong here? These QL's work in several other App Servers so I am lost as to why this doesn't work.

    Kevin,
    We are aware of this bug in the developer's preview and will be fixed when next version of OC4J 9.0.3 will be released.
    regards
    Debu Panda
    Oracle

  • Problem with database access in EJB deployment to SJSAS on remote deploy

    Hi,
    I have deployed an Enterprise application containing an EJB3.0 module to a remote sun application server (Edition 9.0_01 (build b02-p01))
    using a mysql ver 5 DB with connector
    mysql-connector-java-5.0.0-beta-bin.
    It is being used by a swing application client deployed as a module of a separate Enterprise application.
    The client can access the session beans but when the EJB tries to create a query with the entity manager the client fails and the following exception appears in the log.
    Timestamp:     
    Aug 20, 2007 09:36:38.910
    Log Level:     
    INFO
    Logger:     
    javax.enterprise.system.container.ejb
    Name-Value Pairs:     
    _ThreadID=21;_ThreadName=p: thread-pool-1; w: 7;
    Record Number:
    2239
    Message ID:
    javax.ejb.EJBTransactionRolledbackException at com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(BaseContainer.java
    Complete Message
    1373)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1290)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:71)
         at $Proxy329.findAll(Unknown Source)
         at test.TestGuyBean.getTheWordGreat(TestGuyBean.java:36)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:67)
         at $Proxy323.getTheWordGreat(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is:
    java.lang.IllegalArgumentException:
    An exception occured while creating a query in EntityManager
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3588)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3436)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
         ... 30 moreThis is a result of a test portion of the application, but similar results occur when the actual application is run.
    The "at test.TestGuyBean.getTheWordGreat(TestGuyBean.java:36)" is
    being invoked by the client and "$Proxy329.findAll(Unknown Source)" is where the query is constructed.
    The code is as follows
    public String getTheWordGreat(String bob){
            String s = "abcdefgh ";
            List<MobileDialingCodes> c =  mobileDialingCodesFacade.findAll();
            for (MobileDialingCodes elem : c) {
                s += elem.getNumber() + " ";
    //        System.out.println("bob");
            return s;
    public ArrayList<MobileDialingCodesHC> getAllDialingCodes(){
            List allCodesEJB = findAll();
            ArrayList<MobileDialingCodesHC> allCodesHC = new OurArrayList();
            for (Object elem : allCodesEJB) {
                allCodesHC.add(convertEJBtoHC((MobileDialingCodes)elem));
            return allCodesHC;
    }The default config for the application is used and the application
    uses the netbeans defaults. Netbeans 5.5. Toplink persistence manager.
    Any suggestions would be appreciated.
    null

    Did you try after restarting the iAS server?

  • Isolation Level problems with DDConverter , wl4.51 (EJB spec 1.0) to wl5.1 (EJB spec 1.1)

    Hi ,
    I was using the DDConvertor supplied with WL51 to convert my old
    DeploymentDescriptor.txt to the new XML format.
    I have noticed that the Isolation Level did not pass to the new format.
    My entity bean is not container managed and the Isolation level is
    READ_COMMITED .
    No weblogic-cmp-rdbms-jar.xml File was generated.
    Attached are the files.
    Could you please tell me where can I specify the Isolation Level if I have
    no rdbms file ?
    thanks
    Amit Sivan
    [DeploymentDescriptor.txt]
    [weblogic-ejb-jar.xml]

    weblogic-ejb-jar.xml
    amit sivan wrote:
    Hi ,
    I was using the DDConvertor supplied with WL51 to convert my old
    DeploymentDescriptor.txt to the new XML format.
    I have noticed that the Isolation Level did not pass to the new format.
    My entity bean is not container managed and the Isolation level is
    READ_COMMITED .
    No weblogic-cmp-rdbms-jar.xml File was generated.
    Attached are the files.
    Could you please tell me where can I specify the Isolation Level if I have
    no rdbms file ?
    thanks
    Amit Sivan
    ; Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.
    (EntityDescriptor
    beanHomeName pay2card.OnlineHomeEntity
    enterpriseBeanClassName pay2card.beans.online.entity.OnlineEntityBean
    homeInterfaceClassName pay2card.beans.online.entity.OnlineEntityHome
    remoteInterfaceClassName pay2card.beans.online.entity.OnlineEntity
    isReentrant false
    (accessControlEntries
    ; DEFAULT [admin manager]
    ); end accessControlEntries
    (controlDescriptors
    (DEFAULT
    isolationLevel TRANSACTION_READ_COMMITTED
    transactionAttribute TX_REQUIRED
    runAsMode CLIENT_IDENTITY
    ; runAsIdentity admin
    ); end DEFAULT
    ); end controlDescriptors
    (environmentProperties
    ; homeClassName
    ; ejbObjectClassName
    maxBeansInFreePool 20
    maxBeansInCache 1000
    idleTimeoutSeconds 60
    ; isModifiedMethodName isModified
    ); end environmentProperties
    ; Entity EJBean-specific properties:
    primaryKeyClassName pay2card.beans.online.entity.OnlinePK
    ; end entity EJBean-specific properties.
    ); end EntityDescriptor
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>pay2card.OnlineHomeEntity</ejb-name>
    <caching-descriptor>
    <max-beans-in-free-pool>20</max-beans-in-free-pool>
    <max-beans-in-cache>1000</max-beans-in-cache>
    <idle-timeout-seconds>60</idle-timeout-seconds>
    </caching-descriptor>
    <persistence-descriptor>
    <delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
    </persistence-descriptor>
    <jndi-name>pay2card.OnlineHomeEntity</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

  • Problem with ejb 3.0 entity beans with manyToMany relationship

    Hello everyone!
    I am using struts 1.2.9 and java ee 5 sdk update 2 for my enterprise application. Besides others i have these entity beans Targetgroup.java and City.java, (i would upload file but i do not know how:)
    with manytomany relationship with join table.
    when user updates Targetgroup, by clicking on web page with checkboxes and textfields, struts dispatch action calls following method stateless bean:
    public void update(String firmId, String targetgroupId, String newGender, String newMinYearsOld, String newMaxYearsOld, String[] newCities) {
    TargetgroupPK pkForUpdate = new TargetgroupPK(targetgroupId, firmId);
    Targetgroup targetgroupForUpdate = find(pkForUpdate);
    targetgroupForUpdate.setGender(newGender);
    targetgroupForUpdate.setMinyearold(Integer.parseIn t(newMinYearsOld));
    targetgroupForUpdate.setMaxyearold(Integer.parseIn t(newMaxYearsOld));
    //pronalazenje gradva za koje je vezana ciljna grupa
    Collection<City> newCitiesCollection = new ArrayList<City>();
    for(int i = 0; i < newCities.length; i++){
    String tmp_city_name = newCities;
    City city_obj = cityFacade.find(tmp_city_name);
    newCitiesCollection.add(city_obj);
    targetgroupForUpdate.setCityidCollection(newCities Collection);
    parameter newCities represents names of cities which user checked on his update page. When the page is showen to him some cities are allready check because they were connected with Targetgruoup when it was created (targetgroup).
    this code throws following exception:
    [#|2007-07-26T12:13:36.993+0200|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_Threa dID=16;_ThreadName=httpWorkerThread-8080-0;_RequestID=f79d9c50-86b0-4b6c-96ab-97956dfb39c1;|StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
    javax.transaction.RollbackException: Transaction marked for rollback.
    at
    .com.sun.enterprise.web.connector.grizzly.WorkerTh read.run(WorkerThread.java:75)
    javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
    at com.sun.ejb.containers.BaseContainer.completeNewTx (BaseContainer.java:3659)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx( BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(Ba seContainer.java:1247)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHan dler.invoke(EJBLocalObjectInvocationHandler.java:1 92)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHan dlerDelegate.invoke(EJBLocalObjectInvocationHandle rDelegate.java:71)
    at $Proxy149.update(Unknown Source)
    at audiotel.sms.actions.backoffice.TargetgroupDispatc hAction.updateOrDelete(TargetgroupDispatchAction.j ava:132)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:270)
    at org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:187)
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
    com.sun.enterprise.web.connector.grizzly.WorkerThr ead.run(WorkerThread.java:75)
    |#]
    exceprion is throwen ONLY when in parameter newCities are city names allready connected to Targetgroup. when NewCities contains names of
    City objects which are not connected to Targetgroup it works fine, but it's of no use for me, because user must be able to add or remove certian cities from relaionship with Targetgroup. I think it's because there are rows in join table that contain primary keys of city and targetgroup which are connected so perisistence manager cann't write them again.
    i thought it was going to figure it out by itself, and only update those rows.
    Does anyone know what is the problem and solution?
    Thanks! (forgive my spelling errors :)

    solved the problem!
    I moved code from sesion bean to struts action as follows:
    CityFacadeLocal cityFacade = lookupCityFacade();
    //prikupljanje novih podataka o ciljnoj grupi
    String newGender = ctf.getGender();
    String newMaxYears = ctf.getMaxyears();
    String newMinYears = ctf.getMinyears();
    String[] newSelectedCities = ctf.getSelectedCities();
    //niz imena gradova se prevodi u kolekcju objekata City
    Collection<City> newCitiesObjCollection = new Vector<City>();
    for(int i = 0; i < newSelectedCities.length; i++){
    String tmpCityName = newSelectedCities;
    City tmpCityObj = cityFacade.find(tmpCityName);
    newCitiesObjCollection.add(tmpCityObj);
    //setovanje novih podataka
    targetgroupForUD.setGender(newGender);
    targetgroupForUD.setMinyearold(Integer.parseInt(newMinYears));
    targetgroupForUD.setMaxyearold(Integer.parseInt(newMaxYears));
    targetgroupForUD.setCityidCollection(newCitiesObjCollection);
    //pozivanje update metdoe u session beany
    targetgroupFacade.edit(targetgroupForUD);
    //korisnik se vraca na stranu sa svim postojecim ciljnim grupama
    forward = mapping.findForward("backend.targetgroups");
    and now it works fine. I guess probelm was same transaction scope for Targetgroup and City entities. Now when they are separated it works.
    Thanks!

  • Problems with EJB Relationships

    Hi,
    I'm having a problems using relationships in EJB. There are two entities: User and Profile. The User entity is a simple entity, with some String fields and two Integer fields (the primary key and the foreign key - coming from Profile). The Profile entity has some String fields and an Integer field (the primary key).
    There is no problem when executing the ejbCreate() method on the Profile entity. Everything goes fine. But, when executing the ejbCreate() on the User entity, the following message appears:
    javax.ejb.CreateException: Could not create entity:java.sql.SQLException: ORA-06550: line 1, column 83:
    PL/SQL: ORA-00957: duplicate column name
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    The relationship between the two entities is like that:
    "UserBean"
    * Returns the profileId
    * @return the profileId
    * @ejb.persistent-field
    * @ejb.persistence
    * column-name="PROFILE_ID"
    * sql-type="NUMBER"
    * @ejb.interface-method
    * @ejb.relation
    * name="profile-user"
    * role-name="user-has-profile"
    * target-ejb="Profile"
    * target-multiple="no"
    * target-role-name="profile-is-in-user"
    * @jboss.relation
    * fk-column="profile_id"
    * related-pk-field="profileId"
    public abstract java.lang.Integer getProfileId();
    * Sets the profileId
    * @param java.lang.Integer the new profileId value
    * @ejb.interface-method
    public abstract void setProfileId(java.lang.Integer profileId);
    "ProfileBean"
    * Returns a Collection of Usuario
    * @return a Collection of Usuario
    * @ejb.interface-method
    * view-type="both"
    * @ejb.relation
    * name="perfil-usuario"
    * role-name="perfil-tem-usuario"
    public abstract java.util.Collection getUsuario();
    public abstract void setUsuario(java.util.Collection usuario);
    I'm using JBOSS 3.2 application server.
    Have anyone seen this??
    Thank you,
    Wilson

    I've already discovered what happened. The column-name attribute in the @ejb.persistence tag should always be in lower-case.

  • Problems with EJB relationship mapping (annotations)

    So, I'm part of a group working on a web-based project management system, and we're having some trouble with the relationship mapping between the entity beans.
    I've been mainly working on a class called WorkPackage. So the mappings I've got:
    Within the WorkPackage class
    (A work package is one "module" of work within a project)
            @Entity
            @Table(name="WorkPackage")
            @IdClass(WorkPackagePK.class)
            public class WorkPackage implements java.io.Serializable
            @Id
            @Column(name="wpID")
            public String getWpID() { return wpID; }
         public void setWpID(String id) { this.wpID = id; }
         @Id
            @Column(name="projID")
            public String getProjId() { return projId; }
         public void setProjId(String projId) { this.projId = projId; }
            @ManyToOne // bidirectional - owner side
         @JoinColumn(name="projID")
         public Project getProject() { return project; }
         public void setProject(Project project) { this.project = project; }      And on the Project side
            @Entity
            @Table(name="Project")
            public class Project implements java.io.Serializable
            @Id
            @Column(name="projID")
            public String getId() { return id; }
         public void setId(String id) { this.id = id; }
           @OneToMany(mappedBy="project") // biderctional - target side
         public Set<WorkPackage> getWorkPackages() { return workPackages; }
         public void setWorkPackages(Set<WorkPackage> workPackages) { this.workPackages = workPackages; } The problem here is that its apparently seeing 'projID' as attempting to be mapped to 2 columns within the 'workpackage' table in the database instead of using the @Id one as the id, and the other as the foreign key to the 'project' table.
    So, when I try to add a workpackage to the database via a JSF page, it gives me the error 'java.sql.BatchUpdateException: Column 'projID' specified twice'.
    Maybe its something to do with variable in the project class being called 'id' even though its mapped to the database column 'projID'
    Edited by: wormdundee on Mar 1, 2008 2:26 PM

    I think the trouble is that you overrode the column names for the projID and project properties to the same value. Try
    @Entity
            @Table(name="WorkPackage")
            @IdClass(WorkPackagePK.class)
            public class WorkPackage implements java.io.Serializable
            @Id
            @Column(name="WP_WP_ID")
            public String getWpID() { return wpID; }
         public void setWpID(String id) { this.wpID = id; }
         @Id
            @Column(name="WP_PROJ_ID")
            public String getProjId() { return projId; }
         public void setProjId(String projId) { this.projId = projId; }
            @ManyToOne // bidirectional - owner side
         @JoinColumn(name="WP_PROJECT_PROJ_ID")
         public Project getProject() { return project; }
         public void setProject(Project project) { this.project = project; }

  • Problem with 1-to-many relationship between entity beans

    Hi All!
    I have two tables TMP_GROUP and TMP_EMPLOYEE with following fields:
    TMP_GROUP: ID, CAPTION, COMMENT, STATUS.
    TMP_EMPLOYEE: ID, LOGIN, GROUP_ID.
    For this tables i create two entity beans GROUP and EMPLOYEE respectively.
    The relationship looks like this
    descriptor ejb.xml:
    <ejb-relation>
                <description>description</description>
                <ejb-relation-name>employeesOfGroup</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.GroupBean</ejb-relationship-role-name>
                    <multiplicity>One</multiplicity>
                    <relationship-role-source>
                        <ejb-name>GroupBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>employees</cmr-field-name>
                        <cmr-field-type>java.util.Collection</cmr-field-type>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.EmployeeBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>EmployeeBean</ejb-name>
                    </relationship-role-source>
                </ejb-relationship-role>
            </ejb-relation>
    descriptor persistent.xml:
    <table-relation>
                   <table-relationship-role
                        key-type="PrimaryKey">
                        <ejb-name>GroupBean</ejb-name>
                        <cmr-field>employees</cmr-field>
                   </table-relationship-role>
                   <table-relationship-role
                        key-type="NoKey">
                        <ejb-name>EmployeeBean</ejb-name>
                        <fk-column>
                             <column-name>GROUP_ID</column-name>
                             <pk-field-name>ejb_pk</pk-field-name>
                        </fk-column>
                   </table-relationship-role>
              </table-relation>
    Now i implement business method:
    public Long addEmployee(String login, long groupId) {
              Long result;
              try {
                   EmployeeLocal employee = employeeHome.create(login);
                   GroupLocal group =
                        groupHome.findByPrimaryKey(new Long(groupId));
                   Collection employees = group.getEmployees();
                   employees.add(employee);
                   result = (Long) employee.getPrimaryKey();
              } catch (CreateException ex) {
                   result = new Long(0);
              } catch (FinderException ex) {
                   result = new Long(0);
              return result;
    When i call this method from web service, the following exception is raised:
    com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception in method com.mypackage.GroupLocalHomeImpl0.findByPrimaryKey(java.lang.Object).
    P.S.
    1) I have transaction attribute set to "Required" for all methods of all beans
    2) I have unique index for each table:
    TMP_GROUP_I1: CAPTION
    TMP_EMPLOYEE_I1: LOGIN (however i think GROUP_ID must be added here too)
    3) I tried many:many relationship with this tables and it works fine
    4) I try another implementation of addEmployee method with
    EmployeeLocal employee = employeeHome.create(login, groupId);
    without using GroupLocal cmr-field and GroupLocalHome findByPrimaryKey method, the result is same error.
    Can somebody help me with this problem?
    Thanks in advance.
    Best regards, Abramov Andrey.

    gimbal2 wrote:
    1: The @JoinColumn on the listOfDepartments collection in Company is wrong. It should be something like this for a bidirectional relationship:
    @OneToMany(mappedBy="company") // company is the matching property name in Department
    private List <Department> listOfDepartment = new ArrayList<Department>();Note that I removed the fetch configuration; onetomany is fetched lazy by design. Saves some clutter eh.
    2: use a Set in stead of a List (hibernate doesn't like lists much in entities and will break when you create slightly more complex entity relations)
    3: don't just slap cascades on collections, especially of type ALL. Do it with care. In the many years I've been using JPA I've only had to cascade deletes in very specific situations, maybe once or twice. I never needed any of the other cascade types, they just invite sloppy code if you ask me. When working with persistence you should apply a little precision.I made all changes as you mentioned but still compID in department table shows null value...

  • Problem with 1:many relationship between entity beans.

    Hi All!
    I have two tables TMP_GROUP and TMP_EMPLOYEE with following fields:
    TMP_GROUP: ID, CAPTION, COMMENT, STATUS.
    TMP_EMPLOYEE: ID, LOGIN, GROUP_ID.
    For this tables i create two entity beans GROUP and EMPLOYEE respectively.
    The relationship looks like this
    descriptor ejb.xml:
    <ejb-relation>
                <description>description</description>
                <ejb-relation-name>employeesOfGroup</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.GroupBean</ejb-relationship-role-name>
                    <multiplicity>One</multiplicity>
                    <relationship-role-source>
                        <ejb-name>GroupBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>employees</cmr-field-name>
                        <cmr-field-type>java.util.Collection</cmr-field-type>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.EmployeeBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>EmployeeBean</ejb-name>
                    </relationship-role-source>
                </ejb-relationship-role>
            </ejb-relation>
    descriptor persistent.xml:
    <table-relation>
                   <table-relationship-role
                        key-type="PrimaryKey">
                        <ejb-name>GroupBean</ejb-name>
                        <cmr-field>employees</cmr-field>
                   </table-relationship-role>
                   <table-relationship-role
                        key-type="NoKey">
                        <ejb-name>EmployeeBean</ejb-name>
                        <fk-column>
                             <column-name>GROUP_ID</column-name>
                             <pk-field-name>ejb_pk</pk-field-name>
                        </fk-column>
                   </table-relationship-role>
              </table-relation>
    Now i implement business method:
    public Long addEmployee(String login, long groupId) {
              Long result;
              try {
                   EmployeeLocal employee = employeeHome.create(login);
                   GroupLocal group =
                        groupHome.findByPrimaryKey(new Long(groupId));
                   Collection employees = group.getEmployees();
                   employees.add(employee);
                   result = (Long) employee.getPrimaryKey();
              } catch (CreateException ex) {
                   result = new Long(0);
              } catch (FinderException ex) {
                   result = new Long(0);
              return result;
    When i call this method from web service, the following exception is raised:
    com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception in method com.mypackage.GroupLocalHomeImpl0.findByPrimaryKey(java.lang.Object).
    P.S.
    1) I have transaction attribute set to "Required" for all methods of all beans
    2) I have unique index for each table:
    TMP_GROUP_I1: CAPTION
    TMP_EMPLOYEE_I1: LOGIN (however i think GROUP_ID must be added here too)
    3) I tried many:many relationship with this tables and it works fine
    4) I try another implementation of addEmployee method with
    EmployeeLocal employee = employeeHome.create(login, groupId);
    without using GroupLocal cmr-field and GroupLocalHome findByPrimaryKey method, the result is same error.
    Can somebody help me with this problem?
    Thanks in advance.
    Best regards, Abramov Andrey.

    I have posted excerpts from my orion-ejb-jar.xml file in this posting: Problem mapping a 1:M relationship between two entity EJBs w/ a compound PK
    Sorry for the duplicate postings, but I was getting errors on the submission.
    April

  • Problem in map a OneToOne relationship

    If I have a entity name e1 which has a OneToOne relationshp with another entity named e2.
    e1 has two column: workflow and step
    e2 also has the two columns: workflow and step. but these two columns are not the e2's primaryKey.
    how can i use e1,getE2() to get the e2 entity.
    Must the two columns to be the primatyKey in a OneToOne relationship?

    also I have another problem in OneToMany
    [class test.pojo.Testworkflow] should not have @JoinColumn(s) specified. In the case where the @OneToMany is not mapped by another entity (that is, it is the owning side and is uni-directional), it should specify (optional through defaulting) a @JoinTable.
    but it seems like that jpa specification allow to mapp a uni-directional OneToMany
    relationship

  • Problem with Dynamically accessing EJB Class objects in WL 7.0 SP1

    I am trying to build a component which has the ability to instantiate and execute
    an known EJB method on the fly.
    I have managed to build the component but when I try and execute it I get a ClassNotFoundException.
    I know that the EJB I am trying to invoke is deployed and available on the server,
    as I can see it in the console, I also seen to have been able to get the remote
    interface of the object, my problem occurs when I try and access the class object
    so I can perform a create on the object and then execute my method
    The code I have written is below:
    private Object getRemoteObject(Context pCtx, String pJNDIName, String pHomeBean)
    throws Exception {
         String homeCreate = "create";
         Class []homeCreateParam = { };
         Object []homeCreateParamValues = {};           
    try {  
    //This call seems to work and doesn't throw an exception     
    Object home = pCtx.lookup(pJNDIName);
    //However this call throws a java.lang.ClassNotFoundException
    Class homeBean = Class.forName(pHomeBean);
    Method homeCreateMethod = homeBean.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    } catch (NamingException ne) {             
    logStandardErrorMessage("The client was unable to lookup the EJBHome.
    Please make sure ");
    logStandardErrorMessage("that you have deployed the ejb with the JNDI
    name "+pJNDIName+" on the WebLogic server ");
    throw ne;
    } catch (Exception e) {
    logStandardErrorMessage(e.toString());
    throw e;     
    Any advice would be really appreciated, I'm fast running out of ideas, I suspect
    it has something to do with the class loader but I'm not sure how to resolve it
    Regards
    Jo Corless

    Hello Joanne,
    Congratulations! I'm very happy that you've managed to fix your problem. It's
    always essential to understand how to package applications when deploying on BEA
    WebLogic. Usually, by throwing everything into an EAR file solves just about all
    the class loader problems. :-) Let us know if you have any further problems that
    we can assist you with.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Joanne Corless" <[email protected]> wrote:
    >
    >
    I've fixed it!!!!!!!!
    Thanks to everyone who gave me help!!!!
    The class loader was the culprit which is what I suspected all along.
    As soon
    as I put the 2 jar files I was using into an EAR file the problem went
    away!!!!!
    Thanks again
    Jo Corless
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Joanne,
    As Mr. Woollen mentioned, I also believe it's a problem with the class
    loader.
    You need to be careful how you arrange your EJBs, because WebLogic has
    a specific
    method in which it loads classes in an EAR, JAR, and WAR file(s). Please
    refer
    to http://dev2dev.bea.com/articles/musser.jsp for more information about
    BEA WebLogic
    class loading mechanisms and caveats. Also, try printing out the various
    methods
    that are available on the object that was returned to you via reflection.
    For
    example, use the getMethods() method, which returns an array of Method
    objects
    that you can subsequently cycle through and print out the various method
    names.
    This way you can discover if the class found/returned to you is indeed
    the one
    you intend to locate.
    Hope this helps,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Rob Woollen <[email protected]> wrote:
    I believe the issue is the home interface class for this EJB is not
    available in the class loader which is doing the reflection.
    If you do:
    getClass().getClassLoader().loadClass(homeInterfaceClassName)
    I suspect it will fail. Reflection still requires that the class be
    loadable.
    -- Rob
    Joanne Corless wrote:
    Hi Slava,
    If I make my code look like you describe below I get a compliationerror telling
    me that
    home.getMethod() is not recognised (no such method)
    If I change it slightly and use
    Method homeCreateMethod =
    home.getClass().getMethod(homeCreate,homeCreateParam);
    The code will compile OK but when executed it still throws a NoSuchMethodException
    Any ideas ?
    Thanks for your help so far
    Regards
    Jo Corless
    Your code should look like
    Object home = pCtx.lookup(pJNDIName);
    Method homeCreateMethod =
    home.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    Regards,
    Slava Imeshev
    "Joanne Corless" <[email protected]> wrote in message
    news:[email protected]...
    Hi Ryan,
    I also wanted to mention that if you do a "header search" in this
    particular
    newsgroup
    with the search query as "reflection", you will see many previousmessages
    regarding
    reflection and EJBs. I believe you could learn a lot from thedifficulties
    that
    others have faced and solved.I tried that and although there was a number of similar cases noneof them
    actually
    seem to fix my issue. Thanks for the suggestion though
    Are the EJBs that you are trying to access accessible via your
    system
    classpath?
    Try to avoid having them accessible via the main system classpath,and
    only bundle
    them in your appropriate EJB jar files (contained in an EAR file,for
    example).Maybe I should have laid the problem out a little clearer.
    I have a number of EJB's bundled up in a JAR file which is hot deployedto
    the
    server. Within this first JAR file is an EJB (SSB) component that
    needs
    to
    be
    able to invoke a known method on another EJB. This second EJB may
    or
    may
    not be
    within the first JAR file but it also will be hot deployed.
    The component trying to invoke the method on the 2nd EJB has to
    be
    able to
    create
    an instance of the 2nd EJB without actually knowing anything bar
    a
    JNDI
    Name which
    is passed in at runtime.
    I can get as far as doing the
    Object home = pCtx.lookup(pJNDIName);
    This returned a class with the name
    "com.csc.edc.projects.allders.httppostoffice.postman.PostmanBean_mp8qy2_Home
    Impl_WLStub"
    My problem seems to occur when I try and invoke the create method
    Method homeCreate = home.getClass().getMethod("create", new Class[0]);
    My code throws a java.lang.NoSuchMethodException at this point so
    I
    am
    unable
    to progress to the next step of :
    Object bean = homeCreate.invoke(home, null);
    So I can return the instantiated bean back to the calling client.
    Why am I getting the NoSuchMethodException, is is because I am gettinga
    stub
    back rather than the home interface and if so how do I get the truehome
    interface
    from the bean
    Thanks in advance
    Jo Corless

  • EJB 3.0 - problem with persistence unit.

    Hi everybody, I got this problem I would like you to help me.
    I'm doing a proyect with EJB 3.0 using Netbeans 5.5 and Jboss
    The data source is MySQL.
    When I deploy the proyect, the Jboss Log show me this:
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    [Please help me, I'm kind of new in EJB]
    [ENTIRE JBOSS LOG]
    10:08:37,375 INFO [TomcatDeployer] undeploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16823DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:37,515 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,515 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,546 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:39,281 INFO [Ejb3Deployment] EJB3 deployment time took: 47
    10:08:39,296 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU with dependencies:
    10:08:39,296 INFO [JmxKernelAbstraction]      jboss.jca:name=jdbc/connectionPool,service=ManagedConnectionFactory
    10:08:39,312 WARN [ServiceController] Problem starting service persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    javax.naming.NameNotFoundException: jdbc not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy91.start(Unknown Source)
    at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
    at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
    at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
    at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy36.start(Unknown Source)
    at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy37.start(Unknown Source)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy6.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
    10:08:39,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3 with dependencies:
    10:08:39,812 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3 with dependencies:
    10:08:39,828 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,859 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-ejb.jar
    10:08:39,859 INFO [TomcatDeployer] deploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:40,046 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:40,062 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3

    Reason: javax.naming.NameNotFoundException: jdbc not bound
    Although i am quite new to this as well i would say that there is a problem with your connection with the database.
    It seems it cannot connect to Mysql.
    have you download the mysql package library and imported it ?
    Also in your deploy folder in you Jboss
    have you altered the jdbc to connect to you database in your dataset ? ( i am not sure about mysql, but postgre reguired this)
    Most probably it would be the same in mysql.
    <connection-url>jdbc:postgresql://127.0.0.1:5432/Dissertation</connection-url>
    Not sure if this is what you reguire, i am new at this my self

  • Problem with EJB skeleton classloader

    Hi
    We have been migrating an enterprise application from Weblogic 7 to 9.2 and experienced strange problem with EJBs. Our EAR contains (beside the other elements) an EJB module with EJBs and some common POJO classes inside. At the deploy and run phase everything seems working fine, but when the remote client invokes a method which receives one of the common classes as a parameter we get ClassNotFoundException on the server side (talking precisely, the exception is thrown from the EJB skeleton, trying to unmarshall the parameter).
    It seems that our EJB's skeletons do not see the classes from EAR. We have tried moving the common classes to the APP-INF/lib directory or placing them at the root of EAR archive and adding reference in Manifest file of EJB module and it won't help.
    The only workaround we've found is to add the missing classes to the server classpath but this is unacceptable (however, it works).
    We are not using any custom classloader hierarchy.
    The other JARs have no problem loading the content of our EJB module (including the common classes, which cause the problem).
    So, why is the RMI classloader ommiting our application contents?

    The problem was fixed by upgrading to version 9.2.1

Maybe you are looking for

  • Error while trying to get F4 help for a field mapped to an info object

    Hi, I am getting the following exception while trying to attach a search help to a drop down list box.The field belongs to a table on the BW server which has an explicit search help attached to it.I am getting the following exception: An exception oc

  • Exceptional handling using Bulk Collect FORALL

    Hi Members, Following are by DB details SELECT * FROM v$version;                  Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production CORE     9.2.0.7.0     Production TNS for HPUX: Version 9.2.0.7.0

  • Query Regarding Tables in HRMS

    Hi all, I would like to know in which tables the following columns exists Person type Work phone home phone projected start expecting a quick reply Thanks & Regards Swetha

  • How to use "Open Stream" command?

    How to use "Open Stream" command in the iTunes application.

  • 2 languages spell check in mail

    Hello, I am working in two languages Dutch and English in my email. Is it possible to let the mail automatically change the spell check language to the one I am typing in? Right now I have to manually change the language every time I type an email an