RE: Need to share JVM for both tomcat and RMI server
From: siranjeevi krishnan [mailto:siranjee...@gmail.com] Subject: Re: Need to share JVM for both tomcat and RMI server But it search the server.xml in C:\Program Files\myApp\conf\server.xml instead of tomcat\conf\server.xml. You need to set the value of the catalina.base and catalina.home system properties to the path of the Tomcat directory, rather than using the default value of the current directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Need to share JVM for both tomcat and RMI server
I think there is no issue with my class loader but there is some issue with CWD. I am running my program in C:\Program Files\myApp\embedTomcat.java. But it search the server.xml in C:\Program Files\myApp\conf\server.xml instead of tomcat\conf\server.xml. Is there any way to solve this issue? On Fri, Apr 17, 2009 at 8:36 PM, Jorge Medina jmed...@e-dialog.com wrote: I can't help here, but I can give you some suggesstions: - Take a look at the classloaders used by Tomcat, you may be running into trouble because your application may be loading classes that are supposed to be loaded by your Web Apps only. http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html - Verify your Spring configuration file -Original Message- From: siranjeevi krishnan [mailto:siranjee...@gmail.com] Sent: Friday, April 17, 2009 4:40 AM To: Tomcat Users List Subject: Re: Need to share JVM for both tomcat and RMI server Sorry I called main method of Bootstrap class with start as argument to start tomcat. I used Bootstrap.start() in my code to start tomcat On Fri, Apr 17, 2009 at 10:45 AM, siranjeevi krishnan siranjee...@gmail.com wrote: Hi Jorge Thanks for your reply. I used Bootstrap.start() in my code to start tomcat. But i get the following exception in the spring frame work. ERROR 04/16 11:06:58 Stderr 700100 Apr 16, 2009 11:06:58 AM org.apache.catalina.core.ApplicationContext log INFO: Loading Spring root WebApplicationContext ERROR 04/16 11:07:00 Stderr 700100 Apr 16, 2009 11:07:00 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'componentMetricsDataServiceBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' while setting bean property 'componentMetricsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g etSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.pre InstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBea nFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(A bstractApplicationContext.java:380) at org.springframework.web.context.support.AbstractRefreshableWebApplicatio nContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContex t(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext( ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java:49) at
Re: Need to share JVM for both tomcat and RMI server
Sorry I called main method of Bootstrap class with start as argument to start tomcat. I used Bootstrap.start() in my code to start tomcat On Fri, Apr 17, 2009 at 10:45 AM, siranjeevi krishnan siranjee...@gmail.com wrote: Hi Jorge Thanks for your reply. I used Bootstrap.start() in my code to start tomcat. But i get the following exception in the spring frame work. ERROR 04/16 11:06:58 Stderr 700100 Apr 16, 2009 11:06:58 AM org.apache.catalina.core.ApplicationContext log INFO: Loading Spring root WebApplicationContext ERROR 04/16 11:07:00 Stderr 700100 Apr 16, 2009 11:07:00 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'componentMetricsDataServiceBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' while setting bean property 'componentMetricsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at
RE: Need to share JVM for both tomcat and RMI server
I can't help here, but I can give you some suggesstions: - Take a look at the classloaders used by Tomcat, you may be running into trouble because your application may be loading classes that are supposed to be loaded by your Web Apps only. http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html - Verify your Spring configuration file -Original Message- From: siranjeevi krishnan [mailto:siranjee...@gmail.com] Sent: Friday, April 17, 2009 4:40 AM To: Tomcat Users List Subject: Re: Need to share JVM for both tomcat and RMI server Sorry I called main method of Bootstrap class with start as argument to start tomcat. I used Bootstrap.start() in my code to start tomcat On Fri, Apr 17, 2009 at 10:45 AM, siranjeevi krishnan siranjee...@gmail.com wrote: Hi Jorge Thanks for your reply. I used Bootstrap.start() in my code to start tomcat. But i get the following exception in the spring frame work. ERROR 04/16 11:06:58 Stderr 700100 Apr 16, 2009 11:06:58 AM org.apache.catalina.core.ApplicationContext log INFO: Loading Spring root WebApplicationContext ERROR 04/16 11:07:00 Stderr 700100 Apr 16, 2009 11:07:00 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'componentMetricsDataServiceBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' while setting bean property 'componentMetricsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g etSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.pre InstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBea nFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(A bstractApplicationContext.java:380) at org.springframework.web.context.support.AbstractRefreshableWebApplicatio nContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContex t(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext( ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j ava:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
Re: Need to share JVM for both tomcat and RMI server
Hi Jorge Thanks for your reply. I used Bootstrap.start() in my code to start tomcat. But i get the following exception in the spring frame work. ERROR 04/16 11:06:58 Stderr 700100 Apr 16, 2009 11:06:58 AM org.apache.catalina.core.ApplicationContext log INFO: Loading Spring root WebApplicationContext ERROR 04/16 11:07:00 Stderr 700100 Apr 16, 2009 11:07:00 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'componentMetricsDataServiceBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' while setting bean property 'componentMetricsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) at com.proactivenet.server.EmbedTomcatThread.run(PlatformFactoryImpl.java:980) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.bmc.sas.ngp.service.component.NGPComponentMetricsDataService' is defined at
RE: Need to share JVM for both tomcat and RMI server
I guess you can start one from the other no matter what direction you choose. If you can package your RMI server as a webapp, just could start your RMI server from a context listener. If you prefer to start Tomcat from your RMI server, just look at the catalina.sh script, starting Tomcat is just a matter of calling the bootstraping class. Use the same class within your code. -Original Message- From: siranjeevi krishnan [mailto:siranjee...@gmail.com] Sent: Wednesday, April 15, 2009 1:49 AM To: users@tomcat.apache.org Subject: Need to share JVM for both tomcat and RMI server Hi I want to know about the possibility of sharing JVM for both tomcat and RMI server. Any ways to start tomcat from my RMI server. How to programatically start tomcat like how startup.sh is doing? Is it possible to start my RMI server inside tomcat? Regards Siranjeevi - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org