ERROR deploying DRW application in weblogic 12.1.3.0.0

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

ERROR deploying DRW application in weblogic 12.1.3.0.0

dragon2014
Hi, I have read several post about dwr and weblogic but i have not
found a solution, please i need help.
My dwr version is dwr-3.0.0-rc3-RELEASE and my weblogic version is
12.1.3.0.0
I have the following configuration in my web.xml
<servlet>
                <display-name>DWR Servlet</display-name>
                <servlet-name>dwr-invoker</servlet-name>
               
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
                <init-param>
                        <param-name>debug</param-name>
                        <param-value>false</param-value>
                </init-param>
                <init-param>
                        <param-name>generateDtoClasses</param-name>
                        <param-value>dto</param-value>
                </init-param>
                <init-param>
                       
<param-name>initApplicationScopeCreatorsAtStartup</param-name>
                        <param-value>true</param-value>
                </init-param>
                <init-param>
                        <param-name>config</param-name>
                       
<param-value>/WEB-INF/dwr.xml,/WEB-INF/dwr-custom.xml</param-value>
                </init-param>
                <load-on-startup>1</load-on-startup>
        </servlet>

The tag <load-on-startup>1</load-on-startup> makes possible that DWR
initialize correctly in weblogic but the server.log shows the error

<Error> <HTTP>
<AP03CMPROD> <OmniaServer> <[STANDBY] ExecuteThread: '3' for
queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <>
<ca7a250a-50ac-4c63-b97e-ca33aafb2d15-0000000e>
<1482747833333> <BEA-101388> <The ServletContext was
passed to the ServletContextListener.contextInitialized method
of a ServletContextListener that was neither declared in web.xml
or web-fragment.xml, nor annotated with
javax.servlet.annotation.WebListener.>


I executed a debug in DWR code and the problem fires when execute the
class
org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction
method isNativeEnvironment.
I have spend some days with this problem.
I hope that you can help me.
thanks
Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Mike Wilson
Administrator
You are using a fairly old DWR version, please try out the latest
stable version which is 3.0.2.
If you are still having problems then try deploying the DWR demo
application on your appserver and report back how this goes.

You find both the latest dwr.jar and dwrdemo.war on
http://directwebremoting.org/dwr/downloads/
or in Maven Central.

Best regards
Mike Wilson

santiago.parraga wrote:

> Hi, I have read several post about dwr and weblogic but i have not
> found a solution, please i need help.
> My dwr version is dwr-3.0.0-rc3-RELEASE and my weblogic version is
> 12.1.3.0.0
> I have the following configuration in my web.xml
> <servlet>
> <display-name>DWR Servlet</display-name>
> <servlet-name>dwr-invoker</servlet-name>
>      
> <servlet-class>org.directwebremoting.servlet.DwrServlet</servl
> et-class>
> <init-param>
> <param-name>debug</param-name>
> <param-value>false</param-value>
> </init-param>
> <init-param>
> <param-name>generateDtoClasses</param-name>
> <param-value>dto</param-value>
> </init-param>
> <init-param>
>      
> <param-name>initApplicationScopeCreatorsAtStartup</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>config</param-name>
>      
> <param-value>/WEB-INF/dwr.xml,/WEB-INF/dwr-custom.xml</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> The tag <load-on-startup>1</load-on-startup> makes possible that DWR
> initialize correctly in weblogic but the server.log shows the error
>
> <Error> <HTTP>
> <AP03CMPROD> <OmniaServer> <[STANDBY] ExecuteThread: '3' for
> queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <>
> <ca7a250a-50ac-4c63-b97e-ca33aafb2d15-0000000e>
> <1482747833333> <BEA-101388> <The ServletContext was
> passed to the ServletContextListener.contextInitialized method
> of a ServletContextListener that was neither declared in web.xml
> or web-fragment.xml, nor annotated with
> javax.servlet.annotation.WebListener.>
>
>
> I executed a debug in DWR code and the problem fires when execute the
> class
> org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction
> method isNativeEnvironment.
> I have spend some days with this problem.
> I hope that you can help me.
> thanks

Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

dragon2014
In reply to this post by dragon2014
Hi Mike, thanks for your answer.
I did the test. I have upgraded the application with the DRW version
that you sugested, but the problem persist, so i have downloaded the
dwrdemo.war like you said but show the same error :

D-T 16:04:53,544 .directwebremoting.log.startup  INFO Starting:
DwrServlet v3.0.3-dev-665 on WebLogic Server 12.1.3.0.0 Fri May 30
18:25:10 PDT 2014 1606070 Oracle WebLogic Server Module Dependencies
12.1 Tue Mar 11 15:35:15 MDT 2014 WebLogic Jersey Server Integration
3.0 Fri Feb 21 10:55:11 UTC 2014  / JDK 1.7.0_51 from Oracle
Corporation at /dwrdemo
<Feb 13, 2017 4:04:53 PM ECT> <Error> <HTTP> <BEA-101388> <The
ServletContext was passed to the
ServletContextListener.contextInitialized method of a
ServletContextListener that was neither declared in web.xml or
web-fragment.xml, nor annotated with
javax.servlet.annotation.WebListener.>
D-T 16:04:53,837 .directwebremoting.log.startup  INFO Starting: Using
container abstraction
org.directwebremoting.server.servlet2.Servlet24ContainerAbstraction


I have deployed just the demo application (dwrdemo.war) for this test.
Please, I need to know if this error impacts the performance of the
application or can generate other errors?
The version of my weblogic is 12.1.3.0.0.
Thanks for your help.

Best regards
SJPM
Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Mike Wilson
Administrator
Good, so then we know it is not something in your application that causes
this.

When looking into this I see that a bunch of other projects have run into
the same error and most seem to label this as a harmless bug in Weblogic.
Still, it would be good to have more knowledge about why the error is
printed. Please debug further and check the exact line that causes the
error. I guess there might also be a stacktrace with an
UnsupportedOperationException you can find and give us.

Best regards
Mike

santiago.parraga wrote:

> Hi Mike, thanks for your answer.
> I did the test. I have upgraded the application with the DRW version
> that you sugested, but the problem persist, so i have downloaded the
> dwrdemo.war like you said but show the same error :
>
> D-T 16:04:53,544 .directwebremoting.log.startup  INFO Starting:
> DwrServlet v3.0.3-dev-665 on WebLogic Server 12.1.3.0.0 Fri May 30
> 18:25:10 PDT 2014 1606070 Oracle WebLogic Server Module Dependencies
> 12.1 Tue Mar 11 15:35:15 MDT 2014 WebLogic Jersey Server Integration
> 3.0 Fri Feb 21 10:55:11 UTC 2014  / JDK 1.7.0_51 from Oracle
> Corporation at /dwrdemo
> <Feb 13, 2017 4:04:53 PM ECT> <Error> <HTTP> <BEA-101388> <The
> ServletContext was passed to the
> ServletContextListener.contextInitialized method of a
> ServletContextListener that was neither declared in web.xml or
> web-fragment.xml, nor annotated with
> javax.servlet.annotation.WebListener.>
> D-T 16:04:53,837 .directwebremoting.log.startup  INFO Starting: Using
> container abstraction
> org.directwebremoting.server.servlet2.Servlet24ContainerAbstraction
>
>
> I have deployed just the demo application (dwrdemo.war) for this test.
> Please, I need to know if this error impacts the performance of the
> application or can generate other errors?
> The version of my weblogic is 12.1.3.0.0.
> Thanks for your help.
>
> Best regards
> SJPM

Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

David Requena

While not really familiar with weblogic I see some reference to ‎WebLogic Jersey Server Integration in your logs. 

According to https://docs.oracle.com/middleware/1213/wls/RESTF/use-jersey20-ri.htm#RESTF2 this jax-rs implementation requires some customizing of the web descriptor xml file of webapps. 

I'm inclined to think Mike is right here and this is harmless unless you actually intend to use RESTFull Web Services, at which point you must update your weblogic.xml file anyways.

Saludos
David Requena / Gmail
  Original Message  
From: Mike Wilson
Sent: martes, 14 de febrero de 2017 00:38
To: [hidden email]
Reply To: [hidden email]
Subject: [dwr-users] Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Good, so then we know it is not something in your application that causes
this.

When looking into this I see that a bunch of other projects have run into
the same error and most seem to label this as a harmless bug in Weblogic.
Still, it would be good to have more knowledge about why the error is
printed. Please debug further and check the exact line that causes the
error. I guess there might also be a stacktrace with an
UnsupportedOperationException you can find and give us.

Best regards
Mike

santiago.parraga wrote:

> Hi Mike, thanks for your answer.
> I did the test. I have upgraded the application with the DRW version
> that you sugested, but the problem persist, so i have downloaded the
> dwrdemo.war like you said but show the same error :
>
> D-T 16:04:53,544 .directwebremoting.log.startup INFO Starting:
> DwrServlet v3.0.3-dev-665 on WebLogic Server 12.1.3.0.0 Fri May 30
> 18:25:10 PDT 2014 1606070 Oracle WebLogic Server Module Dependencies
> 12.1 Tue Mar 11 15:35:15 MDT 2014 WebLogic Jersey Server Integration
> 3.0 Fri Feb 21 10:55:11 UTC 2014 / JDK 1.7.0_51 from Oracle
> Corporation at /dwrdemo
> <Feb 13, 2017 4:04:53 PM ECT> <Error> <HTTP> <BEA-101388> <The
> ServletContext was passed to the
> ServletContextListener.contextInitialized method of a
> ServletContextListener that was neither declared in web.xml or
> web-fragment.xml, nor annotated with
> javax.servlet.annotation.WebListener.>
> D-T 16:04:53,837 .directwebremoting.log.startup INFO Starting: Using
> container abstraction
> org.directwebremoting.server.servlet2.Servlet24ContainerAbstraction
>
>
> I have deployed just the demo application (dwrdemo.war) for this test.
> Please, I need to know if this error impacts the performance of the
> application or can generate other errors?
> The version of my weblogic is 12.1.3.0.0.
> Thanks for your help.
>
> Best regards
> SJPM

Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

dragon2014
In reply to this post by dragon2014
Hi Mike,
I made the test whit your dwrdemo.war.
When weblogic deploys dwrdemo.war this execute the class

Servlet30ContainerAbstraction, in line 42 the method
isNativeEnvironment generate the error that i send  you before


 public boolean isNativeEnvironment(ServletConfig servletConfig)
    {
        ServletContext ctx = servletConfig.getServletContext();
        return ctx.getMajorVersion() >= 3 &&
ctx.getEffectiveMajorVersion() >= 3;
    }

In line 45 when The variable ctx (WebAppServletContext) evaluates
ctx.getEffectiveMajorVersion() print the following error .

Please your help Mike, my application is in production environmet, i
need to know the consecuences of this error and if this bug would be
solved soon
 because I have to deliver a report to the client.
thanks for your help


<Feb 14, 2017 10:56:03 AM ECT> <Error> <HTTP> <BEA-101388> <The
ServletContext was passed to the
ServletContextListener.contextInitialized method of a
ServletContextListener that was neither declared in web.xml or
web-fragment.xml, nor annotated with
javax.servlet.annotation.WebListener.>
java.lang.UnsupportedOperationException: [HTTP:101388]The
ServletContext was passed to the
ServletContextListener.contextInitialized method of a
ServletContextListener that was neither declared in web.xml or
web-fragment.xml, nor annotated with
javax.servlet.annotation.WebListener.
        at
weblogic.servlet.internal.WebAppServletContext.checkNotifyDynamicContex
t(WebAppServletContext.java:3989)
        at
weblogic.servlet.internal.WebAppServletContext.getEffectiveMajorVersion
(WebAppServletContext.java:3814)
        at
org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction.isN
ativeEnvironment(Servlet30ContainerAbstraction.java:45)
        at
org.directwebremoting.impl.StartupUtil.resolveMultipleImplementations(S
tartupUtil.java:397)
        at
org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUti
l.java:262)
        at
org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(S
tartupUtil.java:189)
        at
org.directwebremoting.servlet.DwrServlet.createContainer(DwrServlet.jav
a:101)
        at
org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(Stub
SecurityHelper.java:337)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(Stub
SecurityHelper.java:288)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedS
ubject.java:321)
        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:12
0)
        at
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57
)
        at
weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSe
curityHelper.java:98)
        at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurity
Helper.java:86)
        at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLif
ecycleHelper.java:71)
        at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelpe
r.java:57)
        at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelpe
r.java:31)
        at
weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(Servl
etStubImpl.java:660)
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImp
l.java:600)
        at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppSer
vletContext.java:1979)
        at
weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(We
bAppServletContext.java:1956)
        at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppS
ervletContext.java:1846)
        at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletConte
xt.java:2876)
        at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:
1661)
        at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
        at
weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.
next(ExtensibleModuleWrapper.java:360)
        at
weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.
next(ExtensibleModuleWrapper.java:356)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDri
ver.java:42)
        at
weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleM
oduleWrapper.java:138)
        at
weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleLi
stenerInvoker.java:124)
        at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleState
Driver.java:216)
        at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleState
Driver.java:211)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDri
ver.java:42)
        at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateD
river.java:73)
        at
weblogic.application.internal.flow.StartModulesFlow.activate(StartModul
esFlow.java:24)
        at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java
:729)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDri
ver.java:42)
        at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.ja
va:258)
        at
weblogic.application.internal.SingleModuleDeployment.activate(SingleMod
uleDeployment.java:48)
        at
weblogic.application.internal.DeploymentStateChecker.activate(Deploymen
tStateChecker.java:165)
        at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppC
ontainerInvoker.java:80)
        at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.acti
vate(AbstractOperation.java:587)
        at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.acti
vateDeployment(ActivateOperation.java:150)
        at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCo
mmit(ActivateOperation.java:116)
        at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.comm
it(AbstractOperation.java:339)
        at
weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymen
tCommit(DeploymentManager.java:846)
        at
weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploym
entList(DeploymentManager.java:1275)
        at
weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(De
ploymentManager.java:442)
        at
weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commi
t(DeploymentServiceDispatcher.java:176)
        at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbac
kDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:19
5)
        at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbac
kDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
        at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbac
kDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
        at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningW
orkManagerImpl.java:548)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Mike Wilson
Administrator
As I'm sure you are aware this is an open source project and
not a paid priority support line ;-) so I would like to avoid
putting in the time to replicate your environment. But I'll
try my best to help you help yourself.

I think there are two faces of this issue you are asking about:

1) Does this error affect your application?
You have concluded that the error appears when executing line
45 in Servlet30ContainerAbstraction.java. It will only affect
DWR and your application if an exception is thrown at this
point.
Put a breakpoint on line 45 and check if execution continues at
the next line, or if you are thrown out to an enclosing catch
handler. If the former, then all is fine, otherwise do a
printStackTrace() and post here.

2) Can we avoid the printed error?
Even if the error is harmless you might want to get rid of it
as not to cause any alarm. With the current info we have I am
quite inclined to judge this as a bug in Weblogic, or in one of
its bundled products f ex Jersey that David Requena so helpfully
pointed out. The behaviour we see is in violation of the Servlet
3.0 specification which would not be the first time for WLS.
To see further about what we can do here I would like you to
run the same tests on the latest Weblogic 12.2.1.2 and see if
the problem persists.

Get back to the list when you have checked these things and I'll
see what we can do next.
Best regards
Mike


santiago.parraga wrote:

> Hi Mike,
> I made the test whit your dwrdemo.war.
> When weblogic deploys dwrdemo.war this execute the class
>
> Servlet30ContainerAbstraction, in line 42 the method
> isNativeEnvironment generate the error that i send  you before
>
>
>  public boolean isNativeEnvironment(ServletConfig servletConfig)
>     {
> ServletContext ctx = servletConfig.getServletContext();
> return ctx.getMajorVersion() >= 3 &&
> ctx.getEffectiveMajorVersion() >= 3;
>     }
>
> In line 45 when The variable ctx (WebAppServletContext) evaluates
> ctx.getEffectiveMajorVersion() print the following error .
>
> Please your help Mike, my application is in production environmet, i
> need to know the consecuences of this error and if this bug would be
> solved soon
>  because I have to deliver a report to the client.
> thanks for your help
>
>
> <Feb 14, 2017 10:56:03 AM ECT> <Error> <HTTP> <BEA-101388> <The
> ServletContext was passed to the
> ServletContextListener.contextInitialized method of a
> ServletContextListener that was neither declared in web.xml or
> web-fragment.xml, nor annotated with
> javax.servlet.annotation.WebListener.>
> java.lang.UnsupportedOperationException: [HTTP:101388]The
> ServletContext was passed to the
> ServletContextListener.contextInitialized method of a
> ServletContextListener that was neither declared in web.xml or
> web-fragment.xml, nor annotated with
> javax.servlet.annotation.WebListener.
> at
> weblogic.servlet.internal.WebAppServletContext.checkNotifyDyna
> micContex
> t(WebAppServletContext.java:3989)
> at
> weblogic.servlet.internal.WebAppServletContext.getEffectiveMaj
> orVersion
> (WebAppServletContext.java:3814)
> at
> org.directwebremoting.server.servlet3.Servlet30ContainerAbstra
> ction.isN
> ativeEnvironment(Servlet30ContainerAbstraction.java:45)
> at
> org.directwebremoting.impl.StartupUtil.resolveMultipleImplemen
> tations(S
> tartupUtil.java:397)
> at
> org.directwebremoting.impl.StartupUtil.setupDefaultContainer(S
> tartupUti
> l.java:262)
> at
> org.directwebremoting.impl.StartupUtil.createAndSetupDefaultCo
> ntainer(S
> tartupUtil.java:189)
> at
> org.directwebremoting.servlet.DwrServlet.createContainer(DwrSe
> rvlet.jav
> a:101)
> at
> org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
> at
> weblogic.servlet.internal.StubSecurityHelper$ServletInitAction
> .run(Stub
> SecurityHelper.java:337)
> at
> weblogic.servlet.internal.StubSecurityHelper$ServletInitAction
> .run(Stub
> SecurityHelper.java:288)
> at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedS
> ubject.java:321)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:12
> 0)
> at
> weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandl
> e.java:57
> )
> at
> weblogic.servlet.internal.StubSecurityHelper.initServletInstan
> ce(StubSe
> curityHelper.java:98)
> at
> weblogic.servlet.internal.StubSecurityHelper.createServlet(Stu
> bSecurity
> Helper.java:86)
> at
> weblogic.servlet.internal.StubLifecycleHelper.createOneInstanc
> e(StubLif
> ecycleHelper.java:71)
> at
> weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifec
> ycleHelpe
> r.java:57)
> at
> weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifec
> ycleHelpe
> r.java:31)
> at
> weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHel
> per(Servl
> etStubImpl.java:660)
> at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImp
> l.java:600)
> at
> weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> WebAppSer
> vletContext.java:1979)
> at
> weblogic.servlet.internal.WebAppServletContext.loadServletsOnS
> tartup(We
> bAppServletContext.java:1956)
> at
> weblogic.servlet.internal.WebAppServletContext.preloadResource
> s(WebAppS
> ervletContext.java:1846)
> at
> weblogic.servlet.internal.WebAppServletContext.start(WebAppSer
> vletConte
> xt.java:2876)
> at
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppMod
> ule.java:
> 1661)
> at
> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
> at
> weblogic.application.internal.ExtensibleModuleWrapper$StartSta
> teChange.
> next(ExtensibleModuleWrapper.java:360)
> at
> weblogic.application.internal.ExtensibleModuleWrapper$StartSta
> teChange.
> next(ExtensibleModuleWrapper.java:356)
> at
> weblogic.application.utils.StateMachineDriver.nextState(StateM
> achineDri
> ver.java:42)
> at
> weblogic.application.internal.ExtensibleModuleWrapper.start(Ex
> tensibleM
> oduleWrapper.java:138)
> at
> weblogic.application.internal.flow.ModuleListenerInvoker.start
> (ModuleLi
> stenerInvoker.java:124)
> at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(Mo
> duleState
> Driver.java:216)
> at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(Mo
> duleState
> Driver.java:211)
> at
> weblogic.application.utils.StateMachineDriver.nextState(StateM
> achineDri
> ver.java:42)
> at
> weblogic.application.internal.flow.ModuleStateDriver.start(Mod
> uleStateD
> river.java:73)
> at
> weblogic.application.internal.flow.StartModulesFlow.activate(S
> tartModul
> esFlow.java:24)
> at
> weblogic.application.internal.BaseDeployment$2.next(BaseDeploy
> ment.java
> :729)
> at
> weblogic.application.utils.StateMachineDriver.nextState(StateM
> achineDri
> ver.java:42)
> at
> weblogic.application.internal.BaseDeployment.activate(BaseDepl
> oyment.ja
> va:258)
> at
> weblogic.application.internal.SingleModuleDeployment.activate(
> SingleMod
> uleDeployment.java:48)
> at
> weblogic.application.internal.DeploymentStateChecker.activate(
> Deploymen
> tStateChecker.java:165)
> at
> weblogic.deploy.internal.targetserver.AppContainerInvoker.acti
> vate(AppC
> ontainerInvoker.java:80)
> at
> weblogic.deploy.internal.targetserver.operations.AbstractOpera
> tion.acti
> vate(AbstractOperation.java:587)
> at
> weblogic.deploy.internal.targetserver.operations.ActivateOpera
> tion.acti
> vateDeployment(ActivateOperation.java:150)
> at
> weblogic.deploy.internal.targetserver.operations.ActivateOpera
> tion.doCo
> mmit(ActivateOperation.java:116)
> at
> weblogic.deploy.internal.targetserver.operations.AbstractOpera
> tion.comm
> it(AbstractOperation.java:339)
> at
> weblogic.deploy.internal.targetserver.DeploymentManager.handle
> Deploymen
> tCommit(DeploymentManager.java:846)
> at
> weblogic.deploy.internal.targetserver.DeploymentManager.activa
> teDeploym
> entList(DeploymentManager.java:1275)
> at
> weblogic.deploy.internal.targetserver.DeploymentManager.handle
> Commit(De
> ploymentManager.java:442)
> at
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatc
> her.commi
> t(DeploymentServiceDispatcher.java:176)
> at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> erCallbac
> kDeliverer.doCommitCallback(DeploymentReceiverCallbackDelivere
> r.java:19
> 5)
> at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> erCallbac
> kDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
> at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> erCallbac
> kDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
> at
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(Se
> lfTuningW
> orkManagerImpl.java:548)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

dragon2014
In reply to this post by dragon2014
haha  i know, i know, but you know how the clients are.
i will check if this tests are possible with the client.
Thank you very much for your help.
Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Mike Wilson
Administrator
In reply to this post by Mike Wilson
I decompiled a couple of classes in the Weblogic distribution
and this is what it looks like in 12.1.3:

/*      */   public int getEffectiveMajorVersion()
/*      */   {
/* 3814 */     checkNotifyDynamicContext();
/*      */     try
/*      */     {
/* 3817 */       String version = ((DescriptorBean)
                   module.getWebAppBean()).getDescriptor()
                   .getOriginalVersionInfo();
/*      */      
/* 3819 */       String[] numbers = version.split("\\.");
/* 3820 */       return Integer.parseInt(numbers[0]);
/*      */     }
/*      */     catch (Exception e) {}
/*      */    
/* 3824 */     return 2;
/*      */   }

...

/*      */   private void checkNotifyDynamicContext() {
/* 3986 */     if (phase == ContextPhase
                   .INITIALIZER_NOTIFY_LISTENER) {
/* 3987 */       Loggable logger = HTTPLogger
                   .logInvalidServletContextListenerLoggable();
/* 3988 */       logger.log();
/* 3989 */       throw new UnsupportedOperationException(
                   logger.getMessage());
/*      */     }
/*      */   }

So, it looks like this is a real problem as
ServletContext.getEffectiveVersion() will throw an
UnsupportedOperationException. This is a Servlet spec violation
in Weblogic and will interfere with application startup.

Weblogic 12.1.3 seems to be in the INITIALIZER_NOTIFY_LISTENER
state during a long time of its startup and it is during this
time they incorrectly fail some operations that are allowed by
the spec.

From reading some decompiled source (so take this with a grain
of salt) I have two suggestions you can try out:

1. Make the DWR servlet lazy loaded with a negative value:
     <load-on-startup>-1</load-on-startup>
   as this could cause DWR to be started when Weblogic has
   entered its started state and is no longer doing the
   incorrect checks.

2. Upgrade to 12.2.1, as from reading the corresponding code
   there it seems they have somewhat fixed this behaviour.
   They are still violating the spec, but to a lesser degree
   as they are doing the incorrect checks during a shorter
   time by introducing an extra intermediate state
   AFTER_INITIALIZER_NOTIFY_LISTENER that doesn't exist in
   12.1.3.

Let me know how these two fixes work.
Best regards
Mike

Mike Wilson wrote:

> As I'm sure you are aware this is an open source project and
> not a paid priority support line ;-) so I would like to avoid
> putting in the time to replicate your environment. But I'll
> try my best to help you help yourself.
>
> I think there are two faces of this issue you are asking about:
>
> 1) Does this error affect your application?
> You have concluded that the error appears when executing line
> 45 in Servlet30ContainerAbstraction.java. It will only affect
> DWR and your application if an exception is thrown at this
> point.
> Put a breakpoint on line 45 and check if execution continues at
> the next line, or if you are thrown out to an enclosing catch
> handler. If the former, then all is fine, otherwise do a
> printStackTrace() and post here.
>
> 2) Can we avoid the printed error?
> Even if the error is harmless you might want to get rid of it
> as not to cause any alarm. With the current info we have I am
> quite inclined to judge this as a bug in Weblogic, or in one of
> its bundled products f ex Jersey that David Requena so helpfully
> pointed out. The behaviour we see is in violation of the Servlet
> 3.0 specification which would not be the first time for WLS.
> To see further about what we can do here I would like you to
> run the same tests on the latest Weblogic 12.2.1.2 and see if
> the problem persists.
>
> Get back to the list when you have checked these things and I'll
> see what we can do next.
> Best regards
> Mike
>
>
> santiago.parraga wrote:
> > Hi Mike,
> > I made the test whit your dwrdemo.war.
> > When weblogic deploys dwrdemo.war this execute the class
> >
> > Servlet30ContainerAbstraction, in line 42 the method
> > isNativeEnvironment generate the error that i send  you before
> >
> >
> >  public boolean isNativeEnvironment(ServletConfig servletConfig)
> >     {
> > ServletContext ctx = servletConfig.getServletContext();
> > return ctx.getMajorVersion() >= 3 &&
> > ctx.getEffectiveMajorVersion() >= 3;
> >     }
> >
> > In line 45 when The variable ctx (WebAppServletContext) evaluates
> > ctx.getEffectiveMajorVersion() print the following error .
> >
> > Please your help Mike, my application is in production environmet, i
> > need to know the consecuences of this error and if this bug would be
> > solved soon
> >  because I have to deliver a report to the client.
> > thanks for your help
> >
> >
> > <Feb 14, 2017 10:56:03 AM ECT> <Error> <HTTP> <BEA-101388> <The
> > ServletContext was passed to the
> > ServletContextListener.contextInitialized method of a
> > ServletContextListener that was neither declared in web.xml or
> > web-fragment.xml, nor annotated with
> > javax.servlet.annotation.WebListener.>
> > java.lang.UnsupportedOperationException: [HTTP:101388]The
> > ServletContext was passed to the
> > ServletContextListener.contextInitialized method of a
> > ServletContextListener that was neither declared in web.xml or
> > web-fragment.xml, nor annotated with
> > javax.servlet.annotation.WebListener.
> > at
> > weblogic.servlet.internal.WebAppServletContext.checkNotifyDyna
> > micContex
> > t(WebAppServletContext.java:3989)
> > at
> > weblogic.servlet.internal.WebAppServletContext.getEffectiveMaj
> > orVersion
> > (WebAppServletContext.java:3814)
> > at
> > org.directwebremoting.server.servlet3.Servlet30ContainerAbstra
> > ction.isN
> > ativeEnvironment(Servlet30ContainerAbstraction.java:45)
> > at
> > org.directwebremoting.impl.StartupUtil.resolveMultipleImplemen
> > tations(S
> > tartupUtil.java:397)
> > at
> > org.directwebremoting.impl.StartupUtil.setupDefaultContainer(S
> > tartupUti
> > l.java:262)
> > at
> > org.directwebremoting.impl.StartupUtil.createAndSetupDefaultCo
> > ntainer(S
> > tartupUtil.java:189)
> > at
> > org.directwebremoting.servlet.DwrServlet.createContainer(DwrSe
> > rvlet.jav
> > a:101)
> > at
> > org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
> > at
> > weblogic.servlet.internal.StubSecurityHelper$ServletInitAction
> > .run(Stub
> > SecurityHelper.java:337)
> > at
> > weblogic.servlet.internal.StubSecurityHelper$ServletInitAction
> > .run(Stub
> > SecurityHelper.java:288)
> > at
> > weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> > nticatedS
> > ubject.java:321)
> > at
> > weblogic.security.service.SecurityManager.runAs(SecurityManage
> > r.java:12
> > 0)
> > at
> > weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandl
> > e.java:57
> > )
> > at
> > weblogic.servlet.internal.StubSecurityHelper.initServletInstan
> > ce(StubSe
> > curityHelper.java:98)
> > at
> > weblogic.servlet.internal.StubSecurityHelper.createServlet(Stu
> > bSecurity
> > Helper.java:86)
> > at
> > weblogic.servlet.internal.StubLifecycleHelper.createOneInstanc
> > e(StubLif
> > ecycleHelper.java:71)
> > at
> > weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifec
> > ycleHelpe
> > r.java:57)
> > at
> > weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifec
> > ycleHelpe
> > r.java:31)
> > at
> > weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHel
> > per(Servl
> > etStubImpl.java:660)
> > at
> > weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> > etStubImp
> > l.java:600)
> > at
> > weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> > WebAppSer
> > vletContext.java:1979)
> > at
> > weblogic.servlet.internal.WebAppServletContext.loadServletsOnS
> > tartup(We
> > bAppServletContext.java:1956)
> > at
> > weblogic.servlet.internal.WebAppServletContext.preloadResource
> > s(WebAppS
> > ervletContext.java:1846)
> > at
> > weblogic.servlet.internal.WebAppServletContext.start(WebAppSer
> > vletConte
> > xt.java:2876)
> > at
> > weblogic.servlet.internal.WebAppModule.startContexts(WebAppMod
> > ule.java:
> > 1661)
> > at
> > weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
> > at
> > weblogic.application.internal.ExtensibleModuleWrapper$StartSta
> > teChange.
> > next(ExtensibleModuleWrapper.java:360)
> > at
> > weblogic.application.internal.ExtensibleModuleWrapper$StartSta
> > teChange.
> > next(ExtensibleModuleWrapper.java:356)
> > at
> > weblogic.application.utils.StateMachineDriver.nextState(StateM
> > achineDri
> > ver.java:42)
> > at
> > weblogic.application.internal.ExtensibleModuleWrapper.start(Ex
> > tensibleM
> > oduleWrapper.java:138)
> > at
> > weblogic.application.internal.flow.ModuleListenerInvoker.start
> > (ModuleLi
> > stenerInvoker.java:124)
> > at
> > weblogic.application.internal.flow.ModuleStateDriver$3.next(Mo
> > duleState
> > Driver.java:216)
> > at
> > weblogic.application.internal.flow.ModuleStateDriver$3.next(Mo
> > duleState
> > Driver.java:211)
> > at
> > weblogic.application.utils.StateMachineDriver.nextState(StateM
> > achineDri
> > ver.java:42)
> > at
> > weblogic.application.internal.flow.ModuleStateDriver.start(Mod
> > uleStateD
> > river.java:73)
> > at
> > weblogic.application.internal.flow.StartModulesFlow.activate(S
> > tartModul
> > esFlow.java:24)
> > at
> > weblogic.application.internal.BaseDeployment$2.next(BaseDeploy
> > ment.java
> > :729)
> > at
> > weblogic.application.utils.StateMachineDriver.nextState(StateM
> > achineDri
> > ver.java:42)
> > at
> > weblogic.application.internal.BaseDeployment.activate(BaseDepl
> > oyment.ja
> > va:258)
> > at
> > weblogic.application.internal.SingleModuleDeployment.activate(
> > SingleMod
> > uleDeployment.java:48)
> > at
> > weblogic.application.internal.DeploymentStateChecker.activate(
> > Deploymen
> > tStateChecker.java:165)
> > at
> > weblogic.deploy.internal.targetserver.AppContainerInvoker.acti
> > vate(AppC
> > ontainerInvoker.java:80)
> > at
> > weblogic.deploy.internal.targetserver.operations.AbstractOpera
> > tion.acti
> > vate(AbstractOperation.java:587)
> > at
> > weblogic.deploy.internal.targetserver.operations.ActivateOpera
> > tion.acti
> > vateDeployment(ActivateOperation.java:150)
> > at
> > weblogic.deploy.internal.targetserver.operations.ActivateOpera
> > tion.doCo
> > mmit(ActivateOperation.java:116)
> > at
> > weblogic.deploy.internal.targetserver.operations.AbstractOpera
> > tion.comm
> > it(AbstractOperation.java:339)
> > at
> > weblogic.deploy.internal.targetserver.DeploymentManager.handle
> > Deploymen
> > tCommit(DeploymentManager.java:846)
> > at
> > weblogic.deploy.internal.targetserver.DeploymentManager.activa
> > teDeploym
> > entList(DeploymentManager.java:1275)
> > at
> > weblogic.deploy.internal.targetserver.DeploymentManager.handle
> > Commit(De
> > ploymentManager.java:442)
> > at
> > weblogic.deploy.internal.targetserver.DeploymentServiceDispatc
> > her.commi
> > t(DeploymentServiceDispatcher.java:176)
> > at
> > weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> > erCallbac
> > kDeliverer.doCommitCallback(DeploymentReceiverCallbackDelivere
> > r.java:19
> > 5)
> > at
> > weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> > erCallbac
> > kDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
> > at
> > weblogic.deploy.service.internal.targetserver.DeploymentReceiv
> > erCallbac
> > kDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
> > at
> > weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(Se
> > lfTuningW
> > orkManagerImpl.java:548)
> > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
> > at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

dragon2014
In reply to this post by dragon2014
Hi Mike, thanks for your help and your quick answer
I did the test that you seggested about this

1) Check Exception in DWR.
When I did the test i saw that DWR code executes a catch block in the
class StartupUtil after throwout the error:

catch (Exception ex)
            {
                Loggers.STARTUP.debug("  - Can't use : " +
abstractionImplName + " to implement " +
ContainerAbstraction.class.getName() + ". This is probably not an error
unless you were expecting to use it. Reason: " + ex);
            }

ERROR:

  - Can't use :
org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction to
implement org.directwebremoting.extend.ContainerAbstraction.
This is probably not an error unless you were expecting to use it.
Reason: java.lang.UnsupportedOperationException: [HTTP:101388]The
ServletContext
 was passed to the ServletContextListener.contextInitialized method of
a ServletContextListener that was neither declared in web.xml or
web-fragment.xml,
 nor annotated with javax.servlet.annotation.WebListener.


This catch block belongs a fragment inside FOR sentence, this FOR
sentence continue its execution process after that error.
I can access to pages with DWR functionality, but i don't know if
everything is ok.



2)load-on-startup Test
I have changed the value to   <load-on-startup>-1</load-on-startup>  in
my web.xml.
The deploying process is OK but DWR is down. When i try to acces any
page, the server shows the following error

WARNING: DWR has not been initialized properly
<Feb 15, 2017 9:44:15 AM ECT> <Error> <HTTP> <BEA-101020>
<[ServletContext@1855965514[app:mef-omnia-ear-1.0-weblogic
module:/mcm-web-render path:null spec-version:3.0]] Servlet failed with
an Exception
java.lang.NullPointerException
        at
org.directwebremoting.jsp.ConvertTag.doEndTag(ConvertTag.java:50)
        at
jsp_servlet._pages._dynamic.__index._jsp__tag15(__index.java:1409)
        at
jsp_servlet._pages._dynamic.__index._jspService(__index.java:759)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(S
tubSecurityHelper.java:280)
        Truncated. see log file for complete stacktrace

3) Changing the version of weblogic is not possible at the moment. We
must evaluate this with our client.
Reply | Threaded
Open this post in threaded view
|

Re: ERROR deploying DRW application in weblogic 12.1.3.0.0

Mike Wilson
Administrator
santiago.parraga wrote:
> Hi Mike, thanks for your help and your quick answer
> I did the test that you seggested about this
>
> 1) Check Exception in DWR.
> When I did the test i saw that DWR code executes a catch block in the
> class StartupUtil after throwout the error:
<snip>
> This catch block belongs a fragment inside FOR sentence, this FOR
> sentence continue its execution process after that error.
> I can access to pages with DWR functionality, but i don't know if
> everything is ok.

Right, DWR will consider Servlet 3.0 feature as failed and will move
on to the next technology stack which normally is Servlet 2.4.
This will only make a difference if you are using asynchronous DWR
servlet in Reverse Ajax.

> 2)load-on-startup Test
> I have changed the value to  
> <load-on-startup>-1</load-on-startup>  in
> my web.xml.
> The deploying process is OK but DWR is down. When i try to acces any
> page, the server shows the following error
<snip>
> java.lang.NullPointerException
> at
> org.directwebremoting.jsp.ConvertTag.doEndTag(ConvertTag.java:50)
> at

Ah, unlucky that you are using the JSP integration. Lazy servlets
are only started once a request hits their path and that doesn't
happen with the JSP integration.
Try this:
- start your appserver
- navigate to the DWR path in your app, usually something like
  http://myhost:8080/myapp/dwr
- check the server log to see DWR starting
- navigate to a page in your app

If this is successful it may become useful so please test.

> 3) Changing the version of weblogic is not possible at the moment.
> We must evaluate this with our client.

I'm asking this to be able to suggest a better workaround
independently of whether you will be able to upgrade your client
or not. Having this information helps us make better decisions.
Also consider that I did you a favor and put in the time to
analyse the two Weblogic versions. Now please return the favor
and test this so we know if we have understood the inner workings
of Weblogic correctly. It doesn't matter if you try with your own
app or dwrdemo.

Best regards
Mike