History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-1086
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Unassigned
Reporter: Tony Voss
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Can't use SQL Server 2005 for persistence

Created: 04/Dec/06 10:19 AM   Updated: 07/May/08 09:50 AM
Component/s: Message Store
Affects Version/s: 4.1.0
Fix Version/s: 5.2.0

Time Tracking:
Not Specified

File Attachments: 1. Text File activemq2000.log (35 kb)
2. Text File activemq2005.log (24 kb)
3. Zip Archive Licensed for inclusion in ASF works MSSql2005.zip (2 kb)

Issue Links:
dependent
 

Regression: Regression


 Description  « Hide
When using SQL Server 2005 for persistence the following exception is thrown:

java.sql.SQLException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:475)
at org.apache.activemq.store.jdbc.DefaultDatabaseLocker.start(DefaultDatabaseLocker.java:59)
at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:175)
at org.apache.activemq.store.journal.JournalPersistenceAdapter.start(JournalPersistenceAdapter.java:223)
at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:63)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
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:159)
at org.apache.activemq.console.Main.main(Main.java:91)



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Baskar Duraikannu - 05/Jan/07 04:09 PM
I was learning Persistence using SQL 2005 and I got the same error mentioned. Please see MSSql2005.zip file attached. It seemed to have resolved the issue.

James Strachan - 12/Jun/07 03:01 AM
AFAIK this is now resolved in 5.0.0. Any chance you could test it to confirm? Let us know if not and we can reopen this issu

Demis Bellot - 12/Jun/07 01:45 PM
This is still an issue using the latest snapshot taken on 07 June 2007.

This problem exists using both 2000 and 2005 JDBC drivers.


Demis Bellot - 12/Jun/07 01:46 PM
log file using 2005 JDBC drivers

Demis Bellot - 12/Jun/07 01:50 PM
I have attached the log files using both SQL 2000 and 2005 JDBC drivers.
This issue is still outstanding. A fix for this issue is here https://issues.apache.org/activemq/browse/AMQ-1191