ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Interchange Server + Adapters » JDBC ODA

Post new topic  Reply to topic
 JDBC ODA « View previous topic :: View next topic » 
Author Message
voyager
PostPosted: Fri Mar 16, 2007 5:51 am    Post subject: JDBC ODA Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 127

All,
Thank you all for your assistance on the previous posts.
Previously, I have used Data Direct JDBC drivers provided by IBM to connect to
SQL Server database and for JDBC ODA. I wanted to switch to Microsoft JDBC driver now.
So, I have downloaded MS JDBC driver from
http://www.microsoft.com/downloads/details.aspx?FamilyID=07287b11-0502-461a-b138-2aa54bfdc03a&DisplayLang=en

I copied mssqlserver.jar, msbase.jar and msutil.jar to CROSSWORLDS\lib folder.
By the way, this is on a Windows 2003 OS. I tried to connect to SQL server 2000 DB
by configuring JDBC ODA with the following info:
UserName: xxxx
Password: zzzzz
DatabaseURL: jdbc:microsoft:sqlserver://<DatabaseServerName>:1433;DatabaseName=XXXXX;SelectMethod=cursor;

DatabaseDriver: com.microsoft.jdbc.sqlserver.SQLServerDriver
I get the following error:

Error in call core.SetAgentProperties: Unable to establish connection to Database. The specified driver class
Quote:
com.microsoft.jdbc.sqlserver.SQLServerDriver
could not be found.

Obviously, it is not classpath problem.

Here is my start_JDBCODA.bat:
REM set AGENTNAME=JDBCODA
REM set AGENT="%CROSSWORLDS%"\ODA\JDBC\JDBCOda.jar
REM set JCLASSES="%CROSSWORLDS%"\lib\rt.jar;"%CROSSWORLDS%"\lib\vbjorb.jar;"%CROSSWORLDS%"\lib\xwutil.jar;"%CROSSWORLDS%"\lib\xwbase.jar;"%CROSSWORLDS%"\lib\xwsqlserver.jar;"%CROSSWORLDS%"\lib\jt400.jar;"%CROSSWORLDS%"\lib\spy\lib\spy.jar;"%CROSSWORLDS%"\lib\xerces.jar;"%CROSSWORLDS%"\lib\jdom.jar;"%CROSSWORLDS%"\ODA\JDBCODA\JDBCODA.jar;"%CROSSWORLDS%"\lib\CwODK.jar;"%CROSSWORLDS%"\lib\classes12_01.zip;"%CROSSWORLDS%"\lib\CrossWorlds.jar
REM set AGENTCLASS=com.crossworlds.oda.jdbcoda.JDBCOda


setlocal
REM IF WBIA_RUNTIME is set use ODK Runtime scripts

if "%WBIA_RUNTIME%"=="" goto CROSSWORLDS
REM Invoke the CWODAENV.bat
call "%WBIA_RUNTIME%"\bin\CWODAEnv

goto LAUNCH

:CROSSWORLDS
REM Invoke the CWODAENV.bat
call "%CROSSWORLDS%"\bin\CWODAEnv

:LAUNCH

set AGENTNAME=JDBCODA
set AGENT="%CROSSWORLDS%"\ODA\JDBC\JDBCODA.jar
set AGENTCLASS=com.crossworlds.oda.jdbcoda.JDBCOda


REM Modify this Driver path to point to the specific driver you want to use.
REM set DRIVERPATH="%CROSSWORLDS%"\lib\xwutil.jar;"%CROSSWORLDS%"\lib\xwbase.jar;"%CROSSWORLDS%"\lib\xwsqlserver.jar;"%CROSSWORLDS%"\lib\jt400.jar;"%CROSSWORLDS%"\lib\xworacle.jar;"%CROSSWORLDS%"\lib\spy\lib\spy.jar
REM set DRIVERPATH="%MICROSOFT%"\lib\msutil.jar;"%MICROSOFT%"\lib\msbase.jar;"%MICROSOFT%"\lib\mssqlserver.jar;"%CROSSWORLDS%"\lib\jt400.jar;"%CROSSWORLDS%"\lib\xworacle.jar;"%CROSSWORLDS%"\lib\spy\lib\spy.jar
set DRIVERPATH="%CROSSWORLDS%"\lib\msutil.jar;"%CROSSWORLDS%"\lib\msbase.jar;"%CROSSWORLDS%"\lib\mssqlserver.jar;"%CROSSWORLDS%"\lib\jt400.jar;"%CROSSWORLDS%"\lib\xworacle.jar;"%CROSSWORLDS%"\lib\spy\lib\spy.jar


REM Modify DRIVERLIB path to point to the specific driver dll libraries you want to use.
REM set DRIVERLIB=C:\Program Files\SQLLIB\bin
REM set DRIVERLIB=
set DRIVERLIB="%CROSSWORLDS%"\lib


set JCLASSES=%JCLASSES%;%AGENT%;%DRIVERPATH%
set JLIBRARIES="%CROSSWORLDS%"\bin;%DRIVERLIB%

REM Start the Object Discovery Agent
%CWJAVA% -Duser.home="%CROSSWORLDS%" -Djava.library.path=%JLIBRARIES% -mx128m %ORB_DEP% -classpath %JCLASSES% com.crossworlds.ODKInfrastructure.%CONNECTION% -l%AGENTNAME% -c%AGENTCLASS%

endlocal
pause

I appreciate your help to resolve this issue.
Thank you all!
_________________
voyager
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Mar 16, 2007 12:21 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
Obviously, it is not classpath problem.

Obviously it is CLASSPATH problem
Back to top
View user's profile Send private message Send e-mail Visit poster's website
voyager
PostPosted: Fri Mar 16, 2007 1:20 pm    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 127

It seems to be a classpath problem. But, it is not because I have the driverpath included in my classpath.
Thanks!
_________________
voyager
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Mar 16, 2007 1:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

voyager wrote:
It seems to be a classpath problem. But, it is not because I have the driverpath included in my classpath.


so is it working now? if yes, what was the problem?
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
voyager
PostPosted: Sat Mar 17, 2007 7:09 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 127

It is still not working. I am working on it...
Thanks!
_________________
voyager
Back to top
View user's profile Send private message
Il_Ciclone
PostPosted: Wed Mar 21, 2007 8:01 am    Post subject: Reply with quote

Novice

Joined: 21 Mar 2007
Posts: 24

I use the "Microsoft SQL Server 2005 JDBC Driver" driver

pointing out the sqljdbc.jar explicitly in the %DRIVERPATH% in startODA.bat

my DB URL is: jdbc:sqlserver://<hostname>:<port>;databaseName=<dbname>
with JDBC driverclass com.microsoft.sqlserver.jdbc.SQLServerDriver

noted that you class was not the same. typo?
Back to top
View user's profile Send private message
voyager
PostPosted: Tue Mar 27, 2007 6:48 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 127

This is for MS SQL Server 2000 and not for MS SQL Server 2005:
jdbc:microsoft:sqlserver://<DatabaseServerName>:1433;DatabaseName=XXXXX;


DatabaseDriver: com.microsoft.jdbc.sqlserver.SQLServerDriver

For "Microsoft SQL Server 2005 JDBC Driver" driver:

jdbc:sqlserver://<hostname>:<port>;databaseName=<dbname>
with JDBC driverclass com.microsoft.sqlserver.jdbc.SQLServerDriver

For some reason, MS has changed the URLs and DatabaseDriver in SQL Server 2005.

Thanks!
_________________
voyager
Back to top
View user's profile Send private message
voyager
PostPosted: Tue Mar 27, 2007 6:50 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 127

All,
Thanks for your valuable comments. This is working now.
I have included the DRIVERPATH in the CLASSPATH.
Thank you!
_________________
voyager
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Interchange Server + Adapters » JDBC ODA
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.