java.lang.IllegalArgumentException: wrong number of arguments

hivmr.com | 5 months ago
  1. 0

    Call EJB method

    Stack Overflow | 3 years ago | user2783755
    java.lang.IllegalArgumentException: wrong number of arguments
  2. 0

    The following error occurs when working with proxy classes deployed on JBoss: ERROR [STDERR] java.lang.ClassCastException: cannot assign instance of net.sf.hibernate.proxy.SerializableProxy to field com.hibernate.test.persistence.SubnetRightHolder.subnet of type com.hibernate.test.persistence.NetPortalSubnetwork in instance of com.hibernate.test.persistence.SubnetRightHolder 09:53:18,851 ERROR [STDERR] at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1840) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1062) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at java.util.HashMap.readObject(HashMap.java:985) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,867 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,867 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:346) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) 09:53:18,867 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:700) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) 09:53:18,882 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:148) 09:53:18,882 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:144) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) 09:53:18,882 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) 09:53:18,882 ERROR [LogInterceptor] RuntimeException: java.lang.IllegalArgumentException: wrong number of arguments 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:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) 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:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 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:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:536) The bug is reproduced in the archives attached. 1. Change db2-ds.xml to work with your db 2. Deploy ear in the JBoss 4. run the MainDevice class from the src archive (after generating tables in the DB)

    Hibernate JIRA | 1 decade ago | Steve Pop
    java.lang.IllegalArgumentException: wrong number of arguments
  3. 0

    db:: 3.37::JSP:Param passing array of Parameter Values 1d

    hivmr.com | 8 months ago
    java.lang.IllegalArgumentException: wrong number of arguments
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Compress and defaultWriteObject

    Oracle Community | 1 decade ago | 843790
    java.lang.IllegalArgumentException: wrong number of arguments
  6. 0

    java.lang.IllegalArgumentException

    Oracle Community | 1 decade ago | 843829
    java.lang.IllegalArgumentException: wrong number of arguments

  1. Aria Pahlavan 16 times, last 3 weeks ago
  2. kjhdofjosvs 2 times, last 1 month ago
  3. tyson925 2 times, last 1 month ago
  4. kuldeep 2 times, last 2 months ago
  5. aldrinleal 1 times, last 5 months ago
6 more registered users
72 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    wrong number of arguments

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:324)
    4 frames