Skip to Content
author's profile photo Former Member
Former Member

Exception when performing a JDO - Query

Hello,

i get the following Exception:

java.util.EmptyStackException

at java.util.Stack.peek(Stack.java:79)

at com.sap.jdo.sql.jdbc.SQLQueryTreeWalker$SQLQueryTreeVisitor.getLastVariableValue(SQLQueryTreeWalker.java:1330)

at com.sap.jdo.sql.jdbc.SQLQueryTreeWalker$SQLQueryTreeVisitor.leave(SQLQueryTreeWalker.java:470)

at com.sap.jdo.common.query.tree.VariableAccessExpr.leave(VariableAccessExpr.java:63)

at com.sap.jdo.query.TreeWalker.walk(TreeWalker.java:55)

at com.sap.jdo.query.TreeWalker.walk(TreeWalker.java:53)

at com.sap.jdo.query.TreeWalker.walk(TreeWalker.java:53)

at com.sap.jdo.query.TreeWalker.walk(TreeWalker.java:53)

at com.sap.jdo.sql.jdbc.SQLQueryTreeWalker.<init>(SQLQueryTreeWalker.java:129)

at com.sap.jdo.sql.jdbc.SQLQueryTreeWalker.<init>(SQLQueryTreeWalker.java:103)

at com.sap.jdo.sql.jdbc.request.factory.JDBCRequestFactory.getQueryRequestImpl(JDBCRequestFactory.java:1116)

at com.sap.jdo.sql.jdbc.request.factory.JDBCRequestCloneCache.getQueryRequest(JDBCRequestCloneCache.java:347)

at com.sap.jdo.sql.jdbc.request.factory.JDBCRequestCache.getQueryRequest(JDBCRequestCache.java:476)

at com.sap.jdo.sql.jdbc.JDBCStoreManager.newQueryResult(JDBCStoreManager.java:676)

at com.sap.jdo.StoreManagerAdapter.newQueryResult(StoreManagerAdapter.java:453)

at com.sap.jdo.common.query.QueryImpl.executeWithArray(QueryImpl.java:616)

at com.sap.jdo.common.query.QueryImpl.execute(QueryImpl.java:529)

at com.vw.tpb.tpb.session.TpbHeaderBean.findTPBsByLabel(TpbHeaderBean.java:169)

at com.vw.tpb.tpb.session.TpbHeaderObjectImpl0.findTPBsByLabel(TpbHeaderObjectImpl0.java:188)

at com.vw.tpb.tpb.session.TpbHeader_Stub.findTPBsByLabel(TpbHeader_Stub.java:151)

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.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)

at $Proxy64.findTPBsByLabel(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:324)

at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)

at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)

at SoapServlet.doPost(SoapServlet.java:51)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:383)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:333)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:311)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:811)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:235)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

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

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

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:94)

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

when performing a query using

pm = pmf.getPersistenceManager();

Extent tpbs = pm.getExtent( TPBImpl.class, true );

String filter = "labels.contains( label ) && label.language == langParam && label.text.startsWith( textParam )";

Query query = pm.newQuery( tpbs, filter );

query.declareImports( "import com.vw.tpb.refdata.model.impl.LabelImpl");

query.declareVariables( "LabelImpl label" );

query.declareParameters( "String langParam, String textParam" );

Collection found = (Collection)query.execute( language, text );

Iterator it = found.iterator();

while( it.hasNext() ) {

result.add( String.valueOf( it.next() ));

}

query.close( it );

The line points to the query.execute() method.

Saving the complete Object tree and loading it w/o any query clauses does not raise any problems.

Does someone have any idea on that ?

regards, Udo

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 06, 2004 at 11:37 AM

    Hi,

    the answer for this problem is the same as the answer to

    your topic:

    "Exception when using JDO-QueryLanguage finder"

    regards

    -Andreas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.