[JBoss-user] [EJB/JBoss] - Re: Problem while accessing the CMP(oracle)-----------Solved
it was solved i was just removed properties from bean class and i was defined get set methods as abstract methods i have changed a bit in ejb-jar.xml that was i was changed cmp-version from 1.x to 2.x now it is working fine View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3858025#3858025 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3858025 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Problem while accessing the CMP(oracle)
You've made a big error in your bean code... If using CMP beans, then you cannot use public variables to store the values of the properties... You must change your code to: | package com.ness.training.ejb; | | import javax.ejb.CreateException; | import javax.ejb.EntityBean; | import javax.ejb.EntityContext; | public abstract class EmployeeEntityBean implements EntityBean | { | private transient EntityContext entContext; | | public void setEntityContext(EntityContext context){ | System.out.println(now it was in setEntityContext method); | entContext = context; | } | | public void unsetEntityContext(){ | entContext = null; | } | public Integer ejbCreate(Integer empid , String ename , String design) throws CreateException{ | setEmpID(empid); | setEName(ename); | setDesignation(design); | System.out.println(inside bean method+empid); | return null; | } | | public void ejbPostCreate(Integer empid,String ename , String design){ | System.out.println(in side ejb post create method +empid); | | } | | public void ejbActivate(){ | | } | | public void ejbPassivate(){ | } | | public void ejbRemove(){ | } | | public void ejbLoad(){ | } | | public void ejbStore(){ | } | | public abstract Integer getEmpID(); | | public abstract String getEName(); | | public abstract String getDesignation(); | | | public abstract void setEName(String ename); | | public abstract void setDesignation(String design); | | public abstract void setEmpID(Integer ent); | | } | I havent' looked at your descriptors, so maybe is still a problem there, but this is the biggest one ;). View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3857960#3857960 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3857960 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Problem while accessing the CMP(oracle)
thank you for responding my query i was changed my bean class with wich was given by but now it is throwing exception while starting itself it cant deployed the error i am getting was 10:24:12,977 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=EmployeeCMP,service=EJB | org.jboss.deployment.DeploymentException: No field named 'empID' found in entity class.com.ness.training.ejb.EmployeeEntityBean | at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData.loadFieldType(JDBCCMPFieldMetaData.java:803) | at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData.init(JDBCCMPFieldMetaData.java:161) | at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.init(JDBCEntityMetaData.java:375) | at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.init(JDBCApplicationMetaData.java:140) | at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:705) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:417) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:365) | at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:147) | at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337) | at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271) | at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221) | at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:324) | at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473) | at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837) | at $Proxy17.start(Unknown Source) | at org.jboss.system.ServiceController.start(ServiceController.java:367) | at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:324) | at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473) | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) | at $Proxy38.start(Unknown Source) | at org.jboss.ejb.EjbModule.startService(EjbModule.java:367) | at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271) | at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221) | at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:324) | at org.jboss.mx.server.ReflectedD my Deployment descriptor--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; | | !-- Generated XML! -- | | ejb-jar | enterprise-beans | session | ejb-nameFirstSessionBean/ejb-name | homecom.ness.training.ejb.FirstSessionHome/home | remotecom.ness.training.ejb.FirstSession/remote | ejb-classcom.ness.training.ejb.FirstSessionBean/ejb-class | session-typeStateless/session-type | transaction-typeContainer/transaction-type | !-- resource-ref | res-ref-nameOracleDS/res-ref-name | res-typejava.sql.DataSource/res-type | res-authContainer/res-auth | descriptionData source for oracle/description | /resource-ref-- | /session | entity | ejb-nameEmployeeCMP/ejb-name | homecom.ness.training.ejb.EmployeeEntityHome/home |