[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Oracle Driver loaded from wrong classloader in OSGi environment sometimes
|
On Tue, 07 Apr 2009 22:19:59 +0200, Shaun Smith <shaun.smith@xxxxxxxxxx>
wrote:
Can you figure out why a different classloader is used if you can debug
into the code?
Indeed I debugged a little further. The actual exception that is thrown
inside EL is
"Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0.1 (Build
20080905)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: E/A-Exception: The Network
Adapter could not establish the connection
Error Code: 17002"
It is caused after the driver manager fails to load the driver and EL
loaded it. The directConnect method fails with this exception.
The XE listener on the VM is running though. The JDBC URL is correct too,
as well as the credentials. Sometimes the connection succeeds and
sometimes it does not.
Any idea what could cause this?
Phil
Shaun
Philipp Kursawe wrote:
On Tue, 07 Apr 2009 20:52:47 +0200, Shaun Smith
<shaun.smith@xxxxxxxxxx> wrote:
I'm not sure how you get variable behavior from the code since the code
path is always the same, however you can also get a "no suitable
driver"
when you do actually find the driver but the database connection
doesn't
work. This is definitely misleading but I have seen it happen when I
haven't started Oracle XE and attempt to run a program. Are you sure
that your database is always available? Perhaps you're out of
connections when you attempt to connect sometimes?
No, the database is running in a VM on my local machine. The
connection is not the problem. I can debug into the code and its a
classloader issue.
The connection to the database is fine.
Phil
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users