geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bohn <joe.b...@earthlink.net>
Subject Re: [jira] Commented: (GERONIMO-1064) WebConnector portlet results in CodeGenerationException when G is configured for tomcat
Date Sun, 06 Nov 2005 04:33:32 GMT

We hit this problem when attempting to create a proxy for a GBean.

I haven't figured out the exact cause of the problem yet, but this patch 
*does* avoid it somehow (try it and see). If nothing else we can use 
this information as a clue as to what is really causing the problem. 
This is not related to  the multiple container scenario... it is only an 
error with just the Tomcat-only configuration.

There seems to be something fishy going on when we have multiple 
interfaces extending from a common parent and then having one interface 
implemented in a class and another class that extends this one and 
implements the other interface.

A picture describes this much better but perhaps this will do:
(interfaces preceded by i)
(classes preceded by c)

i - o/a/g/management/geronimo/NetworkConnector
extended by
i - o/a/g/management/geronimo/WebConnector======|
extended by                                     |
i - o/a/g/tomcat/TomcatWebConnector             |
implemented by                                  |
c - o/a/g/tomcat/ConnectorGBean                 |
extended by                                     |
c - o/a/g/tomcat/HttpsConnectorGBean **Proxy ** |
which also implements                           |
i - o/a/g/management/geronimo/SecureConnector   |
which extends                                   |
i - o/a/g/management/geronimo/WebConnector======|

This fails with the NoClassDefFoundError on the interface 
o/a/g/TomcatWebConnector while trying to create a proxy for the 
HttpsConnectorGBean (which btw, happens to be in the same package as the 
interface that it can't find).  It's almost as if it is using a 
classpath constructed solely from the management package.

It's also strange because in the same scenario we create a proxy for the 
ConnectorGBean just prior to attempting to create the proxy for the 
HttpsConnectorGBean and that proxy has no problem finding the 
TomcatWebConnector interface.

This structure of the tomcat secure connector classes are slightly 
different than the comparable jetty classes.  The only structural 
difference is that the jetty equivalent of HttpsConnectorGBean 
implements a jetty specific secure connector interface that extends from 
  o/a/g/management/geronimo/SecureConnector.

While trying to understand the differences and cause for the error I 
made the tomcat structure consistent with jetty and the error went away. 
  It almost seems as if implementing an interface in the same packaged 
forced that package to be included in the path (which I would have 
expected to be the case anyway).

So the structure in the patch is:
i - o/a/g/management/geronimo/NetworkConnector
extended by
i - o/a/g/management/geronimo/WebConnector==========|
extended by                                         |
i - o/a/g/tomcat/TomcatWebConnector                 |
implemented by                                      |
c - o/a/g/tomcat/ConnectorGBean                     |
extended by                                         |
c - o/a/g/tomcat/HttpsConnectorGBean **Proxy **     |
which implements                                    |
i - o/a/g/tomcat/TomcatSecureConnector              |
which extends                                       |
** i - o/a/g/management/geronimo/SecureConnector ** |
which extends                                       |
i - o/a/g/management/geronimo/WebConnector==========|

Any other ideas on what might be causing this error?



Aaron Mulder (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/GERONIMO-1064?page=comments#action_12356873
] 
> 
> Aaron Mulder commented on GERONIMO-1064:
> ----------------------------------------
> 
> The patch doesn't appear to address the problem.  In the original case, the portlet was
attempting to load Tomcat-specific interfaces that were not on the ClassPath.  Adding more
Tomcat-specific interfaces would not help.  We need to straighten out the classpath for the
portlets, no matter which container(s) are present.
> 
> 
>>WebConnector portlet results in CodeGenerationException when G is configured for tomcat
>>---------------------------------------------------------------------------------------
>>
>>         Key: GERONIMO-1064
>>         URL: http://issues.apache.org/jira/browse/GERONIMO-1064
>>     Project: Geronimo
>>        Type: Bug
>>  Components: console
>>    Versions: 1.0-M5
>> Environment: all
>>    Reporter: Joe Bohn
>>     Fix For: 1.0
>> Attachments: TomcatHttpsConnector.patch
>>
>>This may be related to other configuration problems where the first container is always
presumed to be the active container.  However, when only configured for tomcat I would expect
that there is only one container active.
>>09:21:09,300 ERROR [KernelManagementHelper] Unable to look up related GBean
>>net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetExc
>>eption-->null
>>        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato
>>r.java:236)
>>        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>        at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>        at org.apache.geronimo.kernel.basic.BasicProxyManager$ManagedProxyFactor
>>y.<init>(BasicProxyManager.java:223)
>>        at org.apache.geronimo.kernel.basic.BasicProxyManager.createProxyFactory
>>(BasicProxyManager.java:93)
>>        at org.apache.geronimo.kernel.basic.BasicProxyManager.createProxy(BasicP
>>roxyManager.java:120)
>>        at org.apache.geronimo.kernel.basic.BasicProxyManager.createProxies(Basi
>>cProxyManager.java:157)
>>        at org.apache.geronimo.console.util.KernelManagementHelper.getWebConnect
>>ors(KernelManagementHelper.java:339)
>>        at org.apache.geronimo.console.util.PortletManager.getWebConnectors(Port
>>letManager.java:150)
>>        at org.apache.geronimo.console.webmanager.ConnectorPortlet.doList(Connec
>>torPortlet.java:375)
>>        at org.apache.geronimo.console.webmanager.ConnectorPortlet.doView(Connec
>>torPortlet.java:360)
>>        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
>>        at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
>>        at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218
>>)
>>        at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoke
>>rImpl.java:120)
>>        at org.apache.pluto.invoker.impl.PortletInvokerImpl.render(PortletInvoke
>>rImpl.java:73)
>>        at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerI
>>mpl.java:119)
>>        at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.renderPo
>>rtlet(PortletContainerWrapperImpl.java:70)
>>        at org.apache.pluto.portalImpl.aggregation.PortletFragment.service(Portl
>>etFragment.java:168)
>>        at org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp._jspService
>>(org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp:65)
>>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>>.java:322)
>>        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>>91)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(Abst
>>ractFragment.java:112)
>>        at org.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp._jspService(or
>>g.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp:64)
>>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>>.java:322)
>>        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>>91)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(Abst
>>ractFragment.java:112)
>>        at org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp._jspService(o
>>rg.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp:67)
>>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>>.java:322)
>>        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>>91)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(Abst
>>ractFragment.java:112)
>>        at org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp._jspService(o
>>rg.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp:67)
>>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>>.java:322)
>>        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>>91)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(Abst
>>ractFragment.java:112)
>>        at org.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp._jspService(o
>>rg.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp:170)
>>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>>.java:322)
>>        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>>91)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
>>atcher.java:672)
>>        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
>>ispatcher.java:574)
>>        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
>>patcher.java:499)
>>        at org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(Abst
>>ractFragment.java:112)
>>        at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:254)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>>icationFilterChain.java:252)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>>ilterChain.java:173)
>>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
>>alve.java:213)
>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
>>alve.java:178)
>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
>>torBase.java:482)
>>        at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
>>bjectValve.java:46)
>>        at org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke(PolicyCont
>>extValve.java:50)
>>        at org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(Trans
>>actionContextValve.java:53)
>>        at org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(Compone
>>ntContextValve.java:47)
>>        at org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(Instance
>>ContextValve.java:60)
>>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
>>ava:126)
>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
>>ava:105)
>>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
>>ve.java:107)
>>        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
>>526)
>>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
>>a:148)
>>        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>>:856)
>>        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
>>ssConnection(Http11Protocol.java:744)
>>        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
>>int.java:527)
>>        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
>>lowerWorkerThread.java:80)
>>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
>>ool.java:684)
>>        at java.lang.Thread.run(Thread.java:534)
>>Caused by: java.lang.reflect.InvocationTargetException
>>        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:324)
>>        at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
>>        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato
>>r.java:218)
>>        ... 116 more
>>Caused by: java.lang.NoClassDefFoundError: org/apache/geronimo/tomcat/TomcatWebC
>>onnector
>>        at java.lang.ClassLoader.defineClass0(Native Method)
>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>>        ... 121 more
> 
> 

-- 
Joe Bohn
joe.bohn@earthlink.net

"He is no fool who gives what he cannot keep, to gain what he cannot 
lose."   -- Jim Elliot

Mime
View raw message