facebook

I meet a problem on tomcat 4.1.24 [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #197890 Reply

    leo_wu
    Member

    I downloaded the latest version of myeclipse and tomcat 4.1.24.
    After configration, I added one existing and runnable project, which used sysdeo plugin for tomcat before, into this workbentch.
    I’m sure it is clean. I managed to deploy the project onto tomcat.
    To check if deploying was ok, I started tomcat in the standalone mode and the project seemed ok.
    However, it reported the following information when tomcat started in the workbentch.
    :
    java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path
    params: COM.ibm.db2.jdbc.app.DB2Driver, jdbc:db2:isfa. Please check your username, password and other connectivity info.

    BTW, I used JDO interface to make object persistent.

    Thanks for your reply!

    #197892 Reply

    Scott Anderson
    Participant

    Leo,

    You’ll need to add the directory containing your DB2 driver to the Java library path used to start Tomcat, as has obviously been done in your startup script. This setting is on the Tomcat Paths preference page located at:
    Window > Preferences > MyEclipse > ApplicationServer > Tomcat 4 > Paths.

    –Scott
    MyEclipse Support

    #197893 Reply

    leo_wu
    Member

    Scott,

    I added the -Djava.library.path=”C:\Program Files\SQLLIB\java\db2java.zip” as the JVM arguments and error was same.

    I added the -classpath C:\Program Files\SQLLIB\java\db2java.zip and tomcat couldn’t start.

    I put the zip file to the %tomcat_home%/common/lib/ and %tomcat_home%/server/lib/ and error was still there.

    I was disappointed with it. BTW, I didn’t modify the tomcat’s startup script for including the db2 driver. I just placed it under my web apllication’s lib directory.

    #197894 Reply

    Scott Anderson
    Participant

    Leo,

    I added the -Djava.library.path=”C:\Program Files\SQLLIB\java\db2java.zip” as the JVM arguments and error was same.

    Well, that’s the problem. This modification is incorrect for a couple of reasons. First, you should extend the Java library path using the configuration box we have on the ‘Paths’ configuration page, not by providing an option on the JDK page. In fact, note #2 at the bottom of the JDK page specifically warns against using -Djava.library.path.

    The second reason why this is incorrect is that you don’t need to extend the java library path at all. The java library path is used for specifying the location to look for native libraries. Since your library is a zip, it just needs to be added to the normal Java classpath. You can use the ‘Append to classpath’ section of the ‘Paths’ configuration page to do this.

    But, since the server doesn’t need to know about the drivers you shouldn’t extend the server classpath. You should just do what you did before and place the zip in the WEB-INF/lib directory of your web project. You can just drag it from an Explorer window into the ‘lib’ folder to accomplish this easily. MyEclipse will automatically add the library to your project’s classpath and deploy it when your application is deployed. But don’t forget to remove the setting of -Djava.library.path as this is incorrect and will prevent Tomcat from launching properly. You should also remove it from wherever you copied it out under the Tomcat installation.

    –Scott
    MyEclipse Support

    #197929 Reply

    leo_wu
    Member

    Scott,

    I acted as following steps:

    1.I deleted zip file I added under tomcat’s lib directory.
    2. I removed the JVM argument according to your guideline.
    3. I added the zip driver to the “Paths>Append to classpath”.
    4. I redeployed the project onto tomcat.
    5. Tomcat was started in the workbentch and error was still there.
    BTW, the zip driver was already placed under web-inf/lib/ directory since the project was installed. I never removed it outside.
    I copied a picture of my project’s libs.

    Any other problem? Is there any problem between apache’s poolman and myeclipse?

    #197933 Reply

    leo_wu
    Member

    Scott,

    I have solved the problem.
    I add the %db2_home%/bin directory in the Tomcat 4>Paths>Append to library path.
    Then it starts without errors.

    Thanks for your help.

    #197936 Reply

    Scott Anderson
    Participant

    Leo,

    Great to hear. Of course, now that you’ve got it configured, you might want to try it on Tomcat 5 also so you can see what source-level JSP debugging is like. 😉

    –Scott
    MyEclipse Support

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: I meet a problem on tomcat 4.1.24 [Closed]

You must be logged in to post in the forum log in