problem while installing mysql/connector j dirver

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shivapadma
    New Member
    • Mar 2007
    • 40

    problem while installing mysql/connector j dirver

    i want to access mysql database server from jsp program

    for this i downloaded mysql-connector-java-3.1.14.zip

    mysql-connector-java-3.1.14 folder contains mysql-connector-java-3.1.14-bin.jar
    file.

    then the mysql-connector-java-3.1.14-bin.jar is placed in classpath

    after that,i started tomcat server and executed the jsp program

    but i am gettting the following error
    rootcause: java.lang.Class NotFoundExcepti on: com.mysql.jdbc. Driver

    if any one know how to access mysql database server using
    mysql-connector-java-3.1.14 driver,please explain me....
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    I've moved this over the Java forum, seeing how this is more of a Java problem.

    Comment

    • sukatoa
      Contributor
      • Nov 2007
      • 539

      #3
      Actually(for me), the jarred mysql essential was designed for ready-to-use stand-alone apps, but you can change the settings inside the manifest file....

      Before doing this, please have a back-up copy of the mysql library(jar file)

      Remove the INDEX.LIST

      in the MANIFEST.MF
      Change the Name: common into Name: com/mysql/jdbc/Driver.class

      Add the following below the Name:

      Java-Bean: true

      Please put a new line after the last visible character on MANIFEST.MF
      a must newline... ( I don't know why, maybe because their parser needs it)

      and save it again, i prefer to use WinRAR for this.....

      and put the modified jar file into WEB_INF


      OR

      extract the jar file, copy and save the com folder to WEB_INF/classes directory.

      PLEASE don't forget to RESTART the tomcat server after doing this....

      Hope that helps

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by sukatoa
        Actually(for me), the jarred mysql essential was designed for ready-to-use stand-alone apps, but you can change the settings inside the manifest file....

        [ and there he goes: ripping out valuable organs from the manifest, amputating
        essential information, destroying the precious jar; blood is all over the place ... ]

        Hope that helps
        No it does not; stay away from that .jar file; it is correct as it is. Please first
        read that link I supplied on the classpath before you start operating on that
        poor .jar file.

        kind regards,

        Jos ;-)

        Comment

        • sukatoa
          Contributor
          • Nov 2007
          • 539

          #5
          Originally posted by JosAH
          No it does not; stay away from that .jar file; it is correct as it is. Please first
          read that link I supplied on the classpath before you start operating on that
          poor .jar file.

          kind regards,

          Jos ;-)
          My reply happens before i realized...... If i can only remove my 1st reply here, i will....
          i feel guilt with what ive done here.... :(

          But that is the only way i know before i got the real/proper and exact answer

          regards,
          sukatoa :)

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by sukatoa
            My reply happens before i realized...... If i can only remove my 1st reply here, i will....
            i feel guilt with what ive done here.... :(

            But that is the only way i know before i got the real/proper and exact answer

            regards,
            sukatoa :)
            Ok, because you're so sorry I'll cancel the defenestration festivities ;-)

            kind regards,

            Jos

            Comment

            • shivapadma
              New Member
              • Mar 2007
              • 40

              #7
              after placing the mysql-connector-java-3.1.14-bin.jar file in
              tomcat/webapps/root/web-inf/classes

              my problem is solved i.e.,the program written in jsp is executed

              thanks

              Comment

              Working...