Hi Freeman, I already added the cxf servlet as you mentioned and still getting the ClassCastException. Please see below the complete tomcat console log, especially the highlighted traces. Please let me know whether I need to make any changes to servicemix.xml or web.xml I appreciate your help in this issue. Thanks Babu
C:\software\apache-tomcat-5.5.26\bin>catalina.bat run Using CATALINA_BASE: C:\software\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\software\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\software\apache-tomcat-5.5.26\temp Using JRE_HOME: C:\software\jdk1.5.0_12 Aug 24, 2008 12:49:03 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments w as not found on the java.library.path: C:\software\jdk1.5.0_12\bin;.;C:\WINNT\system32;C:\WINNT;C:\o racle\ora90\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\W bem;C:\Program Files\PKWARE\pkzipc;C:\Perforce;C:\swutilities\ssh;C:\software\apache-maven-2.0.9\bin ;C:\software\Java\jre1.5.0_12\bin;C:\oracle\ora90\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT \system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\PKWARE\pkzipc;C:\Perforce Aug 24, 2008 12:49:03 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 24, 2008 12:49:03 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 859 ms Aug 24, 2008 12:49:03 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 24, 2008 12:49:03 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.26 Aug 24, 2008 12:49:03 PM org..apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 24, 2008 12:49:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive apache-servicemix-web-3.2.2.war Aug 24, 2008 12:49:04 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\software\apache-tomcat-5.5.26\webapps\apache-servicemix-web-3.2.2\WEB-INF\l ib\geronimo-servlet_2.5_spec-1.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offendi ng class: javax/servlet/Servlet.class Aug 24, 2008 12:49:04 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\software\apache-tomcat-5.5.26\webapps\apache-servicemix-web-3.2.2\WEB-INF\l ib\servlet-api-2.5-6.1.6.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class : javax/servlet/Servlet.class INFO - JBIContainer - ServiceMix 3.2.2 JBI Container (ServiceMix) is starting INFO - JBIContainer - For help or more information please see: http://servicemix. apache.org/ INFO - ComponentMBeanImpl - Initializing component: #SubscriptionManager# INFO - DeploymentService - Restoring service assemblies INFO - ComponentMBeanImpl - Initializing component: ID:10.124.14..132-11bf59e7017-0:0 Aug 24, 2008 12:49:09 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No cxf.xml configuration file detected, relying on defaults. Aug 24, 2008 12:49:12 PM org.apache.cxf..endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be http://localhost:8080/apache-servicemix-web-3.2.2/s ervices/circuitSearch INFO - ComponentMBeanImpl - Initializing component: ID:10.124.14.132-11bf59e7017-0:1 WARN - ClientFactory - Cound not start ClientFactory: javax.naming.NamingException : Context is read only INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-cxf-bc to S topped INFO - ComponentMBeanImpl - Initializing component: servicemix-cxf-bc INFO - ComponentMBeanImpl - Setting running state for Component: servicemix-cxf-se to S topped INFO - ComponentMBeanImpl - Initializing component: servicemix-cxf-se Aug 24, 2008 12:49:12 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog Aug 24, 2008 12:49:12 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: jetty-6.1.6 Aug 24, 2008 12:49:12 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: Started [EMAIL PROTECTED]:8080 Aug 24, 2008 12:49:12 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFro mClass INFO: Creating Service {http://tempuri.org/wsStorage3/Search}Search from class org.tempuri.wsstorage 3.search.SearchSoapImpl Aug 24, 2008 12:49:14 PM org.apache.cxf.configuration.spring.ConfigurerImpl getBeanName INFO: Could not determine bean name for instance of class org.apache.cxf.transport.jbi.JBIDestinatio n. Aug 24, 2008 12:49:14 PM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be jbi://ID-10-124-14-132-11bf59e7017-1-0 INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) started INFO - JDBCAdapterFactory - Database driver recognized: [apache_derby_embedded_jdbc_dri ver] Aug 24, 2008 12:49:17 PM org.apache.cxf.transport.servlet.CXFServlet loadSpringBus INFO: Load the bus with application context Aug 24, 2008 12:49:17 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No cxf.xml configuration file detected, relying on defaults. Aug 24, 2008 12:49:17 PM org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFacto ry INFO: Replaced the http destionFactory with servlet transport factory Aug 24, 2008 12:49:18 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 24, 2008 12:49:19 PM org.apache..jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Aug 24, 2008 12:49:19 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/47 config=null Aug 24, 2008 12:49:19 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Aug 24, 2008 12:49:19 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 15577 ms Aug 24, 2008 12:49:43 PM sun.reflect.NativeMethodAccessorImpl invoke0 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) --- On Sat, 8/16/08, Freeman Fang <[EMAIL PROTECTED]> wrote: From: Freeman Fang <[EMAIL PROTECTED]> Subject: Re: ServiceMix-3.2.2 - not able to access serviceMix web console after deploying cxf-bc consumer To: [email protected] Date: Saturday, August 16, 2008, 11:59 AM 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 > > > >
