Announcement Announcement Module
Collapse
No announcement yet.
"Method-not-found-exception" given for DirectChannel-->send method in SI 2.1.3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Kindly give me suitable configuration option for <poller> with <trigger>

    Comment


    • #32
      Hi!
      http://static.springsource.org/sprin...oint-namespace
      And here we have samples: https://github.com/SpringSource/spri...ration-samples
      A point to start.

      I said you once: read more books. Be the man!

      Comment


      • #33
        Your 'trigger' attribute is empty - you need one of fixed-rate, fixed-delay, cron or a reference to a Trigger <bean/> in trigger.

        This tells the poller when to poll.

        Please read the documentation about pollers (http://static.springsource.org/sprin...oint-namespace).

        Comment


        • #34
          I am using the following and the issue is fixed.

          <int:service-activator input-channel="inputChannel" ref="getcompcount"
          method="getCompanyCountName" output-channel="outputChannel">

          <intoller fixed-delay="20000" max-messages-per-poll="2">
          <int:advice-chain />
          </intoller>
          </int:service-activator>


          But I am getting the following

          <faultstring xml:lang="en">java.lang.NullPointerException</faultstring>
          <detail>
          <ns3:SoapFaultDetail xmlns:ns3="http://www.medquist.com/services/v1/exception">
          <errorCode>UNKNOWN</errorCode>
          <retryable>true</retryable>
          <uniqueId>61632d25-3b9e-408b-83e8-8fa84267985b</uniqueId>
          </ns3:SoapFaultDetail>
          </detail>


          The following is the stack trace:

          =org.jboss.monitor.services.ScriptingListener metric=JVM {Committed=628621312, Used=501114008, Init=67108864, Max=704643072}
          2013-06-07 13:16:26,282 level=INFO thread=ScriptProcessor[jboss.monitor:service=ScriptingListener] category=org.jboss.monitor.services.ScriptingListe ner metric=GC {MajorGCCount=5, MinorGCTime=1803, MajorGCTime=1960, MinorGCCount=57}
          2013-06-07 13:16:51,826 level=DEBUG thread=http-0.0.0.0-8081-4 category=com.medq.exception.SoapFaultExceptionReso lver Resolving exception from endpoint [public com.medq.organization.v1.ws.GetCompanyCountByNameR esponse com.medq.organization.ws.OrganizationEndpoint.getC ompanyCountByName(com.medq.organization.v1.ws.GetC ompanyCountByNameRequest)]: java.lang.NullPointerException
          2013-06-07 13:16:51,826 level=WARN thread=http-0.0.0.0-8081-4 category=com.medq.organization.ws.OrganizationEndp oint Endpoint execution resulted in exception
          java.lang.NullPointerException
          at com.medq.organization.ws.OrganizationEndpoint.getC ompanyCountByName(OrganizationEndpoint.java:117)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.springframework.ws.server.endpoint.MethodEndpo int.invoke(MethodEndpoint.java:115)
          at org.springframework.ws.server.endpoint.adapter.Mar shallingMethodEndpointAdapter.invokeInternal(Marsh allingMethodEndpointAdapter.java:135)
          at org.springframework.ws.server.endpoint.adapter.Abs tractMethodEndpointAdapter.invoke(AbstractMethodEn dpointAdapter.java:58)
          at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:228)
          at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:170)
          at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:88)
          at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)
          at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:230)
          at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
          at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:560)
          at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
          at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.security.SecurityUtil$1.run(Se curityUtil.java:275)
          at org.apache.catalina.security.SecurityUtil$1.run(Se curityUtil.java:273)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAsPrivileged(Subject .java:517)
          at org.apache.catalina.security.SecurityUtil.execute( SecurityUtil.java:307)
          at org.apache.catalina.security.SecurityUtil.doAsPriv ilege(SecurityUtil.java:167)
          at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:283)
          at org.apache.catalina.core.ApplicationFilterChain.ac cess$000(ApplicationFilterChain.java:56)
          at org.apache.catalina.core.ApplicationFilterChain$1. run(ApplicationFilterChain.java:189)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:185)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.security.SecurityUtil$1.run(Se curityUtil.java:275)
          at org.apache.catalina.security.SecurityUtil$1.run(Se curityUtil.java:273)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAsPrivileged(Subject .java:517)
          at org.apache.catalina.security.SecurityUtil.execute( SecurityUtil.java:307)
          at org.apache.catalina.security.SecurityUtil.doAsPriv ilege(SecurityUtil.java:248)
          at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:230)
          at org.apache.catalina.core.ApplicationFilterChain.ac cess$000(ApplicationFilterChain.java:56)
          at org.apache.catalina.core.ApplicationFilterChain$1. run(ApplicationFilterChain.java:189)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:185)
          at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:235)
          at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:183)
          at org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:95)
          at org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.process(SecurityContextEstablishment Valve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.invoke(SecurityContextEstablishmentV alve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionV alve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:567)
          at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:451)
          at java.lang.Thread.run(Thread.java:662)
          2013-06-07 13:16:51,831 level=ERROR thread=http-0.0.0.0-8081-4 category=com.medq.exception.SoapFaultExceptionReso lver message="Returning soap fault to the client." uniqueId=61632d25-3b9e-408b-83e8-8fa84267985b
          java.lang.NullPointerException

          Comment


          • #35
            Hi!

            The StackTrace tells you where it is:
            java.lang.NullPointerException
            at com.medq.organization.ws.OrganizationEndpoint.getC ompanyCountByName(OrganizationEndpoint.java:117)
            It's your code, so here we are powerless...

            And, please, to make your posts more readable use [ CODE ] [ /CODE ] & [ QUOTE ] [ /QUOTE ] formatting tags without whitespaces.
            Or just follow with "Go Advanced"

            Comment


            • #36
              Thank you Cleric for addressing the issue.

              The code is as follows.

              ApplicationContext context = new ClassPathXmlApplicationContext("/applicationContextSI.xml",this.getClass());
              MessageChannel inputChannel = (MessageChannel) context.getBean("inputChannel", MessageChannel.class);
              PollableChannel outputChannel = (PollableChannel) context.getBean("outputChannel", PollableChannel.class);
              //("Class name of the typecast object"+inputChannel.getClass().getName());
              Message<String> message1 =MessageBuilder.withPayload(request.getCompanyName ())
              .setHeader("foo", "bar")
              .build() ;

              inputChannel.send(message1);


              // Message<?> reply = output.receive();

              GetCompanyCountByNameResponse Resp = JAXB_OBJECT_FACTORY.createGetCompanyCountByNameRes ponse();
              Resp.setCompanyCount("ff"+outputChannel.receive(0) .getPayload());

              return Resp ;


              Application context is as follows:

              <int:channel id="inputChannel">
              <int:queue/>
              </int:channel>

              <int:channel id="outputChannel">
              <int:queue capacity="100"/>
              </int:channel>
              <!--
              <payload-type-router input-channel="routingChannel">
              <mapping type="java.lang.String" channel="inputChannel" />
              <mapping type="java.lang.String" channel="outputChannel" />
              </payload-type-router>
              -->
              <int:service-activator input-channel="inputChannel" ref="getcompcount"
              method="getCompanyCountName" output-channel="outputChannel">

              <intoller fixed-delay="20000" max-messages-per-poll="2">
              <int:advice-chain />
              </intoller>
              </int:service-activator>



              <beans:bean id="getcompcount"
              class="com.medq.org.OrganizationBOBean" />

              Comment


              • #37
                No, you didn't understand me: it's your code and you have NPE in the line
                com.medq.organization.ws.OrganizationEndpoint.getC ompanyCountByName(OrganizationEndpoint.java:117)
                Try to do something yourself, please...

                Comment


                • #38
                  I am sorry. I thought the error is triggered by SI.
                  But its indeed my code issue which I will resolve myself.

                  THANK YOU VERY MUCH FOR ALL YOUR SUPPORT. I END THE CYCLE HERE ITSELF. LET ME KNOW IN CASE I COULD CONTRIBUTE SOMETHING FOR THE FORUM CAUSE.

                  Comment

                  Working...
                  X