You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sripathi Acharya (JIRA)" <ji...@apache.org> on 2008/08/15 15:07:45 UTC

[jira] Created: (CXF-1750) CXF 2.1.1 And WebLogic 10

CXF 2.1.1 And WebLogic 10
-------------------------

                 Key: CXF-1750
                 URL: https://issues.apache.org/jira/browse/CXF-1750
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.1
         Environment: WebLogic 10
            Reporter: Sripathi Acharya


Hi All,

I'm facing the following exception when I build the webservice from the CXF sample hello_world.wsdl and try to deploy on WebLogic 10

<Aug 15, 2008 12:20:34 PM BST> <Error> <HTTP> <BEA-101125> <[weblogic.servlet.internal.WebAppServletContext@14627f - appName: 'HelloWorld', name: 'HelloWorldWeb', context-path: '/HelloWorldWeb'] Error occurred while instantiating servlet: "org.apache.cxf.js.rhino.DOMPayloadProvider".
java.lang.InstantiationException: org.apache.cxf.js.rhino.DOMPayloadProvider
        at java.lang.Class.newInstance0(Class.java:335)
        at java.lang.Class.newInstance(Class.java:303)
        at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:187)
        at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:203)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:254)

I've used CXF wsdl2java converter to build the server side code.

My EAR model is as follows:

HelloWorld.ear
    -META-INF
        -weblogic-application.xml
    -HelloWorldWeb.war
        -wsdl
            -hello_world.wsdl
        -WEB-INF
            -lib
            -classes
            -web.xml
            -bean.xml

The bean XML has the following entry:

	<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 id="HelloWorld"
		implementor="org.apache.hello_world_soap_http.GreeterImpl"
		address="/HelloWorld">
	</jaxws:endpoint>

weblogic-application.xml has the following entry:

    <application-param>
        <param-name>webapp.encoding.default</param-name>
        <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
        <package-name>javax.jws.*</package-name>
    </prefer-application-packages> 

Workaround:
I've modified the DOMPayloadProvider source to include default constructor, which allowed me to deploy the application on to WebLogic 10.

P.S. The application works fine on Tomcat 6.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1750) CXF 2.1.1 And WebLogic 10

Posted by "Sripathi Acharya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623320#action_12623320 ] 

Sripathi Acharya commented on CXF-1750:
---------------------------------------

Hi Glen,

The application failed to deploy even with the weblogic-application.xml you have mentioned. 

One thing I noticed was, when I removed the classes DOMPayloadProvider and DOMMessageProvider from the cxf-2.1.1.jar, I am able to deploy the application on WebLogic successfully.

I don't know if this error is due to the classes provided by CXF or the way these are instantiated by WebLogic server (also don't know from where its reading the bean configurations). Any help is highly appreciated.

Sripathi

> CXF 2.1.1 And WebLogic 10
> -------------------------
>
>                 Key: CXF-1750
>                 URL: https://issues.apache.org/jira/browse/CXF-1750
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: WebLogic 10
>            Reporter: Sripathi Acharya
>
> Hi All,
> I'm facing the following exception when I build the webservice from the CXF sample hello_world.wsdl and try to deploy on WebLogic 10
> <Aug 15, 2008 12:20:34 PM BST> <Error> <HTTP> <BEA-101125> <[weblogic.servlet.internal.WebAppServletContext@14627f - appName: 'HelloWorld', name: 'HelloWorldWeb', context-path: '/HelloWorldWeb'] Error occurred while instantiating servlet: "org.apache.cxf.js.rhino.DOMPayloadProvider".
> java.lang.InstantiationException: org.apache.cxf.js.rhino.DOMPayloadProvider
>         at java.lang.Class.newInstance0(Class.java:335)
>         at java.lang.Class.newInstance(Class.java:303)
>         at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:187)
>         at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:203)
>         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:254)
> I've used CXF wsdl2java converter to build the server side code.
> My EAR model is as follows:
> HelloWorld.ear
>     -META-INF
>         -weblogic-application.xml
>     -HelloWorldWeb.war
>         -wsdl
>             -hello_world.wsdl
>         -WEB-INF
>             -lib
>             -classes
>             -web.xml
>             -bean.xml
> The bean XML has the following entry:
> 	<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 id="HelloWorld"
> 		implementor="org.apache.hello_world_soap_http.GreeterImpl"
> 		address="/HelloWorld">
> 	</jaxws:endpoint>
> weblogic-application.xml has the following entry:
>     <application-param>
>         <param-name>webapp.encoding.default</param-name>
>         <param-value>UTF-8</param-value>
>     </application-param>
>     <prefer-application-packages>
>         <package-name>javax.jws.*</package-name>
>     </prefer-application-packages> 
> Workaround:
> I've modified the DOMPayloadProvider source to include default constructor, which allowed me to deploy the application on to WebLogic 10.
> P.S. The application works fine on Tomcat 6.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-1750) CXF 2.1.1 And WebLogic 10

Posted by "Sripathi Acharya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sripathi Acharya resolved CXF-1750.
-----------------------------------

    Resolution: Fixed

Since Weblogic uses JAX-WS 2.0 and CXF requires JAX-WS 2.1 we need to override the package javax.xml.ws.*

Modify the weblogic-application.xml as follows

<?xml version="1.0" encoding="UTF-8"?> 
<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90"> 
    <application-param> 
        <param-name>webapp.encoding.default</param-name> 
        <param-value>UTF-8</param-value> 
    </application-param> 
    <prefer-application-packages> 
        <package-name>javax.jws.*</package-name>
        <package-name>javax.xml.ws.*</package-name>
        <package-name>org.apache.cxf.*</package-name>
        <package-name>antlr.*</package-name>
    </prefer-application-packages> 
</weblogic-application> 

> CXF 2.1.1 And WebLogic 10
> -------------------------
>
>                 Key: CXF-1750
>                 URL: https://issues.apache.org/jira/browse/CXF-1750
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: WebLogic 10
>            Reporter: Sripathi Acharya
>
> Hi All,
> I'm facing the following exception when I build the webservice from the CXF sample hello_world.wsdl and try to deploy on WebLogic 10
> <Aug 15, 2008 12:20:34 PM BST> <Error> <HTTP> <BEA-101125> <[weblogic.servlet.internal.WebAppServletContext@14627f - appName: 'HelloWorld', name: 'HelloWorldWeb', context-path: '/HelloWorldWeb'] Error occurred while instantiating servlet: "org.apache.cxf.js.rhino.DOMPayloadProvider".
> java.lang.InstantiationException: org.apache.cxf.js.rhino.DOMPayloadProvider
>         at java.lang.Class.newInstance0(Class.java:335)
>         at java.lang.Class.newInstance(Class.java:303)
>         at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:187)
>         at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:203)
>         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:254)
> I've used CXF wsdl2java converter to build the server side code.
> My EAR model is as follows:
> HelloWorld.ear
>     -META-INF
>         -weblogic-application.xml
>     -HelloWorldWeb.war
>         -wsdl
>             -hello_world.wsdl
>         -WEB-INF
>             -lib
>             -classes
>             -web.xml
>             -bean.xml
> The bean XML has the following entry:
> 	<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 id="HelloWorld"
> 		implementor="org.apache.hello_world_soap_http.GreeterImpl"
> 		address="/HelloWorld">
> 	</jaxws:endpoint>
> weblogic-application.xml has the following entry:
>     <application-param>
>         <param-name>webapp.encoding.default</param-name>
>         <param-value>UTF-8</param-value>
>     </application-param>
>     <prefer-application-packages>
>         <package-name>javax.jws.*</package-name>
>     </prefer-application-packages> 
> Workaround:
> I've modified the DOMPayloadProvider source to include default constructor, which allowed me to deploy the application on to WebLogic 10.
> P.S. The application works fine on Tomcat 6.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1750) CXF 2.1.1 And WebLogic 10

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623520#action_12623520 ] 

Glen Mazza commented on CXF-1750:
---------------------------------

Sorry, don't think I can help you here.  It appears then that DOMPayloadProvider and/or DOMMessageProvider are calling libraries that WebLogic supplies by default, and those libraries that are either older or newer than the ones CXF ships with.  

WebLogic unfortunately uses its own libraries unless you explicitly add them to <prefer application packages/>  -- that is what triggers the CXF-bundled libraries to be used.  I don't know of an easy way to figure out what those libraries are--view error stack traces, perhaps.

As far as I'm concerned, if we work on Tomcat it is not a CXF bug.  It is not the CXF project's fault if an app server wrongly swaps out the JARs that CXF is packaged with and replaces them with its own.  But if you can find out more information, please leave a comment here so others can be helped.


> CXF 2.1.1 And WebLogic 10
> -------------------------
>
>                 Key: CXF-1750
>                 URL: https://issues.apache.org/jira/browse/CXF-1750
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: WebLogic 10
>            Reporter: Sripathi Acharya
>
> Hi All,
> I'm facing the following exception when I build the webservice from the CXF sample hello_world.wsdl and try to deploy on WebLogic 10
> <Aug 15, 2008 12:20:34 PM BST> <Error> <HTTP> <BEA-101125> <[weblogic.servlet.internal.WebAppServletContext@14627f - appName: 'HelloWorld', name: 'HelloWorldWeb', context-path: '/HelloWorldWeb'] Error occurred while instantiating servlet: "org.apache.cxf.js.rhino.DOMPayloadProvider".
> java.lang.InstantiationException: org.apache.cxf.js.rhino.DOMPayloadProvider
>         at java.lang.Class.newInstance0(Class.java:335)
>         at java.lang.Class.newInstance(Class.java:303)
>         at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:187)
>         at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:203)
>         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:254)
> I've used CXF wsdl2java converter to build the server side code.
> My EAR model is as follows:
> HelloWorld.ear
>     -META-INF
>         -weblogic-application.xml
>     -HelloWorldWeb.war
>         -wsdl
>             -hello_world.wsdl
>         -WEB-INF
>             -lib
>             -classes
>             -web.xml
>             -bean.xml
> The bean XML has the following entry:
> 	<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 id="HelloWorld"
> 		implementor="org.apache.hello_world_soap_http.GreeterImpl"
> 		address="/HelloWorld">
> 	</jaxws:endpoint>
> weblogic-application.xml has the following entry:
>     <application-param>
>         <param-name>webapp.encoding.default</param-name>
>         <param-value>UTF-8</param-value>
>     </application-param>
>     <prefer-application-packages>
>         <package-name>javax.jws.*</package-name>
>     </prefer-application-packages> 
> Workaround:
> I've modified the DOMPayloadProvider source to include default constructor, which allowed me to deploy the application on to WebLogic 10.
> P.S. The application works fine on Tomcat 6.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1750) CXF 2.1.1 And WebLogic 10

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623069#action_12623069 ] 

Glen Mazza commented on CXF-1750:
---------------------------------

I'm not sure this is a CXF problem.  In your weblogic-application.xml, you need to add to the <prefer-application-packages/> pretty much any package name it complains about (and it can vary from webapp to webapp).  There's probably nothing we can do in the CXF code to help you here, probably CXF-USER is a better solution for you.

I would try my weblogic-application file listed here:
http://www.jroller.com/gmazza/entry/deploying_metro_and_cxf_based

Does my w-a.xml file help?  If not, perhaps more package names until you get it working...

Glen


> CXF 2.1.1 And WebLogic 10
> -------------------------
>
>                 Key: CXF-1750
>                 URL: https://issues.apache.org/jira/browse/CXF-1750
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: WebLogic 10
>            Reporter: Sripathi Acharya
>
> Hi All,
> I'm facing the following exception when I build the webservice from the CXF sample hello_world.wsdl and try to deploy on WebLogic 10
> <Aug 15, 2008 12:20:34 PM BST> <Error> <HTTP> <BEA-101125> <[weblogic.servlet.internal.WebAppServletContext@14627f - appName: 'HelloWorld', name: 'HelloWorldWeb', context-path: '/HelloWorldWeb'] Error occurred while instantiating servlet: "org.apache.cxf.js.rhino.DOMPayloadProvider".
> java.lang.InstantiationException: org.apache.cxf.js.rhino.DOMPayloadProvider
>         at java.lang.Class.newInstance0(Class.java:335)
>         at java.lang.Class.newInstance(Class.java:303)
>         at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:187)
>         at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:203)
>         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:254)
> I've used CXF wsdl2java converter to build the server side code.
> My EAR model is as follows:
> HelloWorld.ear
>     -META-INF
>         -weblogic-application.xml
>     -HelloWorldWeb.war
>         -wsdl
>             -hello_world.wsdl
>         -WEB-INF
>             -lib
>             -classes
>             -web.xml
>             -bean.xml
> The bean XML has the following entry:
> 	<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 id="HelloWorld"
> 		implementor="org.apache.hello_world_soap_http.GreeterImpl"
> 		address="/HelloWorld">
> 	</jaxws:endpoint>
> weblogic-application.xml has the following entry:
>     <application-param>
>         <param-name>webapp.encoding.default</param-name>
>         <param-value>UTF-8</param-value>
>     </application-param>
>     <prefer-application-packages>
>         <package-name>javax.jws.*</package-name>
>     </prefer-application-packages> 
> Workaround:
> I've modified the DOMPayloadProvider source to include default constructor, which allowed me to deploy the application on to WebLogic 10.
> P.S. The application works fine on Tomcat 6.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.