activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac" <de...@nighttale.net>
Subject Re: Apache activemq configuration for connection to postgresql database
Date Mon, 17 Mar 2008 14:14:52 GMT
It seems like you are missing PostgreSQL JDBC driver ... Download
appropriate driver from http://jdbc.postgresql.org/download.html and
put it in lib/ folder

Cheers
-- 
Dejan Bosanac
www.scriptinginjava.net

On Mon, Mar 17, 2008 at 3:09 PM, chif <admire.chifura@gmail.com> wrote:
>
>  Hi,
>  I am working on activemq4.0.2 and am configuring broker-config.xml for
>  communication to postgresql database and i am getting the following
>  error:(Bean class [org.postgresql.ds.PGPoolingDataSource] not found;)
>
>
>  12:40:57,900 INFO  [XBeanXmlBeanDefinitionReader] Loading XML bean
>  definitions from class path resource [broker-config.xml]
>  12:40:58,269 ERROR [RARDeployment] Starting failed
>  jboss.jca:service=RARDeployment,name='activemq-ra.rar'
>  javax.resource.spi.ResourceAdapterInternalException: Failed to startup an
>  embedded broker: xbean:broker-config.xml, due to:
>  org.springframework.beans.factory.BeanDefinitionStoreException: Error
>  registering bean with name 'postgres-ds' defined in class path resource
>  [broker-config.xml]: Bean class [org.postgresql.ds.PGPoolingDataSource] not
>  found; nested exception is java.lang.ClassNotFoundException: No ClassLoaders
>  found for: org.postgresql.ds.PGPoolingDataSource
>  at
>  org.apache.activemq.ra.ActiveMQResourceAdapter.start(ActiveMQResourceAdapter.java:83)
>  at
>  org.jboss.resource.deployment.RARDeployment.startService(RARDeployment.java:102)
>  at
>  org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
>  at
>  org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
>  at
>  org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:110)
>  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at
>  org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
>  at $Proxy0.start(Unknown Source)
>  at org.jboss.system.ServiceController.start(ServiceController.java:418)
>  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
>  at
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
>  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>  at
>  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>  at $Proxy24.start(Unknown Source)
>  at
>  org.jboss.deployment.SimpleSubDeployerSupport.startService(SimpleSubDeployerSupport.java:378)
>  at
>  org.jboss.deployment.SimpleSubDeployerSupport.start(SimpleSubDeployerSupport.java:141)
>  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
>  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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at
>  org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>         at
>  org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>         at
>  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
>         at
>  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>         at $Proxy8.deploy(Unknown Source)
>         at
>  org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
>         at
>  org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
>         at
>  org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
>         at
>  org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
>         at
>  org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
>         at
>  org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
>         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
>         at
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
>  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>         at
>  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
>         at
>  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>         at
>  org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
>         at $Proxy0.start(Unknown Source)
>         at
>  org.jboss.system.ServiceController.start(ServiceController.java:418)
>         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
>         at
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
>  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>         at
>  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
>         at
>  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>         at $Proxy4.start(Unknown Source)
>         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
>         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
>         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
>         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
>         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>         at
>  org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>         at
>  org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>         at
>  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
>         at
>  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>         at $Proxy5.deploy(Unknown Source)
>         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
>         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
>         at org.jboss.Main.boot(Main.java:195)
>         at org.jboss.Main$1.run(Main.java:463)
>         at java.lang.Thread.run(Thread.java:595)
>  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>  Error registering bean with name 'postgres-ds' defined in class path
>  resource [broker-config.xml]: Bean class
>  [org.postgresql.ds.PGPoolingDataSource] not found; nested exception is
>  java.lang.ClassNotFoundException: No ClassLoaders found for:
>  org.postgresql.ds.PGPoolingDataSource
>         at
>  org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:485)
>         at
>  org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:392)
>         at
>  org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanDefinitionElement(XBeanXmlBeanDefinitionParser.java:705)
>         at
>  org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanDefinitions(XBeanXmlBeanDefinitionParser.java:672)
>         at
>  org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
>  ************************************************************************************************************************************************************************
>  I changed the following arears of broker-config.xml for me to get this
>  error:
>    <persistenceAdapter>
>  <!--        <journaledJDBC journalLogFiles="5"
>  dataDirectory="${activemq.home}/activemq-data"/> -->
>       <!-- To use a different datasource, use th following syntax : -->
>       <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"
>  dataSource="#postgres-ds"/>
>
>     </persistenceAdapter>
>  ...
>  and
>  <!-- Postgres DataSource Sample Setup -->
>       <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
>       <property name="serverName" value="localhost"/>
>       <property name="databaseName" value="checklist"/>
>       <property name="portNumber" value="5432"/>
>       <property name="user" value="mirac"/>
>       <property name="password" value="test"/>
>       <property name="dataSourceName" value="postgres"/>
>       <property name="initialConnections" value="1"/>
>       <property name="maxConnections" value="10"/>
>      </bean>
>
>
>  Regards
>  admire
>  --
>  View this message in context: http://www.nabble.com/Apache-activemq-configuration-for-connection-to-postgresql-database-tp16092881s2354p16092881.html
>  Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Mime
View raw message