2 Replies Latest reply on Apr 22, 2004 5:18 AM by aloubyansky

    Bug in Sun's j2sdk1.4.2_03 proxy generation?

    aloubyansky

      Running SPECjAppServer on Sun's j2sdk1.4.2_03 I often get an UndeclaredThrowableException caused by NullPointerException thorwn from a proxy instance when invoking a method on the proxy by reflection.

      For example:

      java.lang.reflect.UndeclaredThrowableException
       at $Proxy130.create(Unknown Source)
       at org.spec.jappserver.supplier.web.SupplierDomainServlet.doPost(SupplierDomainServlet.java:278)
      
      .....
      
      Caused by: java.lang.IllegalArgumentException: java.lang.NullPointerException@1c4007
       at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
      


      This is the line in ReflectedDispatcher:
       return method.invoke(target, args);
      


      I added logging and am sure target is not null. So it looks like a JVM bug, doesn't it?
      I just tried JRockit 1.4.2_03 and didn't see this.

        • 1. Re: Bug in Sun's j2sdk1.4.2_03 proxy generation?
          aloubyansky

          No. I can see it with JRockit also.
          The cause seems to be null args.

          Here is the stack:

          2004-04-19 17:04:41,543 1579982 WARN [org.jboss.mx.server.ReflectedDispatcher] (RMI TCP Connection(139)-213.186.210.106:) failed method=invoke, class=org.jboss.ejb.Container, args
          =null, target=org.jboss.ejb.StatefulSessionContainer@66450b, t=java.lang.IllegalArgumentException: java.lang.NullPointerException@117feff
          2004-04-19 17:04:41,543 1579982 TRACE [org.jboss.ejb.plugins.cmp.jdbc2.schema.EntityTable.M_PARTS] (RMI TCP Connection(137)-213.186.210.106:) reading result set: pk=00001PRESA00170
          2004-04-19 17:04:41,543 1579982 ERROR [org.jboss.ejb.plugins.LogInterceptor] (RMI TCP Connection(139)-213.186.210.106:) TransactionRolledbackLocalException in method: public abstra
          ct void org.spec.jappserver.mfg.workorderent.ejb.WorkOrderEntLocal.process(), causedBy:
          java.lang.reflect.UndeclaredThrowableException
           at $Proxy129.add(Unknown Source)
           at org.spec.jappserver.mfg.workorderent.ejb.WorkOrderCmp20EJB.process(WorkOrderCmp20EJB.java:508)
          


          Where WorkOrderCmp20EJB.process(WorkOrderCmp20EJB.java:508) is:
          buyer.add(cid, qtyRequired);
          


          • 2. Re: Bug in Sun's j2sdk1.4.2_03 proxy generation?
            aloubyansky