You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Clemens Wyss <cl...@mysign.ch> on 2010/09/30 20:25:18 UTC

instantiating EmbeddedDriver -> FileNotFoundException

Hi all,
when I try to instantiate the EmbeddedDriver:
...
org.apache.derby.jdbc.EmbeddedDriver driver =
(EmbeddedDriver) Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
...
I get a FileNotFoundException, unfortunately the missing file is not mentioned:

> Thread [main] (Suspended (exception FileNotFoundException))
>        URLClassPath$JarLoader.getJarFile(URL) line: 641
>        URLClassPath$JarLoader.access$600(URLClassPath$JarLoader, URL) line: 538
>        URLClassPath$JarLoader$1.run() line: 605
>        AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
>        URLClassPath$JarLoader.ensureOpen() line: 597
>        URLClassPath$JarLoader.<init>(URL, URLStreamHandler, HashMap) line: 581
>        URLClassPath$JarLoader$3.run() line: 806
>        AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
>        URLClassPath$JarLoader.getResource(String, boolean, Set) line: 802
>        URLClassPath$JarLoader.getResource(String, boolean) line: 762
>        URLClassPath.getResource(String, boolean) line: 168
>        URLClassLoader$1.run() line: 192
>        AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
>        Launcher$AppClassLoader(URLClassLoader).findClass(String) line: 188
>        Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 303
>        Launcher$AppClassLoader.loadClass(String, boolean) line: 301
>        Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 248
>        Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: 316
>        Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
>        Class<T>.forName(String) line: 169
>        FileMonitor(BaseMonitor).getImplementations(Properties, boolean) line: not available
>        FileMonitor(BaseMonitor).getDefaultImplementations() line: not available
>        FileMonitor(BaseMonitor).runWithState(Properties, PrintStream) line: not available
>        FileMonitor.<init>(Properties, PrintStream) line: not available
>        Monitor.startMonitor(Properties, PrintStream) line: not available
>        JDBCBoot.boot(String, PrintStream) line: not available
>        EmbeddedDriver.boot() line: not available
>        EmbeddedDriver.<clinit>() line: not available
>        Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
>        Class<T>.forName(String) line: 169
>        JcrAccess.<init>() line: 27
>        Proj2SlingApp.main(String[]) line: 68
...
What dependencies (jar's) am I possibly missing?
Note: I have derby-10.5.3.0_1.jar (and jackrabbit-standalone-2.1.1.jar) in my classpath...

Any help appreciated
Clemens

RE: instantiating EmbeddedDriver -> FileNotFoundException

Posted by Clemens Wyss <cl...@mysign.ch>.
got it!
Looks like my Eclipse references a derby.jar (whatever plugin) which causes problems when I explicitly reference another derby.jar...
http://www.mail-archive.com/derby-user@db.apache.org/msg05999.html

> -----Original Message-----
> From: Clemens Wyss [mailto:clemensdev@mysign.ch]
> Sent: Thursday, September 30, 2010 9:26 PM
> To: 'Derby Discussion'
> Subject: RE: instantiating EmbeddedDriver -> FileNotFoundException
>
>
> I am running the my app from within Eclipse hence I doubt its
> a typo...
>
> > -----Original Message-----
> > From: Donald McLean [mailto:dmclean62@gmail.com]
> > Sent: Thursday, September 30, 2010 8:44 PM
> > To: Derby Discussion
> > Subject: Re: instantiating EmbeddedDriver -> FileNotFoundException
> >
> >
> > I'm guessing that it's something really aggravating like a
> typo in the
> > classpath.
> >
> > Donald
> >
> > On Thu, Sep 30, 2010 at 2:25 PM, Clemens Wyss
> > <cl...@mysign.ch> wrote:
> > > Hi all,
> > > when I try to instantiate the EmbeddedDriver:
> > > ...
> > > org.apache.derby.jdbc.EmbeddedDriver driver =
> > > (EmbeddedDriver)
> > Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
> > > ...
> > > I get a FileNotFoundException, unfortunately the missing
> > file is not mentioned:
> > >
> > >> Thread [main] (Suspended (exception FileNotFoundException))
> >
>

RE: instantiating EmbeddedDriver -> FileNotFoundException

Posted by Clemens Wyss <cl...@mysign.ch>.
I am running the my app from within Eclipse hence I doubt its a typo...

> -----Original Message-----
> From: Donald McLean [mailto:dmclean62@gmail.com]
> Sent: Thursday, September 30, 2010 8:44 PM
> To: Derby Discussion
> Subject: Re: instantiating EmbeddedDriver -> FileNotFoundException
>
>
> I'm guessing that it's something really aggravating like a typo in the
> classpath.
>
> Donald
>
> On Thu, Sep 30, 2010 at 2:25 PM, Clemens Wyss
> <cl...@mysign.ch> wrote:
> > Hi all,
> > when I try to instantiate the EmbeddedDriver:
> > ...
> > org.apache.derby.jdbc.EmbeddedDriver driver =
> > (EmbeddedDriver)
> Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
> > ...
> > I get a FileNotFoundException, unfortunately the missing
> file is not mentioned:
> >
> >> Thread [main] (Suspended (exception FileNotFoundException))
>

Re: instantiating EmbeddedDriver -> FileNotFoundException

Posted by Donald McLean <dm...@gmail.com>.
I'm guessing that it's something really aggravating like a typo in the
classpath.

Donald

On Thu, Sep 30, 2010 at 2:25 PM, Clemens Wyss <cl...@mysign.ch> wrote:
> Hi all,
> when I try to instantiate the EmbeddedDriver:
> ...
> org.apache.derby.jdbc.EmbeddedDriver driver =
> (EmbeddedDriver) Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
> ...
> I get a FileNotFoundException, unfortunately the missing file is not mentioned:
>
>> Thread [main] (Suspended (exception FileNotFoundException))