Hi

com.mycompany.bl.MyInstance#executeJavaScript starts a new thread and
then look the classloader which is bound to the request thread


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2014-11-26 13:27 GMT+01:00 Alex A <[email protected]>:
> Bonjour Romain,
>
> Many thanks for your reply.
> We have been able to shrink down our app into the attached sample.zip and it
> does reproduce the issue!
> The sample comprises a JAX-WS client and a webapp implementing the WS and
> evaluating the input script.
>
>
> TomEE+ 1.7.1:
>
>
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> *-*-*- ExecuteJavaScript Issue *-*-*
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> Connecting to WebServices at
> http://localhost:8080/WebServiceProject/MyWebServiceWS
>
>
>
> *- Main menu -*
>
> 1. ExecuteJavaScript
>
> 2. Exit
>
> Your choice [Exit]? 1
>
>
>
> ExecuteJavaScript:
>
>> Entering console mode. Type in your script, then "run" to finish typing.
>
> com.mycompany.cloudutils.CloudUtils.nowStr()
>
> run
>
>
>
> ScriptException around line [ com.mycompany.cloudutils.CloudUtils.nowStr() ]
>
>>>> sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call
>>>> property nowStr in object [JavaPackage 
>>>> com.mycompany.cloudutils.CloudUtils].
>>>> It is not a function, it is "object". (<Unknown source>#1) in <Unknown
>>>> source> at line number 1
>
>
>
>
> SERVER TRACE (showing the classloader is indeed CxfContainerClassLoader as
> soon as we enter the @WebMethod):
>
> CLASSLOADER_FROMSTART:
> org.apache.openejb.server.cxf.transport.util.CxfContainerClassLoader@7bb42c30
> // when WS is called
>
> CLASSLOADER_EXECUTION:
> org.apache.openejb.server.cxf.transport.util.CxfContainerClassLoader@7bb42c30
> // at javascript execution
>
>
>
>
>
>
>
> TomEE+ 1.5.2:
>
>
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> *-*-*- ExecuteJavaScript Issue *-*-*
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> Connecting to WebServices at
> http://localhost:8080/WebServiceProject/MyWebServiceWS
>
>
>
> *- Main menu -*
>
> 1. ExecuteJavaScript
>
> 2. Exit
>
> Your choice [Exit]? 1
>
>
>
> ExecuteJavaScript:
>
>> Entering console mode. Type in your script, then "run" to finish typing.
>
> com.mycompany.cloudutils.CloudUtils.nowStr()
>
> run
>
>
>
> 2014/11/26 12:24:48.332 +0100
>
>
>
>
>
> SERVER TRACE (showing we keep the StandardClassLoader all along):
>
> CLASSLOADER_FROMSTART: LazyStopWebappClassLoader
>
>   context: /WebServiceProject
>
>   delegate: false
>
>   repositories:
>
>     /WEB-INF/classes/
>
> ----------> Parent Classloader:
>
> org.apache.catalina.loader.StandardClassLoader@771c7eb2
>
>
>
> CLASSLOADER_EXECUTION: LazyStopWebappClassLoader
>
>   context: /WebServiceProject
>
>   delegate: false
>
>   repositories:
>
>     /WEB-INF/classes/
>
> ----------> Parent Classloader:
>
> org.apache.catalina.loader.StandardClassLoader@771c7eb2
>
>
>
>
>
> Thank you for your precious help
>
> Alexandre
>
>
>

Reply via email to