[Design of JBoss/Tomcat Integration] - JspRuntimeContext has invalid assumption of URLClassLoader
by scott.stark@jboss.org
I'm working on externalizing the class loader construction to the new deployer layer, but there are assumptions being made regarding URLClassLoaders. For example, in org.apache.jasper.compiler.JspRuntimeContext:
| 15:14:45,816 INFO [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
| 15:14:47,655 ERROR [[/invoker]] StandardWrapper.Throwable
| java.lang.ClassCastException: org.jboss.classloader.spi.base.BaseClassLoader
| at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:113)
| at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:101)
| at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
| at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
| at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4072)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4377)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5357)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:350)
|
code:
| public JspRuntimeContext(ServletContext context, Options options) {
|
| this.context = context;
| this.options = options;
|
| // Get the parent class loader
| parentClassLoader =
| (URLClassLoader) Thread.currentThread().getContextClassLoader();
| if (parentClassLoader == null) {
| parentClassLoader =
| (URLClassLoader)this.getClass().getClassLoader();
| }
|
This is only used for the compile classpath. I thought this was only used for the legacy javac style compiler, not the jdt memory based compiler. If that is the case this behavior needs to be suppressed when the jdt compiler is being used.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120674#4120674
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120674
18 years, 2 months
[Design of JBoss Tools (dev)] - Re: JBoss AS - Starting, Stopping, Polling in AS 5
by scott.stark@jboss.org
"max.andersen(a)jboss.com" wrote : Other dependencies I can think of:
|
| We default to put users deployment in to /deploy. Is that a sensible default in JB5 still?
|
Yes.
"max.andersen(a)jboss.com" wrote :
| Any api to control it externally? (JB4 has JMX control over DeploymentScanner that we haven't used yet but are planning to do...anything else in JB5 should use ?)
|
Yes, there is an mc bean that controls this. The jmx access to the DeploymentScanner does not exist as that bean is gone, and it would not work across server restarts since the change would not be persisted by default. Control of the server structure is something that will need to be better defined. Right now there is some support via system properties.
"max.andersen(a)jboss.com" wrote :
| We include most .jars found in to the classpath container in eclipse to allow users to compile against the runtime libraries. Is that still where .jars are located?
|
It still is currently. As we move forward, the association between the old filesystem structure and the server/deployment classpaths will be gone as the profile service can be using a repository that points to another structure, a database, etc. Related to the startup classpath, we should be providing a bundle like descriptor that defines class/resource paths and scoping rules. In an osgi environment, this could be used to create a bundle with the property class/resource imports/exports.
"max.andersen(a)jboss.com" wrote :
| How do we find the correct ports to communicate on ? e.g. http port, jmx ports etc.
|
This still is an undefined capability. Where we are going in jbossas5 is that services can annotate their management view to allow for cross service queries for things like all ports, files, interfaces, etc., but it does not exist today.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120658#4120658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120658
18 years, 2 months
[Design of JBoss Tools (dev)] - Re: JBoss AS - Starting, Stopping, Polling in AS 5
by scott.stark@jboss.org
run.jar is used as an executable jar without any additional startup classpath? I can't see how that would work. The run scripts setup additional classpath and endorsed library entries that are needed as well. I expect the tools server setup supports this as well. The question is, what builds the full java command to launch the server?
Eventually I would like to have a self describing osgi like bundle for startup/shutdown.
We should be moving to a proper javax.management.remote.JMXConnector implementation that allows access to the jdk jmx even for minimal jboss configurations without the jmx/invoker/RMIAdaptor as the way to access jmx. While we don't need a jmx kernel in jbossas5 (it is still deployed by default), we should still be mirroring key mcbeans that make up the tooling interface available via jmx for a consistent api. The jboss.system:type=Server mbean is still available in jbossas5.
I'll create jira issues for all these to track them.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120653#4120653
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120653
18 years, 2 months