Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DMI parameters

    Well, we got a DMI call which pass trhough some parameters to its Java class.
    This is the source code:
    // Client side-Javascript Code
    click: function (formulario) { // Or whatever event to call dmi function
    isc.DMI.call({
    appID: "MyJavaClass",
    className: "com.redur.MyJavaClass",
    methodName: "myMethod",
    arguments: [
    value1,
    value2,
    ...
    value_N],
    callback : function (response, data) {
    // Our callback function to do whatever
    }
    });
    }

    // Server Side-Java code
    package com.redur;
    import any.package.from.any.Library;

    public class MyJavaClass extends SqlMapClientDaoSupport {

    public void albsValorar (String field1, BigDecimal field2,... String field_N) throws Exception {
    // Here things suppose to do to process data received, etc, etc
    }
    }

    The main thing is that, if I define as BigDecimal (or another numeric class) on any input parameter of java method (in this case, field2, for example), and from client side I don't pass any value, and method receive a null value at that point, then we get a exception:
    java.lang.IllegalArgumentException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:973)
    at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:805)
    at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:309)
    at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
    at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:231)
    at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:284)
    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:168)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:137)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    How/Where can I define that these parameters are nullables?
    What should I do to avoid exceptions when my parameters in origin are nulls?



    We are working under:
    v9.0p_2013-08-20/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28

    #2
    Could you please provide more concrete issue info? I mean full java method declaration without skipping params using "...". I also would like to see client code with actual values that you pass to the server via isc.DMI.call.

    I'm asking for this cause I could not reproduce your issue - BigDecimal as any other numeric formats worked for me despite providing null values.

    Comment


      #3
      Originally posted by sabaka View Post
      Could you please provide more concrete issue info? I mean full java method declaration without skipping params using "...". I also would like to see client code with actual values that you pass to the server via isc.DMI.call.

      I'm asking for this cause I could not reproduce your issue - BigDecimal as any other numeric formats worked for me despite providing null values.
      As I wrote, the actual value I pass from client side is a null value.
      That's the problem, that I pass a null value to a BigDecimal parameter on the server side. I want to know if there is any way to configure server side to "by-pass" certain parameters when null values.
      A simplier code example:

      /* Client-Javascript */
      isc.DMI.call({
      appID: "MyJavaClass",
      className: "com.redur.MyJavaClass",
      methodName: "myMethod",
      arguments: [value1],
      callback : function (response, data) {
      // Our callback function to do whatever
      }
      });
      }

      /* Server-Java side*/
      package com.redur;
      import any.package.from.any.Library;

      public class MyJavaClass extends SqlMapClientDaoSupport {

      public void albsValorar (BigDecimal field1) throws Exception {
      // Here things suppose to do to process data received, etc, etc
      }
      }

      value1 can be a number or a null value. When it is a number there is no problem, the question is when value1 is null...
      How can I code when it is null, ISC don't try get a BigDecimal object... That's the question...

      P.D.
      The solution it's not assign a default value like 0, because that field is a nullable field in database and can perfectly a null value and not a zero initialization.

      Comment


        #4
        Please enable DEBUG log level for class com.isomorphic.base.Reflection and post here complete log of Smartclient processing request with your DMI call.

        Comment


          #5
          Originally posted by sabaka View Post
          Please enable DEBUG log level for class com.isomorphic.base.Reflection and post here complete log of Smartclient processing request with your DMI call.
          We are trying out debug log level for that class but I can't get how. What are the steps we must follow to achieve debug on that class.
          Anyway, line number after decompiled that class you said, fail at this point:
          return DataTools.setProperties(newArgMap, beanInstance, dataSource);


          Thanks in advance

          Comment


            #6
            Logging level defaults can be set on a per-class basis in the log4j.config.xml file located in the WEB-INF/classes directory for your isomorphic web applications. For more details, please take a look at javadoc for com.isomorphic.log.Logger class.

            Comment


              #7
              Originally posted by sabaka View Post
              Logging level defaults can be set on a per-class basis in the log4j.config.xml file located in the WEB-INF/classes directory for your isomorphic web applications. For more details, please take a look at javadoc for com.isomorphic.log.Logger class.
              Now I understand even less.
              This is the debug result:
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - adaptArgsAndInvoke:

              public java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,int,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,int,java.math.BigDecimal,java.lang.String,java.lang.String,java.math.BigDecimal,java.math.BigDecimal) throws java.sql.SQLException

              requiredArgs: [null, null, null, null, null, java.util.Date, null, null, null, null, java.util.Date, null, null, java.lang.String, java.lang.String, java.lang.String, null] optionalArgs: [com.isomorphic.servlet.RequestContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, javax.servlet.http.HttpSession, com.isomorphic.rpc.RPCManager, com.isomorphic.rpc.RPCRequest]
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: int
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: int
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.math.BigDecimal
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
              === 2013-11-15 17:59:21,376 [ec-3] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
              === 2013-11-15 17:59:21,377 [ec-3] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
              === 2013-11-15 17:59:21,377 [ec-3] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
              === 2013-11-15 17:59:21,377 [ec-3] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.math.BigDecimal
              === 2013-11-15 17:59:21,388 [ec-3] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.math.BigDecimal
              === 2013-11-15 17:59:21,389 [ec-3] DEBUG Reflection - Successfully adapted required arg type: null to type: java.math.BigDecimal
              === 2013-11-15 17:59:21,389 [ec-3] DEBUG Reflection - method takes: 17 args. I've assembled: 17 args
              === 2013-11-15 17:59:21,389 [ec-3] DEBUG Reflection - invoking method:
              java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, int, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, int, java.math.BigDecimal, java.lang.String, java.lang.String, java.math.BigDecimal, java.math.BigDecimal) throws java.sql.SQLException

              with arg types: null, null, null, null, null, java.sql.Timestamp, null, null, null, null, java.sql.Timestamp, null, null, java.lang.String, java.lang.String, java.math.BigDecimal, null
              === 2013-11-15 17:59:28,195 [ec-8] INFO DSResponse - [builtinApplication.atClemDS_fetch] DSResponse: List with 21334 items
              === 2013-11-15 17:59:28,196 [ec-8] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
              === 2013-11-15 17:59:28,196 [ec-8] DEBUG SQLTransaction - Committing Oracle transaction "5179695"
              === 2013-11-15 17:59:28,202 [ec-8] DEBUG RPCManager - non-DMI response, dropExtraFields: false
              === 2013-11-15 17:59:28,664 [ec-8] DEBUG SQLTransaction - Returning transactional connection for Oracle with hashcode "5179695"
              === 2013-11-15 17:59:28,664 [ec-8] DEBUG SQLTransaction - Ending Oracle transaction "5179695"
              === 2013-11-15 17:59:28,670 [ec-8] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "5179695"
              === 2013-11-15 17:59:28,670 [ec-8] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 5179695
              === 2013-11-15 17:59:32,672 [ec-3] WARN RequestContext - rpcRequest.execute() failed:
              java.lang.IllegalArgumentException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:973)
              at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:805)
              at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:309)
              at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
              at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:231)
              at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:284)
              at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:168)
              at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:137)
              at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
              at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
              === 2013-11-15 17:59:32,674 [ec-3] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
              === 2013-11-15 18:00:10,604 [ec-4] INFO DSResponse - [builtinApplication.atbatRemitentesDS_fetch] DSResponse: List with 57496 items
              === 2013-11-15 18:00:10,605 [ec-4] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
              === 2013-11-15 18:00:10,606 [ec-4] DEBUG SQLTransaction - Committing Oracle transaction "2771619"
              === 2013-11-15 18:00:10,612 [ec-4] DEBUG RPCManager - non-DMI response, dropExtraFields: false
              === 2013-11-15 18:00:11,891 [ec-4] DEBUG SQLTransaction - Returning transactional connection for Oracle with hashcode "2771619"
              === 2013-11-15 18:00:11,891 [ec-4] DEBUG SQLTransaction - Ending Oracle transaction "2771619"
              === 2013-11-15 18:00:11,903 [ec-4] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "2771619"
              === 2013-11-15 18:00:11,903 [ec-4] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 2771619

              What's wrong here?

              Comment


                #8
                IllegalArgumentException most likely is thrown by inside code of albsValorar method, that is called via DMI. I have no idea though why that Exception is not reported properly.. Is there any more information in log you didn't send to us?

                Could you please enable DEBUG log level for com.isomorphic.rpc.RPCDMI class also and share it here.

                I also would appreciate if you share more details about what your method is actually doing. May be you could experiment a bit with the method itself, for example commenting out method's body and see if Exception still occurs.

                Comment


                  #9
                  Originally posted by sabaka View Post
                  IllegalArgumentException most likely is thrown by inside code of albsValorar method, that is called via DMI. I have no idea though why that Exception is not reported properly.. Is there any more information in log you didn't send to us?

                  Could you please enable DEBUG log level for com.isomorphic.rpc.RPCDMI class also and share it here.

                  I also would appreciate if you share more details about what your method is actually doing. May be you could experiment a bit with the method itself, for example commenting out method's body and see if Exception still occurs.
                  The exception throws before reach the first line of our code, because there is a interrupt point executing in debug mode, and never stops there.
                  That's all information that I get. Now I changed RPCDMI to debug mode, but I get the same information as before:

                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - adaptArgsAndInvoke:

                  public java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,int,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,int,java.math.BigDecimal,java.lang.String,java.lang.String,java.math.BigDecimal,java.math.BigDecimal) throws java.sql.SQLException

                  requiredArgs: [java.lang.String, java.lang.String, null, null, null, java.util.Date, null, null, null, null, java.util.Date, null, null, java.lang.String, java.lang.String, java.lang.String, null] optionalArgs: [com.isomorphic.servlet.RequestContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, javax.servlet.http.HttpSession, com.isomorphic.rpc.RPCManager, com.isomorphic.rpc.RPCRequest]
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,060 [ec-1] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: int
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: int
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.math.BigDecimal
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                  === 2013-11-18 09:29:58,061 [ec-1] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.math.BigDecimal
                  === 2013-11-18 09:29:58,080 [ec-1] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.math.BigDecimal
                  === 2013-11-18 09:29:58,080 [ec-1] DEBUG Reflection - Successfully adapted required arg type: null to type: java.math.BigDecimal
                  === 2013-11-18 09:29:58,080 [ec-1] DEBUG Reflection - method takes: 17 args. I've assembled: 17 args
                  === 2013-11-18 09:29:58,080 [ec-1] DEBUG Reflection - invoking method:
                  java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, int, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, int, java.math.BigDecimal, java.lang.String, java.lang.String, java.math.BigDecimal, java.math.BigDecimal) throws java.sql.SQLException

                  with arg types: java.lang.String, java.lang.String, null, null, null, java.sql.Timestamp, null, null, null, null, java.sql.Timestamp, null, null, java.lang.String, java.lang.String, java.math.BigDecimal, null
                  === 2013-11-18 09:29:59,703 [ec-1] WARN RequestContext - rpcRequest.execute() failed:
                  java.lang.IllegalArgumentException
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:973)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:805)
                  at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:309)
                  at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
                  at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:231)
                  at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:284)
                  at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:168)
                  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:137)
                  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                  at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
                  at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
                  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
                  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
                  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
                  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


                  Our method only calls to a store procedure and return the value retrieved from PL.
                  We finished testing leaving empty our body method so that method execute nothing, and gets the same result...

                  Comment


                    #10
                    Other reason because I think the problem is outside body method and rely on arguments type is that if I replace BigDecimal and Integer types by String types, we get inside body method and program executes normally without any exception or problem.

                    Example excution with "all String" types (there are Timestamp too, but theses ones are not problem):

                    === 2013-11-18 11:01:33,783 [ec-5] DEBUG Reflection - adaptArgsAndInvoke:

                    public java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.sql.Timestamp,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.sql.SQLException

                    requiredArgs: [java.lang.String, java.lang.String, null, null, null, java.util.Date, null, null, null, null, java.util.Date, null, null, java.lang.String, java.lang.String, java.lang.String, null] optionalArgs: [com.isomorphic.servlet.RequestContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, javax.servlet.http.HttpSession, com.isomorphic.rpc.RPCManager, com.isomorphic.rpc.RPCRequest]
                    === 2013-11-18 11:01:33,784 [ec-5] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                    === 2013-11-18 11:01:33,784 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                    === 2013-11-18 11:01:33,784 [ec-5] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                    === 2013-11-18 11:01:33,784 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                    === 2013-11-18 11:01:33,785 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,785 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,785 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,785 [ec-5] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
                    === 2013-11-18 11:01:33,793 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
                    === 2013-11-18 11:01:33,793 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,793 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - checking whether type: java.util.Date fulfills type: java.sql.Timestamp
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.util.Date to type: java.sql.Timestamp
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                    === 2013-11-18 11:01:33,794 [ec-5] DEBUG Reflection - checking whether type: java.lang.String fulfills type: java.lang.String
                    === 2013-11-18 11:01:33,795 [ec-5] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                    === 2013-11-18 11:01:33,795 [ec-5] DEBUG Reflection - Successfully adapted required arg type: null to type: java.lang.String
                    === 2013-11-18 11:01:33,795 [ec-5] DEBUG Reflection - method takes: 17 args. I've assembled: 17 args
                    === 2013-11-18 11:01:33,795 [ec-5] DEBUG Reflection - invoking method:
                    java.util.HashMap com.redur.orm.PruebaAlbs.PruebaAlbsPL.albsValorar(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException

                    with arg types: java.lang.String, java.lang.String, null, null, null, java.sql.Timestamp, null, null, null, null, java.sql.Timestamp, null, null, java.lang.String, java.lang.String, java.lang.String, null
                    Evidence that pass throuhgh method
                    === 2013-11-18 11:01:35,413 [ec-5] DEBUG RPCDMI - rpc returned data
                    === 2013-11-18 11:01:35,413 [ec-5] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                    === 2013-11-18 11:01:40,222 [ec-6] INFO DSResponse - [builtinApplication.atClemDS_fetch] DSResponse: List with 21334 items
                    === 2013-11-18 11:01:40,222 [ec-6] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                    === 2013-11-18 11:01:40,222 [ec-6] DEBUG SQLTransaction - Committing Oracle transaction "20803610"
                    === 2013-11-18 11:01:40,229 [ec-6] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                    === 2013-11-18 11:01:42,500 [ec-6] DEBUG SQLTransaction - Returning transactional connection for Oracle with hashcode "20803610"
                    === 2013-11-18 11:01:42,500 [ec-6] DEBUG SQLTransaction - Ending Oracle transaction "20803610"
                    === 2013-11-18 11:01:42,511 [ec-6] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "20803610"
                    === 2013-11-18 11:01:42,511 [ec-6] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 20803610

                    The text "Evidence that pass throuhgh method" obviously is a System.out.println which I have wrote in source code.

                    Summary:
                    When null values with BigDecimal:
                    Fails. (and it does not even get body method).
                    When null values with Strings:
                    Works.

                    Comment


                      #11
                      Well it's not necessary you continue trying out a solution, I've found the root of the problem.

                      The cause is when that parameter is a numeric primitive Java type such as int, double, etc... AND from Javascript side we don't pass any value, DMI call crashes and break out through exception.

                      If you fill field with some value there is no problem, even with numeric primitive types.

                      Thanks for helping us, I hope this thread can help more people with same or similar problem.

                      Comment


                        #12
                        Good to hear! I was about to discover same thing - was going to create exactly same method as yours with all 20+ params. Sadly I was tricked by initial idea that BigDecimal is causing problems.

                        Good luck!

                        Comment

                        Working...
                        X