« Return to Thread: Deploying to Weblogic 10.3.1

RE: Deploying to Weblogic 10.3.1

by Carl Roberts :: Rate this Message:

Reply to Author | View in Thread

OK,

I've gotten a little further by doing this:

I replaced the Sun JVM used by Weblogic Server 10.3.1 from version 1.6 build 11 to 1.6 build 14 and this resolved the error:

com.sun.xml.internal.messaging.saaj.soap.LocalStrings
> != com.sun.xml.messaging.saaj.soap.LocalStrings

However, I am now running into another error which I think stems from the fact that the following two schemas don't support the <display-name> or <description> elements under the <servlet> element of a web deployment descriptor (web.xml):


http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd


Here is what works in Metro and Tomcat (section of web.xml):

  <servlet>
    <servlet-name>DocumentServiceSoap11</servlet-name>
    <display-name>DocumentServiceSoap11</display-name>
    <description>DocumentService SOAP 1.1</description>
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

However, when I use Weblogic and try to deploy using the same entries in the web.xml I get this:

Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error [HTTP:101064][WebAppModule(DocumentServiceImplSoap11:DocumentServiceImplSoap11)] Error parsing descriptor in Web appplication "C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceImplSoap11\cvh7s\com\oracle\webservices\documentservice\server\DocumentServiceImplSoap11.war" weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:1201) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:335) at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:609) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:185) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:53) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:241) at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:228) at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:153) at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323) at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788) at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768) at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:141) at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:1193) ... 26 more weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>
Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>



So it appears that Tomcat does no validation against the web.xml but J2EE containers do (are required) and cannot validate the web.xml with the <display-name> and <description> elements.  If I take out these elements then validation succeeds in Weblogic but then Metro throws this exception:

####<Jul 10, 2009 4:24:09 PM EDT> <Error> <Console> <idocumaker> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1247257449500> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException:
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1376)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:53)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
        at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NullPointerException:
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:362)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:104)
        at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262)
        at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:335)
        at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:198)
        at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:504)
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1799)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
>


It seems to me this is a bug in Metro:

If <display-name> and <description> aren't supported under the <servlet> element in the schemas for a web.xml, then why are we relying on them to be there and throwing a NullpointerException when they are not.  At the very least they should be made optional.  This way I can take them out in the web.xml when deploying to a J2EE container and not have to worry about Metro throwing this exception.  It is possible I am missing some sort of crucial piece of information but I don't see that this elements are supported under the <servlet> element in the following two schemas:

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

or
 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

Please advise,

Carl



-----Original Message-----
From: Glen Mazza [mailto:glen.mazza@...]
Sent: Friday, July 10, 2009 12:35 PM
To: users@...
Subject: RE: Deploying to Weblogic 10.3.1


Looking at your error stack, it appears that you're relying on BEAWLS' own jax-ws implementation (weblogic.wsee.jaxws...) instead of Metro.  I might advise against removing the Metro jars from the WEB-INF/lib for that reason, but as that is not working for you either, I'm not sure what else to suggest other than trying CXF (which comes with no guarantees on BEAWLS either[1]) or switching to Glassfish or Tomcat.  I'm pretty confident that Metro 2.0 will work on BEAWLS but simply don't know the <prefer-application-packages/> library overrides necessary for that to happen.

Sorry,
Glen

[1]
http://cwiki.apache.org/CXF20DOC/appserverguide.html#AppServerGuide-WebLogic


Carl Roberts wrote:

>
> Thanks Glen,
>
> I will try your setup.
>
> BTW, since Oracle WebLogic claims to follow the Glassfish
> implementation and I couldn't get any further with my previous
> approach, I figured why not remove the metro webservices-*.jar files
> from my WEB-INF\lib directory and just go with the Weblogic
> implementation of Glassfish. Theoretically this should work.
>
> Well,
>
> I changed the web.xml to run the Implementation class directly by
> commenting out the listener:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> - <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee">
>   <display-name>DocumentServiceSoap11</display-name>
> - <!--
>   <listener>
>
> <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
>   </listener>
>
>
>   -->
> - <servlet>
>   <servlet-name>DocumentServiceSoap11</servlet-name>
> - <!--
> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
>   -->
>
> <servlet-class>com.oracle.webservices.documentservice.server.DocumentServiceImpl</servlet-class>
>   <load-on-startup>0</load-on-startup>
>   </servlet>
> - <servlet-mapping>
>   <servlet-name>DocumentServiceSoap11</servlet-name>
>   <url-pattern>/DocumentService</url-pattern>
>   </servlet-mapping>
> - <session-config>
>   <session-timeout>60</session-timeout>
>   </session-config>
>   </web-app>
>
> And I am getting a little further I think, but now I am getting this
> error, indicating the Weblogic schema validator is not up to par with
> Metro's 2.0 one, because it is complaining about default attribute for
> xsd:element not being valid?  Isn't default attribute for xsd:element
> a standard attribute?  It seems like a schema that worked fine before
> under tomcat now has problems under Weblogic.
>
> Here is the error from weblogic:
>
> Message icon - Error An error occurred during activation of changes,
> please see the log for details.
> Message icon - Error [HTTP:101216]Servlet: "DocumentServiceSoap11"
> failed to preload on startup in Web application: "DocumentServiceImpl".
> javax.xml.ws.WebServiceException: org.xml.sax.SAXParseException:
> s4s-att-not-allowed: Attribute 'default' cannot appear in element
> 'element'. at
> com.sun.xml.ws.server.ServerSchemaValidationTube.<init>(ServerSchemaVa
> lidationTube.java:69)
> at
> com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext.createValidationTub
> e(ServerTubeAssemblerContext.java:221)
> at
> weblogic.wsee.jaxws.tubeline.standard.StandardTubelineDeploymentListen
> er$13.createServer(StandardTubelineDeploymentListener.java:158)
> at
> weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$TubelineAssemblerImpl.
> createServer(WLSTubelineAssemblerFactory.java:105)
> at
> com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:158)
> at
> weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory$WLSEndpointImpl.<i
> nit>(WLSContainer.java:413)
> at ''
>
> This is getting a little frustrating.  I guess I am going to try going
> back to including the webservies-*.jar files and using
> saaj-impl-3.2.jar from Sun instead of 3.1 version.  I noticed the 3.2
> version contains a META-INF\services directory with some factory
> classes while the 3.1 version I was using does not.  I am hoping this solves the problem.
>
>
>
> -----Original Message-----
> From: Carl Roberts [mailto:carl.roberts@...]
> Sent: Friday, July 10, 2009 8:58 AM
> To: glen.mazza@...
> Cc: users@...
> Subject: RE: Deploying to Weblogic 10.3.1
>
> Hi Glen,
>
> Thanks for your response.  Much appreciated. I tried your package
> names per the link you gave me instead of mine.  Here are the ones I
> am using
> now:
>
> <package-name>com.sun.xml.*</package-name>
>       <package-name>javax.xml.bind.*</package-name>
>
> But I am back to a different error that I saw before:
>
> Message icon - Error An error occurred during activation of changes,
> please see the log for details.
> Message icon - Error weblogic.application.ModuleException:
> Message icon - Error
> com.sun.xml.internal.messaging.saaj.soap.LocalStrings
> != com.sun.xml.messaging.saaj.soap.LocalStrings
>
> I noticed the saaj-impl namespace is also com.sun.xml.* so I am
> wondering if it has to do with this.
>
> I have also tried including the saaj-impl-1.3.jar file in the
> WEB-INF\lib directory of the war inside the ear and redeploying but I
> get the same error.  Have you seen this error before?
>
> Do you have a sample ear file that you used for testing that I could
> try to deploy on my instance of Weblogic Server 10.3.1?
>
> Thanks,
>
> Joe
>
> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@...]
> Sent: Thursday, July 09, 2009 7:03 PM
> To: users@...
> Subject: RE: Deploying to Weblogic 10.3.1
>
>
> I used somewhat different <p-a-p/s>--perhaps my list would help:
> http://www.jroller.com/gmazza/entry/deploying_metro_and_cxf_based
>
> Glen
>
>
> Carl Roberts wrote:
>>
>>    <prefer-application-packages>
>>
>>       <package-name>javax.jws.*</package-name>
>>
>>         <package-name>javax.xml.soap.*</package-name>
>>
>>    </prefer-application-packages>
>>
>> </weblogic-application>
>>
>> The deployment process in Weblogic then complains that my service
>> implementation class does not have @WebService or @WebServiceProvider
>> annotation, but it does:
>>
>
> --
> View this message in context:
> http://www.nabble.com/Deploying-to-Weblogic-10.3.1-tp24415730p24419290
> .html Sent from the Metro - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>

--
View this message in context: http://www.nabble.com/Deploying-to-Weblogic-10.3.1-tp24415730p24430825.html
Sent from the Metro - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Deploying to Weblogic 10.3.1