You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Rob Brown <li...@gmail.com> on 2009/02/26 18:38:41 UTC

adding jars to classpath

i have written a mailet that accesses a postgresql database.

i modified the james bin/run.bat file to include the jdbc jar file and
the jdbc.drivers setting:

  "%PHOENIX_JAVACMD%" -cp C:/Java/JDBC/postgresql-8.3-603.jdbc4.jar
-Djdbc.drivers=org.postgresql.Driver ...

but i get the exception:

  java.sql.SQLException: No suitable driver found for
jdbc:postgresql://databasehost:5432/testdatabase

when i try to access the database.

how do i add additional classes, jars, etc. to the classpath so that i
can access the jdbc jar?

Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: adding jars to classpath

Posted by Norman Maurer <no...@apache.org>.
Hi Rob,

add custom jars / classes to /path/to/james/apps/james/SAR-INF/lib
(create lib folder if not exist).

Bye,
Norman

2009/2/26 Rob Brown <li...@gmail.com>:
>
> i have written a mailet that accesses a postgresql database.
>
> i modified the james bin/run.bat file to include the jdbc jar file and
> the jdbc.drivers setting:
>
>  "%PHOENIX_JAVACMD%" -cp C:/Java/JDBC/postgresql-8.3-603.jdbc4.jar
> -Djdbc.drivers=org.postgresql.Driver ...
>
> but i get the exception:
>
>  java.sql.SQLException: No suitable driver found for
> jdbc:postgresql://databasehost:5432/testdatabase
>
> when i try to access the database.
>
> how do i add additional classes, jars, etc. to the classpath so that i
> can access the jdbc jar?
>
> Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org