activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: problems with JDBC persistence without journaling
Date Tue, 06 Jun 2006 13:07:57 GMT
I'm afraid this is a bug in our documentation as the <jdbcAdapter>
currently requires a DataSource to be specified.  I've added a better
exception message to SVN HEAD now which will describe exactly whats
wrong (you need to specify a dataSource).

The <journaledJDBC/> autocreates a dataSource if one is not provided
using the default Apache Derby - I've patched <jdbcAdapter> to do the
same now too.

So you could try SVN HEAD - or failing that change the XML to
explicitly refer to a JDBC connection

<jdbcAdapter dataSource="#foo"/>

then somewhere else in the XML define a spring bean named foo

<bean xmlns="" class="org.com.foo.MyDataSource">...


On 6/6/06, Igor Bogicevic <caboom@gmail.com> wrote:
> Hi all,
>
> when I try to start activemq with JDBC persistence without journaling
> (incubator activemq 4.0 release, JDK 1.5_06) with following
> configuration and according to the documentation
> (http://www.activemq.org/site/persistence.html):
>
>  <persistenceAdapter>
>    <jdbcPersistenceAdapter/>
>  </persistenceAdapter>
>
> i get following exception:
>
> ACTIVEMQ_HOME: /data1/activemq/incubator-activemq-4.0
> Loading message broker from: xbean:activemq.xml
> INFO  BrokerService                  - ActiveMQ 4.0 JMS Message Broker
> (localhost) is starting
> INFO  BrokerService                  - For help or more information
> please see: http://incubator.apache.org/activemq/
> ERROR BrokerService                  - Failed to start ActiveMQ JMS
> Message Broker. Reason: java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:229)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:213)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:139)
>         at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:930)
>         at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:888)
>         at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:458)
>         at org.apache.activemq.broker.BrokerService.start(BrokerService.java:361)
>         at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
>         at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>         at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>         at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
>         at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
>         at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
>         at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:46)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
>         at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:81)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
>         at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
>         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.apache.activemq.console.Main.runTaskClass(Main.java:135)
>         at org.apache.activemq.console.Main.main(Main.java:67)
> ERROR: java.lang.RuntimeException: Failed to execute start task.
> Reason: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService'
> defined in class path resource [activemq.xml]: Initialization of bean
> failed; nested exception is java.lang.NullPointerException: null
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService'
> defined in class path resource [activemq.xml]: Initialization of bean
> failed; nested exception is java.lang.NullPointerException: null
> INFO  ManagementContext              - JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrm
>
> Could someone direct me what I might be misconfiguring, or is this
> problem with ActiveMQ?
>
> Thanks,
> Igor
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message