Re: 求助

50 views
Skip to first unread message

Willem Jiang

unread,
Dec 16, 2009, 5:39:28 AM12/16/09
to 陈世伟, cxf...@googlegroups.com
CXF ֧��Servlet Transport�� ����openfire�����в����ʱ�������ʲô���⣿
�Dz�����ΪSpring �汾��ͻ���ֵ����⡣

��������Stack trace 4��������bus��������г��ֵ����⡣
����Ժú��о�һ��CXF bus �������ֵĴ��롣

������������й�CXF�����⣬�����㷢��cxf...@googlegroups.com, ��������
��Χ���һЩ��
���ұ���Ҳ�ܴ���������л��档

����

����ΰ wrote:
> ������
> ���
> �����һ����Ŀ��ʹ��CXF�������кܶ������˼������⣬������Ҳ���˺�
> ������ ʼ��û�н��ϣ������ָ��һ�������ż��¡�
> �ҵ���Ŀ���и���Ʒ��� ����Ҫ��openfire ��webservice�����һ��ͨ��
> �����ӿ� �õ������openfire�������ݡ�Ŀǰ�ҵ�ʵ�ַ�����ͨ��д
> openfire���4ʵ��webservice�Ĺ��ܡ���ʵ�ֵĹ���з������SPRING��CXF ��
> openfire�Դ��JETTY������ ����ֺܶ����⣬���Ǿ��뵽��spring��CXF���롣
> ����һ������extends CXFNonSpringServlet ����ಢ���չٷ�������
> OVERRIDE�� loadBus �������������£�
> public void loadBus(ServletConfig servletConfig) throws ServletException {
>
> // You can als use the simple frontend API to do this
> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
> ServerFactoryBean factroy = new ServerFactoryBean();
>
> factroy.setBus(bus);
> factroy.setServiceClass(HelloWorld.class);
> factroy.setAddress("/HelloWorld");
> factroy.setServiceBean(helloworldImpl);
> factroy.create();
> }
> ����������ʱ�����load bus without application context����ʾ�����ҳ�
> ��nullexception �쳣�������£�
> java.lang.NullPointerException
> at
> org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:512)
> at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:334)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:460)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:523)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:271)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
> at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105)
> at org.jivesoftware.openfire.plugin.MyServlet.loadBus(MyServlet.java:44)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78)
> at
> org.jivesoftware.openfire.container.PluginServlet.registerServlets(PluginServlet.java:159)
> at
> org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:435)
> at
> org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java:47)
> at
> org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManager.java:1032)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> ������2������1��Ϊʲô������Ǹ���ʾ��
> 2������쳣����ô���ֵģ�
>
> ��4�ҶԴ��������һ���޸ģ������loadBusConfig�������������£�
> private void loadBusNoConfig(ServletConfig servletConfig)
> throws ServletException {
>
> bus = BusFactory.getDefaultBus();
> ResourceManager resourceManager = bus
> .getExtension(ResourceManager.class);
> resourceManager.addResourceResolver(new ServletContextResourceResolver(
> servletConfig.getServletContext()));
>
> replaceDestinationFactory();
> // Set up the ServletController
> controller = createServletController(servletConfig);
>
> }
> ��loadBus������ �� super.loadBus(servletConfig)�滻��loadBusConfig
> (servletConfig);
> ����factory.create()ǰ�����
> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
> ����������£�
> public void loadBus(ServletConfig servletConfig) throws ServletException {
>
> loadBusNoConfig(servletConfig);
>
> // Bus bus = getBus();
> // BusFactory.setDefaultBus(bus);
> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>
> // You can als use the simple frontend API to do this
> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
> ServerFactoryBean factroy = new ServerFactoryBean();
>
> factroy.setBus(bus);
> factroy.setServiceClass(HelloWorld.class);
> factroy.setAddress("/HelloWorld");
> factroy.setServiceBean(helloworldImpl);
> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>
>
> factroy.create();
>
> }
> ����� ǰ���2���������� ���ǻ��DZ����쳣��
> org.apache.cxf.service.factory.ServiceConstructionException: Could not
> resolve a binding for null
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:404)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:146)
> at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105)
> at org.jivesoftware.openfire.plugin.MyServlet.loadBus(MyServlet.java:44)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78)
> at
> org.jivesoftware.openfire.container.PluginServlet.registerServlets(PluginServlet.java:159)
> at
> org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:435)
> at
> org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java:47)
> at
> org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManager.java:1032)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.cxf.BusException: No binding factory for namespace
> http://schemas.xmlsoap.org/soap/ registered.
> at
> org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:91)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:394)
> ... 18 more
> ��������openfire�Ļ�����ͨ����ʵ�֣��ҿ�ʼ�����Dz��ǻ����������� ����
> ����ͬ��һ�ݴ��� �ŵ�һ��WEB������ͨ��TOMCAT��������б���
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/cxf/transport/servlet/CXFNonSpringServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> ... 6 more
> ����˵�ǰ汾�����⣬����ϸ�˶����ҵİ汾�����õ���JDK1.5 CXF�汾Ϊ
> 2.1.8����ȫ��Ϲ����ϵı�׼��
> ���Ͼ��������������ϣ�������ڰ�æ֮�г��ʱ�����С�ܽ��һ�£�С�ܽ�
> ��ʤ�м���
>
>
> ����ΰ

梁文龙

unread,
Dec 16, 2009, 8:57:41 PM12/16/09
to cxf...@googlegroups.com
����

org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null:

�����openfire�Ļ�ṹ��ʵ�ʼ���, ������CXF��������������ܾ���
��Thread.currentThread().getContextClassLoader()


�� 2009-12-16 18:39, Willem Jiang �:

陈世伟

unread,
Dec 16, 2009, 9:07:04 PM12/16/09
to cxf...@googlegroups.com

谢谢Willem
给我回信,我在openfire中部署这个Webservice用到的CXF是将SPRING分离的,所以应该不会出现spring版本冲突的问题。现在出现的异常是

org.apache.cxf.BusException: No binding factory for namespace
org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for null:
在梁的回复中说到Thread.currentThread().getContextClassLoader(),能说的再详细点吗?

梁文龙-2 wrote:
>
> 关于


>
> org.apache.cxf.service.factory.ServiceConstructionException: Could not
> resolve a binding for null:
>

> 不清楚openfire的基础结构和实际技术, 但是引发CXF的这个错误的最大可能就在
> 于Thread.currentThread().getContextClassLoader()
>
>
> 于 2009-12-16 18:39, Willem Jiang 写道:
>> CXF 支持Servlet Transport, 你在openfire容器中部署的时候出现了什么问题?
>> 是不是因为Spring 版本冲突出现的问题。
>>
>> 单从你给的Stack trace 来看可能是bus创建过程中出现的问题。
>> 你可以好好研究一下CXF bus 创建部分的代码。
>>
>> 还有你如果还有有关CXF的问题,建议你发到cxf...@googlegroups.com, 这样讨论
>> 范围会大一些,
>> 而且别人也能从你的讨论中获益。
>>
>> 姜宁
>>
>> 陈世伟 wrote:
>>
>>> 姜宁:
>>> 你好
>>> 最近在一个项目上使用CXF,发现有很多问题百思不得其解,在网上也查了很
>>> 多资料 始终没有解决。希望你能指点一二,打扰见谅。
>>> 我的项目里有个设计方案 就是要把openfire 和webservice整合在一起,通过
>>> 发布接口 让第三方访问openfire里面的数据。目前我的实现方案是通过写
>>> openfire插件来实现webservice的功能。在实现的过程中发现整合SPRING的CXF 在
>>> openfire自带的JETTY容器中 会出现很多问题,于是就想到将spring与CXF分离。
>>> 起初第一步,我extends CXFNonSpringServlet 这个类并按照官方的例子
>>> OVERRIDE了 loadBus 这个方法,代码如下:


>>> public void loadBus(ServletConfig servletConfig) throws ServletException
>>> {
>>>
>>> // You can als use the simple frontend API to do this
>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>
>>> factroy.setBus(bus);
>>> factroy.setServiceClass(HelloWorld.class);
>>> factroy.setAddress("/HelloWorld");
>>> factroy.setServiceBean(helloworldImpl);
>>> factroy.create();
>>> }

>>> 当我启动服务的时候出现load bus without application context的提示,并且出
>>> 现nullexception 异常代码如下:

>>> 这里有2个问题1、为什么会出现那个提示?
>>> 2、这个异常是怎么出现的?
>>>
>>> 后来我对代码进行了一下修改,增加了loadBusConfig方法,代码如下:


>>> private void loadBusNoConfig(ServletConfig servletConfig)
>>> throws ServletException {
>>>
>>> bus = BusFactory.getDefaultBus();
>>> ResourceManager resourceManager = bus
>>> .getExtension(ResourceManager.class);
>>> resourceManager.addResourceResolver(new
>>> ServletContextResourceResolver(
>>> servletConfig.getServletContext()));
>>>
>>> replaceDestinationFactory();
>>> // Set up the ServletController
>>> controller = createServletController(servletConfig);
>>>
>>> }

>>> 在loadBus方法中 将 super.loadBus(servletConfig)替换成loadBusConfig
>>> (servletConfig);
>>> 并在factory.create()前面加上
>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>> 完整代码如下:


>>> public void loadBus(ServletConfig servletConfig) throws ServletException
>>> {
>>>
>>> loadBusNoConfig(servletConfig);
>>>
>>> // Bus bus = getBus();
>>> // BusFactory.setDefaultBus(bus);
>>> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>>>
>>> // You can als use the simple frontend API to do this
>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>
>>> factroy.setBus(bus);
>>> factroy.setServiceClass(HelloWorld.class);
>>> factroy.setAddress("/HelloWorld");
>>> factroy.setServiceBean(helloworldImpl);
>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>
>>>
>>> factroy.create();
>>>
>>> }

>>> 启动服务 前面的2个问题解决了 但是还是报了异常:

>>> 以上是在openfire的环境下通过插件实现,我开始怀疑是不是环境出了问题 于是
>>> 将相同的一份代码 放到一个WEB工程下通过TOMCAT启动,启动过程中报:

>>> 有人说是版本的问题,我仔细核对了我的版本,我用的是JDK1.5 CXF版本为
>>> 2.1.8,完全符合官网上的标准。
>>> 以上就是我问题的描述,希望你能在百忙之中抽点时间帮助小弟解答一下,小弟将
>>> 不胜感激!
>>>
>>>
>>> 陈世伟
>>>
>>
>
> --
> 您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
> 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
> ----
> Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
>
>

--
View this message in context: http://old.nabble.com/Re%3A-%E6%B1%82%E5%8A%A9-tp26809203p26821979.html
Sent from the cxf-zh mailing list archive at Nabble.com.

梁文龙

unread,
Dec 16, 2009, 9:15:58 PM12/16/09
to cxf...@googlegroups.com
û�Ǵ�Ļ�Bus�ڳ�ʼ����ʱ�������Ǽ��
Thread.currentThread().getContextClassLoader(), �����ֵ������4����cxf-
x.x.x.jar!/META-INF�µ���Щ�����ļ�, �������Bus��ʼ����ʱ��, ��ǰThread
�ϵ�ContextClassLoader��ָ��Ϊ�˲�ͬ��ֵ, ����openfireΪÿ����ʹ�ø���
��ClassLoader, ����OSGI����, ���������ͻ��4��.

�� 2009-12-17 10:07, ����ΰ д��:
> ллWillem
> ���һ��ţ�����openfire�в������Webservice�õ���CXF�ǽ�SPRING����ģ�����Ӧ�ò������spring�汾��ͻ�����⡣���ڳ��ֵ��쳣��


> org.apache.cxf.BusException: No binding factory for namespace
> org.apache.cxf.service.factory.ServiceConstructionException: Could not
> resolve a binding for null:

> ��z�Ļظ���˵��Thread.currentThread().getContextClassLoader()����˵������ϸ����
>
> z����-2 wrote:
>
>> ����


>>
>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> resolve a binding for null:
>>

>> �����openfire�Ļ�ṹ��ʵ�ʼ���, ������CXF��������������ܾ���
>> ��Thread.currentThread().getContextClassLoader()
>>
>>
>> �� 2009-12-16 18:39, Willem Jiang �:
>>
>>> CXF ֧��Servlet Transport�� ����openfire�����в����ʱ�������ʲô���⣿
>>> �Dz�����ΪSpring �汾��ͻ���ֵ����⡣
>>>
>>> ��������Stack trace 4��������bus��������г��ֵ����⡣
>>> ����Ժú��о�һ��CXF bus �������ֵĴ��롣
>>>
>>> ������������й�CXF�����⣬�����㷢��cxf...@googlegroups.com, ��������
>>> ��Χ���һЩ��
>>> ���ұ���Ҳ�ܴ���������л��档
>>>
>>> ����
>>>
>>> ����ΰ wrote:
>>>
>>>
>>>> ������
>>>> ���
>>>> �����һ����Ŀ��ʹ��CXF�������кܶ������˼������⣬������Ҳ���˺�
>>>> ������ ʼ��û�н��ϣ������ָ��һ�������ż��¡�
>>>> �ҵ���Ŀ���и���Ʒ��� ����Ҫ��openfire ��webservice�����һ��ͨ��
>>>> �����ӿ� �õ������openfire�������ݡ�Ŀǰ�ҵ�ʵ�ַ�����ͨ��д
>>>> openfire���4ʵ��webservice�Ĺ��ܡ���ʵ�ֵĹ���з������SPRING��CXF ��
>>>> openfire�Դ��JETTY������ ����ֺܶ����⣬���Ǿ��뵽��spring��CXF���롣
>>>> ����һ������extends CXFNonSpringServlet ����ಢ���չٷ�������
>>>> OVERRIDE�� loadBus �������������£�

>>>> public void loadBus(ServletConfig servletConfig) throws ServletException
>>>> {
>>>>
>>>> // You can als use the simple frontend API to do this
>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>
>>>> factroy.setBus(bus);
>>>> factroy.setServiceClass(HelloWorld.class);
>>>> factroy.setAddress("/HelloWorld");
>>>> factroy.setServiceBean(helloworldImpl);
>>>> factroy.create();
>>>> }

>>>> ����������ʱ�����load bus without application context����ʾ�����ҳ�
>>>> ��nullexception �쳣�������£�

>>>> ������2������1��Ϊʲô������Ǹ���ʾ��
>>>> 2������쳣����ô���ֵģ�
>>>>
>>>> ��4�ҶԴ��������һ���޸ģ������loadBusConfig�������������£�

>>>> private void loadBusNoConfig(ServletConfig servletConfig)
>>>> throws ServletException {
>>>>
>>>> bus = BusFactory.getDefaultBus();
>>>> ResourceManager resourceManager = bus
>>>> .getExtension(ResourceManager.class);
>>>> resourceManager.addResourceResolver(new
>>>> ServletContextResourceResolver(
>>>> servletConfig.getServletContext()));
>>>>
>>>> replaceDestinationFactory();
>>>> // Set up the ServletController
>>>> controller = createServletController(servletConfig);
>>>>
>>>> }

>>>> ��loadBus������ �� super.loadBus(servletConfig)�滻��loadBusConfig
>>>> (servletConfig);
>>>> ����factory.create()ǰ�����
>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>> ����������£�

>>>> public void loadBus(ServletConfig servletConfig) throws ServletException
>>>> {
>>>>
>>>> loadBusNoConfig(servletConfig);
>>>>
>>>> // Bus bus = getBus();
>>>> // BusFactory.setDefaultBus(bus);
>>>> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>>>>
>>>> // You can als use the simple frontend API to do this
>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>
>>>> factroy.setBus(bus);
>>>> factroy.setServiceClass(HelloWorld.class);
>>>> factroy.setAddress("/HelloWorld");
>>>> factroy.setServiceBean(helloworldImpl);
>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>
>>>>
>>>> factroy.create();
>>>>
>>>> }

>>>> ����� ǰ���2���������� ���ǻ��DZ����쳣��

>>>> ��������openfire�Ļ�����ͨ����ʵ�֣��ҿ�ʼ�����Dz��ǻ����������� ����
>>>> ����ͬ��һ�ݴ��� �ŵ�һ��WEB������ͨ��TOMCAT��������б���

>>>> ����˵�ǰ汾�����⣬����ϸ�˶����ҵİ汾�����õ���JDK1.5 CXF�汾Ϊ
>>>> 2.1.8����ȫ��Ϲ����ϵı�׼��
>>>> ���Ͼ��������������ϣ�������ڰ�æ֮�г��ʱ�����С�ܽ��һ�£�С�ܽ�
>>>> ��ʤ�м���
>>>>
>>>>
>>>> ����ΰ
>>>>
>>>>
>>>
>>>

>> --
>> ���յ�����Ϣ������������ Google ��̳��cxf-zh����̳��
>> Ҫ�ڴ���̳�����뷢�����ʼ��� cxf...@googlegroups.com
>> Ҫ�˶�����̳���뷢�ʼ��� cxf-zh-un...@googlegroups.com
>> ���ѡ���ͨ�� http://groups.google.com/group/cxf-zh?hl=zh-CN ���ʸ���̳
>> ----
>> Apache CXF ��ҳ http://cwiki.apache.org/confluence/display/CXF/Index
>>
>>
>>
>

陈世伟

unread,
Dec 17, 2009, 2:24:00 AM12/17/09
to cxf...@googlegroups.com

如你所说,openfire在加载插件的时候用到自己的URLClassLoader
,但是我已经将CXF-jar放到了相对应的路径中,我想在初始化BUS的时候用这个URLClassLoader应该是可以找到相应的类的吧?

梁文龙-2 wrote:
>
> 没记错的话Bus在初始化的时候首先是检查
> Thread.currentThread().getContextClassLoader(), 如果有值就用它来加载cxf-
> x.x.x.jar!/META-INF下的那些配置文件, 而如果在Bus初始化的时候, 当前Thread
> 上的ContextClassLoader被指定为了不同的值, 比如openfire为每个插件使用各自
> 的ClassLoader, 就像OSGI那样, 那这个问题就会出来了.


>
> 于 2009-12-17 10:07, 陈世伟 写道:
>> 谢谢Willem
>> 给我回信,我在openfire中部署这个Webservice用到的CXF是将SPRING分离的,所以应该不会出现spring版本冲突的问题。现在出现的异常是

>> org.apache.cxf.BusException: No binding factory for namespace
>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> resolve a binding for null:

>> 在梁的回复中说到Thread.currentThread().getContextClassLoader(),能说的再详细点吗?
>>
>> 梁文龙-2 wrote:
>>
>>> 关于
>>>

>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>> resolve a binding for null:
>>>

>>> 不清楚openfire的基础结构和实际技术, 但是引发CXF的这个错误的最大可能就在
>>> 于Thread.currentThread().getContextClassLoader()
>>>
>>>
>>> 于 2009-12-16 18:39, Willem Jiang 写道:
>>>
>>>> CXF 支持Servlet Transport, 你在openfire容器中部署的时候出现了什么问题?
>>>> 是不是因为Spring 版本冲突出现的问题。
>>>>
>>>> 单从你给的Stack trace 来看可能是bus创建过程中出现的问题。
>>>> 你可以好好研究一下CXF bus 创建部分的代码。
>>>>
>>>> 还有你如果还有有关CXF的问题,建议你发到cxf...@googlegroups.com, 这样讨论
>>>> 范围会大一些,
>>>> 而且别人也能从你的讨论中获益。
>>>>
>>>> 姜宁
>>>>
>>>> 陈世伟 wrote:
>>>>
>>>>
>>>>> 姜宁:
>>>>> 你好
>>>>> 最近在一个项目上使用CXF,发现有很多问题百思不得其解,在网上也查了很
>>>>> 多资料 始终没有解决。希望你能指点一二,打扰见谅。
>>>>> 我的项目里有个设计方案 就是要把openfire 和webservice整合在一起,通过
>>>>> 发布接口 让第三方访问openfire里面的数据。目前我的实现方案是通过写
>>>>> openfire插件来实现webservice的功能。在实现的过程中发现整合SPRING的CXF 在
>>>>> openfire自带的JETTY容器中 会出现很多问题,于是就想到将spring与CXF分离。
>>>>> 起初第一步,我extends CXFNonSpringServlet 这个类并按照官方的例子
>>>>> OVERRIDE了 loadBus 这个方法,代码如下:

>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>> ServletException
>>>>> {
>>>>>
>>>>> // You can als use the simple frontend API to do this
>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>
>>>>> factroy.setBus(bus);
>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>> factroy.setAddress("/HelloWorld");
>>>>> factroy.setServiceBean(helloworldImpl);
>>>>> factroy.create();
>>>>> }

>>>>> 当我启动服务的时候出现load bus without application context的提示,并且出
>>>>> 现nullexception 异常代码如下:

>>>>> 这里有2个问题1、为什么会出现那个提示?
>>>>> 2、这个异常是怎么出现的?
>>>>>
>>>>> 后来我对代码进行了一下修改,增加了loadBusConfig方法,代码如下:

>>>>> private void loadBusNoConfig(ServletConfig servletConfig)
>>>>> throws ServletException {
>>>>>
>>>>> bus = BusFactory.getDefaultBus();
>>>>> ResourceManager resourceManager = bus
>>>>> .getExtension(ResourceManager.class);
>>>>> resourceManager.addResourceResolver(new
>>>>> ServletContextResourceResolver(
>>>>> servletConfig.getServletContext()));
>>>>>
>>>>> replaceDestinationFactory();
>>>>> // Set up the ServletController
>>>>> controller = createServletController(servletConfig);
>>>>>
>>>>> }

>>>>> 在loadBus方法中 将 super.loadBus(servletConfig)替换成loadBusConfig
>>>>> (servletConfig);
>>>>> 并在factory.create()前面加上
>>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>> 完整代码如下:

>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>> ServletException
>>>>> {
>>>>>
>>>>> loadBusNoConfig(servletConfig);
>>>>>
>>>>> // Bus bus = getBus();
>>>>> // BusFactory.setDefaultBus(bus);
>>>>> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>>>>>
>>>>> // You can als use the simple frontend API to do this
>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>
>>>>> factroy.setBus(bus);
>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>> factroy.setAddress("/HelloWorld");
>>>>> factroy.setServiceBean(helloworldImpl);
>>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>>
>>>>>
>>>>> factroy.create();
>>>>>
>>>>> }

>>>>> 启动服务 前面的2个问题解决了 但是还是报了异常:

>>>>> 以上是在openfire的环境下通过插件实现,我开始怀疑是不是环境出了问题 于是
>>>>> 将相同的一份代码 放到一个WEB工程下通过TOMCAT启动,启动过程中报:

>>>>> 有人说是版本的问题,我仔细核对了我的版本,我用的是JDK1.5 CXF版本为
>>>>> 2.1.8,完全符合官网上的标准。
>>>>> 以上就是我问题的描述,希望你能在百忙之中抽点时间帮助小弟解答一下,小弟将
>>>>> 不胜感激!
>>>>>
>>>>>
>>>>> 陈世伟
>>>>>
>>>>>
>>>>
>>>>
>>> --
>>> 您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
>>> 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
>>> 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
>>> 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
>>> ----
>>> Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
>>>
>>>
>>>
>>
>
> --
> 您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
> 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> 更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
> ----
> Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
>
>

--
View this message in context: http://old.nabble.com/Re%3A-%E6%B1%82%E5%8A%A9-tp26809203p26824207.html

梁文龙

unread,
Dec 17, 2009, 4:47:52 AM12/17/09
to cxf...@googlegroups.com
��, �ο�һ��JEE�������tomcat, �����Լ���ClassLoader, Ȼ���������
ClassLoaderΪparentΪÿ��webӦ���ٽ�b���Ե�ClassLoader, ������, ��
ClassLoader������ʱ��˫��ί�л���, parent����load��child�ڵ�class, ��
child����load��parent�ڵ�class; openfire�IJ�����ƴ��Ҳ������, loadһ��
�����ʱ��, ��currentThread.contxtClassLoader��ΪparentClassLoader, ��
��cxf����load�Լ��������ļ�, ��Ϊparent����load��child�ڵ���Դ

�� 2009-12-17 15:24, ����ΰ д��:
> ������˵��openfire�ڼ��ز����ʱ���õ��Լ���URLClassLoader
> ���������Ѿ���CXF-jar�ŵ������Ӧ��·���У������ڳ�ʼ��BUS��ʱ�������URLClassLoaderӦ���ǿ����ҵ���Ӧ����İɣ�


>
> z����-2 wrote:
>
>> û�Ǵ�Ļ�Bus�ڳ�ʼ����ʱ�������Ǽ��
>> Thread.currentThread().getContextClassLoader(), �����ֵ������4����cxf-
>> x.x.x.jar!/META-INF�µ���Щ�����ļ�, �������Bus��ʼ����ʱ��, ��ǰThread
>> �ϵ�ContextClassLoader��ָ��Ϊ�˲�ͬ��ֵ, ����openfireΪÿ����ʹ�ø���
>> ��ClassLoader, ����OSGI����, ���������ͻ��4��.
>>
>> �� 2009-12-17 10:07, ����ΰ д��:
>>
>>> ллWillem
>>> ���һ��ţ�����openfire�в������Webservice�õ���CXF�ǽ�SPRING����ģ�����Ӧ�ò������spring�汾��ͻ�����⡣���ڳ��ֵ��쳣��

>>> org.apache.cxf.BusException: No binding factory for namespace
>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>> resolve a binding for null:

>>> ��z�Ļظ���˵��Thread.currentThread().getContextClassLoader()����˵������ϸ����
>>>
>>> z����-2 wrote:
>>>
>>>
>>>> ����
>>>>

>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>>> resolve a binding for null:
>>>>

>>>> �����openfire�Ļ�ṹ��ʵ�ʼ���, ������CXF��������������ܾ���
>>>> ��Thread.currentThread().getContextClassLoader()
>>>>
>>>>
>>>> �� 2009-12-16 18:39, Willem Jiang �:
>>>>
>>>>
>>>>> CXF ֧��Servlet Transport�� ����openfire�����в����ʱ�������ʲô���⣿
>>>>> �Dz�����ΪSpring �汾��ͻ���ֵ����⡣
>>>>>
>>>>> ��������Stack trace 4��������bus��������г��ֵ����⡣
>>>>> ����Ժú��о�һ��CXF bus �������ֵĴ��롣
>>>>>
>>>>> ������������й�CXF�����⣬�����㷢��cxf...@googlegroups.com, ��������
>>>>> ��Χ���һЩ��
>>>>> ���ұ���Ҳ�ܴ���������л��档
>>>>>
>>>>> ����
>>>>>
>>>>> ����ΰ wrote:
>>>>>
>>>>>
>>>>>
>>>>>> ������
>>>>>> ���
>>>>>> �����һ����Ŀ��ʹ��CXF�������кܶ������˼������⣬������Ҳ���˺�
>>>>>> ������ ʼ��û�н��ϣ������ָ��һ�������ż��¡�
>>>>>> �ҵ���Ŀ���и���Ʒ��� ����Ҫ��openfire ��webservice�����һ��ͨ��
>>>>>> �����ӿ� �õ������openfire�������ݡ�Ŀǰ�ҵ�ʵ�ַ�����ͨ��д
>>>>>> openfire���4ʵ��webservice�Ĺ��ܡ���ʵ�ֵĹ���з������SPRING��CXF ��
>>>>>> openfire�Դ��JETTY������ ����ֺܶ����⣬���Ǿ��뵽��spring��CXF���롣
>>>>>> ����һ������extends CXFNonSpringServlet ����ಢ���չٷ�������
>>>>>> OVERRIDE�� loadBus �������������£�

>>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>>> ServletException
>>>>>> {
>>>>>>
>>>>>> // You can als use the simple frontend API to do this
>>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>>
>>>>>> factroy.setBus(bus);
>>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>>> factroy.setAddress("/HelloWorld");
>>>>>> factroy.setServiceBean(helloworldImpl);
>>>>>> factroy.create();
>>>>>> }

>>>>>> ����������ʱ�����load bus without application context����ʾ�����ҳ�
>>>>>> ��nullexception �쳣�������£�

>>>>>> ������2������1��Ϊʲô������Ǹ���ʾ��
>>>>>> 2������쳣����ô���ֵģ�
>>>>>>
>>>>>> ��4�ҶԴ��������һ���޸ģ������loadBusConfig�������������£�

>>>>>> private void loadBusNoConfig(ServletConfig servletConfig)
>>>>>> throws ServletException {
>>>>>>
>>>>>> bus = BusFactory.getDefaultBus();
>>>>>> ResourceManager resourceManager = bus
>>>>>> .getExtension(ResourceManager.class);
>>>>>> resourceManager.addResourceResolver(new
>>>>>> ServletContextResourceResolver(
>>>>>> servletConfig.getServletContext()));
>>>>>>
>>>>>> replaceDestinationFactory();
>>>>>> // Set up the ServletController
>>>>>> controller = createServletController(servletConfig);
>>>>>>
>>>>>> }

>>>>>> ��loadBus������ �� super.loadBus(servletConfig)�滻��loadBusConfig
>>>>>> (servletConfig);
>>>>>> ����factory.create()ǰ�����
>>>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>>> ����������£�

>>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>>> ServletException
>>>>>> {
>>>>>>
>>>>>> loadBusNoConfig(servletConfig);
>>>>>>
>>>>>> // Bus bus = getBus();
>>>>>> // BusFactory.setDefaultBus(bus);
>>>>>> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>>>>>>
>>>>>> // You can als use the simple frontend API to do this
>>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>>
>>>>>> factroy.setBus(bus);
>>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>>> factroy.setAddress("/HelloWorld");
>>>>>> factroy.setServiceBean(helloworldImpl);
>>>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>>>
>>>>>>
>>>>>> factroy.create();
>>>>>>
>>>>>> }

>>>>>> ����� ǰ���2���������� ���ǻ��DZ����쳣��

>>>>>> ��������openfire�Ļ�����ͨ����ʵ�֣��ҿ�ʼ�����Dz��ǻ����������� ����
>>>>>> ����ͬ��һ�ݴ��� �ŵ�һ��WEB������ͨ��TOMCAT��������б���

陈世伟

unread,
Dec 17, 2009, 5:07:47 AM12/17/09
to cxf...@googlegroups.com

谢谢你的回复。openfire加载插件其中有一段代码如下:
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(pluginLoader);
plugin.initializePlugin(this, pluginDir);
Thread.currentThread().setContextClassLoader(oldLoader);
其中的pluginLoader就是openfire自定义的,而根据CXF的BUS加载机制,他是先判定Thread.currentThread().getContextClassLoader();是否为空,很显然,轮到他加载的时候不是为空的,而是pluginLoader。不知道我这样理解是否正确呢?


org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/

依然是这个异常。我将同样的代码放到TOMCAT环境下 可以通过,应该可以证明代码没有问题。

梁文龙-2 wrote:
>
> 唔, 参考一下JEE容器比如tomcat, 它有自己的ClassLoader, 然后再以这个
> ClassLoader为parent为每个web应用再建立各自的ClassLoader, 这样呢, 由
> ClassLoader查找类时的双亲委托机制, parent不能load到child内的class, 而
> child可以load到parent内的class; openfire的插件机制大概也是这样, load一个
> 插件的时候, 将currentThread.contxtClassLoader设为parentClassLoader, 而导
> 致cxf不能load自己的配置文件, 因为parent不能load到child内的资源


>
> 于 2009-12-17 15:24, 陈世伟 写道:
>> 如你所说,openfire在加载插件的时候用到自己的URLClassLoader
>> ,但是我已经将CXF-jar放到了相对应的路径中,我想在初始化BUS的时候用这个URLClassLoader应该是可以找到相应的类的吧?
>>
>> 梁文龙-2 wrote:
>>
>>> 没记错的话Bus在初始化的时候首先是检查
>>> Thread.currentThread().getContextClassLoader(), 如果有值就用它来加载cxf-
>>> x.x.x.jar!/META-INF下的那些配置文件, 而如果在Bus初始化的时候, 当前Thread
>>> 上的ContextClassLoader被指定为了不同的值, 比如openfire为每个插件使用各自
>>> 的ClassLoader, 就像OSGI那样, 那这个问题就会出来了.
>>>
>>> 于 2009-12-17 10:07, 陈世伟 写道:
>>>
>>>> 谢谢Willem
>>>> 给我回信,我在openfire中部署这个Webservice用到的CXF是将SPRING分离的,所以应该不会出现spring版本冲突的问题。现在出现的异常是

>>>> org.apache.cxf.BusException: No binding factory for namespace
>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>>> resolve a binding for null:

>>>> 在梁的回复中说到Thread.currentThread().getContextClassLoader(),能说的再详细点吗?
>>>>
>>>> 梁文龙-2 wrote:
>>>>
>>>>
>>>>> 关于
>>>>>

>>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>>>> resolve a binding for null:
>>>>>

>>>>> 不清楚openfire的基础结构和实际技术, 但是引发CXF的这个错误的最大可能就在
>>>>> 于Thread.currentThread().getContextClassLoader()
>>>>>
>>>>>
>>>>> 于 2009-12-16 18:39, Willem Jiang 写道:
>>>>>
>>>>>
>>>>>> CXF 支持Servlet Transport, 你在openfire容器中部署的时候出现了什么问题?
>>>>>> 是不是因为Spring 版本冲突出现的问题。
>>>>>>
>>>>>> 单从你给的Stack trace 来看可能是bus创建过程中出现的问题。
>>>>>> 你可以好好研究一下CXF bus 创建部分的代码。
>>>>>>
>>>>>> 还有你如果还有有关CXF的问题,建议你发到cxf...@googlegroups.com, 这样讨论
>>>>>> 范围会大一些,
>>>>>> 而且别人也能从你的讨论中获益。
>>>>>>
>>>>>> 姜宁
>>>>>>
>>>>>> 陈世伟 wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> 姜宁:
>>>>>>> 你好
>>>>>>> 最近在一个项目上使用CXF,发现有很多问题百思不得其解,在网上也查了很
>>>>>>> 多资料 始终没有解决。希望你能指点一二,打扰见谅。
>>>>>>> 我的项目里有个设计方案 就是要把openfire 和webservice整合在一起,通过
>>>>>>> 发布接口 让第三方访问openfire里面的数据。目前我的实现方案是通过写
>>>>>>> openfire插件来实现webservice的功能。在实现的过程中发现整合SPRING的CXF 在
>>>>>>> openfire自带的JETTY容器中 会出现很多问题,于是就想到将spring与CXF分离。
>>>>>>> 起初第一步,我extends CXFNonSpringServlet 这个类并按照官方的例子
>>>>>>> OVERRIDE了 loadBus 这个方法,代码如下:

>>>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>>>> ServletException
>>>>>>> {
>>>>>>>
>>>>>>> // You can als use the simple frontend API to do this
>>>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>>>
>>>>>>> factroy.setBus(bus);
>>>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>>>> factroy.setAddress("/HelloWorld");
>>>>>>> factroy.setServiceBean(helloworldImpl);
>>>>>>> factroy.create();
>>>>>>> }

>>>>>>> 当我启动服务的时候出现load bus without application context的提示,并且出
>>>>>>> 现nullexception 异常代码如下:

>>>>>>> 这里有2个问题1、为什么会出现那个提示?
>>>>>>> 2、这个异常是怎么出现的?
>>>>>>>
>>>>>>> 后来我对代码进行了一下修改,增加了loadBusConfig方法,代码如下:

>>>>>>> private void loadBusNoConfig(ServletConfig servletConfig)
>>>>>>> throws ServletException {
>>>>>>>
>>>>>>> bus = BusFactory.getDefaultBus();
>>>>>>> ResourceManager resourceManager = bus
>>>>>>> .getExtension(ResourceManager.class);
>>>>>>> resourceManager.addResourceResolver(new
>>>>>>> ServletContextResourceResolver(
>>>>>>> servletConfig.getServletContext()));
>>>>>>>
>>>>>>> replaceDestinationFactory();
>>>>>>> // Set up the ServletController
>>>>>>> controller = createServletController(servletConfig);
>>>>>>>
>>>>>>> }

>>>>>>> 在loadBus方法中 将 super.loadBus(servletConfig)替换成loadBusConfig
>>>>>>> (servletConfig);
>>>>>>> 并在factory.create()前面加上
>>>>>>> factroy.getServiceFactory().setDataBinding(new AegisDatabinding());
>>>>>>> 完整代码如下:

>>>>>>> public void loadBus(ServletConfig servletConfig) throws
>>>>>>> ServletException
>>>>>>> {
>>>>>>>
>>>>>>> loadBusNoConfig(servletConfig);
>>>>>>>
>>>>>>> // Bus bus = getBus();
>>>>>>> // BusFactory.setDefaultBus(bus);
>>>>>>> // Endpoint.publish("/HelloWorld", new HelloWorldImpl());
>>>>>>>
>>>>>>> // You can als use the simple frontend API to do this
>>>>>>> HelloWorldImpl helloworldImpl = new HelloWorldImpl();
>>>>>>> ServerFactoryBean factroy = new ServerFactoryBean();
>>>>>>>
>>>>>>> factroy.setBus(bus);
>>>>>>> factroy.setServiceClass(HelloWorld.class);
>>>>>>> factroy.setAddress("/HelloWorld");
>>>>>>> factroy.setServiceBean(helloworldImpl);
>>>>>>> factroy.getServiceFactory().setDataBinding(new
>>>>>>> AegisDatabinding());
>>>>>>>
>>>>>>>
>>>>>>> factroy.create();
>>>>>>>
>>>>>>> }

>>>>>>> 启动服务 前面的2个问题解决了 但是还是报了异常:

>>>>>>> 以上是在openfire的环境下通过插件实现,我开始怀疑是不是环境出了问题 于是
>>>>>>> 将相同的一份代码 放到一个WEB工程下通过TOMCAT启动,启动过程中报:

--
View this message in context: http://old.nabble.com/Re%3A-%E6%B1%82%E5%8A%A9-tp26809203p26825771.html

Reply all
Reply to author
Forward
0 new messages