I finally got Jetty 6 JDBC Authentication Realms to work with Derby.
Problem was that Derby rejects the SQL produced by Jetty during the roles-for-user SQL request.
ERROR 42818: Comparisons between 'INTEGER' and 'CHAR' are not supported..
I have created a Jira entry for this. See
http://jira.codehaus.org/browse/JETTY-175.
While I'm at it, setting up a JNDI DataSource in Jetty for Derby works as follows:
<New id="mydatasource" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/DerbyDS</Arg>
<Arg>
<New class="org.apache.derby.jdbc.ClientConnectionPoolDataSource">
<Set name="DatabaseName">YourDatabaseName</Set>
<Set name="ServerName">localhost</Set>
<Set name="PortNumber">1527</Set>
<Set name="User">username</Set>
<Set name="Password">password</Set>
</New>
</Arg>
</New>
with access to it via
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/DerbyDS");
as usual. ClientConnectionPoolDataSource is the DataSource driver that connects to a derby server via TCP/IP.
Make sure to put this fragment in either WEB-INF/context.xml of your WebApp or one of the etc/yoursite.xml
XML configuration files that you include in the jetty start command. Also make sure to include etc/jetty-plus.xml to get the JNDI stuff working.
Back to main page. Back to software page.
| This page was last changed on November 15th, 2006. © Matthias Gärtner 2006 | |