You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Ram@dstws" <rv...@dstws.com> on 2015/12/11 14:17:29 UTC

Getting NO Messege Reader Exception,Please give me the direction to move forward

[pache.camel.spring.Main.main()] ServerImpl                     INFO  Setting
the server's publish address to be http://localhost:58605
[pache.camel.spring.Main.main()] Server                         INFO 
jetty-7.5.4.v20111024
[pache.camel.spring.Main.main()] AbstractConnector              INFO 
Started SelectChannelConnector@localhost:58605 STARTING
[pache.camel.spring.Main.main()] ContextHandler                 INFO 
started o.e.j.s.h.ContextHandler{,null}
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache
Camel 2.10.0.redhat-60024 (CamelContext: AccessControl-Routes) is starting
[pache.camel.spring.Main.main()] ManagementStrategyFactory      INFO  JMX
enabled.
[pache.camel.spring.Main.main()] DefaultTypeConverter           INFO  Loaded
192 type converters
[pache.camel.spring.Main.main()] ServerImpl                     INFO 
Setting the server's publish address to be http://localhost:8096/rest
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
Initialising MongoDb endpoint:
Endpoint[mongodb://myDb?collection=accesscontrollist&database=dstfsrc&operation=insert]
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
MongoDb component initialised and endpoint bound to MongoDB collection with
the following paramters. Address list: [localhost/127.0.0.1:27017], Db:
dstfsrc, Collection: accesscontrollist
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
Initialising MongoDb endpoint:
Endpoint[mongodb://myDb?collection=accesscontrollist&database=dstfsrc&operation=insert]
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
MongoDb component initialised and endpoint bound to MongoDB collection with
the following paramters. Address list: [localhost/127.0.0.1:27017], Db:
dstfsrc, Collection: accesscontrollist
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
Initialising MongoDb endpoint:
Endpoint[mongodb://myDb?collection=accesscontrollist&database=dstfsrc&operation=remove]
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
MongoDb component initialised and endpoint bound to MongoDB collection with
the following paramters. Address list: [localhost/127.0.0.1:27017], Db:
dstfsrc, Collection: accesscontrollist
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
Initialising MongoDb endpoint:
Endpoint[mongodb://myDb?collection=accesscontrollist&database=dstfsrc&operation=update]
[pache.camel.spring.Main.main()] MongoDbEndpoint                INFO 
MongoDb component initialised and endpoint bound to MongoDB collection with
the following paramters. Address list: [localhost/127.0.0.1:27017], Db:
dstfsrc, Collection: accesscontrollist
[pache.camel.spring.Main.main()] Server                         INFO 
jetty-7.5.4.v20111024
[pache.camel.spring.Main.main()] AbstractConnector              INFO 
Started SelectChannelConnector@localhost:8096 STARTING
[pache.camel.spring.Main.main()] ContextHandler                 INFO 
started o.e.j.s.h.ContextHandler{,null}
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route:
MongoDB-AccessControlRoute1 started and consuming from:
Endpoint[cxfrs://http://localhost:8096/rest?resourceClasses=com.dstsystems.dstfsrc.acl.routes.AccessControlServices]
[pache.camel.spring.Main.main()] ultManagementLifecycleStrategy INFO 
StatisticsLevel at All so enabling load performance statistics
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total
1 routes, of which 1 is started.
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache
Camel 2.10.0.redhat-60024 (CamelContext: AccessControl-Routes) started in
0.464 seconds
[                qtp24685196-25] JAXRSUtils                     WARN  No
message body reader has been found for request class Associate, ContentType
: application/json.
[                qtp24685196-25] WebApplicationExceptionMapper  WARN 
javax.ws.rs.WebApplicationException
	at
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1054)
	at
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:614)
	at
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:578)
	at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:238)
	at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:89)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:348)
	at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:312)
	at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
	at org.eclipse.jetty.server.Server.handle(Server.java:349)
	at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
	at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
	at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
	at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:745)



--
View this message in context: http://camel.465427.n5.nabble.com/Getting-NO-Messege-Reader-Exception-Please-give-me-the-direction-to-move-forward-tp5774995.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Getting NO Messege Reader Exception with cxf 2.6.1,Please give me the direction to move forward

Posted by "Ram@dstws" <rv...@dstws.com>.
I have resolved this issue while adding below dependency
<dependency>
                     <groupId>org.apache.cxf</groupId>
                     <artifactId>cxf-rt-rs-extension-providers</artifactId>
                     <version>2.6.1</version>
              </dependency>



--
View this message in context: http://camel.465427.n5.nabble.com/Getting-NO-Messege-Reader-Exception-with-cxf-2-6-1-Please-give-me-the-direction-to-move-forward-tp5774995p5779500.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Getting NO Messege Reader Exception,Please give me the direction to move forward

Posted by "Ram@dstws" <rv...@dstws.com>.
  
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>2.10.0.redhat-60024</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>2.10.0.redhat-60024</version>
    </dependency>
 <dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-rs-security-cors</artifactId>
  <version>2.6.1</version>
</dependency>


 
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>3.1.3.RELEASE</version>
    </dependency>

	
	<dependency>
    	<groupId>org.apache.camel</groupId>
    	<artifactId>camel-cxf</artifactId>
    	<version>2.10.0.redhat-60024</version>
	</dependency>
	
	<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http-jetty</artifactId>
        <version>2.6.0.redhat-60024</version>
    </dependency>	

     <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-rs-extension-providers</artifactId>
             <version>2.6.1</version>
         </dependency>
          <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.3.1</version>
             </dependency>

Service:
  @POST
  @Path("/ADDACLAssociate")
  @Consumes("application/json")
  public Response addACLAssociate(@QueryParam("id") String
id,@QueryParam("emp") String name,Associate ass)
  {
   return Response.ok( "success").build();
  }


My pojo:

import java.io.Serializable;

public class Associate implements Serializable
{ 
 String id;
 public String getId()
{
  return id;
}
public void setId( String id )
{
  this.id = id;
}

}


application context.xml


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:camel="http://camel.apache.org/schema/spring"
    xmlns:cxf="http://camel.apache.org/schema/cxf"
    xmlns:jaxrs="http://cxf.apache.org/jaxrs"    
    xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring
       http://camel.apache.org/schema/spring/camel-spring.xsd
       http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
       http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">


  

   
  
	<bean id="myDb" class="com.mongodb.Mongo">
		
		<constructor-arg index="0" value="localhost"/>
	</bean>  
 

     
 
   <bean id="associate"
class="com.dstsystems.dstfsrc.acl.routes.AccessControlAssociate"/>   

     
       <bean id="cxfJaxrsJsonProvider" 
          class="org.apache.cxf.jaxrs.provider.json.JSONProvider" /> 
 <bean id="restResource"
class="com.dstsystems.dstfsrc.acl.routes.AccessControlServices" /> 
 
<jaxrs:server id="restService" staticSubresourceResolution="true"> 
 <jaxrs:serviceBeans> 
     <ref bean="restResource" /> 
   </jaxrs:serviceBeans> 
<jaxrs:providers> 
  <ref bean="cxfJaxrsJsonProvider" /> 
     </jaxrs:providers> 
  </jaxrs:server> 







  <cxf:rsServer id="service" address="/rest/fsrc"
       
serviceClass="com.dstsystems.dstfsrc.acl.routes.AccessControlServices"
loggingFeatureEnabled="true">
    <cxf:providers>
        <bean
class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter" /> 
         
    </cxf:providers>
</cxf:rsServer> 
       
   
   
  <camelContext trace="false" id="AccessControl-Routes"
xmlns="http://camel.apache.org/schema/spring">
    <propertyPlaceholder location="classpath:sql.properties"
id="placeholder"/>
   
    <route id="MongoDB-AccessControlRoute1">
        <from
uri="cxfrs:http://localhost:8096/rest?resourceClasses=com.dstsystems.dstfsrc.acl.routes.AccessControlServices"/>
        <choice>
            <when>
                <simple>${in.header.operationName} ==
'getACLAssociate'</simple>
                <log message="${in.header.operationName}"/>              
                <to uri="bean:associate"/>
                <log message="${body}"/>
                <to
uri="mongodb:myDb?database=dstfsrc&amp;collection=accesscontrollist&amp;operation=insert"/>
              
            </when>
            <when>
                <simple>${in.header.operationName} ==
'getACLAssociates'</simple>
                <log message="${in.header.operationName}"/>
                <to uri="bean:associate?method=processACLAssociates"/>
                <log message="${body}"/>
                <to
uri="mongodb:myDb?database=dstfsrc&amp;collection=accesscontrollist&amp;operation=insert"/>
              
            </when>
            <when>
                <simple>${in.header.operationName} ==
'removeACLAssociate'</simple>
                <log message="${in.header.operationName}"/>
              
                                 
                <to uri="bean:associate?method=removeACLAssociate"/>
                  <log message="${in.header.operationName}"/>
               
              <to
uri="mongodb:myDb?database=dstfsrc&amp;collection=accesscontrollist&amp;operation=remove"/> 
              
               
            </when>
            
             <when>
                <simple>${in.header.operationName} ==
'addACLAssociate'</simple>
                <log message="${in.header.operationName}"/>
              
                                 
                <to uri="bean:associate?method=addACLAssociate"/>
                  <log message="${in.header.operationName}"/>
         
              <to
uri="mongodb:myDb?database=dstfsrc&amp;collection=accesscontrollist&amp;operation=update"/> 
             
                 <to uri="bean:associate?method=updateACLAssociate"/>
             
    
            </when>
            <otherwise>
                <log message="${in.header.CamelHttpPath}"/>
                <transform>
                    <constant>No EAD Mongo resource found for URI</constant>
                </transform>
            </otherwise>
        </choice>
    </route>
</camelContext>
</beans>


Iam new camel rotes development.Iam strucked at here from last two
days.Please help me on it



--
View this message in context: http://camel.465427.n5.nabble.com/Getting-NO-Messege-Reader-Exception-Please-give-me-the-direction-to-move-forward-tp5774995p5774996.html
Sent from the Camel - Users mailing list archive at Nabble.com.