# Classpath Issue

**URL:** <https://www.ruby-forum.com/t/classpath-issue/159891>\
**Category:** Rails\
**Created:** [February 9, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/classpath-issue/159891 "2009-02-09T20:33:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganeshk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7cd45c/32.png) [@ganeshk](https://www.ruby-forum.com/u/ganeshk)\
**Post date:** [February 9, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/classpath-issue/159891/1 "2009-02-09T20:33:05Z")

</div>

I am new to Ruby/RoR and would appreciate any help on the issue I am  
trying to resolve far past 2 days.

I have a java application as a jar and I have included in the controller  
as below.

require ‘java’  
require ‘C:/Documents and Settings/user/Desktop/application.jar’

include\_package ‘whatever.something’

After that I am calling a method from one of the classes in the jar.

puts Java::WhateverSomething::Engine.helloWorld()

This helloWorld() program does a very complex thing 🙂 and returns an id  
string that I am trying to display in the console. This external  
application has a call to the DB.

I have the driver jar in the application.jar. Also, I have included in  
the RoR java runtime library and all places I can think of but still I  
am getting the ‘Class Not Found’ exception. Can someone point what I am  
doing wrong?

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)  
…  
java.sql.SQLException: No suitable driver  
at java.sql.DriverManager.getConnection(DriverManager.java:545)  
at java.sql.DriverManager.getConnection(DriverManager.java:171)  
…

Thanks.
