Announcement Announcement Module
Collapse
No announcement yet.
newbie jboss spring question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • newbie jboss spring question

    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:
    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)
    My springapp-ds.xml file looks like this :
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
       <local-tx-datasource>
    
          <jndi-name>SpringappDS</jndi-name>
          <connection-url>jdbc&#58;hsqldb&#58;$&#123;jboss.server.data.dir&#125;$&#123;/&#125;hypersonic$&#123;/&#125;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&#58;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&#58;service=Hypersonic,database=springappDB">
         <attribute name="Database">springappDB</attribute>
         <attribute name="InProcessMode">true</attribute>
       </mbean>
    </datasources>
    the relevant part of springapp-servlet.xml looks like this :
    Code:
        <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    	  <property name="jndiName"><value>java&#58;/SpringappDS</value></property>	  
        </bean>

  • #2
    anyone have an idea on this one? It must be something simple that I am doing wrong.

    Comment


    • #3
      For those of you like me who are finding this a problem years later the solution is to modify the logon-config.xml file in the jboss conf directory with a new Realm.

      Comment

      Working...
      X