You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Sebarry <se...@yahoo.co.uk> on 2014/02/12 17:45:59 UTC

[org.apache.openjpa.persistence.ArgumentException - An error occurred while parsing the query filter "select x from Person x". 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]]

Hi,

I'm getting the following error trying to poll a JPA entity Person. There's
no error in the code. Everything compiles ok with a mvn clean install and
the Person entity does exist in the
net.lr.tutorial.karaf.camel.jpa2jms.model package. I have installed all the
necessary features I believe and I know it's correctly connection to the
database because it's creating a sequence database for the primary key.

2014-01-30 21:33:59,848 | WARN  | jms.model.Person | JpaConsumer                     
|  
125 - org.apache.camel.camel-core - 2.12.0 | Consumer   
Consumer[jpa://net.lr.tutorial.karaf.camel.jpa2jms.model.Person?consumer.delay=3500] 
failed polling endpoint: 
Endpoint[jpa://net.lr.tutorial.karaf.camel.jpa2jms.model.Person?consumer.delay=3500]. 
Will try again at next poll. Caused by: 
[org.apache.openjpa.persistence.ArgumentException - An error occurred while
parsing the 
query filter "select x from Person x". 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]] 
<openjpa-2.1.1-r422266:1148538 nonfatal user error> 
org.apache.openjpa.persistence.ArgumentException: An error occurred while
parsing the 
query filter "select x from Person x". 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] 

Any ideas?

Sean



--
View this message in context: http://openjpa.208410.n2.nabble.com/org-apache-openjpa-persistence-ArgumentException-An-error-occurred-while-parsing-the-query-filter-se-tp7585976.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: [org.apache.openjpa.persistence.ArgumentException - An error occurred while parsing the query filter "select x from Person x". 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]]

Posted by Rick Curtis <cu...@gmail.com>.
Is it possibly some sort of classloading issue? I know in the past we've
seen the 'The name "x" is not a recognized entity or identifier. Perhaps
you meant n' in the past, but it seems like most of those were cleaned up.

One shot it the dark would be to try to enable <property name="openjpa.
MetaDataRepository" value="Preload=true"/> to see if that helps.

Thanks,
Rick


On Wed, Feb 12, 2014 at 12:52 PM, Sebarry <se...@yahoo.co.uk>wrote:

> Hi Rick,
>
> Here's the contents of my persistence.xml
>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     version="1.0">
>
>     <persistence-unit name="person2" transaction-type="JTA">
>
> <jta-data-source>osgi:service/javax.sql.XADataSource/(
> osgi.jndi.service.name=jdbc/derbydsxa)</jta-data-source>
>         <class>net.lr.tutorial.karaf.camel.jpa2jms.model.Person</class>
>         <exclude-unlisted-classes>true</exclude-unlisted-classes>
>
>         <properties>
>
>             <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema"/>
>             <property name="openjpa.jdbc.DBDictionary" value="derby"/>
>         </properties>
>     </persistence-unit>
>
> </persistence>
>
> Regards,
>
> Sean
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/org-apache-openjpa-persistence-ArgumentException-An-error-occurred-while-parsing-the-query-filter-se-tp7585976p7585979.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>



-- 
*Rick Curtis*

Re: [org.apache.openjpa.persistence.ArgumentException - An error occurred while parsing the query filter "select x from Person x". 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]]

Posted by Sebarry <se...@yahoo.co.uk>.
Hi Rick,

Here's the contents of my persistence.xml

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.0">

    <persistence-unit name="person2" transaction-type="JTA">
       
<jta-data-source>osgi:service/javax.sql.XADataSource/(osgi.jndi.service.name=jdbc/derbydsxa)</jta-data-source>
        <class>net.lr.tutorial.karaf.camel.jpa2jms.model.Person</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
       
        <properties>
            
            <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema"/>
            <property name="openjpa.jdbc.DBDictionary" value="derby"/>
        </properties>
    </persistence-unit>

</persistence>

Regards,

Sean



--
View this message in context: http://openjpa.208410.n2.nabble.com/org-apache-openjpa-persistence-ArgumentException-An-error-occurred-while-parsing-the-query-filter-se-tp7585976p7585979.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: [org.apache.openjpa.persistence.ArgumentException - An error occurred while parsing the query filter "select x from Person x". 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]]

Posted by Rick Curtis <cu...@gmail.com>.
Please post the contents of your persistence.xml.

Thanks,
Rick


On Wed, Feb 12, 2014 at 10:45 AM, Sebarry <se...@yahoo.co.uk>wrote:

> Hi,
>
> I'm getting the following error trying to poll a JPA entity Person. There's
> no error in the code. Everything compiles ok with a mvn clean install and
> the Person entity does exist in the
> net.lr.tutorial.karaf.camel.jpa2jms.model package. I have installed all the
> necessary features I believe and I know it's correctly connection to the
> database because it's creating a sequence database for the primary key.
>
> 2014-01-30 21:33:59,848 | WARN  | jms.model.Person | JpaConsumer
> |
> 125 - org.apache.camel.camel-core - 2.12.0 | Consumer
>
> Consumer[jpa://net.lr.tutorial.karaf.camel.jpa2jms.model.Person?consumer.delay=3500]
> failed polling endpoint:
>
> Endpoint[jpa://net.lr.tutorial.karaf.camel.jpa2jms.model.Person?consumer.delay=3500].
> Will try again at next poll. Caused by:
> [org.apache.openjpa.persistence.ArgumentException - An error occurred while
> parsing the
> query filter "select x from Person x". 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]]
> <openjpa-2.1.1-r422266:1148538 nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: An error occurred while
> parsing the
> query filter "select x from Person x". 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]
>
> Any ideas?
>
> Sean
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/org-apache-openjpa-persistence-ArgumentException-An-error-occurred-while-parsing-the-query-filter-se-tp7585976.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>



-- 
*Rick Curtis*