This discussion is archived
8 Replies Latest reply: May 9, 2012 11:36 AM by 934183 RSS

Weblogic 12c web-app problem

774423 Newbie
Currently Being Moderated
Hi Guys,

Just downloaded Weblogic 12c & tried to deploy my ear appilcation. Within ear, I have few WAR files, one such war is a spring based deployment of webservices using CXF. When I deploy this war I get following exception:

weblogic.application.ModuleException: [HTTP:101216]Servlet: "com.banctec.caseware.client.api.wsapi.WSFreeTextListAPIServiceImpl" failed to preload on startup in Web application: "webservice".
javax.servlet.ServletException: Servlet class: 'com.banctec.caseware.client.api.wsapi.WSFreeTextListAPIServiceImpl' does not implement javax.servlet.Servlet
     at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:292)
     at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
     at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94)
     at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82)
     at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
     at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:60)
     at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:34)
     at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:638)
     at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:579)
     at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1874)
     at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1848)
     at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1738)
     at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
     at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
     at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
     at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
     at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
     at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
     at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
     at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
     at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
     at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
     at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
     at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
     at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
     at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:192)
     at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
     at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
     at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
     at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:186)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:94)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

     at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1706)
     at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
     Truncated. see log file for complete stacktrace
Caused By: javax.servlet.ServletException: Servlet class: 'com.banctec.caseware.client.api.wsapi.WSFreeTextListAPIServiceImpl' does not implement javax.servlet.Servlet
     at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:292)
     at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
     Truncated. see log file for complete stacktrace


Now, com.banctec.caseware.client.api.wsapi.WSFreeTextListAPIServiceImpl is my class that implements web service. It's surely not a servlet, org.apache.cxf.transport.servlet.CXFServlet is. In fact here is an exrupt from my web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>SOAPService</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:cxf-config.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>


I don't know what is the problem. Please help.
  • 1. Re: Weblogic 12c web-app problem
    934183 Newbie
    Currently Being Moderated
    Very similar issue-anyone?
  • 2. Re: Weblogic 12c web-app problem
    ashishshinde - oracle Journeyer
    Currently Being Moderated
    hi,

    Can you please provide weblogic-application.xml.

    probably the issue is with <prefer-application-packages>

    Thanks,
    Ashish
  • 3. Re: Weblogic 12c web-app problem
    934183 Newbie
    Currently Being Moderated
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application"
    xsi:schemaLocation="
    http://www.bea.com/ns/weblogic/weblogic-application
    http://www.bea.com/ns/weblogic/weblogic-application.xsd
    http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd">
    <wls:application-param>
    <wls:param-name>webapp.encoding.default</wls:param-name>
    <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>
    <wls:prefer-application-packages>

         <wls:package-name>javax.jws.*</wls:package-name>
         <wls:package-name>org.apache.*</wls:package-name>
         <wls:package-name>org.codehaus.*</wls:package-name>
         <wls:package-name>com.ctc.*</wls:package-name>
    <wls:package-name>com.sun.xml.*</wls:package-name>
    <wls:package-name>com.sun.istack.*</wls:package-name>
    <wls:package-name>com.sun.msv.datatype.*</wls:package-name>
    <wls:package-name>com.sun.msv.driver.*</wls:package-name>
    <wls:package-name>com.sun.msv.grammar.*</wls:package-name>
    <wls:package-name>com.sun.msv.reader.*</wls:package-name>
    <wls:package-name>com.sun.msv.relaxns.*</wls:package-name>
    <wls:package-name>com.sun.msv.scanner.*</wls:package-name>
    <wls:package-name>com.sun.msv.util.*</wls:package-name>
    <wls:package-name>com.sun.msv.verifier.*</wls:package-name>
    <wls:package-name>com.sun.msv.writer.*</wls:package-name>
    <wls:package-name>com.sun.org.apache.xml.internal.*</wls:package-name>
    <wls:package-name>com.sun.wsit.*</wls:package-name>
    <wls:package-name>javanet.staxutils.*</wls:package-name>
    <wls:package-name>jp.gr.xml.*</wls:package-name>
    <wls:package-name>org.codehaus.stax2.*</wls:package-name>
    <wls:package-name>org.glassfish.gmbal.*</wls:package-name>
    <wls:package-name>org.iso_relax.*</wls:package-name>
    <wls:package-name>org.jcp.xml.dsig.*</wls:package-name>
    <wls:package-name>org.jvnet.*</wls:package-name>
    <wls:package-name>org.relaxng.*</wls:package-name>

    </wls:prefer-application-packages>
    <wls:prefer-application-resources>

         <wls:resource-name>META-INF/services/javax.xml.ws.spi.Provider</wls:resource-name>

    </wls:prefer-application-resources>
    </wls:weblogic-application>

    Not all of these are relavent to my app, I followed a guide and copy/paste most of the list. I started with just:

    <wls:package-name>javax.jws.*</wls:package-name>
    <wls:package-name>org.apache.*</wls:package-name>

    and still had the same error. (prefer-web-inf in weblogic.xml = true)

    Thanks for the help-I'm so grateful-i'm almost certain its the weblogic-applicatioin.xml

    Edited by: 931180 on May 3, 2012 8:36 AM

    Edited by: 931180 on May 3, 2012 8:47 AM
  • 4. Re: Weblogic 12c web-app problem
    934183 Newbie
    Currently Being Moderated
    I ran the classloader analysis tool (locally for wls 10.3.5) found the following recommendations:

    <prefer-application-packages>
    <package-name>com.ctc.wstx.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.jws.soap.*</package-name>
    <package-name>javax.mail.*</package-name>
    <package-name>javax.mail.event.*</package-name>
    <package-name>javax.mail.internet.*</package-name>
    <package-name>javax.mail.search.*</package-name>
    <package-name>javax.mail.util.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>org.apache.commons.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    </prefer-application-packages>

    Same error deploying to 12c after updating with the above.

    Edited by: 931180 on May 3, 2012 10:42 AM
  • 5. Re: Weblogic 12c web-app problem
    ashishshinde - oracle Journeyer
    Currently Being Moderated
    Hi,

    Can you try to running the test by removing all the javax.* package names from weblogic-application.xml:

    <wls:package-name>javax.jws.*</wls:package-name>

    Please let me know the results.

    Thanks,
    Ashish

    Edited by: ASHISH on May 4, 2012 8:30 AM
  • 6. Re: Weblogic 12c web-app problem
    934183 Newbie
    Currently Being Moderated
    <?xml version='1.0' encoding='UTF-8'?>

    <wls:weblogic-application
    xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application
    http://xmlns.oracle.com/weblogic/weblogic-application/1.4/weblogic-application.xsd">

    <wls:application-param>
    <wls:param-name>webapp.encoding.default</wls:param-name>
    <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>
    <wls:prefer-application-packages>
    <wls:package-name>javax.jws.*</wls:package-name>
    </wls:prefer-application-packages>
    <wls:prefer-application-resources>
         <wls:resource-name>META-INF/services/javax.xml.ws.spi.Provider</wls:resource-name>
    </wls:prefer-application-resources>
    </wls:weblogic-application>

    Error:

    Servlet: "org.apache.juddi.v3.client.mapping.UDDIClientSubscriptionListenerImpl" failed to preload on startup in Web application: "dashboard". javax.servlet.ServletException: Servlet class: 'org.apache.juddi.v3.client.mapping.UDDIClientSubscriptionListenerImpl' does not implement javax.servlet.Servlet at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:292) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74) at weblogic.servlet.internal.StubLifecycleHelper.<init>
  • 7. Re: Weblogic 12c web-app problem
    ashishshinde - oracle Journeyer
    Currently Being Moderated
    HI,

    did you get a chances to run the test by removing below tags from weblogic-application.xml:

    <wls:package-name>javax.jws.*</wls:package-name>
    <package-name>javax.jws.soap.*</package-name>
    <package-name>javax.xml.ws.*</package-name>

    Regards,
    Ashish
  • 8. Re: Weblogic 12c web-app problem
    934183 Newbie
    Currently Being Moderated
    Thanks-removing those packages seemed to move past the servlet error

    <?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>org.apache.*</package-name>
    </prefer-application-packages>
         <prefer-application-resources>
         <resource-name>META-INF/services/javax.xml.ws.spi.Provider</resource-name>      
         <resource-name>META-INF/services/javax.xml.bind.JAXBContext</resource-name>
         <resource-name>META-INF/services/com.sun.xml.ws.spi.db.BindingContextFactory</resource-name>
    </prefer-application-resources>
    </weblogic-application>

    This could be unrelated to the OP, but I had to override the MOXY jaxb implementation in order for my application to work.

    THANK YOU SOOOOO MUCH!!! :D

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points