On Fri, Jul 24, 2015 at 3:44 PM, Chanaka Fernando <[email protected]> wrote:

> Hi Devs,
>
> In the latest ESB 490 packs, we have observed several mediator UIs are
> throwing the following exceptions[1] related to javax.servlet API. This
> issue is reported in [2] and [3]. This issue is related to package imports.
>
> When I debug from the OsgiConsole, I found that the javax.servlet package
> is imported through a dependency and it has the following versions.
>
> javax.servlet; version="[3.0.0,4.0.0)"<unwired><optional>
> javax.servlet.http; version="[3.0.0,4.0.0)"<unwired><optional>
>

Did you have these versions specified in your bundles (check the MANIFEST
file and confirm)? What change(s) caused the bundles to wire to the above
version?

>From 4.2.0 to 4.4.0 we did not change the version exported for the above
servlet packages, rather we changed the implementation (from eclipse to
tomcat).

*4.2.0*

osgi> p javax.servlet.http

javax.servlet.http; version="2.6.0"<javax.servlet_3.0.0.v201112011016 [34]>

*4.4.0*

osgi> p javax.servlet.http

javax.servlet.http; version="2.6.0"<tomcat-servlet-api_7.0.59.wso2v1 [143]>


>
>
> But we only have version 2.6.0 at the runtime. I have already fixed this
> issue by explicitly importing these two packages in the pom file of the
> relevant UI bundle like below.
>
> javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
> javax.servlet;version="${imp.pkg.version.javax.servlet}",
>

It is always good to have the versions specified (i.e the version range)
for package imports. All these times you may have been depending on the
dynamic import package feature.

>
>
>
> But the concern is that we need to do this is for each and every mediator
> UI pom file which fails due to this exception (we have 3 already). Is there
> a better way to tackle this issue?
>
> [1]
>
> [2015-07-24 15:07:30,544] ERROR - ApplicationDispatcher Servlet.service() for 
> servlet bridgeservlet threw exception
> java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
>       at 
> org.wso2.carbon.mediator.dblookup.DBLookupMediatorClient.getInstance(DBLookupMediatorClient.java:61)
>       at 
> org.apache.jsp.dblookup_002dmediator.edit_002dmediator_jsp._jspService(edit_002dmediator_jsp.java:181)
>       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>       at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
>       at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
>       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>       at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
>       at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>       at 
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>       at 
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>       at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>       at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>       at 
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>       at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
>       at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
>       at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
>       at 
> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
>       at 
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
>       at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
>
>
> [2] https://wso2.org/jira/browse/ESBJAVA-3958
>
> [3] https://wso2.org/jira/browse/ESBJAVA-3950
>
>
> Thanks,
> Chanaka
> --
> --
> Chanaka Fernando
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 773337238
> Blog : http://soatutorials.blogspot.com
> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
> Twitter:https://twitter.com/chanakaudaya
> Wordpress:http://chanakaudaya.wordpress.com
>
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to