0 Replies Latest reply on Sep 13, 2011 12:32 PM by Fred Curry

    SQL Server 2005 Connection Issues

    Fred Curry Newbie

      Can anyone direct me to the correct SQL Server JDBC driver to use? I have tried versions 1.2, 2.0, and 3.0 from Microsoft, but they throw a series of errors.

       

      I have copied the configuration into my *-ds.xml files from http://docs.jboss.org/jbossas/docs/Installation_And_Getting_Started_Guide/5/html/Using_other_Databases.html#d0e3898, and put the driver jar file in my server/server-name/lib folder. When I start my server, I get the below stack trace.

       

      I changed my configuration to use the JTDS driver, but do not want to use this long-term, as it is not supported. Using the JTDS driver also took about 40 minutes to start my server (MySQL takes about 4).

       

       

      Thanks for any help,

       

      Fred

       

      Stack Trace:

       

      09:39:25,376 INFO  [TomcatDeployment] deploy, ctxPath=/starter

      09:39:25,433 INFO  [RootContainer] Trying to create the portal container 'bres'

      09:39:30,981 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null

      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: com.microsoft.sqlserver.jdbc.SQLServerDriver, url: jdbc:microsoft:sqlserver://WIN32APP01:1433;DatabaseName=bres_jcr)

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)

                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:639)

                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:273)

                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:690)

                at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)

                at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:381)

                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

                at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.openConnection(JDBCConfigurationPersister.java:201)

                at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:132)

                at org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl.<init>(RepositoryServiceConfigurationImpl.java:89)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:321)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

                at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

                at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

                at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)

                at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)

                at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

                at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

                at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

                at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)

                at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)

                at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

                at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

                at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

                at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:350)

                at org.exoplatform.container.CachingContainer.getComponentInstancesOfType(CachingContainer.java:111)

                at org.picocontainer.defaults.LifecycleVisitor.visitContainer(LifecycleVisitor.java:97)

                at org.exoplatform.container.ConcurrentPicoContainer.accept(ConcurrentPicoContainer.java:517)

                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.picocontainer.defaults.AbstractPicoVisitor.traverse(AbstractPicoVisitor.java:32)

                at org.picocontainer.defaults.LifecycleVisitor.traverse(LifecycleVisitor.java:63)

                at org.picocontainer.defaults.LifecycleVisitor.start(LifecycleVisitor.java:113)

                at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:464)

                at org.exoplatform.container.ExoContainer.start(ExoContainer.java:186)

                at org.exoplatform.container.PortalContainer.start(PortalContainer.java:620)

                at org.exoplatform.container.ExoContainer.start(ExoContainer.java:180)

                at org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:357)

                at org.exoplatform.container.RootContainer.createPortalContainers(RootContainer.java:249)

                at org.exoplatform.container.web.PortalContainerCreator.contextInitialized(PortalContainerCreator.java:57)

                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:4389)

                at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:321)

                at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)

                at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                at org.jboss.web.deployers.WebModule.startModule(WebModule.java:122)

                at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                at sun.reflect.GeneratedMethodAccessor320.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                at $Proxy38.start(Unknown Source)

                at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

                at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                at org.jboss.system.ServiceController.start(ServiceController.java:460)

                at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)

                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)

                at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

                at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

                at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)

                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

                at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                at org.jboss.Main.boot(Main.java:221)

                at org.jboss.Main$1.run(Main.java:556)

                at java.lang.Thread.run(Thread.java:680)

      Caused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: com.microsoft.sqlserver.jdbc.SQLServerDriver, url: jdbc:microsoft:sqlserver://WIN32APP01:1433;DatabaseName=bres_jcr

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:492)

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)

                ... 119 more