Guys, this is a classic example. There are many bundles which are basically aggregates of multiple(unrelated) third party libraries. Every now and then, we get hit by these sort of issues. I guess the best way to handle them is case by case. When we know the issues, we know how to fix it.
Thanks, Sameera. On Wed, Mar 21, 2012 at 6:03 AM, Sameera Jayasoma <[email protected]> wrote: > Had an offline chat with Nuwan on this. > > This is a collision with bsf-all bundle the rhino-js bundle. They both > export "org.mozilla.javascript.*" package, hence the tomcat bundle and the > synapse bundles wire in a random manner. > > ESB needs both bsf and rhino, so they have merged these two and come up > with a single bundle. bsf-all bundle has embedded the rhino-1.6R7 bundle > and exported the above package. We need to remove rhino packages from the > bsf-all bundle. So ESB has to use the rhino bundle and the bsf bundle now. > > Nuwan will verify this. > > Thanks, > Sameera. > > On Wed, Mar 21, 2012 at 2:42 AM, Nuwan Bandara <[email protected]> wrote: > >> Hi >> >> On Wed, Mar 21, 2012 at 6:44 AM, Afkham Azeez <[email protected]> wrote: >> >>> We need to verify whether this is the correct fix. Sameera fixed some >>> issues in the bsf bundle yesterday. >>> >> I reverted the fix, I will talk to sameera and check on this. >> >> Thanks, >> /Nuwan >> >> >>> -- >>> Afkham Azeez >>> Sent from my phone >>> On Mar 20, 2012 9:43 PM, "Nuwan Bandara" <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> So I think I found the root cause, >>>> >>>> Its that when our jaggery filed are compiled to a servlet and invoked, >>>> tomcat loads org.mozilla.javascript from the bsf bundle, but our jaggery >>>> cache manager uses org.mozilla.javascript from the rhino bundle, and we get >>>> this exception. >>>> >>>> I have added an osgi import to the tomcat bundle >>>> >>>> org.mozilla.javascript;version="[1.7,2.0)", >>>> >>>> which resolves the issue. I believe there is no harm from the tomcat >>>> side. >>>> >>>> you need to take an update of orbit/tomcat and then build kernal after >>>> that build the api-mgt product. that should resolve the issue. >>>> >>>> Regards, >>>> /Nuwan >>>> >>>> On Tue, Mar 20, 2012 at 9:18 PM, Nuwan Bandara <[email protected]> wrote: >>>> >>>>> Okey so the issue was that APIMgt build has bsf-all bundle which also >>>>> exports org.mozilla.javascript.Script, when you remove the jar it works, >>>>> as >>>>> a temporal fix please remove this jar from the build. Will look into >>>>> a permanent solution. >>>>> >>>>> We dont see this error in Jaggery build coz the jaggery build does not >>>>> have bsf library. >>>>> >>>>> Regards, >>>>> /Nuwan >>>>> >>>>> >>>>> On Tue, Mar 20, 2012 at 7:44 PM, Madhuka Udantha <[email protected]>wrote: >>>>> >>>>>> *I am not getting this error in jaggery product. :( will try to >>>>>> build apimgt product and see if I can reproduce it.* >>>>>> >>>>>> In here Hello world app even not work, >>>>>> >>>>>> *can you point to the APIstore jaggery app in the SVN. is it up to >>>>>> date with .jag file extension changes ? * >>>>>> * >>>>>> * >>>>>> Pack is updated with today >>>>>> yap .jag files, and you can try just hello jaggery application >>>>>> >>>>>> >>>>>> On Tue, Mar 20, 2012 at 7:30 PM, Nuwan Bandara <[email protected]>wrote: >>>>>> >>>>>>> I am not getting this error in jaggery product. :( will try to build >>>>>>> apimgt product and see if I can reproduce it. can you point to the >>>>>>> APIstore >>>>>>> jaggery app in the SVN. is it up to date with .jag file extension >>>>>>> changes ? >>>>>>> >>>>>>> Regards, >>>>>>> /Nuwan >>>>>>> >>>>>>> >>>>>>> On Tue, Mar 20, 2012 at 7:14 PM, Madhuka Udantha >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> hi, >>>>>>>> >>>>>>>> for API Manager jaggery apps are getting error as >>>>>>>> >>>>>>>> [2012-03-20 18:50:10,920] INFO - CarbonAuthenticationUtil 'admin' >>>>>>>> logged in at [2012-03-20 18:50:10,0920] from IP address 10.200.3.214 >>>>>>>> [2012-03-20 18:50:28,078] ERROR - RhinoEngine >>>>>>>> org.wso2.carbon.scriptengine.exceptions.ScriptException: >>>>>>>> java.lang.ClassCastException: org.wso2.carbon.rhino.c0 cannot be cast >>>>>>>> to >>>>>>>> org.mozilla.javas >>>>>>>> cript.Script >>>>>>>> [2012-03-20 18:50:28,081] ERROR - WebAppManager >>>>>>>> org.wso2.carbon.scriptengine.exceptions.ScriptException: >>>>>>>> java.lang.ClassCastException: org.wso2.carbon.rhino.c0 cannot be cast >>>>>>>> to >>>>>>>> org.mozilla.jav >>>>>>>> ascript.Script >>>>>>>> org.wso2.carbon.scriptengine.exceptions.ScriptException: >>>>>>>> org.wso2.carbon.scriptengine.exceptions.ScriptException: >>>>>>>> java.lang.ClassCastException: org.wso2.carbon.rhino.c0 cannot be cast >>>>>>>> to >>>>>>>> org.mo >>>>>>>> zilla.javascript.Script >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:477) >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:231) >>>>>>>> at >>>>>>>> org.wso2.carbon.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:101) >>>>>>>> at >>>>>>>> org.wso2.carbon.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:42) >>>>>>>> at >>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:621) >>>>>>>> at >>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >>>>>>>> at >>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) >>>>>>>> at >>>>>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) >>>>>>>> at >>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:60) >>>>>>>> at >>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:155) >>>>>>>> at >>>>>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) >>>>>>>> at >>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >>>>>>>> at >>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >>>>>>>> at >>>>>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) >>>>>>>> at >>>>>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) >>>>>>>> at >>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1600) >>>>>>>> at >>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>>>>>>> at >>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>>>>>>> at java.lang.Thread.run(Thread.java:662) >>>>>>>> Caused by: org.wso2.carbon.scriptengine.exceptions.ScriptException: >>>>>>>> java.lang.ClassCastException: org.wso2.carbon.rhino.c0 cannot be cast >>>>>>>> to >>>>>>>> org.mozilla.javascript.Script >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.cache.CacheManager.cacheScript(CacheManager.java:112) >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:469) >>>>>>>> ... 23 more >>>>>>>> Caused by: java.lang.ClassCastException: org.wso2.carbon.rhino.c0 >>>>>>>> cannot be cast to org.mozilla.javascript.Script >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.cache.CacheManager.loadScript(CacheManager.java:239) >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.cache.CacheManager.updateContexts(CacheManager.java:230) >>>>>>>> at >>>>>>>> org.wso2.carbon.scriptengine.cache.CacheManager.cacheScript(CacheManager.java:109) >>>>>>>> ... 24 more >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> We try just hello.jag file with <% print('hiii')%> >>>>>>>> This also given error. >>>>>>>> >>>>>>>> Pls have look it is Urgent >>>>>>>> >>>>>>>> -- >>>>>>>> *Madhuka* Udantha >>>>>>>> http://madhukaudantha.blogspot.com/ >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Thanks & Regards, >>>>>>> >>>>>>> Nuwan Bandara >>>>>>> Senior Software Engineer >>>>>>> WSO2 Inc. | http://wso2.com >>>>>>> lean . enterprise . middleware >>>>>>> >>>>>>> http://nuwan.bandara.co >>>>>>> * >>>>>>> <http://www.nuwanbando.com/> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Madhuka* Udantha >>>>>> http://madhukaudantha.blogspot.com/ >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Thanks & Regards, >>>>> >>>>> Nuwan Bandara >>>>> Senior Software Engineer >>>>> WSO2 Inc. | http://wso2.com >>>>> lean . enterprise . middleware >>>>> >>>>> http://nuwan.bandara.co >>>>> * >>>>> <http://www.nuwanbando.com/> >>>>> >>>> >>>> >>>> >>>> -- >>>> *Thanks & Regards, >>>> >>>> Nuwan Bandara >>>> Senior Software Engineer >>>> WSO2 Inc. | http://wso2.com >>>> lean . enterprise . middleware >>>> >>>> http://nuwan.bandara.co >>>> * >>>> <http://www.nuwanbando.com/> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >> >> >> -- >> *Thanks & Regards, >> >> Nuwan Bandara >> Senior Software Engineer >> WSO2 Inc. | http://wso2.com >> lean . enterprise . middleware >> >> http://nuwan.bandara.co >> * >> <http://www.nuwanbando.com/> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Sameera Jayasoma > Technical Lead and Product Manager, WSO2 Carbon > > WSO2, Inc. (http://wso2.com) > email: [email protected] > blog: http://tech.jayasoma.org > > > Lean . Enterprise . Middleware > -- Sameera Jayasoma Technical Lead and Product Manager, WSO2 Carbon WSO2, Inc. (http://wso2.com) email: [email protected] blog: http://tech.jayasoma.org Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
