Re: Classpath for MSSQLServer JDBC Driver
Re: Classpath for MSSQLServer JDBC Driver
- Subject: Re: Classpath for MSSQLServer JDBC Driver
- From: Jonathan Rochkind <email@hidden>
- Date: Tue, 27 May 2003 11:26:46 -0500
At 01:25 PM 5/23/2003 +0100, Jonathan Fleming wrote:
I don't know if it makes a difference, but this errorr message was thrown
up by the EOModeler App when I tried to set the URL
Woah, EOModeler, now I get it. Okay, see, this is a big pain in the
ass. You are on Windows, right? Okay, on Windows, EOModeler doesn't use
Java 1.3, and in fact is written with frameworks that are equivelent to OLD
(4.5) versions of WO. That's why the error message you were getting
reminded me of older versions of WO, because EOModeler on Windows, throwing
it, is in fact kind of like an older version of WO.
In general, to get EOModeler to recognize and use your JDBC driver, you need:
1) A Java 1.1.3 compatible JDBC Driver, since EOModeler operates in a
1.1.3 world. (Some people use TWO versions of their JDBC Driver, a 1.1.3
one for EOModeler, and a 1.3 one for the actual deployed app)
2) To put the JDBC Driver (or the 1.1.3 version of it) in some special
place where EOModeler will find it. I forget how you do this because....
I gave up on getting EOModeler to actually use my JDBC Driver. Partially
because getting a 1.1.3 version of my desired JDBC Driver would have
required paying them extra for it, so I said forget it. So, my EOModeler
just doesn't use my JDBC Driver. It throws up an error message from time to
time, but I just ignore it and I can still use EOModeler to edit my models,
and everything still works fine at runtime. Alas, the features of EOModeler
that require talking to the db (schema synchornization, data browsing)
don't work of course. I also sometimes need to set the connection
dictionary by hand with the inspector in EOModeler, rather than use
EOModelers custom dialogs for doing that. Because with the actual adaptor
info dialogs, EOModeler refuses to make the change because of the errors it
gets trying to use the JDBC Driver which it doesn't have. This is kind of
a pain, but also ends up working fine at actual runtime.
Hope this helps,
--Jonathan
Wait, that error message looks suspicious. You're not using WO 5.2, are
you?
Yes absolutly in fact WO5.2.1
Sorry, the
thing where you could just drop jars in that directory was new in 5.2.
I'm not sure what the
reccomended way to do it with other versions is; it was always confusing
to me too.
On Fri, 23 May 2003 00:28:30 +0100 "Jonathan Fleming" wrote:
> Ummm, Jonathan something hasn't worked...
> I'm getting the error below after using the given URL
> where Silver-Back is the local machine running SQLServer2000 and
> DevBoxSQLServer is the instance name...
>
> jdbc:microsoft:sqlserver://Silver-Back\\DevBoxSQLServer
>
> JDBC connection failed for driver
> :'com.microsoft.jdbc.sqlserver.SQLServerDriver'. Driver not found in Java
> Runtime! Please verify your CLASSPATH environment variable. The current
> CLASSPATH for your application is :
>
C:\Apple\Library\Frameworks\JDBCEOAdaptor.framework\Resources\Java\.;c:\usr\FrontBas
e\Java\frontbasejdbc.jar;c:\usr\FrontBase\Java\FrontBasePlugIn.jar;/Library/Java;C:/Apple/
Local/Library/Java;C:/Apple/Library/Java;C:/Apple/Library/JDK/lib/classes.zip;C:/Apple/Libr
ary/Frameworks/JavaVM.framework/Classes/awt.jar;C:/Apple/Library/JDK/lib/swingall.jar
>
> I have tried the .jar files in --
> C:\Apple\Local\Library\WebObjects\Extensions
> and also in --
> C:\Apple\Library\Frameworks\JDBCEOAdaptor.framework\Resources\Java\
>
> but nothing... got any idea where or what I'm doing wrong?
>
> Jonathan
>
>
> >From: Jonathan Rochkind <email@hidden>
> >To: "Jonathan Fleming" <email@hidden>,
> >email@hidden, email@hidden
> >Subject: Re: Classpath for MSSQLServer JDBC Driver
> >Date: Thu, 22 May 2003 15:03:20 -0500
> >
> >Yes, it has worked for me to just put my JDBC .jar files in that
> directory.
> >
> >It was not neccesary to set my environmental CLASSPATH to anything
> at all.
> >You shouldn't have to, and probably should not. Instead, put all
> those JAR
> >files in that directory... and the WOBootstrap architecture will
> find them
> >there and make sure they are included in the CLASSPATH sent to the
> launched
> >Java app, even though they are not included in your environmental
> >classpath.
> >
> >--Jonathan
> >
> >At 08:40 PM 5/22/2003 +0100, Jonathan Fleming wrote:
> >>I've installed MS SQL Server 2000 and have the JDBC .jar files that
> need
> >>to be used in classpath, since I am using WO5.2 can I simply copy these
> >>into the C:\Apple\Local\Library\WebObjects\Extensions directory?
> >>
> >>The documentation says: Set your system CLASSPATH to include the
> following
> >>entries,
> >>where install_dir is the path to your SQL Server 2000 Driver for
> >>JDBC installation directory:
> >>install_dir/lib/msbase.jar
> >>install_dir/lib/msutil.jar
> >>install_dir/lib/mssqlserver.jar
> >>I'm using Windows 2000, this is the Windows Example
> >>CLASSPATH=.;c:\Microsoft SQL Server 2000 Driver for
> >>JDBC\lib\msbase.jar;c:\Microsoft SQL Server 2000 Driver for
> >>JDBC\lib\msutil.jar;c:\Microsoft SQL Server 2000 Driver for JDBC
> >>\lib\mssqlserver.jar
> >>
> >>Just conforming. Once this is done I should be able to connect using my
> >>EOModel with something like this:
> >>jdbc:microsoft:sqlserver://server_name:1433
> >>For example, to specify a connection URL that includes the user
> >>ID "username" and the password "secret":
> >>Connection conn = DriverManager.getConnection
> >>("jdbc:microsoft:sqlserver://server1:1433","username","secret");
> >>
> >>Thanks for any help
> >>Jonathan
> >>
> >>_________________________________________________________________
> >>Express yourself with cool emoticons - download MSN Messenger today!
> >>http://www.msn.co.uk/messenger
> >>
> >>_______________________________________________
> >>WebObjects-dev mailing list
> >>email@hidden
> >>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
> >
>
> _________________________________________________________________
> Stay in touch with absent friends - get MSN Messenger
> http://www.msn.co.uk/messenger
>
_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.