Re: Making Classes Available to Tomcat (Geronimo 1.1.1) on Startup
Thanks David! You confirmed my suspicions that a custom build of the Tomcat module is probably the way to go. Daniel. On 4/19/07, David Jencks <[EMAIL PROTECTED]> wrote: > I'm trying to install a set of global Servlet Filters in Tomcat. > I've modified the global Tomcat var/catalina/conf/web.xml > configuration and added the references to my filters. But I don't > know where to place the class files to make them available to > Tomcat during Geronimo startup. > > Putting them in the var/shared/lib (or var/shared/classes) didn't > work (I get a ClassNotFoundException). I think this means that the > Tomcat container doesn't include a dependency to the SharedLib > GBean or maybe this dependency isn't fully realized on startup? > > I have looked through the attributes of the TomcatWebConnector and > some of the other GBeans that are installed by default with > Geronimo to see if there was something I could tweak to set an > extra bootstrap classpath location, but I haven't found anything. > > I could modify the geronimo.bat file to add my classes to the Java > classpath during the Geronimo startup, but I'm hoping to find a > solution more integrated with Geronimo. I'm also trying to avoid > having to re-build Geronimo from source if possible. > > Any ideas? you might be able to put them in a module or web app that you use as a parent of all your other web apps, but since in my experience tomcat starts a default web app I have doubts this will be easy to make work. You would probably have to move most of the gbeans in the tomcat module into your "parent" web app plan. (you can turn off the gbeans in the tomcat module by including load="false" in config.xml for each gbean). It would probably be simpler to build your own tomcat module and install it instead of the one we ship. There might be other approaches I haven't thought of. thanks david jencks > > Daniel.
Making Classes Available to Tomcat (Geronimo 1.1.1) on Startup
I'm trying to install a set of global Servlet Filters in Tomcat. I've modified the global Tomcat var/catalina/conf/web.xml configuration and added the references to my filters. But I don't know where to place the class files to make them available to Tomcat during Geronimo startup. Putting them in the var/shared/lib (or var/shared/classes) didn't work (I get a ClassNotFoundException). I think this means that the Tomcat container doesn't include a dependency to the SharedLib GBean or maybe this dependency isn't fully realized on startup? I have looked through the attributes of the TomcatWebConnector and some of the other GBeans that are installed by default with Geronimo to see if there was something I could tweak to set an extra bootstrap classpath location, but I haven't found anything. I could modify the geronimo.bat file to add my classes to the Java classpath during the Geronimo startup, but I'm hoping to find a solution more integrated with Geronimo. I'm also trying to avoid having to re-build Geronimo from source if possible. Any ideas? Daniel.
Re: Help with Custom Configuration Builders - ClassCastException: ModuleIDBuilder
That was the problem!!! Thank you David!!! I'm a bit confused about what the dependency to the "geronimo-gbean-deployer/car" module/file actually means... Does it somehow "link" to a set of core classes used by custom ConfigurationBuilders? Daniel. On 1/23/07, David Jencks <[EMAIL PROTECTED]> wrote: On Jan 23, 2007, at 9:13 AM, Daniel Bloomfield Ramagem wrote: Geronimo newbie here trying to write a custom builder. Maybe someone more experienced can help out with the following problem. I keep getting ModuleIDBuilder ClassCastException anytime I deploy my custom ConfigurationBuilder to Geronimo. The logs and my deployment plan follow. Has anyone experienced this??? Since you are depending on geronimo jars directly, your module is getting a separate copy of all the classes in those jars, so when anything loaded by your builder gets near anything in in the rest of geronimo, the classes don't match. Instead of loading everything in your own classloader, try having a dependency on the geronimo-gbean-deployer car file. I think that will be the only dependency you need. Hope this helps david jencks Daniel. 12:06:54,800 ERROR [Deployer] Deployment failed due to java.lang.ClassCastException: org.apache.geronimo.deployment.ModuleIDBuilder at com.daniel.TestConfigBuilder$$FastClassByCGLIB$$93606ad9.invoke() at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke ( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:817) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java :57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke ( RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( ProxyMethodInterceptor.java:96) at org.apache.geronimo.kernel.config.DeploymentWatcher$$EnhancerByCGLIB$$6f296f75.getDeploymentPlan() at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:232) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124) at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke() at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke ( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:852) at org.apache.geronimo.kernel.basic.BasicKernel.invoke( BasicKernel.java:239) at org.apache.geronimo.kernel.KernelGBean.invoke (KernelGBean.java :338) at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke () at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke ( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:852) at org.apache.geronimo.kernel.basic.BasicKernel.invoke ( BasicKernel.java:239) at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke( MBeanGBeanBridge.java:168) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke( DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke (MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke( DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java :784) at javax.management.remote.rmi.RMIConnectionImpl.doOperation( RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.access$100( RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run ( RMIConnectionImpl.java:1245) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation (RMIConnectionImpl.java:1348) at javax.management.remote.rmi.RMIConnectionImpl.invoke ( RMIConnectionImpl.java:782) at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke (Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java :466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run( TCPTransport.java:707)
Help with Custom Configuration Builders - ClassCastException: ModuleIDBuilder
Geronimo newbie here trying to write a custom builder. Maybe someone more experienced can help out with the following problem. I keep getting ModuleIDBuilder ClassCastException anytime I deploy my custom ConfigurationBuilder to Geronimo. The logs and my deployment plan follow. Has anyone experienced this??? Daniel. 12:06:54,800 ERROR [Deployer] Deployment failed due to java.lang.ClassCastException: org.apache.geronimo.deployment.ModuleIDBuilder at com.daniel.TestConfigBuilder$$FastClassByCGLIB$$93606ad9.invoke () at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:817) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java :57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( ProxyMethodInterceptor.java:96) at org.apache.geronimo.kernel.config.DeploymentWatcher$$EnhancerByCGLIB$$6f296f75.getDeploymentPlan () at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:232) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124) at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke () at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:852) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java :239) at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:338) at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke () at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( GBeanOperation.java:122) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( GBeanInstance.java:852) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java :239) at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke( MBeanGBeanBridge.java:168) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke( DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke( DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java :784) at javax.management.remote.rmi.RMIConnectionImpl.doOperation( RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.access$100( RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run (RMIConnectionImpl.java:1245) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation( RMIConnectionImpl.java:1348) at javax.management.remote.rmi.RMIConnectionImpl.invoke( RMIConnectionImpl.java:782) at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java :466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run( TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) My geronimo-service.xml: http://geronimo.apache.org/xml/ns/deployment-1.1";> com.daniel testbuilder 1.0.0 jar commons-logging commons-logging 1.0.4 jar geronimo geronimo-common 1.1.1 jar geronimo geronimo-deployment 1.1.1 jar geronimo geronimo-kernel 1.1.1 jar geronimo geronimo-service-builder 1.1.1 jar stax stax-api
Specifying SNAPSHOT Versions of Modules
I've got a Module A that depends on version 1.0 of Module B. Module B is in version 1.0 and has been deployed to the server. Everything works fine (A deploys fine). But then I make a change to B and want to *keep* the 1.0version number. I redeploy B to the server but then A is stopped by the deployment process. I must now manually start A back up. I tried using the Maven SNAPSHOT tag in the "version" tag in both the deployment plans of A and B: Module A: ... mygroup moduleB 1.0-SNAPSHOT ... Module B: ... mygroup moduleB 1.0-SNAPSHOT This made no difference. Redeploying B stops A, which needs to be manually started again. Any hints on how I could get A to restart automatically when the same version (or a development version) of a dependent module is being updated? Thanks, Daniel.
Re: Javadocs for Geronimo 1.1.1?
A ha!!! The "BUILDING.txt" file in the source distribution stated "To build me please install Maven from here - version 1.0.2 or later." Maybe someone could update that document. I'm gonna give M1 a try. Thanks! Daniel. On 12/14/06, David Jencks <[EMAIL PROTECTED]> wrote: On Dec 13, 2006, at 9:39 AM, Daniel Bloomfield Ramagem wrote: I downloaded the Geronimo 1.1.1 source code ZIP from the downloads page and I noticed that the Javadocs available on the main Apache Geronimo website don't match up to version 1.1.1 (http://geronimo.apache.org/api/index.html), is this correct? I am now trying to generate the Javadocs directly from the source code. I added the following section to my c:\geronimo-1.1.1_src\pom.xml file: org.apache.maven.plugins maven-javadoc-plugin true And then executed "mvn javadoc:javadoc" and also "mvn site" with no success in producing the Javadocs (output follows below). What am I missing? 1.1.1 builds with maven1, not maven2. You'll have to try modifying the project.xml and maven.xml files thanks david jencks Daniel.
Javadocs for Geronimo 1.1.1?
I downloaded the Geronimo 1.1.1 source code ZIP from the downloads page and I noticed that the Javadocs available on the main Apache Geronimo website don't match up to version 1.1.1 (http://geronimo.apache.org/api/index.html), is this correct? I am now trying to generate the Javadocs directly from the source code. I added the following section to my c:\geronimo-1.1.1_src\pom.xml file: org.apache.maven.plugins maven-javadoc-plugin true And then executed "mvn javadoc:javadoc" and also "mvn site" with no success in producing the Javadocs (output follows below). What am I missing? Daniel. -- OUTPUT -- C:\geronimo-1.1.1_src>mvn javadoc:javadoc mvn javadoc:javadoc [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'javadoc'. [INFO] [INFO] Building Geronimo [INFO]task-segment: [javadoc:javadoc] [INFO] [INFO] Preparing javadoc:javadoc [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class => ' org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] ** [INFO] Starting Jakarta Velocity v1.4 [INFO] RuntimeInstance initializing. [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader [INFO] ClasspathResourceLoader : initialization starting. [INFO] ClasspathResourceLoader : initialization complete. [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) [INFO] Default ResourceManager initialization complete. [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach [INFO] Created: 20 parsers. [INFO] Velocimacro : initialization starting. [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' [INFO] Velocimacro : VM library template macro registration complete. [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. [INFO] Velocimacro : initialization complete. [INFO] Velocity successfully started. [INFO] [javadoc:javadoc] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Dec 13 12:37:56 EST 2006 [INFO] Final Memory: 6M/11M [INFO]
Javadocs for Geronimo 1.1.1?
I downloaded the Geronimo 1.1.1 source code ZIP from the downloads page and I noticed that the Javadocs available on the main Apache Geronimo website don't match up to version 1.1.1 ( http://geronimo.apache.org/api/index.html), is this correct? I am now trying to generate the Javadocs directly from the source code. I added the following section to my c:\geronimo-1.1.1_src\pom.xml file: org.apache.maven.plugins maven-javadoc-plugin true And then executed "mvn javadoc:javadoc" and also "mvn site" with no success in producing the Javadocs (output follows below). What am I missing? Daniel. -- OUTPUT -- C:\geronimo-1.1.1_src>mvn javadoc:javadoc mvn javadoc:javadoc [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'javadoc'. [INFO] [INFO] Building Geronimo [INFO]task-segment: [javadoc:javadoc] [INFO] [INFO] Preparing javadoc:javadoc [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class => ' org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] ** [INFO] Starting Jakarta Velocity v1.4 [INFO] RuntimeInstance initializing. [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl ) [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader [INFO] ClasspathResourceLoader : initialization starting. [INFO] ClasspathResourceLoader : initialization complete. [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) [INFO] Default ResourceManager initialization complete. [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach [INFO] Created: 20 parsers. [INFO] Velocimacro : initialization starting. [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException : Unable to find resource 'VM_global_library.vm' [INFO] Velocimacro : VM library template macro registration complete. [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. [INFO] Velocimacro : initialization complete. [INFO] Velocity successfully started. [INFO] [javadoc:javadoc] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Dec 13 12:37:56 EST 2006 [INFO] Final Memory: 6M/11M [INFO]
Creating a Custom Builder to Preprocess Web Apps
I'm very new to Geronimo and I want to make sure I'm on the right track for doing the following: create a custom builder to handle my own module type ".gar" (.e.g., "generic archive"). Now, I want to essentially treat .GAR files like .WAR files, except that I'll be doing some pre-processing to the JSP pages (for instance, upper-casing everything). So I'm thinking about creating a ConfigurationBuilder that would integrate with whatever Web Container is installed in Geronimo. Is this a good approach? I'm having a hard time understanding what the different methods of the ConfigurationBuilder are supposed to do (even though I have read the Quartz "Advanced Plugin Example" page). I initially was thinking of, after doing the preprocessing, using JSR-88 API inside of my ConfigurationBuilder to deploy my GAR as a web application. But it seems to me that I would probably want to look up some sort of WebBuilder GBean in the kernel to perform the deployment for me. But what GBean to lookup? Thanks Daniel.