Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » problem about emf+jpox query
problem about emf+jpox query [message #609903] Mon, 08 October 2007 02:00
Eclipse UserFriend
Originally posted by: danceslower.sina.com

Hi All
There is a strange problem in object query during using emf+jpox.
There is a 1-n relation between Class Car and Class Part, which means one
Car contains n Parts. When I use this query:
////////////////////
query = pm.newQuery("javax.jdo.query.JDOQL", "SELECT FROM Part WHERE car ==
threshold");
query.declareImports("import Car");
query.declareParameters("Car threshold");
List results = (List)query.execute("BMW");
/////////////////////////////
Exception are throwed:
Exception in thread "main" java.lang.NullPointerException
at org.jpox.store.expression.UnboundVariable.eq(UnboundVariable .java:184)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileEquali tyExpression(JDOQLQuery.java:1609)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAndExp ression(JDOQLQuery.java:1591)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExclus iveOrExpression(JDOQLQuery.java:1579)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileInclus iveOrExpression(JDOQLQuery.java:1567)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileCondit ionalAndExpression(JDOQLQuery.java:1555)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileCondit ionalOrExpression(JDOQLQuery.java:1537)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpres sion(JDOQLQuery.java:1514)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpres sionFromString(JDOQLQuery.java:1475)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileFilter (JDOQLQuery.java:1314)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.performCompil e(JDOQLQuery.java:924)
at
org.jpox.store.rdbms.query.JDOQLQuery$Compiler.executionComp ile(JDOQLQuery.java:897)
at
org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQu ery.java:497)
at org.jpox.store.query.Query.executeWithMap(Query.java:959)
at org.jpox.store.query.Query.executeWithArray(Query.java:932)
at org.jpox.store.query.Query.execute(Query.java:855)
at test.TestQuery.queryPartData(TestQuery.java:34)
at test.TestQuery.main(TestQuery.java:18)

what is the meaning of that?
Previous Topic:Teneo and Named Queries
Next Topic:problem about emf+jpox query
Goto Forum:
  


Current Time: Thu Apr 25 01:37:41 GMT 2024

Powered by FUDForum. Page generated in 0.03100 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top