Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented romainmuller said: Oh and if that's of some use, the entity is defined as:
@Entity @NamedQuery(name = "listLoaderTables", query = "SELECT lt FROM LoaderTable lt WHERE 1=1") public class LoaderTable implements Serializable
{ / Some pretty classical JPA-enabled class code there. / }
@glassfishrobot Commented dkoper said: That's interesting.. This method is not in the JPA2.0 spec and not in the Java EE 6 javadoc. But it is there in the interface, and EclipseLink (confirmed with the latest source) simply throws an UnsupportedOperationException() with no message, and no comments in the code with more details..
@glassfishrobot Commented romainmuller said: If I may correct, the method IS at list in the JavaEE6 Javadoc. See http://java.sun.com/javaee/6/docs/api/javax/persistence/EntityManager.html#createNamedQuery%28java.lang.String,%20java.lang.Class%29
@glassfishrobot Commented dkoper said: I stand corrected, you are right. I tried so hard to be careful not to look at the JavaEE 5 javadocs but it looks like I did.
Other similar methods (like the createQuery equivalent) have been implemented, it's just this one that's throwing the UnsupportedOperationException. Also, CTS does check for this method's existence. I haven't gone through all tests, but I suppose it has no tests that actually use this method.
@glassfishrobot Commented mm110999 said: https://bugs.eclipse.org/bugs/show_bug.cgi?id=300412 tracks this issue in EclipseLink.The fix has been integrated in EclipseLink and will be integrated in GlassFish with next promoted build of EclipseLink
@glassfishrobot Commented mm110999 said: Setting the target milestone...
@glassfishrobot Commented mm110999 said: Checked in http://fisheye4.atlassian.com/changelog/glassfish-svn/?cs=35508
@glassfishrobot Commented mm110999 said: Integrated http://fisheye4.atlassian.com/changelog/glassfish-svn/?cs=35529 in trunk
@glassfishrobot Commented Was assigned to tware
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-11467
@glassfishrobot Commented Reported by romainmuller
@glassfishrobot Commented Marked as fixed on Monday, February 1st 2010, 6:50:08 am
Hello,
My glassfish instance keeps throwing an odd UnsupportedOperationException on thr following line of code:
final TypedQuery listLoaderTables =
config.createNamedQuery("listLoaderTables", LoaderTable.class);
Where "config" refers to an EntityManager instance that is injected into an EJB. All situations I've tried so far get to the same issue so I don't think this is related to the way I use the EntityManager, rater a missing implementation. The exact full StackTrace is:
java.lang.UnsupportedOperationException at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:974) at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:555) at somepackage.LoaderDefaultConfig.initialize(LoaderDefaultConfig.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006) at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61) at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115) at sun.reflect.GeneratedMethodAccessor716.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961) at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373) at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:518) ... 38 more
Environment
Operating System: All Platform: All
Affected Versions
[V3]