I want to connect my spring app to a hypersonic datasource in jboss. I create the datasource with an xml file and drop into the deploy dir. I can access the datasource through JMX > HSQL database manager and create my tables. I hook up my spring app to point to this datasource but get the following error upon deployment. Any ideas? Thanks -Patrick
Stacktrace:
My springapp-ds.xml file looks like this :Code:2004-11-13 11:58:03,896 ERROR [org.springframework.web.servlet.DispatcherServlet] Could not complete request org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC connection; nested exception is org.jboss.util.NestedSQLException: No matching credentials in Subject!; - nested throwable: (org.jboss.resource.JBossResourceException: No matching credentials in Subject!) org.jboss.util.NestedSQLException: No matching credentials in Subject!; - nested throwable: (org.jboss.resource.JBossResourceException: No matching credentials in Subject!) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
the relevant part of springapp-servlet.xml looks like this :Code:<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>SpringappDS</jndi-name> <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}springappDB</connection-url> <driver-class>org.hsqldb.jdbcDriver</driver-class> <user-name>sa</user-name> <password></password> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>0</idle-timeout-minutes> <track-statements/> <security-domain>HsqlDbRealm</security-domain> <metadata> <type-mapping>Hypersonic SQL</type-mapping> </metadata> <depends>jboss:service=Hypersonic,database=springappDB</depends> </local-tx-datasource> <!-- This mbean can be used when using in process persistent db --> <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic,database=springappDB"> <attribute name="Database">springappDB</attribute> <attribute name="InProcessMode">true</attribute> </mbean> </datasources>
Code:<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"><value>java:/SpringappDS</value></property> </bean>


Reply With Quote