程序在本机运行没有问题,迁移到aix系统上面,查询数据库的时候就会报下面这个问题,我这是在osgi平台上面运行的程序,程序错误如下
org.springframework.integration.message.MessageHandlingException: method 'public org.springframework.integration.core.Message com.becp.customized.endpoint.webserviceEndPointClient.handler(org.springframework.integration.core.Message)' threw an Exception.
at org.springframework.integration.handler.MessageMappingMethodInvoker.invokeMethod(MessageMappingMethodInvoker.java:113)
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:49)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:91)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223)
at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:180)
at org.springframework.integration.router.AbstractMessageRouter.handleMessageInternal(AbstractMessageRouter.java:76)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223)
at org.springframework.integration.channel.MessageChannelTemplate.doSendAndReceive(MessageChannelTemplate.java:248)
at org.springframework.integration.channel.MessageChannelTemplate.sendAndReceive(MessageChannelTemplate.java:215)
at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceiveMessage(AbstractMessagingGateway.java:176)
at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceive(AbstractMessagingGateway.java:159)
at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceive(AbstractMessagingGateway.java:150)
at com.jbsoft.jmts.connector.tcp.SyncChannelHandlerImpl$1.run(SyncChannelHandlerImpl.java:69)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:693)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:719)
at java.lang.Thread.run(Thread.java:813)
Caused by: java.lang.NoClassDefFoundError: sun.io.ByteToCharConverter
at com.ibm.db2.jcc.b.s.a(s.java:157)
at com.ibm.db2.jcc.c.d.a(d.java:989)
at com.ibm.db2.jcc.c.jb.a(jb.java:1719)
at com.ibm.db2.jcc.c.jb.a(jb.java:1647)
at com.ibm.db2.jcc.c.jb.n(jb.java:562)
at com.ibm.db2.jcc.c.jb.j(jb.java:247)
at com.ibm.db2.jcc.c.jb.c(jb.java:57)
at com.ibm.db2.jcc.c.w.c(w.java:42)
at com.ibm.db2.jcc.c.cc.h(cc.java:178)
at com.ibm.db2.jcc.b.sf.p(sf.java:1256)
at com.ibm.db2.jcc.b.sf.a(sf.java:1954)
at com.ibm.db2.jcc.b.sf.e(sf.java:809)
at com.ibm.db2.jcc.b.sf.execute(sf.java:793)
at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)
at com.becp.customized.endpoint.webserviceEndPointClient.QueryAddress2(webserviceEndPointClient.java:322)
at com.becp.customized.endpoint.webserviceEndPointClient.handler(webserviceEndPointClient.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:619)
at org.springframework.integration.util.DefaultMethodInvoker.invokeMethod(DefaultMethodInvoker.java:97)
at org.springframework.integration.handler.MessageMappingMethodInvoker.doInvokeMethod(MessageMappingMethodInvoker.java:135)
at org.springframework.integration.handler.MessageMappingMethodInvoker.invokeMethod(MessageMappingMethodInvoker.java:107)
... 30 more
Caused by: java.lang.ClassNotFoundException: sun.io.ByteToCharConverter
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:616)
... 53 more
问题终于解决了,在这里对帮助我的朋友说声谢谢,既然解决了就说说解决的办法吧,我在ibm官网偶然发现,在osgi平台上面操作db2的的驱动用db2jcc4.jar,db2jcc_license_cisuz.jar,(我原来用的是db2jcc.jar,db2jcc_license_cu.jar),把jar包更换之后,在aix上面启动平台依然会报找不到sun.io.ByteToCharConverter,但是程序倒是可以正常运行,数据库操作都正常,到现在还是弄不明白具体原因,但是总算程序能正常运行,启动报异常只能后续再慢慢研究了,最后还是要对大家说声谢谢!