Subject Re: Problems finding error messages
Author ben_ata
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy" > The
following code is used to load error messages:
>
> InputStream in = GDSException.class.getResourceAsStream(res);
>
> if (in == null) {
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> in = cl.getResourceAsStream(res);
> }
>
> if (in != null)
> messages.load(in);
>
> It is relatively standard way to manually load resources. Please specify
> your deployment environment (web/application server, where
firebirdsql*.jar
> files are located, if possible, what classloader loads the driver, etc.)

I'm using it from within a Swing application. The actual driver is
loaded dynamically at runtime using an URLClassLoader:

Class drvClass = this.classLoader.loadClass(this.driverClass);
Driver driverClassInstance = (Driver)drvClass.newInstance();

Then I call connect() on the obtained instance..

Regards
Thomas