-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Urban Widmark wrote:
>
> On Sat, 4 Sep 1999, Raimee Stevens wrote:
>
> > > The dll has to be in whatever search path NT uses for dlls (the PATH
> > > variable? I think the db2 installation sets that).
> > Not which path NT uses, but which path the vm uses. The DriverManager
>
> The vm process tells NT to load the dll for it, right? So where does NT go
> looking for that dll? (and I think it uses the PATH variable of the
> calling process).
I would agree. So up to now I think it is safe to say that the driver
IS being loaded(in fact both the net and app drv.),
And it appears that both drivers are being registered.
---(from setLogStream of Driver Mgr. class)
registerDriver:
driver[className=COM.ibm.db2.jdbc.app.DB2Driver,COM.ibm.db2.jdbc.app.DB2Driver@e39d4957]
registerDriver:
driver[className=COM.ibm.db2.jdbc.net.DB2Driver,COM.ibm.db2.jdbc.net.DB2Driver@3d54957]
---
getConnection returning
driver[className=COM.ibm.db2.jdbc.net.DB2Driver,COM.ibm.db2.jdbc.net.DB2Driver@3d54957]
This line suggests that a connection was tried but I can't say that a
conn. object was created.
And more importantly, I can't say which driver made the connection.
I have however traced the connection through DB2. And indeed I am
making a connection.
Until I inspect the trace file more closely, I can't say what is
missing.
> > This is documented in an IBM Quick Book as
> > //required for trusted applets. The connection to the app driver
> > _alone_ fails for some reason but waorks when
> > //drivers both are registered.
>
> Eh, required?
http://www.software.ibm.com/cgi-bin/db2www/library/document.d2w/report?uid=UNKNOWN&pwd=&search_type=SIMPLE&r_host=&last_page=list.d2w&fn=JMER-3PCRZX
STRANGE!!
> I assume that a trusted applet could use the app driver, but
> if the app driver requires the net driver then IBM has a very funny design
> (the whole point of the app driver, as I see it, is to avoid going through
> the "applet server"). A trusted applet could use either (or both, if
> connecting twice), but required sounds wrong.
>
> The app driver does require that the client machine (the one the applet &
> webbbrowser is running on) has a working, native db2 client setup (eg has
> installed the client application enabler or is the same as the server).
>
> As I read the above it does not connect using the app driver, it connects
> using the net driver. Try without the app driver, that should work too.
But it is the app driver that I need, right?
> The driver used is controlled by the url used in the getConnection call.
> If you use an url like this you will always use the net driver:
> jdbc:db2://elderlyone:6790/DBTTR
>
> an app url looks like this:
> jdbc:db2:DBTTR
>
> I'm confused by your talk about trusted applets, I thought it was the
> servlet that couldn't connect to the database.
Yes, well I was confused as well, and still am. There is next to NO
documentation about servlets on the
IBM side, and little DB2 talk on the JServ side. So, I constructed my
url for the wrong driver.
Now, since rewriting url, my db2trace file is repleat with driver
connection, Application Init and other
statements that verify that I am getting a connection. I don't know
where the ouput is going! BUT COME HELL OR HIGH WATER!!!
I do know that until I explicitley register the net Driver, I can't
connect. And when I do connect, (evidence in
the db2 trace output), I'm not even running the db2jstr applet server.
> > mod_jserv.log:
> > ajp11: Servlet Error: GET is not supported by this URL
> >
> > now what does this mean?
>
> What url have you used? The jserv process listens to some port (8007), if
> you connect with your browser to http://machine.net:8007/... you will get
> this error message. You contact the servlet by going through the normal
> webserver, http://machine.net/name-of-the-servlet-mount-point/FooServlet
>
> The setup is something like this (using :xxx to denote port numbers)
>
> browser --> :80 apache/mod_jserv --> :8007 JServ java process
> ajp11 is the protocol between mod_jserv and the java process.
>
> /Urban
Sorry, I still don't see your point. I use the JServ default
config.(ajpll:8007), and connect
to the servlet as with any other html form based GET request:
ACTION="http://192.168.1.1/name-of-the-servlet-mount-point/testDB2"
METHOD=GET
I perform driver registration in my init() and connections from
doGet().
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]