Porblem loading Microsoft JDBC Driver for SQL Server
Hi all !!
Well, it seems there is a naming problem for the MS Driver, when Netbeans creates server resources for the Connection Pool and the DataSource, the default name for the connection pool's datasource classname is com.microsoft.jdbc.sqlserver.SQLServerDataSource, but the actual name of the class within the driver's jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource, note the 'x' after jdbc.
I changed this and the resource is created correctly (from the admin console, it pings to the DB server), but when I try to deploy the project, I get this error:
RAR5038:Unexpected exception while creating resource
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource]
WebModule[/WebApplication2]java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
I guess I must change the name of the classname in some other place, but I searched the admin colsole and Netbeans and failed to find where it should be.
I'm using Netbeans 5.5 and SQL Server 200 with the MS JDBC Driver sp 3.
Thanks in advance,
Daniel
[1667 byte] By [
toffedana] at [2007-11-26 15:09:29]

# 2
Thanks for your answer !!
Yes, the datasource classname is correct in domains.xml.
I had the driver files copied into Appserver/lib, now I placed them also where you suggested me and restarted the server.
Now I get a different error:
LDR5202:Exception in EJBClassLoader
java.io.IOException: The filename, directory or volume label are not valid:
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:396)
at java.io.File.getCanonicalPath(File.java:559)
at com.sun.enterprise.loader.EJBClassLoader$1.run(EJBClassLoader.java:418)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.loader.EJBClassLoader.findResource0(EJBClassLoader.java:391)
at com.sun.enterprise.loader.EJBClassLoader.findResource(EJBClassLoader.java:467)
at java.lang.ClassLoader.getResource(ClassLoader.java:977)
at java.lang.ClassLoader.getResource(ClassLoader.java:972)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
at com.sun.enterprise.loader.EJBClassLoader.getResourceAsStream(EJBClassLoader.java:782)
at com.sun.xml.rpc.spi.JaxRpcObjectFactory.newInstance(JaxRpcObjectFactory.java:131)
at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.<init>(JaxRpcRICodegen.java:120)
at com.sun.enterprise.webservice.codegen.JaxRpcCodegenFactory.getAdapter(JaxRpcCodegenFactory.java:50)
at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:839)
at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:580)
at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:413)
at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:226)
at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:1189)
at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:179)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
I guess it may have something to do with any of the classpathes, there is a system or environment CP, one for the App server (with prefixes, suffixes, etc, and there is another in the Netbeans IDE tools Options....
I also tried to debug into java.io.WinNTFileSystem.canonicalize0(Native Method) just to see the name of the file who raised the exception, but I couldn't attach the BPEL debugger, it gives me this error:
11:57:24 Connecting to localhost:3343
11:57:24 Unable to start a debug session : Unable to connect to localhost:3343 : Connection refused: connect
I'm using a proxy but the system settings are set to not use the proxy for localhost addresses and so is netbeans.
How much I miss the simplicity of the old Turbo Pascal days !!
Thanks for your help !!
Daniel