You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Matthieu Riou <ma...@gmail.com> on 2009/02/12 00:05:24 UTC

Re: OpenJPA Exception (An error occurred while parsing the query filter "SELECT du from org.apache.ode.store.jpa.DeploymentUnitDaoImpl du")

On Wed, Feb 11, 2009 at 10:01 AM, Milinda Pathirage <
milinda.pathirage@gmail.com> wrote:

> Did anyone have any clue about the cause for following exception when using
> ODE + OpenJPA in OSGi environment. Why we are using "SELECT du from
> org.apache.ode.store.jpa.DeploymentUnitDaoImpl du" instead of "SELECT du
> from DeploymentUnitDaoImpl du"? I have seen the later style in other places
> in ODE.
>

It's probably a class loading issue. For example, say the classloader in
which OpenJPA is loaded is not the same as the one where the DAO creation
actually happens so they don't see the same class. Pick your favorite class
loading headache :) I'd ask on the OpenJPA mailing list, they might have
seen this before and point you to specific things to be careful with when
deploying in OSGi.

Cheers,
Matthieu


>
> Caused by: java.util.concurrent.ExecutionException: <openjpa-0.0.0-rnull
> nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An
> error occurred while parsing the query filter "SELECT du from
> org.apache.ode.store.jpa.DeploymentUnitDaoImpl du". Error message: The name
> "org.apache.ode.store.jpa.DeploymentUnitDaoImpl" is not a recognized entity
> or identifier. Known entity names: []
>    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
>    at java.util.concurrent.FutureTask.get(FutureTask.java:80)
>    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:542)
>    ... 27 more
> Caused by: <openjpa-0.0.0-rnull nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: An error occurred while
> parsing the query filter "SELECT du from
> org.apache.ode.store.jpa.DeploymentUnitDaoImpl du". Error message: The name
> "org.apache.ode.store.jpa.DeploymentUnitDaoImpl" is not a recognized entity
> or identifier. Known entity names: []
>    at
>
> org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:118)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:180)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:150)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:225)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:195)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:188)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$600(JPQLExpressionBuilder.java:69)
>    at
>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1754)
>    at
> org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:56)
>    at
>
> org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:153)
>    at
> org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:657)
>    at
>
> org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:638)
>    at
>
> org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:604)
>    at
> org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:666)
>    at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1486)
>    at
>
> org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)
>    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:227)
>    at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:277)
>    at
>
> org.apache.ode.store.jpa.ConfStoreConnectionJpa.getDeploymentUnits(ConfStoreConnectionJpa.java:68)
>    at
> org.apache.ode.store.ProcessStoreImpl$6.call(ProcessStoreImpl.java:458)
>    at
>
> org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:701)
>    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>    at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>    at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>    at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>    at java.lang.Thread.run(Thread.java:595)
>
> Thanks
> Milinda
>
> --
> http://mpathirage.com
> http://wso2.org "Oxygen for Web Service Developers"
> http://wsaxc.blogspot.com "Web Services With Axis2/C"
>