facebook

weblogic jdbc classpath problem

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

    joa23
    Member

    Thanks a lot for helping me with my last issue.
    May you can help me now as well and tell me what I’m doing wrong.

    Finaly i got weblogic 8.1. on my eclpise 3.0 final, latest myeclipse relaease installed.
    However I need a jdbc connection to mysql so i add the mysql jdbc jar in the classpath in the Weblogic / Path setup.
    I added the jar file to the ‘Append to classpath’ section.

    However until weblogic startup I got this error:

    eblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: org.gjt.mm.mysql.Driver

    Any idea what I may doing wrong?

    Thanks a lot!
    Stefan

    #212047 Reply

    Scott Anderson
    Participant

    Stefan,

    There are really a couple of things this could be. First, database connections are created by weblogic itself, not by your application per se since they are a pooled resource. To create your database connection properly, you need to start weblogic and then use the weblogic console to configure your database connection before you can access it in your application. Please see the BEA documentation on how to do this properly for MySQL. Second, many database drivers also provide native libraries, in addition to the jar, for speed. If that is the case for MySQL on your platform, you’ll also need to add the directory containing the native library to the ‘Append to library path’ section of the connection configuration also. However, I don’t believe this is the case with MySQL.

    To get you going, here’s an article that walks you through the process:
    http://www.javacoding.net/articles/technical/mysql-bea-wl.html

    #212049 Reply

    joa23
    Member

    Scott, thanks for your fast replay. In case I start my weblogic from shell the datasource is well running.
    As you described i setuped the datasource by using the web console.
    In case I try this as again when I started the weblogic from myeclipse I just get the information that the jdbc is not in the class path.
    I do it like illustrated here:
    http://www.myeclipseide.com/images/tutorials/WebLogic_Setup.html

    Thanks for your support!
    Stefan

    #212050 Reply

    Scott Anderson
    Participant

    Stefan,

    Two things to check. First, please be sure that the driver is in the jar you’re including on the classpath, and that no other jars are needed as well. Second, please be sure that you’re really adding the jar in the “Append to Classpath” area and *not* in the “Append to Library Path” area. Also, are you adding any other jars, or just this one? And finally, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #212055 Reply

    joa23
    Member

    Scott,

    I checked that the
    1.) that the jdbc drive class is in the jar.
    2.) I added to “Append to Classpath”
    3.) Since the jddbc connection work when start from shell I guess there are no other jars required.

    What operating system and version are you running?
    OS X 10.3.4
    What Eclipse version and build id are you using? (Help > About Eclipse Platform)
    Version: 3.0.0
    Build id: 200406251208
    – Was Eclipse freshly installed for MyEclipse?
    no.
    – If not, was it upgraded to its current version using the update manager?
    yes, there are no new updates
    – Are any other external plugins installed?
    jbosside is installed as well.
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    8
    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
    Version: 3.7.200
    Build id: 200407091200-3.8-Beta2
    What JDK version are you using to run Eclipse? (java -version)
    java version “1.4.2_03”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-117.1)
    Java HotSpot(TM) Client VM (build 1.4.2-34, mixed mode)
    What JDK version are you using to launch your application server?
    see above
    What steps did you take that resulted in the issue?
    configure and start weblogic
    What application server are you using?
    weblogic 8.1.
    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
    no only a exception in the console of weblogi “MySQL JDBC Connection Pool” deployment failed with the following error: Cannot load driver class: org.gjt.mm.mysql.Driver.>

    Thanks for your help!

    #212057 Reply

    Scott Anderson
    Participant

    Stefan,

    I believe the problem you’re experiencing is a bug in 3.8 beta 2. There was an issue with preservation of the drive component in the path for classpath additions that I think would make the path invalid on Mac OS/X. Basically, it only worked on Windows with the default drive setup. Version 3.8 GA will be available today or tomorrow at the latest so I’d suggest just waiting for it and doing a clean install of it to fix the issue.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: weblogic jdbc classpath problem

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