Skip to main content

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

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?

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: 1300
Registered: July 2009
Senior Member

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,
Previous Topic:Strange behavior in loading entities
Next Topic:em.remove throws exception: identifier is too long
Goto Forum:

Current Time: Wed Jun 20 10:02:31 GMT 2018

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

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

Back to the top