openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafal Rusin (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1783) Can't use NamedQuery under OSGi
Date Sat, 04 Sep 2010 20:42:32 GMT
Can't use NamedQuery under OSGi
-------------------------------

                 Key: OPENJPA-1783
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1783
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 2.0.1
         Environment: equinox
            Reporter: Rafal Rusin


I tried to run named query under equinox osgi, but got this:

osgi> start 157
ble2
Init JPA ok.
85  openjpa  WARN   [OSGi Console] openjpa.MetaData - The class "openjpa_example.Person" listed
in the openjpa.MetaDataFactory configuration property could not be loaded by org.apache.openjpa.lib.util.MultiClassLoader@81b4ab2;
ignoring.
93  openjpa  WARN   [OSGi Console] openjpa.MetaData - The class "openjpa_example.Person" listed
in the openjpa.MetaDataFactory configuration property could not be loaded by org.apache.openjpa.lib.util.MultiClassLoader@3695640;
ignoring.
109  openjpa  WARN   [OSGi Console] openjpa.MetaData - The class "openjpa_example.Person"
listed in the openjpa.MetaDataFactory configuration property could not be loaded by org.apache.openjpa.lib.util.MultiClassLoader@81b4ab2;
ignoring.
2010-09-04 22:31:49,047 DEBUG [o.s.o.e.i.s.NamespacePlugins] [ OSGi Console] Removing handler
Openjpa-example (openjpa-example)
org.osgi.framework.BundleException: Exception in openjpa_example.Activator.start() of bundle
openjpa-example.
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:279)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:271)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:252)
	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:597)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:157)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:142)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:106)
	at java.lang.Thread.run(Thread.java:619)
Caused by: <openjpa-2.0.1-r422266:989424 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
An error occurred while parsing the query filter "select p from Person p". Error message:
The name "Person" is not a recognized entity or identifier. Perhaps you meant Person, which
is a close match. Known entity names: [Person]
	at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:194)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:167)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:242)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:212)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:205)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$200(JPQLExpressionBuilder.java:81)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:2387)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:61)
	at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:154)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:671)
	at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:652)
	at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:618)
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:680)
	at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:587)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1028)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:100)
	at openjpa_example.PersonPersistenceImpl.list(PersonPersistenceImpl.java:38)
	at openjpa_example.Activator.start(Activator.java:21)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
	... 14 more
Nested Exception:
<openjpa-2.0.1-r422266:989424 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
An error occurred while parsing the query filter "select p from Person p". Error message:
The name "Person" is not a recognized entity or identifier. Perhaps you meant Person, which
is a close match. Known entity names: [Person]
	at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:194)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:167)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:242)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:212)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:205)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$200(JPQLExpressionBuilder.java:81)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:2387)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:61)
	at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:154)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:671)
	at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:652)
	at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:618)
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:680)
	at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:587)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1028)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:100)
	at openjpa_example.PersonPersistenceImpl.list(PersonPersistenceImpl.java:38)
	at openjpa_example.Activator.start(Activator.java:21)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:279)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:271)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:252)
	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:597)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:157)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:142)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:106)
	at java.lang.Thread.run(Thread.java:619)
Nested Exception:
<openjpa-2.0.1-r422266:989424 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
An error occurred while parsing the query filter "select p from Person p". Error message:
The name "Person" is not a recognized entity or identifier. Perhaps you meant Person, which
is a close match. Known entity names: [Person]
	at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:194)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:167)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:242)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:212)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:205)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$200(JPQLExpressionBuilder.java:81)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:2387)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:61)
	at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:154)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:671)
	at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:652)
	at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:618)
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:680)
	at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:587)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1028)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:100)
	at openjpa_example.PersonPersistenceImpl.list(PersonPersistenceImpl.java:38)
	at openjpa_example.Activator.start(Activator.java:21)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:279)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:271)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:252)
	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:597)
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:157)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:142)
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:106)
	at java.lang.Thread.run(Thread.java:619)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message