You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by nareshkpotti <po...@gmail.com> on 2012/07/19 01:39:25 UTC

Upgrading from Service Mix 4.3 to Service Mix 4.4

Hi All,
       We are planning to upgrade our systems from servicemix 4.3 to service
4.4 as camel proxy is not working in service mix 4.3 version. In one of the
service mix forums i read that to make camel proxy work we are asked to
upgrade camel version to 2.8.3 version but camel 2.8.3 works only with
service mix 4.4. 
To work with Service mix 4.4 *which versions of CXF/CAMEL/KARAF/SPRING do we
need to use?*

I tried with CXF 2.4.4, CAMEL 2.8.3, KARAF 2.2.4 and spring 3.0.5.RELEASE
versions. Our Web services are deployed as a war file and When i tried to
install our web services to service mix 4.4, i am getting following errors.
What am i missing?

java.io.IOException: Cannot bind to URL:
javax.naming.NoInitialContextException: Cannot instantiate class:
org.apache.naming.java.javaURLContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.apache.naming.java.javaURLContextFactory]
	at
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)[:1.6.0_33]
	at
javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:555)[:1.6.0_33]
	at
org.apache.karaf.management.ConnectorServerFactory.destroy(ConnectorServerFactory.java:253)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_33]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_33]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_33]
	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_33]
	at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:741)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:295)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:681)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:835)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:250)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:242)[9:org.apache.aries.blueprint:0.3.1]
	at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:431)[9:org.apache.aries.blueprint:0.3.1]
	at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453)[karaf.jar:2.2.4]
	at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)[karaf.jar:2.2.4]
	at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)[karaf.jar:2.2.4]
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3761)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.stopBundle(Felix.java:2206)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)[org.apache.felix.framework-3.0.9.jar:]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_33]
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
org.apache.naming.java.javaURLContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.apache.naming.java.javaURLContextFactory]
	at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)[:1.6.0_33]
	at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)[:1.6.0_33]
	at javax.naming.InitialContext.init(InitialContext.java:223)[:1.6.0_33]
	at javax.naming.InitialContext.<init>(InitialContext.java:197)[:1.6.0_33]
	at
javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:544)[:1.6.0_33]
	... 25 more
Caused by: java.lang.ClassNotFoundException:
org.apache.naming.java.javaURLContextFactory
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)[:1.6.0_33]
	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_33]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)[:1.6.0_33]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)[:1.6.0_33]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)[:1.6.0_33]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_33]
	at java.lang.Class.forName0(Native Method)[:1.6.0_33]
	at java.lang.Class.forName(Class.java:247)[:1.6.0_33]
	at
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)[:1.6.0_33]
	at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)[:1.6.0_33]
	... 29 more

--
View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Seems it's commons-dbcp can't find some class from oracle jdbc driver, it's a common issue when use JDBC driver in OSGi world, take a look at this blog[1],  the explanation and solution is here.

[1]http://freemanfang.blogspot.com/2012/03/how-to-use-jdbc-driver-in-osgi.html
Freeman
-------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-7-26, at 上午6:11, nareshkpotti wrote:

> Hi,
>   I am facing another problem now and i am not able to solve this. We are
> using common.dbcp for connection pool with ojdbc6.jar and orai18n.jar for
> database connection. I am able to open wsdl from browser and when i try to
> make a service call, Our middle layer is failing to connect to database. I
> tried to debug through common dbcp source code and its failing in ojdbc6.jar
> file. As ojdbc6 source code is not available, i could not find the reason
> behind this failure. I spent more than a day to solve this problem and any
> help is appreciated. I have included ojdbc6.jar and orai18n.jar in required
> bundle  of manifest of web services war file.
> 
> *org.apache.cxf.interceptor.Fault: Could not initialize class
> oracle.sql.CharacterSet*
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_33]
> 	at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_33]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_33]
> 	at
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[109:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
> 	at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)[141:org.apache.cxf.bundle:2.4.6]
> 	at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480)[99:org.eclipse.jetty.security:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
> 	at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.Server.handle(Server.java:342)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[100:org.eclipse.jetty.http:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[100:org.eclipse.jetty.http:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[96:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[98:org.eclipse.jetty.io:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[98:org.eclipse.jetty.io:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[108:org.eclipse.jetty.util:7.4.5.v20110725]
> 	at java.lang.Thread.run(Thread.java:662)[:1.6.0_33]
> *Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> oracle.sql.CharacterSet*
> 	at
> oracle.jdbc.driver.DBConversion.init(DBConversion.java:169)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.DBConversion.<init>(DBConversion.java:120)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1087)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)[243:ojdbc6.jar:0]
> 	at
> oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)[243:ojdbc6.jar:0]
> 	at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)[251:org.apache.commons.dbcp:1.4]
> 	at
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)[251:org.apache.commons.dbcp:1.4]
> 	at
> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)[251:org.apache.commons.dbcp:1.4]
> 	at
> org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)[251:org.apache.commons.dbcp:1.4]
> 	at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)[251:org.apache.commons.dbcp:1.4]
> 	at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)[251:org.apache.commons.dbcp:1.4]
> 
> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713995.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by nareshkpotti <po...@gmail.com>.
Hi,
   I am facing another problem now and i am not able to solve this. We are
using common.dbcp for connection pool with ojdbc6.jar and orai18n.jar for
database connection. I am able to open wsdl from browser and when i try to
make a service call, Our middle layer is failing to connect to database. I
tried to debug through common dbcp source code and its failing in ojdbc6.jar
file. As ojdbc6 source code is not available, i could not find the reason
behind this failure. I spent more than a day to solve this problem and any
help is appreciated. I have included ojdbc6.jar and orai18n.jar in required
bundle  of manifest of web services war file.

*org.apache.cxf.interceptor.Fault: Could not initialize class
oracle.sql.CharacterSet*
	at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[141:org.apache.cxf.bundle:2.4.6]
	at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_33]
	at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_33]
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_33]
	at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[141:org.apache.cxf.bundle:2.4.6]
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)[141:org.apache.cxf.bundle:2.4.6]
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[109:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)[141:org.apache.cxf.bundle:2.4.6]
	at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
	at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480)[99:org.eclipse.jetty.security:7.4.5.v20110725]
	at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
	at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)[97:org.eclipse.jetty.servlet:7.4.5.v20110725]
	at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[111:org.ops4j.pax.web.pax-web-jetty:1.0.7]
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.Server.handle(Server.java:342)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[100:org.eclipse.jetty.http:7.4.5.v20110725]
	at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[100:org.eclipse.jetty.http:7.4.5.v20110725]
	at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[96:org.eclipse.jetty.server:7.4.5.v20110725]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[98:org.eclipse.jetty.io:7.4.5.v20110725]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[98:org.eclipse.jetty.io:7.4.5.v20110725]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[108:org.eclipse.jetty.util:7.4.5.v20110725]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_33]
*Caused by: java.lang.NoClassDefFoundError: Could not initialize class
oracle.sql.CharacterSet*
	at
oracle.jdbc.driver.DBConversion.init(DBConversion.java:169)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.DBConversion.<init>(DBConversion.java:120)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1087)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)[243:ojdbc6.jar:0]
	at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)[243:ojdbc6.jar:0]
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)[251:org.apache.commons.dbcp:1.4]
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)[251:org.apache.commons.dbcp:1.4]
	at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)[251:org.apache.commons.dbcp:1.4]
	at
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)[251:org.apache.commons.dbcp:1.4]
	at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)[251:org.apache.commons.dbcp:1.4]
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)[251:org.apache.commons.dbcp:1.4]





--
View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713995.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by nareshkpotti <po...@gmail.com>.
Thank you freeman.. That worked...



--
View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713971.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This NPE is caused by CXF bus changed a lot since 2.4.x.
So you shouldn't explicitly  initialize org.apache.cxf.bus.CXFBusImpl yourself now.
So the 
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
        <property name="inInterceptors">
            <list>
                <ref bean="logInbound"/>
            </list>
        </property>
        <property name="outInterceptors">
            <list>
                <ref bean="logOutbound"/>
            </list>
        </property>
        <property name="outFaultInterceptors">
            <list>
                <ref bean="logOutbound"/>
            </list>
        </property>
    </bean>  

should be changed to something like

<cxf:bus>
        <cxf:inInterceptors>
                <ref bean="logInbound"/>
        </cxf:inInterceptors>
      
        <cxf:outInterceptors>
                <ref bean="logOutbound"/>
        </cxf:outInterceptors>
        <cxf:outFaultInterceptors>
                <ref bean="logOutbound"/>
        </cxf:outFaultInterceptors>
    </cxf:bus>

Also you needn't have 
<import resource="classpath:META-INF/cxf/cxf.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

now.

Freeman
-------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-7-24, at 上午7:42, nareshkpotti wrote:

> Thanks for the reply and our services are working fine in 4.3 version of
> service mix. We planned to move to  service mix 4.4.2 version and I faced
> different problems and able to solve those. But now i am facing strange
> problem. Our services are in war file and when i installed war its status is
> active but i am getting exceptions in log files. Errors are nothing but
> failed to create beans from context file. Services works fine in 4.3 version
> but are failing in 4.4.2. I tried to debug with cxf source code and i
> noticed that It looks like the WSDLServiceFactory can 't get the WSDLManager
> from the bus when i try to create a service model for the client. This is
> part of my spring context file
> 
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> 	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> 	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> 
> <jaxws:endpoint xmlns:tns="http://www.xyz.com/CustomerWS"
> 		id="customerwsV1" implementorClass="com.xyz.webservices.CustomerWSImp"
> 		
> 		wsdlLocation="wsdl/customerwsV1.wsdl" endpointName="tns:CustomerWSV1Port"
> 		serviceName="tns:CustomerWSV1Service" address="/CustomerWSV1Port">
> 		<jaxws:features><bean class="org.apache.cxf.feature.LoggingFeature"
> /></jaxws:features>
> 	<jaxws:properties> <entry key="schema-validation-enabled" value="true" />
> </jaxws:properties>
> 	</jaxws:endpoint>
> 
> <bean id="logInbound" class="com.ctl.cxf.util.CWSLoggingInInterceptor"/>
>    <bean id="logOutbound"
> class="com.ctl.cxf.util.CWSLoggingOutInterceptor"/>
> 	
>    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>        <property name="inInterceptors">
>            <list>
>                <ref bean="logInbound"/>
>            </list>
>        </property>
>        <property name="outInterceptors">
>            <list>
>                <ref bean="logOutbound"/>
>            </list>
>        </property>
>        <property name="outFaultInterceptors">
>            <list>
>                <ref bean="logOutbound"/>
>            </list>
>        </property>
>    </bean> 
> 
> I did not install cxf-osgi feature in service mix 4.4.2 as i could not find.
> Is that the reason behind that??? What this feature used for and if that is
> the reason how can i add it?????
> 
> *org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'customerwsV1': Invocation of init method failed; nested
> exception is javax.xml.ws.WebServiceException:
> java.lang.NullPointerException*
> 
> Caused by:
> 
> java.lang.NullPointerException
> 	at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:369)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
> 	at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
> 	at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> 	at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
> 	at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> 	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> 	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> 	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713947.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by nareshkpotti <po...@gmail.com>.
Thanks for the reply and our services are working fine in 4.3 version of
service mix. We planned to move to  service mix 4.4.2 version and I faced
different problems and able to solve those. But now i am facing strange
problem. Our services are in war file and when i installed war its status is
active but i am getting exceptions in log files. Errors are nothing but
failed to create beans from context file. Services works fine in 4.3 version
but are failing in 4.4.2. I tried to debug with cxf source code and i
noticed that It looks like the WSDLServiceFactory can 't get the WSDLManager
from the bus when i try to create a service model for the client. This is
part of my spring context file

<import resource="classpath:META-INF/cxf/cxf.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

<jaxws:endpoint xmlns:tns="http://www.xyz.com/CustomerWS"
		id="customerwsV1" implementorClass="com.xyz.webservices.CustomerWSImp"
		
		wsdlLocation="wsdl/customerwsV1.wsdl" endpointName="tns:CustomerWSV1Port"
		serviceName="tns:CustomerWSV1Service" address="/CustomerWSV1Port">
		<jaxws:features><bean class="org.apache.cxf.feature.LoggingFeature"
/></jaxws:features>
	<jaxws:properties> <entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
	</jaxws:endpoint>

<bean id="logInbound" class="com.ctl.cxf.util.CWSLoggingInInterceptor"/>
    <bean id="logOutbound"
class="com.ctl.cxf.util.CWSLoggingOutInterceptor"/>
	
    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
        <property name="inInterceptors">
            <list>
                <ref bean="logInbound"/>
            </list>
        </property>
        <property name="outInterceptors">
            <list>
                <ref bean="logOutbound"/>
            </list>
        </property>
        <property name="outFaultInterceptors">
            <list>
                <ref bean="logOutbound"/>
            </list>
        </property>
    </bean> 

I did not install cxf-osgi feature in service mix 4.4.2 as i could not find.
Is that the reason behind that??? What this feature used for and if that is
the reason how can i add it?????

*org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'customerwsV1': Invocation of init method failed; nested
exception is javax.xml.ws.WebServiceException:
java.lang.NullPointerException*

Caused by:

java.lang.NullPointerException
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:369)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
	at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
	at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)



--
View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713947.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Upgrading from Service Mix 4.3 to Service Mix 4.4

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

With Apache Servicemix 4.4, it comes with Camel 2.8.3, CXF 2.4.4, Karaf 2.2.4, Spring 3.0.6.RELEASE out-of-box.

This error indicate you need install some bundle which have org.apache.naming.java(I think it's from tomcat) package in OSGi container first.
I have a quick question, does your war works even with Apache Servicemix 4.3?

Freeman
-------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-7-19, at 上午7:39, nareshkpotti wrote:

> Hi All,
>       We are planning to upgrade our systems from servicemix 4.3 to service
> 4.4 as camel proxy is not working in service mix 4.3 version. In one of the
> service mix forums i read that to make camel proxy work we are asked to
> upgrade camel version to 2.8.3 version but camel 2.8.3 works only with
> service mix 4.4. 
> To work with Service mix 4.4 *which versions of CXF/CAMEL/KARAF/SPRING do we
> need to use?*
> 
> I tried with CXF 2.4.4, CAMEL 2.8.3, KARAF 2.2.4 and spring 3.0.5.RELEASE
> versions. Our Web services are deployed as a war file and When i tried to
> install our web services to service mix 4.4, i am getting following errors.
> What am i missing?
> 
> java.io.IOException: Cannot bind to URL:
> javax.naming.NoInitialContextException: Cannot instantiate class:
> org.apache.naming.java.javaURLContextFactory [Root exception is
> java.lang.ClassNotFoundException:
> org.apache.naming.java.javaURLContextFactory]
> 	at
> javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)[:1.6.0_33]
> 	at
> javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:555)[:1.6.0_33]
> 	at
> org.apache.karaf.management.ConnectorServerFactory.destroy(ConnectorServerFactory.java:253)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_33]
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_33]
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_33]
> 	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_33]
> 	at
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:741)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:295)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:681)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:835)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:250)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:242)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:431)[9:org.apache.aries.blueprint:0.3.1]
> 	at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453)[karaf.jar:2.2.4]
> 	at
> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)[karaf.jar:2.2.4]
> 	at
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)[karaf.jar:2.2.4]
> 	at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3761)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.Felix.stopBundle(Felix.java:2206)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)[org.apache.felix.framework-3.0.9.jar:]
> 	at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)[org.apache.felix.framework-3.0.9.jar:]
> 	at java.lang.Thread.run(Thread.java:662)[:1.6.0_33]
> Caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
> org.apache.naming.java.javaURLContextFactory [Root exception is
> java.lang.ClassNotFoundException:
> org.apache.naming.java.javaURLContextFactory]
> 	at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)[:1.6.0_33]
> 	at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)[:1.6.0_33]
> 	at javax.naming.InitialContext.init(InitialContext.java:223)[:1.6.0_33]
> 	at javax.naming.InitialContext.<init>(InitialContext.java:197)[:1.6.0_33]
> 	at
> javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:544)[:1.6.0_33]
> 	... 25 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.naming.java.javaURLContextFactory
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)[:1.6.0_33]
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_33]
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)[:1.6.0_33]
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)[:1.6.0_33]
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)[:1.6.0_33]
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_33]
> 	at java.lang.Class.forName0(Native Method)[:1.6.0_33]
> 	at java.lang.Class.forName(Class.java:247)[:1.6.0_33]
> 	at
> com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)[:1.6.0_33]
> 	at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)[:1.6.0_33]
> 	... 29 more
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.