aspose file tools*
The moose likes JBoss/WildFly and the fly likes MS SQL SERVER for JBOSS 3.2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "MS SQL SERVER for JBOSS 3.2.1" Watch "MS SQL SERVER for JBOSS 3.2.1" New topic
Author

MS SQL SERVER for JBOSS 3.2.1

Fabian Schulcz
Greenhorn

Joined: May 13, 2004
Posts: 2
Hi all!

I am trying to setup JBoss to use SQL-Server as default datasource.

I followed the JBOSS getting-started.pdf as well as a thread in this forum.
My files look like that:


mssqldb-ds.xml:
---------------

<datasources>
<local-tx-datasource>
<!-- remove this depends tag if you are not using the tcp connection url -->
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:jtds:sqlserver://lisocon-4/jbpm</connection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<user-name>x</user-name>
<password>x</password>
<min-pool-size>5</min-pool-size>
<security-domain>MSSQLDbRealm</security-domain>
</local-tx-datasource>

in login-config.xml:
--------------------

<!-- Security Domain for MS-SQL -->
<application-policy name = "MSSQLDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">x</module-option>
<module-option name = "userName">x</module-option>
<module-option name = "password">x</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MSSQLDS</module-option>
</login-module>
</authentication>
</application-policy>

Still, what I get is this:
--------------------------

2004-05-13 12:59:13,970 ERROR [org.jboss.resource.security.AbstractPasswordCredentialLoginModule] The ConnectionManager mbean: jboss.jca:service=LocalTxCM,name=MSSQLDS specified in a ConfiguredIdentityLoginModule could not be found. ConnectionFactory will be unusable!
2004-05-13 12:59:13,985 ERROR [org.jboss.mq.pm.jdbc2.PersistenceManager] Starting failed
java.lang.SecurityException: Invalid authentication attempt, principal=null
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:660)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:798)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
.....

I understand that my datasource isn't local, right!?!
When try to use XaTxCM the error is the same

What do I miss, anyone knows ??

Help's appreciated a lot Fab
Fabian Schulcz
Greenhorn

Joined: May 13, 2004
Posts: 2
N E V E R M I N D ! !
Shawn Perreault
Greenhorn

Joined: Dec 23, 2008
Posts: 1
A perfect example of what NOT to do after you have figured out your issue...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Shawn, welcome to Java Ranch!

Also, are you by any chance hinting to Fabian that he should describe what he did wrong so that others can benefit? If so, I heartily agree.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MS SQL SERVER for JBOSS 3.2.1
 
Similar Threads
DeploymentException: Error cant find datasource:
Jboss and Oracle
JBoss 422 DataSource Connection and SecureIdentityLoginModule
JBoss 4.0 and MSSQL Server 2000
how debug a CMP entity error?