Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPQL query does not locate the constructor correctly
JPQL query does not locate the constructor correctly [message #632566] Wed, 13 October 2010 09:19 Go to next message
Pavel Zelenka is currently offline Pavel Zelenka
Messages: 61
Registered: July 2009
Member
Hi,

I have problem with this query:

select new cz.mediaservis.metro.entity.SedmickaRemitendaObce(v.vykladka .obec, max(v.vykladka.cislo)) from Vykaz v ...

It always ends up with exception: java.lang.NoSuchMethodException: cz.mediaservis.metro.entity.SedmickaRemitendaObce.<init>(java.lang.String, java.lang.Object)

I use EclipseLink 1.1.1.v20090430-r4097

Any ideas what's wrong?

Thanks
Re: JPQL query does not locate the constructor correctly [message #632654 is a reply to message #632566] Wed, 13 October 2010 13:41 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1017
Registered: July 2009
Senior Member
Hello,

The exception is occuring because SedmickaRemitendaObce does not have a constructor that takes a String and Object as a paramter. Feel free to file a bug so that Max uses the type defined for the v.vykladka.cislo and vote for it to get it fixed. The mean time is to use Object in the constructor as the argument type.

Best Regards,
Chris
Previous Topic:Strange behavior in loading entities
Next Topic:em.remove throws exception: identifier is too long
Goto Forum:
  


Current Time: Sat Aug 23 15:22:46 EDT 2014

Powered by FUDForum. Page generated in 0.01662 seconds