Issue while connecting to Microsoft SQL from EAP 7.0 - sql-server

I defined my JNDI datasource in the standalone.xml
<datasource jta="false" jndi-name="java:/dailymenu" pool-name="dailymenu" enabled="true">
<connection-url>jdbc:sqlserver://<host>:<port>;DatabaseName=<db-name>;</connection-url>
<driver>mssql</driver>
<security>
<user-name><username></user-name>
<password><pw></password>
</security>
</datasource>
And in the section:
<driver name="mssql" module="com.mircosoft.sqlserver.jdbc">
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
</driver>
And I added the module.xml in ‎⁨⁨jboss-eap-7.0⁩ ▸ ⁨modules⁩ ▸ ⁨com⁩ ▸ ⁨microsoft⁩ ▸ ⁨sqlserver⁩ ▸ ⁨jdbc⁩ ▸ ⁨main⁩ (along with the mssql-jdbc-7.2.1.jre8.jar)
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver.jdbc">
<resources>
<resource-root path="mssql-jdbc-7.2.1.jre8.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
However, when starting the jBoss I get:
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "dailymenu.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"dailymenu.war\".component.DailyMenuApplication.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"dailymenu.war\".component.DailyMenuApplication.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: javax.ejb.EJBException: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [dailymenu]
Caused by: javax.naming.NameNotFoundException: dailymenu [Root exception is java.lang.IllegalStateException]
Caused by: java.lang.IllegalStateException"},
"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.deployment.unit.\"dailymenu.war\".deploymentCompleteService",
"jboss.deployment.unit.\"dailymenu.war\".moduleDeploymentRuntimeInformationStart",
"jboss.undertow.deployment.default-server.default-host./dailymenu",
"jboss.undertow.deployment.default-server.default-host./dailymenu.UndertowDeploymentInfoService"
],
"Services that may be the cause:" => ["jboss.jdbc-driver.mssql"]
}
}

Ok, i had a typo. The driver-module name should - of course - exactly match the path to the module.xml (without "main").

Related

Wildfly 14 Microsoft SQL Server Configuration

I want to use MS SQL Server as a datasource in Wildfly 14, but I always get following error in the console:
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 41) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "datasources"),("jdbc-driver" => "sqlserver")]) - failure description: "WFLYJCA0115: Module for driver [com.microsoft.sqlserver.jdbc] or one of it dependencies is missing: [com.microsoft.sqlserver.jdbc]"
My configuration is as follow:
standalone.xml
<drivers>
<driver name="sqlserver" module="com.microsoft.sqlserver">
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</xa-datasource-class>
</driver>
</drivers>
I also configured a module.xml in the following directory: wildfly-14.0.1.Final\modules\system\layers\base\com\microsoft\sqlserver\main. I also put the sqljdbc42.jar in it.
<module xmlns="urn:jboss:module:1.3" name="com.microsoft.sqlserver.jdbc">
<resources>
<resource-root path="sqljdbc42.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
With Wildfly 13 and before I had no problems.
I believe your driver configuration in the standalone.xml is still wrong.
The following have to be the same.
In standalone.xml:
<driver name="sqlserver" module="com.microsoft.sqlserver.jdbc">
In module.xml:
<module xmlns="urn:jboss:module:1.3" name="com.microsoft.sqlserver.jdbc">
Location of sqljdbc42.jar and module.xml:
JBOSS_HOME\modules\com\microsoft\sqlserver\jdbc\main\
I also believe you are using the wrong xa-datasource-class, this should be:
com.microsoft.sqlserver.jdbc.SQLServerXADataSource
Also have a look at EAP7 Documentation. It should be the same vor wildfly.
There is also a good example of how to use the CLI.
add this to module.xml inside <dependencies> tag
<module name="javax.xml.bind.api"/>

Using JDO 3.0 with App Engine and Gradle

I am trying to migrate to JDO 3.0 in a cloud endpoint Framework 2.0 and Guice environment. I am using the datanucleus Eclipse plugin.
I checked the following documentation:
Using JDO 3.0 with App Engine
There is only a Ant or Maven docu. In my Gradle env, when starting the appengine standard server in eclipse, i get the error appended below.
Does anyone have a hint? Maybe the copytarget not set in Gradle build script correctly?
Sep 24, 2017 4:58:19 PM java.util.prefs.WindowsPreferences <init>
WARNUNG: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Sep 24, 2017 4:58:20 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFORMATION: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\MMM\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'D:\workspaces\tatonlinews\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\justMapMeEndpoints\WEB-INF\appengine-web.xml'
Sep 24, 2017 4:58:20 PM com.google.apphosting.utils.jetty.JettyLogger info
INFORMATION: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Sep 24, 2017 2:58:20 PM com.google.apphosting.utils.jetty.JettyLogger info
INFORMATION: jetty-6.1.x
log4j:WARN No appenders could be found for logger (DataNucleus.Plugin).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sep 24, 2017 2:58:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNUNG: failed guiceFilter: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error in custom provider, javax.jdo.JDOFatalUserException: A property named javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar file with a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be in the classpath, or a property named javax.jdo.option.PersistenceUnitName must be specified.
NestedThrowables:
javax.jdo.JDOException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
at com.sky.tatOnline.server.guice.DispatchServletModule.getPersistenceManagerFactory(Unknown Source)
at com.sky.tatOnline.server.guice.DispatchServletModule.getPersistenceManagerFactory(Unknown Source)
while locating javax.jdo.PersistenceManagerFactory
for parameter 1 at com.sky.tatOnline.server.db.GAEDatastore.<init>(Unknown Source)
while locating com.sky.tatOnline.server.db.GAEDatastore
at com.sky.tatOnline.server.guice.DispatchServletModule.configureServlets(DispatchServletModule.java:92)
while locating com.sky.tatOnline.server.db.Datastore
for parameter 1 at com.sky.tatOnline.server.mapMeEndpoints.MapMeFriendsV1.<init>(Unknown Source)
while locating com.sky.tatOnline.server.mapMeEndpoints.MapMeFriendsV1
1 error
Sep 24, 2017 2:58:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNUNG: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext#3c9bfddc{/,D:\workspaces\tatonlinews\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\justMapMeEndpoints}
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error in custom provider, javax.jdo.JDOFatalUserException: A property named javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar file with a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be in the classpath, or a property named javax.jdo.option.PersistenceUnitName must be specified.
NestedThrowables:
javax.jdo.JDOException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
at com.sky.tatOnline.server.guice.DispatchServletModule.getPersistenceManagerFactory(Unknown Source)
at com.sky.tatOnline.server.guice.DispatchServletModule.getPersistenceManagerFactory(Unknown Source)
while locating javax.jdo.PersistenceManagerFactory
for parameter 1 at com.sky.tatOnline.server.db.GAEDatastore.<init>(Unknown Source)
while locating com.sky.tatOnline.server.db.GAEDatastore
at com.sky.tatOnline.server.guice.DispatchServletModule.configureServlets(DispatchServletModule.java:92)
while locating com.sky.tatOnline.server.db.Datastore
for parameter 1 at com.sky.tatOnline.server.mapMeEndpoints.MapMeFriendsV1.<init>(Unknown Source)
while locating com.sky.tatOnline.server.mapMeEndpoints.MapMeFriendsV1
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.api.server.spi.guice.ServiceMap.get(ServiceMap.java:69)
at com.google.api.server.spi.guice.GuiceEndpointsServlet.createService(GuiceEndpointsServlet.java:37)
at com.google.api.server.spi.EndpointsServlet.createSystemService(EndpointsServlet.java:128)
at com.google.api.server.spi.EndpointsServlet.init(EndpointsServlet.java:57)
at com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:121)
at com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:268)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:271)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:359)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:47)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
Caused by: javax.jdo.JDOFatalUserException: A property named javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar file with a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be in the classpath, or a property named javax.jdo.option.PersistenceUnitName must be specified.
NestedThrowables:
javax.jdo.JDOException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:861)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1099)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:919)
at com.sky.tatOnline.server.guice.DispatchServletModule.getPersistenceManagerFactory(DispatchServletModule.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:128)
at com.google.inject.internal.ProviderMethod$ReflectionProviderMethod.doProvision(ProviderMethod.java:299)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
... 37 more
Caused by: javax.jdo.JDOException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.initialiseMetaData(JDOPersistenceManagerFactory.java:611)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.<init>(JDOPersistenceManagerFactory.java:504)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:294)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:128)
at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
at java.security.AccessController.doPrivileged(Native Method)
at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:844)
... 75 more
Caused by: org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:1151)
at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:986)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.initialiseMetaData(JDOPersistenceManagerFactory.java:601)
... 88 more
Caused by: org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for class com.sky.tatOnline.server.db.entities.CountryBoundingBox but this class is not enhanced!! Please enhance the class before running DataNucleus.
at org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData(MetaDataManager.java:2593)
at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData(MetaDataManager.java:2544)
at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:1140)
... 90 more
Sep 24, 2017 2:58:23 PM com.google.apphosting.utils.jetty.JettyLogger info
INFORMATION: Started SelectChannelConnector#localhost:8080
Sep 24, 2017 2:58:23 PM com.google.appengine.tools.development.AbstractModule startup
INFORMATION: Module instance default is running at http://localhost:8080/
Sep 24, 2017 2:58:23 PM com.google.appengine.tools.development.AbstractModule startup
INFORMATION: The admin console is running at http://localhost:8080/_ah/admin
Sep 24, 2017 4:58:23 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFORMATION: Dev App Server is now running
Here is my gradle script:
buildscript { // Configuration for building
repositories {
jcenter() // Bintray's repository - a fast Maven Central mirror & more
mavenCentral()
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+' // latest App Engine Gradle tasks
// Endpoints Frameworks Gradle plugin
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+'
}
}
repositories { // repositories for Jar's you access in your code
maven {
url 'https://maven-central.storage.googleapis.com' // Google's mirror of Maven Central
// url 'https://oss.sonatype.org/content/repositories/snapshots' // SNAPSHOT Repository (if needed)
}
jcenter()
mavenCentral()
}
apply plugin: 'java' // standard Java tasks
apply plugin: 'war' // standard Web Archive plugin
apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks
// [START apply_endpoints-framework-server]
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'
// [END apply_endpoints-framework-server]
dependencies {
providedCompile group: 'javax.servlet', name: 'servlet-api', version:'2.5'
compile 'com.google.appengine:appengine:1.9.54'
compile 'com.google.appengine:appengine-jsr107cache:1.9.54'
// Add your dependencies here.
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '+'
compile group: 'com.google.inject', name: 'guice', version: '3.0', classifier: 'no_aop'
compile group: 'net.sf.jsr107cache', name: 'jsr107cache', version: '1.1'
//https://cloud.google.com/endpoints/docs/frameworks/java/adding-api-management
compile group: 'com.google.endpoints', name: 'endpoints-management-control-appengine', version: '1.0.0-beta.11'
compile group: 'com.google.endpoints', name: 'endpoints-framework-auth', version: '1.0.0-beta.11'
compile 'com.google.apis:google-api-services-storage:v1-rev110-1.22.0'
//GCM:
compile 'com.google.gcm:gcm-server:1.0.0'
compile 'io.jsonwebtoken:jjwt:0.6.0'
compile 'org.bouncycastle:bcprov-jdk16:1.45'
compile 'com.google.code.gson:gson:2.8.1'
//Facebook Authenticator:
compile 'com.google.gwt:gwt-servlet:2.7.0-rc1'
compile 'com.google.appengine:appengine-api-labs:1.7.4'
compile 'com.google.inject.extensions:guice-servlet:3.0'
compile 'com.google.inject:guice:4.0'
compile 'com.google.endpoints:endpoints-framework-guice:2.0.0-beta.4'
compile 'log4j:log4j:1.2.16'
// Persistence
compile 'org.ow2.asm:asm:4.0'
compile 'org.datanucleus:datanucleus-api-jpa:3.1.3'
compile 'org.datanucleus:datanucleus-api-jdo:3.1.3'
compile 'com.google.appengine.orm:datanucleus-appengine:2.1.2'
compile 'org.datanucleus:datanucleus-core:3.1.3'
compile 'org.apache.geronimo.specs:geronimo-jpa_2.0_spec:1.0'
compile 'javax.jdo:jdo-api:3.0.1'
compile 'javax.transaction:jta:1.1'
}
appengine { // App Engine tasks configuration
run { // local (dev_appserver) configuration (standard environments only)
port = 8080 // default
}
deploy { // deploy configuration
stopPreviousVersion = true // default - stop the current version
promote = true // default - & make this the current version
version = '90'
project = 'appname'
}
}
// [START endpoints-server]
endpointsServer {
// Endpoints Framework Plugin server-side configuration
hostname = "appname.appspot.com"
}
group = 'com.example.appengine' // Generated output GroupId
version = '1.0-SNAPSHOT' // Version in generated output
sourceCompatibility = 1.7 // App Engine Standard uses Java 7
targetCompatibility = 1.7 // App Engine Standard uses Java 7
here is my jdoconfig.xml:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
<!-- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig"> alte config-->
<persistence-manager-factory name="transactions-optional">
<property name="javax.jdo.PersistenceManagerFactoryClass" value="org.datanucleus.api.jdo.JDOPersistenceManagerFactory"/>
<property name="javax.jdo.option.ConnectionURL" value="appengine"/>
<property name="javax.jdo.option.NontransactionalRead" value="true"/>
<property name="javax.jdo.option.NontransactionalWrite" value="true"/>
<property name="javax.jdo.option.RetainValues" value="true"/>
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
<property name="javax.jdo.option.DatastoreReadTimeoutMillis" value="5000"/>
<property name="javax.jdo.option.DatastoreWriteTimeoutMillis" value="10000"/>
<!-- https://cloud.google.com/appengine/docs/java/datastore/transactions
Using cross-group transactions in JDO and JPA
-->
<property name="datanucleus.appengine.datastoreEnableXGTransactions" value="true"/>
<!--
http://code.google.com/intl/de-DE/appengine/docs/java/datastore/overview.html#Datastore_Performance_Features
Do not use EVENTUAL consistency, because you can not read and write in a transaction
Default is strong Consistency, so the following property must not be defined!
<property name="datanucleus.appengine.datastoreReadConsistency" value="EVENTUAL" />-->
<!-- <property name="datanucleus.appengine.datastoreReadConsistency" value="STRONG " />-->
</persistence-manager-factory>
</jdoconfig>
and here is my datanucleus persistence.xml:
i trie the following folders where i put this file:
- src\main\webapp\META-INF\persistence.xml
- src\main\webapp\WEB-INF\classes\META-INF\persistence.xml
- src\main\java\META-INF\persistence.xml
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="transactions-optional">
<mapping-file>myclass.jdo</mapping-file>
</persistence-unit>
</persistence>
error message using datanucleus plugin v4. an v4 version of datanucleus.core.jar...
16:32:15,937 (main) WARN [DataNucleus.General] - Extension Point "org.datanucleus.implementation_creator" not registered, but plugin "org.datanucleus.enhancer" defined in file:/C:/Users/MMM/.gradle/caches/modules-2/files-2.1/org.datanucleus/datanucleus-enhancer/3.1.1/b141c67d55cc19f14639f091b84e692e2198dc50/datanucleus-enhancer-3.1.1.jar refers to it.
16:32:15,998 (main) ERROR [DataNucleus.Persistence] - User-defined type mapping class "org.datanucleus.store.types.sco.simple.Collection" was not found. Please check the mapping file class specifications and your CLASSPATH. The class must be in the CLASSPATH.
16:32:16,015 (main) ERROR [DataNucleus.Persistence] - User-defined type mapping class "org.datanucleus.store.types.sco.simple.List" was not found. Please check the mapping file class specifications and your CLASSPATH. The class must be in the CLASSPATH.
16:32:16,028 (main) ERROR [DataNucleus.Persistence] - User-defined type mapping class "org.datanucleus.store.types.sco.simple.Set" was not found. Please check the mapping file class specifications and your CLASSPATH. The class must be in the CLASSPATH.
16:32:16,064 (main) INFO [DataNucleus.Enhancer] - DataNucleus Enhancer (version 4.1.17) for API "JDO"
16:32:16,092 (main) ERROR [DataNucleus.MetaData] - Unknown tag : "faceted-project"
16:32:16,093 (main) ERROR [DataNucleus.MetaData] - An error occurred while parsing <"faceted-project"> nested within "
" for URI ""
java.lang.RuntimeException: Unknown tag : "faceted-project"
at org.datanucleus.api.jdo.metadata.JDOMetaDataHandler.startElement(JDOMetaDataHandler.java:1242)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:619)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3129)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:283)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataURL(MetaDataParser.java:144)
at org.datanucleus.api.jdo.metadata.JDOMetaDataManager.parseFile(JDOMetaDataManager.java:263)
at org.datanucleus.metadata.MetaDataManagerImpl.loadFiles(MetaDataManagerImpl.java:1426)
at org.datanucleus.metadata.MetaDataManagerImpl.loadMetadataFiles(MetaDataManagerImpl.java:522)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:731)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:500)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1152)

Connection problems MS SQL 2008 in EAP 6.4

I am new to JBoss EAP and using 6.4 version . Earlier I have been using Tomcat 7.39. I like to shift from tomcat to JBOSS EAP 6.4. From some posts in stack overflow and JBOSS EAP , I some how configure MS SQL 2008 in JBOSS EAP but it is not working .
Standalone.xml File
<subsystem xmlns="urn:jboss:domain:datasources:1.2">
<datasources>
<datasource jndi-name="java:jboss/datasources/TMS" pool-name="TMS" enabled="true" use-java-context="true">
<connection-url>jdbc:sqlserver://localhost:1433;databaseName=TMS;integratedSecurity=false;</connection-url>
<driver>sqlserver</driver>
<security>
<user-name>sa</user-name>
<password>1234</password>
</security>
</datasource>
<drivers>
<driver name="sqlserver" module="com.microsoft.sqlserver">
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
Earlier as I do not have any pool-name , I have deleted this attribute from datasource tag. Now I have just kept the pool name as database name though I do not have any pool name yet. Should I have to create pool-name and how could I do that ?
I Created (com\microsoft\sqlserver\main) this folder structure in *EAP_HOME\modules* and Then there I kept sqljdbc4.jar and module.xml. I am using windows 7, 32 bit machine. Below is the code snippet of module.xml:-
<module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver">
<resources>
<resource-root path="sqljdbc4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
And I am getting this error ERROR com.microsoft.sqlserver.jdbc.SQLServerDriver from [Module "deployment.TSM_UI.war:main" from Service Module Loader]
I am thinking that it might be due to my pool name.Any suggestion. Thanks in Advance
The Error-Message doesn't look complete. I guess it is "ERROR ClassNotFoundEcxeption: Could not load class com.microsoft.sqlserver.jdbc.SQLServerDriver from [Module "deployment.TSM_UI.war:main" from Service Module Loader]" ?
Then you try to load the driver directly from within your deployment, but you should use a JNDI-lookup to get the connection from the datasource you created.
Search your deployment (TSM_UI.war) whether you have any references to com.microsoft.sqlserver.jdbc.SQLServerDriver within your deployment and remove it.

liquibase maven hangs when trying to connect to sql server 2012

I am trying to set up liquibase with maven for sql server 2012. I am using the sqljdbc4.jar and trying to connect to sql server using windows authentication. With windows authentication, I have also included the line below as a VM argument to read the file sqljdbc_auth.dll
-Djava.library.path="D:\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x86"
I can't figure out why when I run liquibase in maven (liquibase:update -PlocalDB -e -X) it is hanging and getting this error:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:47817196-07c1-4fc8-92e2-7e03ca044fcb -> [Help 1]
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.liquibase</groupId>
<artifactId>Database</artifactId>
<version>1.0</version>
<properties>
<skipTests>true</skipTests>
<jdk-version>1.6</jdk-version>
<sqlserver-version>4.0</sqlserver-version>
<liquibase-version>3.1.1</liquibase-version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk-version}</source>
<target>${jdk-version}</target>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase-version}</version>
<configuration>
<changeLogFile>src/main/resources/changelogs/changelog-master.xml</changeLogFile>
<driver>${database.driver}</driver>
<url>${database.url}</url>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>localDB</id>
<properties>
<database.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</database.driver>
<database.url>jdbc:sqlserver://computername:1433;databaseName=Test_Liquibase;integratedSecurity=true</database.url>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>${sqlserver-version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase-version}</version>
</dependency>
</dependencies>
EDIT full stack trace from maven
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:381)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:61)
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:330)
... 21 more
Caused by: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:231)
at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:141)
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:52)
... 22 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1654)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1789)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6154)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6106)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2907)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:223)
... 24 more
Liquibase appears to be trying to open a connection and failing with a "Connection reset ClientConnectionId" error from the JDBC driver.
The connection call is just driverObject.Connect(url, properties) where properties is the username and password if specified in maven. Since you are not specifying them they should be null.
Are you able to connect to the database normally with the URL you are giving it? It may be a firewall/network issue. Otherwise I would be suspicious of the windows authentication attempt causing problems.
changed maven to use java 7, instead of java 6, windows authentication and SQL server authentication works and I was able to connect. :)

SQL Server Login failed for user Jboss AS7

I am attempting to set up multiple datasources in my standalone.xml file. I have a connection to DB2 up and working fine. I am having trouble getting the SQL Server connection to work.
From standalone.xml:
<datasource jndi-name="java:/jdbc/syteline" pool-name="SYTELINEMSSDS" enabled="true" use-java-context="true" spy="true">
<connection-url>jdbc:sqlserver://SLSQL:1433;databaseName=npsl_pilot_app;</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<driver>sqljdbc4.jar</driver>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>10</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
</pool>
<security>
<user-name>myUser</user-name>
<password>myPass</password>
</security>
<timeout>
<idle-timeout-minutes>15</idle-timeout-minutes>
</timeout>
</datasource>
I have the sqljdbc4.jar deployed in my standalone\deployments directory and it is deploying. I have tested the connection URL and credentials by copy/pasting it into my application and creating a JDBC connection within my code. That connection works properly. Setting the connection up as a datasource in standalone.xml gives me the following:
15:20:00,326 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-15) JBAS010400: Bound data source [java:/jdbc/syteline]
15:20:00,684 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (JCA PoolFiller) IJ000610: Unable to fill pool: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:758) [ironjacamar-core-impl-1.0.7.Final.jar:1.0.7.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.fillToMin(SemaphoreArrayListManagedConnectionPool.java:703) [ironjacamar-core-impl-1.0.7.Final.jar:1.0.7.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.PoolFiller.run(PoolFiller.java:97) [ironjacamar-core-impl-1.0.7.Final.jar:1.0.7.Final]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_23]
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'dna'. ClientConnectionId:4e4e0e7f-3e23-4a13-9c49-37e33aeb4613
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:254)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:84)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2908)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
... 5 more
15:20:01,385 WARN [org.jboss.as.server.deployment] (MSC service thread 1-14) Class Path entry jcifs.jar in "/C:/jbossdir/jboss7/standalone/deployments/speed2.war/WEB-INF/lib/jtds-1.2.5.jar" does not point to a valid jar for a Class-Path reference.
I have not been able to figure out the Login Failed message.
Is the JBoss server on the same computer as the test application that can connect properly?
Just as a followup, I gave up on the Microsoft driver and used JTDS instead. Works fine.

Resources