Home » Eclipse Projects » Eclipse Platform » ClassNotFoundException with new .jar - but old one works???
ClassNotFoundException with new .jar - but old one works??? [message #290105] |
Thu, 18 August 2005 11:57  |
Eclipse User |
|
|
|
Originally posted by: dbt.acwanet.com
I have a couple of applications that load SQL connectors to transfer
data from a DB2 database to a MySQL database. I created one several
months ago that works fine. But now, when I try to create a new one, I
get a ClassNotFoundException on my Class.forName("<dbdriver>") line.
The drivers are in the same folder as the jar that is created, so that
shouldn't be the issue. What's odd is that I can take the jar that I
created several months ago, and it runs fine. I then take the same code
(absolutely no changes), create a new jar, and it bombs. I'm fairly new
to Java and Eclipse, so I'm not sure where to start.
I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go back
to 3.0 and create a simple test program, it has the same problem.
Any ideas? Where do I even start?
|
|
|
Re: ClassNotFoundException with new .jar - but old one works??? [message #290108 is a reply to message #290105] |
Thu, 18 August 2005 12:14   |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"DBT" <dbt@acwanet.com> wrote in message
news:de2b77$ks1$1@news.eclipse.org...
>I have a couple of applications that load SQL connectors to transfer data
>from a DB2 database to a MySQL database. I created one several months ago
>that works fine. But now, when I try to create a new one, I get a
>ClassNotFoundException on my Class.forName("<dbdriver>") line. The drivers
>are in the same folder as the jar that is created, so that shouldn't be the
>issue. What's odd is that I can take the jar that I created several months
>ago, and it runs fine. I then take the same code (absolutely no changes),
>create a new jar, and it bombs. I'm fairly new to Java and Eclipse, so I'm
>not sure where to start.
>
> I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go back to
> 3.0 and create a simple test program, it has the same problem.
>
> Any ideas? Where do I even start?
In the plugin.xml editor, go to the Runtime tab and make sure the driver
jars are in the plugin classpath.
---
Sunil
|
|
|
Re: ClassNotFoundException with new .jar - but old one works??? [message #290140 is a reply to message #290108] |
Thu, 18 August 2005 20:04   |
Eclipse User |
|
|
|
Originally posted by: dbt.acwanet.com
Sunil Kamath wrote:
> "DBT" <dbt@acwanet.com> wrote in message
> news:de2b77$ks1$1@news.eclipse.org...
>
>>I have a couple of applications that load SQL connectors to transfer data
>
>>from a DB2 database to a MySQL database. I created one several months ago
>
>>that works fine. But now, when I try to create a new one, I get a
>>ClassNotFoundException on my Class.forName("<dbdriver>") line. The drivers
>>are in the same folder as the jar that is created, so that shouldn't be the
>>issue. What's odd is that I can take the jar that I created several months
>>ago, and it runs fine. I then take the same code (absolutely no changes),
>>create a new jar, and it bombs. I'm fairly new to Java and Eclipse, so I'm
>>not sure where to start.
>>
>>I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go back to
>>3.0 and create a simple test program, it has the same problem.
>>
>>Any ideas? Where do I even start?
>
>
> In the plugin.xml editor, go to the Runtime tab and make sure the driver
> jars are in the plugin classpath.
> ---
> Sunil
>
>
I can't find anything like that for this project. I've seen that for an
RCP application, but this is just a simple class that has no user interface.
I should also mention though, that I can run the programs from within
Eclipse and they run fine. I have the sql connector jars in the
libraries of the project properties - Java Build Path. And those jars
are the exact same path as where I put the final jar that I create.
|
|
|
Re: ClassNotFoundException with new .jar - but old one works??? [message #290147 is a reply to message #290140] |
Thu, 18 August 2005 21:01   |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
DBT wrote:
> Sunil Kamath wrote:
>
>> "DBT" <dbt@acwanet.com> wrote in message
>> news:de2b77$ks1$1@news.eclipse.org...
>>
>>> I have a couple of applications that load SQL connectors to transfer
>>> data
>>
>>
>>> from a DB2 database to a MySQL database. I created one several
>>> months ago
>>
>>
>>> that works fine. But now, when I try to create a new one, I get a
>>> ClassNotFoundException on my Class.forName("<dbdriver>") line. The
>>> drivers are in the same folder as the jar that is created, so that
>>> shouldn't be the issue. What's odd is that I can take the jar that I
>>> created several months ago, and it runs fine. I then take the same
>>> code (absolutely no changes), create a new jar, and it bombs. I'm
>>> fairly new to Java and Eclipse, so I'm not sure where to start.
>>>
>>> I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go
>>> back to 3.0 and create a simple test program, it has the same problem.
>>>
>>> Any ideas? Where do I even start?
>>
>>
>>
>> In the plugin.xml editor, go to the Runtime tab and make sure the
>> driver jars are in the plugin classpath.
>> ---
>> Sunil
>>
> I can't find anything like that for this project. I've seen that for an
> RCP application, but this is just a simple class that has no user
> interface.
>
> I should also mention though, that I can run the programs from within
> Eclipse and they run fine. I have the sql connector jars in the
> libraries of the project properties - Java Build Path. And those jars
> are the exact same path as where I put the final jar that I create.
Is the jar file that contains the dbdriver classes on the runtime
classpath. Check in your Launch Config (Run->Run... menu)
|
|
|
Re: ClassNotFoundException with new .jar - but old one works??? [message #290273 is a reply to message #290147] |
Mon, 22 August 2005 12:23   |
Eclipse User |
|
|
|
Originally posted by: dbt.acwanet.com
David Wegener wrote:
> DBT wrote:
>
>> Sunil Kamath wrote:
>>
>>> "DBT" <dbt@acwanet.com> wrote in message
>>> news:de2b77$ks1$1@news.eclipse.org...
>>>
>>>> I have a couple of applications that load SQL connectors to transfer
>>>> data
>>>
>>>
>>>
>>>> from a DB2 database to a MySQL database. I created one several
>>>> months ago
>>>
>>>
>>>
>>>> that works fine. But now, when I try to create a new one, I get a
>>>> ClassNotFoundException on my Class.forName("<dbdriver>") line. The
>>>> drivers are in the same folder as the jar that is created, so that
>>>> shouldn't be the issue. What's odd is that I can take the jar that
>>>> I created several months ago, and it runs fine. I then take the
>>>> same code (absolutely no changes), create a new jar, and it bombs.
>>>> I'm fairly new to Java and Eclipse, so I'm not sure where to start.
>>>>
>>>> I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go
>>>> back to 3.0 and create a simple test program, it has the same problem.
>>>>
>>>> Any ideas? Where do I even start?
>>>
>>>
>>>
>>>
>>> In the plugin.xml editor, go to the Runtime tab and make sure the
>>> driver jars are in the plugin classpath.
>>> ---
>>> Sunil
>>>
>> I can't find anything like that for this project. I've seen that for
>> an RCP application, but this is just a simple class that has no user
>> interface.
>>
>> I should also mention though, that I can run the programs from within
>> Eclipse and they run fine. I have the sql connector jars in the
>> libraries of the project properties - Java Build Path. And those jars
>> are the exact same path as where I put the final jar that I create.
>
>
> Is the jar file that contains the dbdriver classes on the runtime
> classpath. Check in your Launch Config (Run->Run... menu)
Yes, they are there.
|
|
|
Re: ClassNotFoundException with new .jar - but old one works??? (Got it figured out) [message #290485 is a reply to message #290147] |
Thu, 25 August 2005 13:14  |
Eclipse User |
|
|
|
Originally posted by: dbt.acwanet.com
David Wegener wrote:
> DBT wrote:
>
>> Sunil Kamath wrote:
>>
>>> "DBT" <dbt@acwanet.com> wrote in message
>>> news:de2b77$ks1$1@news.eclipse.org...
>>>
>>>> I have a couple of applications that load SQL connectors to transfer
>>>> data
>>>
>>>
>>>
>>>> from a DB2 database to a MySQL database. I created one several
>>>> months ago
>>>
>>>
>>>
>>>> that works fine. But now, when I try to create a new one, I get a
>>>> ClassNotFoundException on my Class.forName("<dbdriver>") line. The
>>>> drivers are in the same folder as the jar that is created, so that
>>>> shouldn't be the issue. What's odd is that I can take the jar that
>>>> I created several months ago, and it runs fine. I then take the
>>>> same code (absolutely no changes), create a new jar, and it bombs.
>>>> I'm fairly new to Java and Eclipse, so I'm not sure where to start.
>>>>
>>>> I had done an upgrade from Eclipse 3.0 to 3.1, but even when I go
>>>> back to 3.0 and create a simple test program, it has the same problem.
>>>>
>>>> Any ideas? Where do I even start?
>>>
>>>
>>>
>>>
>>> In the plugin.xml editor, go to the Runtime tab and make sure the
>>> driver jars are in the plugin classpath.
>>> ---
>>> Sunil
>>>
>> I can't find anything like that for this project. I've seen that for
>> an RCP application, but this is just a simple class that has no user
>> interface.
>>
>> I should also mention though, that I can run the programs from within
>> Eclipse and they run fine. I have the sql connector jars in the
>> libraries of the project properties - Java Build Path. And those jars
>> are the exact same path as where I put the final jar that I create.
>
>
> Is the jar file that contains the dbdriver classes on the runtime
> classpath. Check in your Launch Config (Run->Run... menu)
As it turns out, I didn't know (or remember) to manually edit the
manifest file and put the Class-Path line in there. I don't remember
having to do that before, but being new to Java, and not having done it
for a while, I don't remember for sure.
|
|
|
Goto Forum:
Current Time: Thu Jul 10 02:15:30 EDT 2025
Powered by FUDForum. Page generated in 0.08312 seconds
|