Hi,
i have a entitybean user, which has a namedquery User.getAllUsers.
when i call this query from my sessionbean:
Query q = getEm().createNativeQuery("SELECT object(u) FROM User u WHERE "
| + col + " LIKE :value", User.class).setParameter("value",
value);
or the namedquery
| @NamedQuery(name = "User.getAllUsers", query = "SELECT u FROM User
u"):
|
then i get this stack from the client progam:
xception in thread "main" javax.ejb.EJBException:
java.lang.IllegalArgumentException: wrong number of arguments
| at
org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:337)
| at
org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:320)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
| at
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
| at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| at
| org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
the serverstack is as follows:
| 13:09:37,421 ERROR [STDERR] java.lang.IllegalArgumentException: wrong number of
arguments
| 13:09:37,421 ERROR [STDERR] at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| 13:09:37,421 ERROR [STDERR] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| 13:09:37,421 ERROR [STDERR] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| 13:09:37,421 ERROR [STDERR] at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:514)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.AbstractPool.create(AbstractPool.java:66)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.InfinitePool.get(InfinitePool.java:49)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.ThreadlocalPool.create(ThreadlocalPool.java:50)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:90)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:315)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:320)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| 13:09:37,421 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
does anyone has one idea about what i'm doing wrong?
Regards
Auke Noppe
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154993#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...