4 Replies Latest reply: Jul 14, 2009 10:53 PM by 710579 RSS

    Loadjava error for spring-ws-1.5.4.jar: Incompatible argument to function

    710579
      Hi, I had the following log when I used the loadjava tool for spring-ws-1.5.4. I need the class org/springframework/ws/transport/http/CommonsHttpMessageSender particularly to load w/o errors or warnings because I am using it in one of my classes. I am wondering why I am getting this error (bold and underlined in log):

      errors   : class SMSG21.org/springframework/ws/transport/http/CommonsHttpMessageSender_
      ORA-29552: verification warning: java.lang.VerifyError: (class: org/springframework/ws/transport/http/CommonsHttpMessageSender, method: setMaxConnectionsPerHost signature: (Ljava/util/Properties;)V) Incompatible argument to function_

      ============================================================================================================

      arguments: '-u' 'SMSG21/**@udev110g.world' '-schema' 'SMSG21' '-r' '-v' '-f' '-order' '-genmissing' 'spring-ws-1.5.4.jar' '-resolver' '((*SYS) (*PUBLIC) (*SMSG21))'*
      creating : resource SMSG21.META-INF/MANIFEST.MF with resolver ((*SYS) (*PUBLIC) (*SMSG21))
      loading : resource SMSG21.META-INF/MANIFEST.MF
      .
      .
      .
      skipping : class SMSG21.org/springframework/ws/transport/context/TransportContextHolder$TransportThreadLocal
      skipping : class SMSG21.org/springframework/ws/transport/context/TransportContextHolder
      resolving: class SMSG21.org/springframework/ws/transport/http/AbstractHttpSenderConnection
      resolving: class SMSG21.org/springframework/ws/transport/http/AbstractHttpWebServiceMessageSender
      resolving: class SMSG21.org/springframework/ws/transport/http/CommonsHttpConnection
      resolving: class SMSG21.org/springframework/ws/transport/http/CommonsHttpMessageSender
      errors   : class SMSG21.org/springframework/ws/transport/http/CommonsHttpMessageSender_
      ORA-29552: verification warning: java.lang.VerifyError: (class: org/springframework/ws/transport/http/CommonsHttpMessageSender, method: setMaxConnectionsPerHost signature: (Ljava/util/Properties;)V) Incompatible argument to function_
      .
      .
      .
      The following operations failed
      class SMSG21.org/springframework/ws/server/endpoint/adapter/XPathParamAnnotationMethodEndpointAdapter: resolution
      class SMSG21.org/springframework/ws/server/endpoint/mapping/AbstractAnnotationMethodEndpointMapping: resolution
      class SMSG21.org/springframework/ws/server/endpoint/mapping/PayloadRootAnnotationMethodEndpointMapping: resolution
      class SMSG21.org/springframework/ws/soap/addressing/server/AnnotationActionEndpointMapping: resolution
      class SMSG21.org/springframework/ws/soap/server/endpoint/mapping/SoapActionAnnotationMethodEndpointMapping: resolution
      class SMSG21.org/springframework/oxm/jaxb/Jaxb2Marshaller$ByteArrayDataSource: resolution
      class SMSG21.org/springframework/oxm/jaxb/Jaxb2Marshaller$Jaxb2AttachmentMarshaller: resolution
      class SMSG21.org/springframework/oxm/jaxb/Jaxb2Marshaller$Jaxb2AttachmentUnmarshaller: resolution
      class SMSG21.org/springframework/oxm/jaxb/Jaxb2Marshaller: resolution
      exiting : Failures occurred during processing

      ============================================================================================================


      And so when I finally use loadjava to load my webservice, I am getting the following error in the log:


      ============================================================================================================

      arguments: '-u' 'SMSG21/***@udev110g.world' '-r' '-v' '-f' '-order' '-genmissing' 'netcastclient.jar'
      creating : resource META-INF/MANIFEST.MF
      loading : resource META-INF/MANIFEST.MF
      .
      .
      .
      resolving: class ph/com/sunlife/netcast/NetcastClientRequest
      resolving: class ph/com/sunlife/netcast/NetcastCommonsHTTPMessageSender
      errors   : class ph/com/sunlife/netcast/NetcastCommonsHTTPMessageSender_
      ORA-29552: verification warning: java.lang.VerifyError: (class: org/springframework/ws/transport/http/CommonsHttpMessageSender, method: setMaxConnectionsPerHost signature: (Ljava/util/Properties;)V) Incompatible argument to function_

      resolving: class ph/com/sunlife/netcast/ErrorCode
      resolving: class ph/com/sunlife/netcast/WSHostConfiguration
      resolving: class ph/com/sunlife/netcast/NetcastClient
      skipping : resource ph/com/sunlife/netcast/NetcastClientContext.xml
      resolving: class ph/com/sunlife/netcast/mail/NetcastPop3Client
      skipping : resource NetcastClient.mf
      skipping : resource .classpath
      skipping : resource config.properties
      skipping : resource .project
      skipping : resource .springBeans

      ============================================================================================================

      And when I run a stored procedure in Oracle using PL/SQL:


      create or replace
      procedure call_NetcastClient
      as language java name 'ph.com.sunlife.netcast.NetcastClient.main(java.lang.String[])';


      begin
      call_NetcastClient();
      end;


      I run into the following exception:


      ORA-29516:_ Aurora assertion failure: Assertion failure at eoasga.c:557
      EOA runtime assertion failure: eoasga.c:557
      ORA-06512:_ at "SMSG21.CALL_NETCASTCLIENT", line 1
      ORA-06512:_ at line 2


      Can anyone help regarding this issue? I think the runtime assertion failure is caused by the "Incompatible argument to function" warning during the resolution of the class org/springframework/ws/transport/http/CommonsHttpMessageSender while being loaded into Oracle (schema: smsg21). How can I avoid it? What causes this warning/error? Any ideas or help would be appreciated...
        • 1. Re: Loadjava error for spring-ws-1.5.4.jar: Incompatible argument to function
          thomaso
          Your problem may depend on version of Oracle you are running.
          In general:
          Oracle 10.2.... JVM is 1.4.1
          Oracle 11.1... JVM is 1.5
          In addition to possibly a JVM conflict, if you are running on 11g: Oracle has tighten up security, you may have to grant execute on each class separately.

          What version of Oracle are you running?

          Thomas
          • 2. Re: Loadjava error for spring-ws-1.5.4.jar: Incompatible argument to function
            710579
            Now that you've mentioned it, I'm actually using Oracle 9i (Ora92).... JVM 1.3.1. Any possible issues with this version?

            The disappointing part is that I was able to upload all my jars "successfully" before. That is, my webservice is called successfully though there are some loadjava class resolution errors that I couldn't avoid in spring.jar and spring-ws-1.5.4.jar. Fortunately I didn't depend on those classes so that's why the webservice still ran. Now, however, class ph/com/sunlife/netcast/NetcastCommonsHTTPMessageSender from spring-ws-1.5.4.jar had a verification warning and I'm getting the Aurora assertion failure that I just described when I'm calling my webservice.

            I used the ff. loadjava commands to load my jars in SMSG21 schema:

            1) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing activation-1.0.2.jar
            2) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing commons-codec-1.3.jar
            3) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing commons-httpclient-3.1.jar
            4) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing commons-logging-1.1.1.jar
            5) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing mail.jar
            6) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing dom.jar
            7) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -v -f -order -genmissing xercesImpl.jar (dependence: dom.jar)
            8) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -v -f -order -genmissing saaj-impl.jar (dependence: commons-logging.jar, xercesImpl.jar)
            9) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing saaj-api.jar (dependence: saaj-impl.jar)
            10) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -v -f -order -genmissing jaxp-api.jar
            11) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing sax.jar

            I also ran the ff. PL/SQL block to grant permission in SMSG21 (schema I'm using) to load specific classes from spring.jar into restricted packages:

            begin
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLNonTransientException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLTransientException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLIntegrityConstraintViolationException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.instrument.IllegalClassFormatException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.ServiceLoader', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLSyntaxErrorException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLTransientConnectionException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ConcurrentHashMap', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.Enum', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.annotation.Annotation', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLNonTransientConnectionException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.RejectedExecutionException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.TimeUnit', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ThreadPoolExecutor$AbortPolicy', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ScheduledThreadPoolExecutor', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ScheduledFuture', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLTransactionRollbackException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.AnnotatedElement', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.RejectedExecutionHandler', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.management.ManagementFactory', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ExecutorService', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.instrument.ClassFileTransformer', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.CopyOnWriteArraySet', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.ParameterizedType', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.GenericArrayType', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.annotation.Inherited', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.BlockingQueue', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.WildcardType', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.instrument.Instrumentation', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.SynchronousQueue', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLRecoverableException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLFeatureNotSupportedException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.TypeVariable', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLTimeoutException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.lang.reflect.Type', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLInvalidAuthorizationSpecException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ScheduledExecutorService', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ThreadPoolExecutor', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.sql.SQLDataException', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.Executors', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.Executor', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.ThreadFactory', null );
            dbms_java.grant_permission('SMSG21','SYS:oracle.aurora.security.JServerPermission','LoadClassInPackage.java.util.concurrent.LinkedBlockingQueue', null );
            commit;
            end;

            12) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing spring.jar
            13) loadjava -u SMSG21/***@udev110g.world -schema SMSG21 -r -resolver "((*SYS) (*PUBLIC) (*SMSG21))" -v -f -order -genmissing spring-ws-1.5.4.jar

            I think I'm going to try the grant execute to each class that you suggested. In the meantime, what else can I do about this in case it doesn't work? Any more ideas?
            • 3. Re: Loadjava error for spring-ws-1.5.4.jar: Incompatible argument to function
              710579
              Thanks Thomas for the help. I'm having my Oracle client reinstalled to possibly address the aurora assertion failure issue, or the loadjava error. And I mentioned too that it should be the same version as the Oracle Applications Server w/c our systems admin are using.

              hopefully this problem would be solved asap. Please keep those ideas coming in.
              • 4. Re: Loadjava error for spring-ws-1.5.4.jar: Incompatible argument to function
                710579
                I've resolved this issue w/ System Admin's help. We encountered the aurora assertion failures from running PL/SQL statements that use dbms_java functions because the classes in those restricted packages were either overwritten before by incompatible classes (compiled in other java versions) or are invalid. The solution was to restart Oracle 10g Application Server's JVM and reload all the original classes, which systems did.