Re: Adding DB pool JNDI in Jar
I was trying to use declared database pool in Jar file through JNDI. Is there an easy way to decalre db pool in Global JNDI? Please help. djencks wrote: java:comp/env only works in javaee components. To use a datasource in jndi in something like quartz you need to bind into global jndi. I think the best instructions are in this thread http://www.nabble.com/How-to-register-a-Datasource-in-GlobalJNDI- Namespace--tf4521379s134.html#a12902470 we need to get this class and some docs into geronimo 2.l... hope this helps david jencks On Jan 20, 2008, at 6:34 PM, Qaiser Mehmood wrote: I am using Geronimo 2.0.I want to use quartz in my Jar file and I am using quartz.properties to configure Quartz. In the properties file, I am using database pool through JNDI. I am getting this error: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'myDS': java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/QuartzDS' java.lang.NullPointerException: null [See nested exception: java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/QuartzDS' java.lang.NullPointerException: null] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection (JobStoreSupport.java:636) at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection (JobStoreTX.java:72) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin (JobStoreSupport.java:3070) at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage (JobStoreSupport.java:3713) at org.quartz.impl.jdbcjobstore.JobStoreSupport $ClusterManager.initialize(JobStoreSupport.java:3700) at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted (JobStoreSupport.java:570) at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:449) at org.quartz.impl.StdScheduler.start(StdScheduler.java:146) at com.pervasive.phaip.services.scheduler.PhaipScheduler.doStart (PhaipScheduler.java:31) at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance (GBeanInstance.java:996) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( GBeanInstanceState.java:268) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start (GBeanInstanceState.java:102) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive (GBeanInstanceState.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive (GBeanInstance.java:553) at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean (BasicKernel.java:379) at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration GBeans(ConfigurationUtil.java:448) at org.apache.geronimo.kernel.config.KernelConfigurationManager.start (KernelConfigurationManager.java:187) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:530) at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ $FastClassByCGLIB$$ce77a924.invoke(generated) 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:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) 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.gbean.GBeanLifecycle$$EnhancerByCGLIB$ $b023c139.startConfiguration(generated) JNDI URL in my quartz.properties file is: org.quartz.dataSource.myDS.jndiURL=java:comp/env/jdbc/MyDataSource And my geronimo-service.xml : ?xml version=1.0 encoding=UTF-8? module xmlns=http://geronimo.apache.org/xml/ns/deployment-1.1; environment moduleId groupIdphaip-core/groupId artifactIdphaip-core/artifactId version1.1/version /moduleId dependencies dependency groupIdorg.apache.activemq/groupId artifactIdactivemq-core/artifactId version4.1.1/version typejar/type /dependency dependency groupIddbunit/groupId artifactIddbunit/artifactId version2.2/version typejar/type /dependency dependency groupIddj800ec/groupId artifactIddj800ec/artifactId version1.0/version typejar/type
JNDI name for Database pool in Jar file?
I have created a database pool for PostgerSQL through Geronimo Admin console. Now I want to pass this pool name as JNDI name in quartz.properties. I want to use this pool in a Jar file rather than a web application and that Jar file uses quartz.properties for config information. How and what name I can use? please help. -- View this message in context: http://www.nabble.com/JNDI-name-for-Database-pool-in-Jar-file--tp14985520s134p14985520.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Adding DB pool JNDI in Jar
artifactIdxmlbeans/artifactId version2.0.2/version typecar/type /dependency dependency groupIdjuddi/groupId artifactIdjuddi-client/artifactId version2.0rc5/version typejar/type /dependency dependency groupIdjuddi/groupId artifactIdjuddi/artifactId version2.0rc5/version typejar/type /dependency dependency groupIdconsole.dbpool/groupId artifactIdQuartzDS/artifactId /dependency /dependencies resource-ref ref-namejdbc/MyDataSource/ref-name resource-linkQuartzDS/resource-link /resource-ref /environment /module I have created database pool through Geronimo Console and using name QuartzDS.Please help. Qaiser Mehmood -- View this message in context: http://www.nabble.com/Adding-DB-pool-JNDI-in-Jar-tp14990200s134p14990200.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Class [org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does not implement the NamespaceHandler interface
I am trying to deploy a web application in Geronimo 2.0 and I am getting following error: 20:03:39,543 ERROR [[/phaip]] StandardWrapper.Throwable java.lang.IllegalArgumentException: Class [org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does not implement the NamespaceHandler interface at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119) at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.init(DefaultNamespaceHandlerResolver.java:96) at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.init(DefaultNamespaceHandlerResolver.java:70) at org.apache.cxf.bus.spring.BusApplicationContext.initBeanDefinitionReader(BusApplicationContext.java:172) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:78) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324) at org.apache.cxf.bus.spring.BusApplicationContext.init(BusApplicationContext.java:71) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:84) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:52) at org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:156) at org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java:98) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1053) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:955) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4035) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4338) at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:60) at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:345) at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47) at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:198) 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 org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:355) at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(generated) 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:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830) 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.tomcat.TomcatContainer$$EnhancerByCGLIB$$98ccabf8.addContext(generated) at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:533) at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:996) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:539) at org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111) at org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146) at org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120) at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176) at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44) at
java.lang.NoClassDefFoundError: org/quartz/Trigger
Hi, I am trying to deploy a JAR file as on geronimo which has different GBean which I want to access through JMX. When I am deploying this Jar file , I am getting this error: 19:42:47,732 ERROR [Deployer] Deployment failed due to java.lang.NoClassDefFoundError: org/quartz/Trigger at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at org.apache.xbean.finder.ClassFinder.init(ClassFinder.java:162) at org.apache.xbean.finder.ClassFinder.init(ClassFinder.java:144) at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:428) at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:330) at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:152) at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:118) at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:332) at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:614) at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:551) at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:473) at org.apache.geronimo.openejb.deployment.EjbModuleBuilder$$FastClassByCGLIB$$cd80af20.invoke(generated) I have deployed this quartz.jar as dependency and I am adding this in my META-INF/geronimo-service.xml too. Any idea? Other question is where I can deploy the Shared Jar file which I want to use in all applications in Geronimo (Like Tomcat Shared lib folder)? Please help. Qaiser Mehmood -- View this message in context: http://www.nabble.com/java.lang.NoClassDefFoundError%3A-org-quartz-Trigger-tp14904364s134p14904364.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Adding third party libraries in GBean and ClassNotFound Exception
Hi, I am developing GBean and within my bean, I am using third party libraries like quartz. I have deployed quarz.jar in geronimo and then in my Gbean config, I am including this quartz.jar as dependency. When I am deploying GBean, I am getting error org.quartz.Trigger class not found. My geronimo-service.xml file in my Gbean jar file is : ?xml version=1.0 encoding=UTF-8? phaip-test phaip-test 1.1 quartz quartz 1.6.0 jar Please help. Qaiser Mehmood -- View this message in context: http://www.nabble.com/Adding-third-party-libraries-in-GBean-and-ClassNotFound-Exception-tp14859517s134p14859517.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.