You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jack Jack <sm...@yahoo.com> on 2008/08/12 16:12:10 UTC

ServiceMix-3.2.2 - not able to access serviceMix web console after deploying cxf-bc consumer

Hi ,
 I am using tomcat-5.5, serviceMix3.2.2 version and working on servicemix-cxf-bc. In servicemix.xml CXF-BC consumer was configured with locationURI.
  I defined the cxf-bc and cxf-se components in the srevicemix.xml
At fisrt I specified mistakenly the wrong locationURI where no service is running as below
 locationURI=http://circuitdev:8080/circuit/services/circuitSearch
And I got the below exeception. Realized that locationURI is wrong, set the URI as below and restarted the tomcat.
locationURI=http://localhost:8080/apache-servicemix-web-3.2.2/services/circuitSearch
Tomcat is running on 8080 port.  After restart the  following are the facts
  1) Not able to access Tomcat console using http://localhost:8080
  2) Not able to access servicemix-web console http://localhost:8080/apache-servicemix-web-3.2.2
  3) Able to view the WSDL file using the link http://localhost:8080/apache-servicemix-web-3.2.2/services/circuitSearch?wsdl
  4) And also found the same exception as shown below  on system console
  5) Tested the web service and it is working fine.
Stack from system console is as below
SEVERE: EXCEPTION
java.lang.ClassCastException: org.apache.cxf.transport.jbi.JBIDestination
        at org.apache.servicemix.cxfbc.ListServiceHandler.handle(ListServiceHandler.java:80)
        at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Aug 12, 2008 8:58:34 AM sun.reflect.NativeMethodAccessorImpl invoke0
Can you please help on why I am not able to access the ServiceMix-web console? When tried I am getting the below on the screen
HTTP ERROR: 404
NOT_FOUND
RequestURI=/apache-servicemix-web-3.2.2
Powered by jetty://
Thanks
Babu


      

Re: ServiceMix-3.2.2 - not able to access serviceMix web console after deploying cxf-bc consumer

Posted by Freeman Fang <fr...@gmail.com>.
Hi Jack,
Looks like you didn't reuse servlet transport instead of http transport 
for cxf bc when you deploy smx into servlet container such as tomcat in 
your case.
The error shows that your cxf bc use port 8080 which is started by jetty 
underlying and your tomcat can't start at 8080 at all
You need add
<servlet>
      <servlet-name>cxf</servlet-name>
      <display-name>cxf</display-name>
      <description>Apache CXF Endpoint</description>
      
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
      <servlet-name>cxf</servlet-name>
      <url-pattern>/services/*</url-pattern>
  </servlet-mapping>
to the /webapps/apache-servicemix-web-3.2.2/WEB-INF/web.xml
this servlet just replace http transport with servlet transport, so that 
you can avoid starting jetty server when start cxf bc consumer, just 
reuse the http server provided by your servlet container,
Also, you need add
locationURI="/whateveryouwant"
for your cxf bc consumer configuration
then you can access the wsdl by
http://localhost:8080/apache-servicemix-web-3.2.2/services/whateveryouwant?wsdl 


Regards
Freeman

Jack Jack wrote:
> Hi ,
>  I am using tomcat-5.5, serviceMix3.2.2 version and working on servicemix-cxf-bc. In servicemix.xml CXF-BC consumer was configured with locationURI.
>   I defined the cxf-bc and cxf-se components in the srevicemix.xml
> At fisrt I specified mistakenly the wrong locationURI where no service is running as below
>  locationURI=http://circuitdev:8080/circuit/services/circuitSearch
> And I got the below exeception. Realized that locationURI is wrong, set the URI as below and restarted the tomcat.
> locationURI=http://localhost:8080/apache-servicemix-web-3.2.2/services/circuitSearch
> Tomcat is running on 8080 port.  After restart the  following are the facts
>   1) Not able to access Tomcat console using http://localhost:8080
>   2) Not able to access servicemix-web console http://localhost:8080/apache-servicemix-web-3.2.2
>   3) Able to view the WSDL file using the link http://localhost:8080/apache-servicemix-web-3.2.2/services/circuitSearch?wsdl
>   4) And also found the same exception as shown below  on system console
>   5) Tested the web service and it is working fine.
> Stack from system console is as below
> SEVERE: EXCEPTION
> java.lang.ClassCastException: org.apache.cxf.transport.jbi.JBIDestination
>         at org.apache.servicemix.cxfbc.ListServiceHandler.handle(ListServiceHandler.java:80)
>         at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Aug 12, 2008 8:58:34 AM sun.reflect.NativeMethodAccessorImpl invoke0
> Can you please help on why I am not able to access the ServiceMix-web console? When tried I am getting the below on the screen
> HTTP ERROR: 404
> NOT_FOUND
> RequestURI=/apache-servicemix-web-3.2.2
> Powered by jetty://
> Thanks
> Babu
>
>
>       
>