Results 1 to 3 of 3

Thread: newbie jboss spring question

  1. #1
    Join Date
    Nov 2004
    Posts
    2

    Default 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. #2
    Join Date
    Nov 2004
    Posts
    2

    Default

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

  3. #3
    Join Date
    Apr 2008
    Location
    Chicago
    Posts
    2

    Default

    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.

Similar Threads

  1. Newbie Question - The Ideal Spring Solution
    By conorp in forum Architecture
    Replies: 3
    Last Post: Aug 23rd, 2005, 03:22 AM
  2. Newbie question: How to get spring debug logging on?
    By wangjammer5 in forum Container
    Replies: 2
    Last Post: Jul 15th, 2005, 07:11 AM
  3. Replies: 1
    Last Post: Jul 11th, 2005, 03:50 PM
  4. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  5. Spring newbie - http session question
    By ncubeait in forum Web
    Replies: 3
    Last Post: Sep 22nd, 2004, 11:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •