Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to use alternative sql statements in ejb 2.0

hi

i have written the alternative sql statement in persistence.xml like "select max(modifieddate) from tmp_dlv_mgmt".

i am getting the error

java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(java.lang.String).

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1477)

at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)

... 10 more

Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)

at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)

at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)

... 11 more

; nested exception is:

javax.ejb.EJBException: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)

at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)

at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)

at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)

... 11 more

com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)

at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)

at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)

at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

at com.sap.engine.services.ejb.exceptions.BaseRemoteException.writeReplace(BaseRemoteException.java:276)

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 java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

at com.sap.engine.services.rmi_p4.DispatchImpl.throwException(DispatchImpl.java:144)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:322)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Caused by: javax.ejb.EJBException: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)

at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)

at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)

at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)

... 11 more

com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)

at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)

at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)

at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)

at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)

at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)

at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)

at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)

at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

at com.sap.engine.services.ejb.exceptions.BaseEJBException.writeReplace(BaseEJBException.java:274)

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 java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

... 11 more

Former Member
Not what you were looking for? View more on this topic or Ask a question