Topic
  • 3 replies
  • Latest Post - ‏2012-01-06T14:27:50Z by Forrest_Xia
thustle1
thustle1
2 Posts

Pinned topic WASCE 3.0.0 Database Pool Wizard error with MS SQLServer

‏2012-01-05T10:33:39Z |
Hi,

I am having a problem creating a datasource using the SQL Server JDBC driver (version 3, but it seems to happen on all versions) on WASCE 3.0.0.0 on Windows.

I put the sqljdbc4.jar driver in the repository (at com/microsoft/sqlserver/sqljdbc4/3.0/sqljdbc4-3.0.jar) and go through the wizard to create the database pool. At the end, I clicked on Test and the test result shows:

Test Result: Connected toMicrosoft SQL Server 9.00.5057

All looks good until I click on Deploy, then I get the following:

Deployer operation failed: start of console.dbpool/testDB/1.0/car failed
org.apache.geronimo.kernel.config.LifecycleException: start of console.dbpool/testDB/1.0/car failed
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:718)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:681)
at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exception
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:523)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:226)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:702)
... 3 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Configuration console.dbpool/testDB/1.0/car failed to start due to the following reasons:
The service J2EEApplication=null,JCAConnectionFactory=testDB,JCAResource=tranql-connector-ra-1.7,ResourceAdapter=tranql-connector-ra-1.7,ResourceAdapterModule=console.dbpool/testDB/1.0/car,j2eeType=JCAManagedConnectionFactory,name=testDB did not start because Unable to load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
javax.resource.spi.InvalidPropertyException: Unable to load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.tranql.connector.jdbc.JDBCDriverMCF.setDriver(JDBCDriverMCF.java:154)
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.apache.geronimo.gbean.DynamicGBeanDelegate$Operation.invoke(DynamicGBeanDelegate.java:232)
at org.apache.geronimo.gbean.DynamicGBeanDelegate.setAttribute(DynamicGBeanDelegate.java:176)
at org.apache.geronimo.connector.wrapper.outbound.ManagedConnectionFactoryWrapper.setAttribute(ManagedConnectionFactoryWrapper.java:209)
at org.apache.geronimo.gbean.runtime.GBeanAttribute$DynamicSetterMethodInvoker.invoke(GBeanAttribute.java:419)
at org.apache.geronimo.gbean.runtime.GBeanAttribute.setValue(GBeanAttribute.java:392)
at org.apache.geronimo.gbean.runtime.GBeanAttribute.inject(GBeanAttribute.java:426)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:990)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:271)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:127)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:569)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:386)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:462)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:226)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:702)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:681)
at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.tranql.connector.jdbc.JDBCDriverMCF.loadClass(JDBCDriverMCF.java:321)
at org.tranql.connector.jdbc.JDBCDriverMCF.setDriver(JDBCDriverMCF.java:151)
... 22 more

I don't understand why it can't find the driver class now (the connection test seemed to work fine). Has anyone seen this before or know how to get round this?

Many thanks in advance,
Dave
Updated on 2012-01-06T14:27:50Z at 2012-01-06T14:27:50Z by Forrest_Xia
  • Forrest_Xia
    Forrest_Xia
    82 Posts

    Re: WASCE 3.0.0 Database Pool Wizard error with MS SQLServer

    ‏2012-01-06T07:18:43Z  
    1. How you put sqljdbc4.jar into the repository? manually copy it there? or install it via admin console interface?

    2. Can you post the plan content here when you click "show plan" button instead of "Deploy" button?

    CE 3.0.0.0 is transforming to OSGi world, which requires every functional jar as a OSGi bundle.

    Regrards, Forrest
  • thustle1
    thustle1
    2 Posts

    Re: WASCE 3.0.0 Database Pool Wizard error with MS SQLServer

    ‏2012-01-06T10:21:26Z  
    1. How you put sqljdbc4.jar into the repository? manually copy it there? or install it via admin console interface?

    2. Can you post the plan content here when you click "show plan" button instead of "Deploy" button?

    CE 3.0.0.0 is transforming to OSGi world, which requires every functional jar as a OSGi bundle.

    Regrards, Forrest
    Hi,

    I have tried manually copying the jar file into the repository and also adding it to the repository via the console. Either way I get the same issue.

    Here's my generated deployment plan:

    <?xml version="1.0" encoding="UTF-8"?>
    <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <dep:moduleId>
    <dep:groupId>console.dbpool</dep:groupId>
    <dep:artifactId>testDB_71</dep:artifactId>
    <dep:version>1.0</dep:version>
    <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
    <dep:dependency>
    <dep:groupId>com.microsoft.sqlserver</dep:groupId>
    <dep:artifactId>sqljdbc4</dep:artifactId>
    <dep:version>3.0</dep:version>
    <dep:type>jar</dep:type>
    </dep:dependency>
    </dep:dependencies>
    </dep:environment>
    <resourceadapter>
    <outbound-resourceadapter>
    <connection-definition>
    <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
    <connectiondefinition-instance>
    <name>testDB</name>
    <config-property-setting name="Driver">com.microsoft.sqlserver.jdbc.SQLServerDriver</config-property-setting>
    <config-property-setting name="Password">password</config-property-setting>
    <config-property-setting name="UserName">sa</config-property-setting>
    <config-property-setting name="ConnectionURL">jdbc:sqlserver://localhost:1433;DatabaseName=TestDB</config-property-setting>
    <connectionmanager>
    <local-transaction/>
    <single-pool>
    <max-size>10</max-size>
    <min-size>0</min-size>
    <match-one/>
    </single-pool>
    </connectionmanager>
    </connectiondefinition-instance>
    </connection-definition>
    </outbound-resourceadapter>
    </resourceadapter>
    </connector>

    Thanks,
    Dave
  • Forrest_Xia
    Forrest_Xia
    82 Posts

    Re: WASCE 3.0.0 Database Pool Wizard error with MS SQLServer

    ‏2012-01-06T14:27:50Z  
    • thustle1
    • ‏2012-01-06T10:21:26Z
    Hi,

    I have tried manually copying the jar file into the repository and also adding it to the repository via the console. Either way I get the same issue.

    Here's my generated deployment plan:

    <?xml version="1.0" encoding="UTF-8"?>
    <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <dep:moduleId>
    <dep:groupId>console.dbpool</dep:groupId>
    <dep:artifactId>testDB_71</dep:artifactId>
    <dep:version>1.0</dep:version>
    <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
    <dep:dependency>
    <dep:groupId>com.microsoft.sqlserver</dep:groupId>
    <dep:artifactId>sqljdbc4</dep:artifactId>
    <dep:version>3.0</dep:version>
    <dep:type>jar</dep:type>
    </dep:dependency>
    </dep:dependencies>
    </dep:environment>
    <resourceadapter>
    <outbound-resourceadapter>
    <connection-definition>
    <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
    <connectiondefinition-instance>
    <name>testDB</name>
    <config-property-setting name="Driver">com.microsoft.sqlserver.jdbc.SQLServerDriver</config-property-setting>
    <config-property-setting name="Password">password</config-property-setting>
    <config-property-setting name="UserName">sa</config-property-setting>
    <config-property-setting name="ConnectionURL">jdbc:sqlserver://localhost:1433;DatabaseName=TestDB</config-property-setting>
    <connectionmanager>
    <local-transaction/>
    <single-pool>
    <max-size>10</max-size>
    <min-size>0</min-size>
    <match-one/>
    </single-pool>
    </connectionmanager>
    </connectiondefinition-instance>
    </connection-definition>
    </outbound-resourceadapter>
    </resourceadapter>
    </connector>

    Thanks,
    Dave
    Can you try sqlserver 2005 XA when selecting "Database Type"?

    Type "SQL Server" has bug, can you help open a jira in https://issues.apache.org/jira/browse/GERONIMO? thank you!

    Forrest