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

  • #16
    Hi!

    What is a reason to do this:
    Message<String> message2 = MessageBuilder.fromMessage(message1).build();
    Here it's just enough to use message1, or you don't show entire code...
    java.lang.IncompatibleClassChangeError: Class org.springframework.integration.message.GenericMes sage does not implement the requested interface org.springframework.integration.Message"
    Looks like you have a CLASSPATH issue: there are conflict of Spring Integration versions.
    You should have just only last one.

    Good luck!

    Comment


    • #17
      when I change it to use only Message1 like the following I get the following error messag again

      Message<String> message1 =MessageBuilder.withPayload(request.getCompanyName ())
      .setHeader("foo", "bar")
      .build() ;

      inputChannel.send(message1);

      Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletExc eption: Request processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.integration.channel.DirectChan nel.send(Lorg/springframework/integration/Message

      I checked the CLASSPATH conflict probability and found that its only referring to SI 2.1.3.RELEASE . I cleared cache, libraries in eclipse and re-imported everything , cleared all jar(s) except SI 2.1.3.RELEASE

      Could you let me know how I could change it to MessageChannel also if there is some issues with DirectChannel

      Comment


      • #18
        DirectChannel implements org.springframework.integration.MessageChannel, so you can simply make channel variable as MessageChannel.
        java.lang.NoSuchMethodError: org.springframework.integration.channel.DirectChan nel.send(Lorg/springframework/integration/Message
        I continue to insist to versions issue.
        Message was in the package org.springframework.integration.core in version 1.0 ...
        And here it looks like you are using DirectChannel from SI 1.0, but Message from SI 2.x

        Comment


        • #19
          Yes its. I salute your experience in this regard. In fact one of my war's was injected with 1.0 version of SI and it never got cleaned up using maven clean. When I cleaned it up physically the strange error gone. Just kindly address one last direct issue i am facing.

          Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/integration]

          Sorry to ask this silly question I am a newbie in this area.

          Comment


          • #20
            Try to follow with this one: http://static.springsource.org/sprin...de-conventions
            And be sure, that you have in CLASSPATH spring-integration-core.jar

            Comment


            • #21
              I am having spring-integration-core-2.1.3.RELEASE.jar in my CLASSPATH. is not it enough or I need to download any jar?

              please help

              Comment


              • #22
                Show Exception StackTrace, please

                Comment


                • #23
                  Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/integration]
                  Offending resource: class path resource [com/medq/organization/ws//applicationContextSI.xml]

                  Comment


                  • #24
                    No! Full StackTrace.
                    Copy from log file.
                    And a head of that applicationContextSI.xml

                    Comment


                    • #25
                      Application_context.xml
                      <beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xmlns:int="http://www.springframework.org/schema/integration"
                      xmlns:int-twitter="http://www.springframework.org/schema/integration/twitter"
                      xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
                      xsi:schemaLocation="
                      http://www.springframework.org/schema/beans
                      http://www.springframework.org/schem...ring-beans.xsd
                      http://www.springframework.org/schema/integration
                      http://www.springframework.org/schem...ntegration.xsd
                      http://www.springframework.org/schem...ration/twitter
                      http://www.springframework.org/schem...on-twitter.xsd
                      http://www.springframework.org/schem...gration/stream
                      http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">


                      2013-06-05 17:45:16,173 level=WARN thread=http-0.0.0.0-8081-2 category=com.medq.organization.ws.OrganizationEndp oint Endpoint execution resulted in exception
                      org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/integration]
                      Offending resource: class path resource [com/medq/organization/ws//applicationContextSI.xml]

                      at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
                      at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
                      at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:80)
                      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.error(BeanDefinitionParserDelegat e.java:284)
                      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1332)
                      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1325)
                      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:135)
                      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:93)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
                      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
                      at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:122)
                      at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:92)
                      at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:130)
                      at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:467)
                      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:397)
                      at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:197)
                      at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:172)
                      at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:158)
                      at com.medq.organization.ws.OrganizationEndpoint.getC ompanyCountByName(OrganizationEndpoint.java:103)
                      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-05 17:45:16,176 level=ERROR thread=http-0.0.0.0-8081-2 category=com.medq.exception.SoapFaultExceptionReso lver message="Returning soap fault to the client." uniqueId=54ffb2c6-4e70-4390-a722-f8cf9820b512
                      org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/integration]
                      Offending resource: class path resource [com/medq/organization/ws//applicationContextSI.xml]

                      Comment


                      • #26
                        Sorry, I'm very busy:
                        http://lmgtfy.com/?q=Unable+to+locat...hema+namespace

                        Comment


                        • #27
                          Sorry I am unable to figure out the solution. Please let me know the solution once you are a bit free.

                          Comment


                          • #28
                            I mean, that it looks like you don't have a spring-integration-core-2.1.3.RELEASE.jar in right CLASSPATH.
                            Or the Spring Core are loaded by one ClassLoader, but the Spring Integration another.
                            So, Spring sees your application context and tries to parse it, but it can't find appropriate class to parse SI tags.

                            Comment


                            • #29
                              Turn on DEBUG level logging for org.springframework - you will see many many log messages about loading the context and parsing the XML.

                              This message means you either don't have the spring-integration-core jar on the classpath, or it has been repackaged and has lost important information in the META-INF directory.

                              Another thing to try is
                              Code:
                              System.out.println(System.getProperty("java.class.path")
                              before loading the context - that way you can see exactly what jars are on the classpath.

                              Finally, you can run the JVM with
                              Code:
                              -verbose
                              and you'll get lots of information about which jar each class is loaded from.

                              Comment


                              • #30
                                I overcome this CLASSPATH issue. now getting another following issues.
                                My service activator is the following

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

                                <intoller max-messages-per-poll="10" trigger="">

                                </intoller>
                                </int:service-activator>

                                I am getting

                                >Configuration problem: A &lt;poller> must have one and only one trigger configuration.
                                Offending resource: class path resource

                                Comment

                                Working...
                                X