geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qaiser Mehmood <mqais...@lycos.com>
Subject Adding DB pool JNDI in Jar
Date Mon, 21 Jan 2008 02:34:28 GMT

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.startConfigurationGBeans(ConfigurationUtil.java:448)
	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(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>
            <groupId>phaip-core</groupId>
            <artifactId>phaip-core</artifactId>
            <version>1.1</version>
         </moduleId>
         <dependencies>
                                   
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-core</artifactId>
                <version>4.1.1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>dbunit</groupId>
                <artifactId>dbunit</artifactId>
                <version>2.2</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>dj800ec</groupId>
                <artifactId>dj800ec</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>postgresql</groupId>
                <artifactId>postgresql-8.2</artifactId>
                <version>506.jdbc4</version>
                <type>jar</type>
            </dependency>
            
            
            <dependency>
                <groupId>spring</groupId>
                <artifactId>spring</artifactId>
                <version>2.5.1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>3.1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>commons-digester</groupId>
                <artifactId>commons-digester</artifactId>
                <version>1.8</version>
                <type>jar</type>
            </dependency>

            
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.0.4</version>
                <type>jar</type>
            </dependency>

			<dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.6.1</version>
                <type>jar</type>
            </dependency>
			
            
            <dependency>
                <groupId>jmx</groupId>
                <artifactId>jmx</artifactId>
                <version>5.0_r16</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>commons-logging-api</groupId>
                <artifactId>commons-logging-api</artifactId>
                <version>1.0.4</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>jdbc2_0-stdext</groupId>
                <artifactId>jdbc2_0-stdext</artifactId>
                <version>2.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.15</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>openjpa</artifactId>
                <version>2.0.2</version>
                <type>car</type>
            </dependency>
            
            
            <dependency>
                <groupId>quartz</groupId>
                <artifactId>quartz-all</artifactId>
                <version>1.6.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-servlet_2.5_spec</artifactId>
                <version>1.1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>j2ee</groupId>
                <artifactId>javaee</artifactId>
                <version>9.1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>geronimo</groupId>
                <artifactId>geronimo-kernel</artifactId>
                <version>2.0.2</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>org.apache.geronimo.modules</groupId>
                <artifactId>geronimo-activation</artifactId>
                <version>2.0.2</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-ejb_3.0_spec</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            
            <dependency>
                <groupId>org.apache.ws.scout</groupId>
                <artifactId>scout</artifactId>
                <version>1.0rc1</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>ejb</groupId>
                <artifactId>ejb</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>jms</groupId>
                <artifactId>jms</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>jta</groupId>
                <artifactId>jta</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>mail</groupId>
                <artifactId>mail</artifactId>
                <version>1.3.3</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>derby</groupId>
                <artifactId>derby</artifactId>
                <version>10.3.2000001.599110</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>phaip</groupId>
                <artifactId>phaip-core</artifactId>
                <version>1.0</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>xmlbeans</artifactId>
                <version>2.0.2</version>
                <type>car</type>
            </dependency>
            
            <dependency>
                <groupId>juddi</groupId>
                <artifactId>juddi-client</artifactId>
                <version>2.0rc5</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>juddi</groupId>
                <artifactId>juddi</artifactId>
                <version>2.0rc5</version>
                <type>jar</type>
            </dependency>
            
            <dependency>
                <groupId>console.dbpool</groupId>
                <artifactId>QuartzDS</artifactId>
            </dependency>
            
         </dependencies>
    	
    	<resource-ref>
          <ref-name>jdbc/MyDataSource</ref-name>
          <resource-link>QuartzDS</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.


Mime
View raw message