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 13:19 Go to next message
Pavel Zelenka is currently offline Pavel ZelenkaFriend
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 17:41 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1225
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:Unknown entity bean class issue with glassfish v3
Next Topic:Using a fetch group with find
Goto Forum:
  


Current Time: Sun May 28 14:47:25 GMT 2017

Powered by FUDForum. Page generated in 0.02888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software