- This topic has 3 replies, 2 voices, and was last updated 19 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
jtorrecillaMemberIhave a CMP successfully deplyed in jboss 4.0 and ORACLE 10g when I call create I obtain the following error ( I can see my connection in Oracle from jboss )
javax.ejb.CreateException: Error checking if entity exists:java.sql.SQLException: ORA-00942: table or view does not exist
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:92)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
21:09:23,453 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:219)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:612)
21:09:23,453 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
21:09:23,453 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
21:09:23,453 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21:09:23,453 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
21:09:23,453 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:189)
21:09:23,453 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:180)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:119)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
21:09:23,453 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:894)
21:09:23,468 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:344)
21:09:23,468 INFO [STDOUT] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
21:09:23,468 INFO [STDOUT] at $Proxy56.create(Unknown Source)
21:09:23,468 INFO [STDOUT] at com.victor.session.ejb.VictorSession.replaceWithRealBusinessMethod(VictorSession.java:128)
21:09:23,468 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
21:09:23,468 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
21:09:23,468 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21:09:23,468 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
21:09:23,468 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
21:09:23,468 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
21:09:23,468 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
21:09:23,468 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
21:09:23,468 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
21:09:23,468 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
21:09:23,484 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
21:09:23,484 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
21:09:23,484 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
21:09:23,484 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21:09:23,484 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
21:09:23,484 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
21:09:23,484 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
21:09:23,484 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
21:09:23,484 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
21:09:23,484 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
21:09:23,484 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
21:09:23,484 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
21:09:23,484 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
21:09:23,484 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
21:09:23,484 INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
21:09:23,484 INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
21:09:23,484 INFO [STDOUT] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
21:09:23,484 INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
21:09:23,484 INFO [STDOUT] at $Proxy59.replaceWithRealBusinessMethod(Unknown Source)
21:09:23,484 INFO [STDOUT] at com.victor.struts.action.Struts2Action.execute(Struts2Action.java:57)
21:09:23,484 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
21:09:23,484 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
21:09:23,484 INFO [STDOUT] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
21:09:23,484 INFO [STDOUT] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
21:09:23,484 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
21:09:23,484 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:09:23,484 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
21:09:23,484 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
21:09:23,484 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:157)
21:09:23,484 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
21:09:23,484 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
21:09:23,484 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
21:09:23,484 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
21:09:23,484 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
21:09:23,484 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
21:09:23,484 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)my CMP Bean is:
package com.victor.ejb;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;import javax.ejb.CreateException;
import com.victor.interfaces.VictorBeanPK;
import com.victor.interfaces.VictorPK;/**
* XDoclet-based CMP 2.x entity bean. This class must be declared
* public abstract because the concrete class will
* be implemented by the CMP providers tooling.
*
* To generate EJB related classes using XDoclet:
*
* – Add Standard EJB module to XDoclet project properties
* – Customize XDoclet configuration
* – Run XDoclet
*
* Below are the xdoclet-related tags needed for this EJB.
*
*
*
* @ejb.bean name=”VictorBean”
* display-name=”Name for Victor”
* description=”Description for Victor”
* type=”CMP”
* cmp-version=”2.x”
* view-type=”local”
* local-jndi-name=”ejb/VictorBeanLocalHome”
* transaction-type=”Container”
* jndi-name=”ejb/VictorBeanHome”
* primkey-field=”id”
*
* @ejb.persistence table-name=”VICTOR”
* @ejb.home local-class=”com.victor.interfaces.VictorLocalHome”
* @ejb.transaction type=”Supports”
*
*
*
* @jboss.persistence datasource=”java:/SierraDS” datasource-mapping=”Oracle9i” table-name=”victor”
*
* @jboss.cmp-field column-name=”str”
* field-name=”str”
* @jboss.cmp-field column-name=”VictorPK”
* field-name=”id”
*
* @jboss.ejb-local-ref ref-name=”ejb/VictorBean” jndi-name=”ejb/VictorBeanLocalHome”
*
*/
public abstract class VictorBean implements EntityBean
{
private EntityContext context;public VictorBean ()
{
super ();
}
/**
*
* @return
* @throws CreateException
* @ejb.create-method
*/public java.lang.Integer ejbCreate () throws CreateException
{
setStr ( “ventiuno”);
java.lang.Integer pk = new java.lang.Integer ( 21);
setId ( pk);
return pk;
}public void ejbPostCreate () throws CreateException
{
}public void ejbActivate () throws EJBException, RemoteException
{
}public void ejbLoad() throws EJBException, RemoteException
{
}public void ejbPassivate() throws EJBException, RemoteException
{
}public void ejbRemove () throws RemoveException, EJBException, RemoteException
{
}public void ejbStore() throws EJBException, RemoteException
{
}/**
* Id of this account.
*
* This is not remote since the primary key can be extracted by other means.
*
* @ejb:pk-field
* @ejb.persistence column-name=”VictorPK”
* @ejb.interface-method
* @ejb.
*/public abstract java.lang.Integer getId ();
public abstract void setId ( java.lang.Integer pk);/**
* Id of this account.
*
* This is not remote since the primary key can be extracted by other means.
*
* @ejb:persistent-field
*
* @jboss:column-name str
*/public abstract String getStr ();
public abstract void setStr ( String str);public void setEntityContext ( EntityContext newContext) throws EJBException
{
context = newContext;
}public void unsetEntityContext () throws EJBException
{
context = null;
}}
please tell me what happens, thanks
Riyad KallaMemberMoving to OT > Soft Dev
jtorrecillaMemberI try to putnaem as schema_name.table_name ad it dosen´t work. I try to put schema name like this:
@ejb.bean name=”VictorBean”
* display-name=”Name for Victor”
* description=”Description for Victor”
* type=”CMP”
* cmp-version=”2.x”
* view-type=”local”
* local-jndi-name=”ejb/VictorBeanLocalHome”
* transaction-type=”Container”
* jndi-name=”ejb/VictorBeanHome”
* primkey-field=”id”
* schema=”JBOSS”
*
* @ejb.persistence table-name=”JBOSS.VICTOR”
* @ejb.home local-class=”com.victor.interfaces.VictorLocalHome”
* @ejb.transaction type=”Supports”and it doesn´t work
when jboss connect with oracle i can see the user jboss in oracle view v$session.
Please tell me something, thanks.
Riyad KallaMemberI’m sorry jtorrecilla, I’m not versed in EJB development. Have you tried posting your question to: http://forums.java.sun.com/forum.jspa?forumID=13
-
AuthorPosts