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 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 17:41 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1019
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: Wed Sep 17 13:45:45 GMT 2014

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

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