|query conflicts and "unexpected token [count]" [message #493254]
||Fri, 23 October 2009 23:03
Registered: October 2009
we are trying to migrate from toplink to eclipselink.
But there are some problems getting things to work.
The first exception is:
Cannot add a query whose types conflict with an existing query.
Query To Be Added:
[ReadAllQuery(name="university.findById" referenceClass=University jpql="SELECT uni FROM University uni WHERE uni.id = :id")] is named: [university.findById] with arguments [[long]].
The existing conflicting query:
[ReadAllQuery(name="university.findById" referenceClass=University jpql="SELECT uni FROM University uni WHERE uni.id = :id")] is named: [university.findById] with arguments: [[long]].
As you can see, two times the same query. But its existing only once (I've checked this a couple of times).
The curious is, that this exception goes away after a lot of glassfish restarts and redeploys (and minor code changes, like variable renaming... !!!??)
But a view deploys later it comes back.
The second problem (after the first is solved).
We have a lot of named queries for getting row counts, like:
@NamedQuery(name = "gbEntry.countByUser", query = "select count(entry) from GuestbookEntry entry where entry.owner = :user")
Syntax error parsing the query [gbEntry.countByUser: select count(entry) from GuestbookEntry as entry where entry.owner = :user], line 1, column 7: unexpected token [count].
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.target-database" value="PostgreSQL" />
<property name="eclipselink.logging.level" value="FINEST"/>
Hope somebody can help!
[Updated on: Fri, 23 October 2009 23:08]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.14096 seconds