-
1. Re: Sybase datasource connection failure
wdfink Apr 28, 2015 1:30 PM (in response to sharmamanish3)Did you see that the driver is installed within the server.log?
How your complete datasource definition look like?
Maybe you try to use it as a module, see this doc https://developer.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_module
-
2. Re: Sybase datasource connection failure
sharmamanish3 Apr 29, 2015 11:41 AM (in response to wdfink)Using JBoss EAP 6.4.0.GA to connect to Sybase 12.5.
Connection Jar file -> jconn3.jar
Note: As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar
I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.
--------------------------------------------------------
1. Created an empty temporary directory.
2. Create a "META-INF" subdirectory.
3. Create a "META-INF/services" subdirectory.
4. Create a "META-INF/services/java.sql.Driver"
Added text in java.sql.Driver as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1--------------------------------------------------------
Using Winrar added the META-INF/services/java.sql.Driver into jconn3.jar file.
Created a module.xml file in directory [modules\com\sybaseDS\sybase\main]:
----------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybaseDriver">
<resources>
<resource-root path="jconn3.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
In standalone.xml file added below text
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="sybaseDriver" module="com.sybaseDS.sybaseDriver"/>
</drivers>----------------------------------------------------------------------------------------------------------------
On restarting the JBOSS in standalone mode it gave below text in logs
16:27:59,429 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 27) JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]) - failure description: "JBAS010441: Failed to load module for driver [com.sybaseDS.sybaseDriver]"Many thanks in advance for any guidance to resolve above issue. Already spent 2 days but no luck.
Never thought Datasource set-up wil be so time consuming in JBOSS :-)
-
3. Re: Sybase datasource connection failure
jaysensharma Apr 29, 2015 2:16 PM (in response to sharmamanish3)You mentioned that you created directory as [modules\com\sybaseDS\sybase\main]
So ideally your module name should be something like following:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybase"> <!-- NOT: com.sybaseDS.sybaseDriver -->
<resources>
<resource-root path="jconn3.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>Can you try the same to see if it works?
-
4. Re: Sybase datasource connection failure
sharmamanish3 Apr 30, 2015 5:07 AM (in response to jaysensharma)Now I get the below error
With above change I got below error
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found
------------------------------------------------------------------------------------------------------------------------------------------------
So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver
Now i got below error
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found
As mentioned earlier - As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar
I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.
How can I be sure about the value to be placed in file java.sql.Driver file
Many thanks
Manish
-
5. Re: Sybase datasource connection failure
sharmamanish3 Apr 30, 2015 5:08 AM (in response to jaysensharma)Now I get the below error
With above change I got below error
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found
------------------------------------------------------------------------------------------------------------------------------------------------
So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver
Now i got below error
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found
As mentioned earlier - As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar
I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.
How can I be sure about the value to be placed in file java.sql.Driver file
Many thanks
Manish
-
6. Re: Sybase datasource connection failure
sharmamanish3 Apr 30, 2015 5:10 AM (in response to jaysensharma)Now I get the below error
With above change I got below error
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found
------------------------------------------------------------------------------------------------------------------------------------------------
So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver
Now i got below error
JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "sybaseDriver")
]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found
As mentioned earlier - As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar
I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.
How can I be sure about the value to be placed in file java.sql.Driver file
Many thanks
Manish
-
7. Re: Sybase datasource connection failure
wdfink Apr 30, 2015 7:23 AM (in response to sharmamanish3)Did you change the datasource to use the module according to the wiki page Installing_a_JDBC_driver_as_a_module section Defining the DataSource itself?
If you have problems you might attach the server configuration and the module.xml
-
8. Re: Sybase datasource connection failure
sharmamanish3 May 5, 2015 12:35 PM (in response to wdfink)Many thanks.