You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by mahu2425 <ma...@lycos.de> on 2006/09/22 07:46:33 UTC

Creating SQL security realm fails in 1.1.1

Hi,

I tried to create an SQL security realm in Geronimo 1.1.1 using the wizard, but in opposite to Geronimo 1.0 it fails. Maybe this might be a bug

In the last step where I can test the new ream I'll always get the result "Login failed". The logfile (geronimo.log) says:


07:33:15,193 WARN  [SecurityRealmPortlet] Testing with options {dataSourceName=testpool, dataSourceApplication=null, org.apache.geronimo.security.realm.GenericSecurityRealm.CLASSLOADER=[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=geronimo/webconsole-jetty_standard.war/1.1.1/car], groupSelect=select userid, groupname from groups where userid=?, userSelect=select userid, password from users where userid=?}
07:34:19,159 WARN  [SecurityRealmPortlet] Test login failed
javax.security.auth.login.LoginException: SQL error
	at org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:238)
	at org.apache.geronimo.console.util.KernelManagementHelper.testLoginModule(KernelManagementHelper.java:414)
	at org.apache.geronimo.console.util.PortletManager.testLoginModule(PortletManager.java:159)
	at org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.actionAttemptLogin(SecurityRealmPortlet.java:316)
	at org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.processAction(SecurityRealmPortlet.java:200)
	at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
	at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
	at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
	at org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104)
	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
	at org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
	at org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59)
	at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
	at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
	at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
	at org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
	at org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
	at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
	at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
	at org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104)
	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
	at org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
	at org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: SQL Exception: Failed to start database 'testdb', see the next exception for details.
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
	at org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDriverMCF.java:96)
	at org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCDriverMCF.java:73)
	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41)
	at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
	at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63)
	at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73)
	at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47)
	at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86)
	at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
	at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
	at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
	at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61)
	at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56)
	at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:54)
	at $javax.sql.DataSource$$EnhancerByCGLIB$$2a52535c.getConnection(<generated>)
	at org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:175)
	... 43 more




I created the security realm in the following way (to reproduce the error):

1. Create a new database called testdb, create and fill tables for users
and groups.
SQL statements:

create table users (
userid varchar(15) primary key,
password varchar(15),
username varchar(20)
);
create table groups (
userid varchar(15),
groupname varchar(20),
primary key (userid, groupname)
);
insert into users values ('admin', 'password', 'Administrator');
insert into groups values ('admin', 'AdminGroup');


2. Create Database pool (Database Pools -> Using the Geronimo database pool
wizard)

Step 1
- Name: testpool
- Database type: Derby embedded
Step 2:
- JDBC Driver (pre defined value): org.apache.derby.jdbc.EmbeddedDriver
- Driver JAR: org.apache.derby/derby/10.1.1.0/jar
- Database: testdb
Step 3:
JDBC connect url (pre defined): jdbc:derby:testdb



3. Create Security Realm (Security Realms -> Add new security realm)
Step 1:
- Name of realm: testrealm
- Realm type: Database (SQL) Realm
Step 2:
- User select SQL: select userid, password from users where userid=?
- Group select: select userid, groupname from groups where userid=?
- Database pool: testpool
Step 3:
- Leave all unchecked an press "Test a login"


You'll get the error after entering username and password..

Has anybody an idea what's going wrong? I had a similar problem in Geronimo 1.1 which was a bug. But JIRA says it should be fixed in 1.1.1.


Best regards,

Markus

Stelle Deine Fragen bei Lycos iQ -  http://iq.lycos.de/qa/ask/

Re: Creating SQL security realm fails in 1.1.1

Posted by Peter Petersson <pe...@pmb.mine.nu>.
I had the same problem but find a pointer somware telling me to save the 
plan and use the command line deploy tool and It worked fine.

Cheers
   Peter

Lasantha Ranaweera skrev:
> Hi Markus,
>
> Yeah I have seen this problem in several times with Derby database in 
> Windows environment. I couldn't produce this problem in a Linux 
> environment. This happens when try to access the DB pool as soon as it 
> deployed. If you restart the server and do the testing it will work. 
> This might be a problem in Derby database class loading according to 
> David Jenks. Have a look at,
>
> http://www.mail-archive.com/user@geronimo.apache.org/msg03881.html
>
> It did work for me sometime back. :-)
>
> Thanks,
> Lasantha Ranaweera
>
> mahu2425 wrote:
>> Hi,
>>
>> I tried to create an SQL security realm in Geronimo 1.1.1 using the 
>> wizard, but in opposite to Geronimo 1.0 it fails. Maybe this might be 
>> a bug
>>
>> In the last step where I can test the new ream I'll always get the 
>> result "Login failed". The logfile (geronimo.log) says:
>>
>>
>> 07:33:15,193 WARN  [SecurityRealmPortlet] Testing with options 
>> {dataSourceName=testpool, dataSourceApplication=null, 
>> org.apache.geronimo.security.realm.GenericSecurityRealm.CLASSLOADER=[org.apache.geronimo.kernel.classloader.JarFileClassLoader 
>> id=geronimo/webconsole-jetty_standard.war/1.1.1/car], 
>> groupSelect=select userid, groupname from groups where userid=?, 
>> userSelect=select userid, password from users where userid=?}
>> 07:34:19,159 WARN  [SecurityRealmPortlet] Test login failed
>> javax.security.auth.login.LoginException: SQL error
>>     at 
>> org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:238) 
>>
>>     at 
>> org.apache.geronimo.console.util.KernelManagementHelper.testLoginModule(KernelManagementHelper.java:414) 
>>
>>     at 
>> org.apache.geronimo.console.util.PortletManager.testLoginModule(PortletManager.java:159) 
>>
>>     at 
>> org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.actionAttemptLogin(SecurityRealmPortlet.java:316) 
>>
>>     at 
>> org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.processAction(SecurityRealmPortlet.java:200) 
>>
>>     at 
>> org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
>>     at 
>> org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>     at 
>> org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
>>     at 
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
>>     at 
>> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104) 
>>
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) 
>>
>>     at 
>> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) 
>>
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) 
>>
>>     at 
>> org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59) 
>>
>>     at 
>> org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
>>     at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
>>     at 
>> org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120) 
>>
>>     at 
>> org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68) 
>>
>>     at 
>> org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164) 
>>
>>     at 
>> org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82) 
>>
>>     at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>     at 
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
>>     at 
>> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104) 
>>
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) 
>>
>>     at 
>> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) 
>>
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) 
>>
>>     at 
>> org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59) 
>>
>>     at 
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
>>     at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>>     at 
>> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) 
>>
>>     at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>>     at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>>     at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
>>     at 
>> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
>>     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>>     at 
>> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) 
>>
>>     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>>     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>> Caused by: SQL Exception: Failed to start database 'testdb', see the 
>> next exception for details.
>>     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown 
>> Source)
>>     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown 
>> Source)
>>     at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
>> Source)
>>     at 
>> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown 
>> Source)
>>     at 
>> org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
>>     at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>>     at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown 
>> Source)
>>     at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown 
>> Source)
>>     at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>     at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
>>     at 
>> org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDriverMCF.java:96) 
>>
>>     at 
>> org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCDriverMCF.java:73) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66) 
>>
>>     at 
>> org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61) 
>>
>>     at 
>> org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56)
>>     at 
>> $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)
>>     at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
>>     at 
>> org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:54) 
>>
>>     at 
>> $javax.sql.DataSource$$EnhancerByCGLIB$$2a52535c.getConnection(<generated>) 
>>
>>     at 
>> org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:175) 
>>
>>     ... 43 more
>>
>>
>>
>>
>> I created the security realm in the following way (to reproduce the 
>> error):
>>
>> 1. Create a new database called testdb, create and fill tables for users
>> and groups.
>> SQL statements:
>>
>> create table users (
>> userid varchar(15) primary key,
>> password varchar(15),
>> username varchar(20)
>> );
>> create table groups (
>> userid varchar(15),
>> groupname varchar(20),
>> primary key (userid, groupname)
>> );
>> insert into users values ('admin', 'password', 'Administrator');
>> insert into groups values ('admin', 'AdminGroup');
>>
>>
>> 2. Create Database pool (Database Pools -> Using the Geronimo 
>> database pool
>> wizard)
>>
>> Step 1
>> - Name: testpool
>> - Database type: Derby embedded
>> Step 2:
>> - JDBC Driver (pre defined value): org.apache.derby.jdbc.EmbeddedDriver
>> - Driver JAR: org.apache.derby/derby/10.1.1.0/jar
>> - Database: testdb
>> Step 3:
>> JDBC connect url (pre defined): jdbc:derby:testdb
>>
>>
>>
>> 3. Create Security Realm (Security Realms -> Add new security realm)
>> Step 1:
>> - Name of realm: testrealm
>> - Realm type: Database (SQL) Realm
>> Step 2:
>> - User select SQL: select userid, password from users where userid=?
>> - Group select: select userid, groupname from groups where userid=?
>> - Database pool: testpool
>> Step 3:
>> - Leave all unchecked an press "Test a login"
>>
>>
>> You'll get the error after entering username and password..
>>
>> Has anybody an idea what's going wrong? I had a similar problem in 
>> Geronimo 1.1 which was a bug. But JIRA says it should be fixed in 1.1.1.
>>
>>
>> Best regards,
>>
>> Markus
>>
>> Stelle Deine Fragen bei Lycos iQ -  http://iq.lycos.de/qa/ask/
>

Re: Creating SQL security realm fails in 1.1.1

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Hi Markus,

Yeah I have seen this problem in several times with Derby database in 
Windows environment. I couldn't produce this problem in a Linux 
environment. This happens when try to access the DB pool as soon as it 
deployed. If you restart the server and do the testing it will work. 
This might be a problem in Derby database class loading according to 
David Jenks. Have a look at,

http://www.mail-archive.com/user@geronimo.apache.org/msg03881.html

It did work for me sometime back. :-)

Thanks,
Lasantha Ranaweera

mahu2425 wrote:
> Hi,
>
> I tried to create an SQL security realm in Geronimo 1.1.1 using the wizard, but in opposite to Geronimo 1.0 it fails. Maybe this might be a bug
>
> In the last step where I can test the new ream I'll always get the result "Login failed". The logfile (geronimo.log) says:
>
>
> 07:33:15,193 WARN  [SecurityRealmPortlet] Testing with options {dataSourceName=testpool, dataSourceApplication=null, org.apache.geronimo.security.realm.GenericSecurityRealm.CLASSLOADER=[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=geronimo/webconsole-jetty_standard.war/1.1.1/car], groupSelect=select userid, groupname from groups where userid=?, userSelect=select userid, password from users where userid=?}
> 07:34:19,159 WARN  [SecurityRealmPortlet] Test login failed
> javax.security.auth.login.LoginException: SQL error
> 	at org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:238)
> 	at org.apache.geronimo.console.util.KernelManagementHelper.testLoginModule(KernelManagementHelper.java:414)
> 	at org.apache.geronimo.console.util.PortletManager.testLoginModule(PortletManager.java:159)
> 	at org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.actionAttemptLogin(SecurityRealmPortlet.java:316)
> 	at org.apache.geronimo.console.securitymanager.realm.SecurityRealmPortlet.processAction(SecurityRealmPortlet.java:200)
> 	at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
> 	at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> 	at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
> 	at org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
> 	at org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
> 	at org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59)
> 	at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
> 	at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
> 	at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
> 	at org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
> 	at org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
> 	at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
> 	at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
> 	at org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:104)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
> 	at org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
> 	at org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:59)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> 	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> 	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> 	at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> 	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
> 	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
> 	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> 	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> 	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> Caused by: SQL Exception: Failed to start database 'testdb', see the next exception for details.
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
> 	at org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDriverMCF.java:96)
> 	at org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCDriverMCF.java:73)
> 	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41)
> 	at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
> 	at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63)
> 	at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73)
> 	at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47)
> 	at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86)
> 	at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
> 	at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
> 	at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
> 	at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61)
> 	at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56)
> 	at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)
> 	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
> 	at org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:54)
> 	at $javax.sql.DataSource$$EnhancerByCGLIB$$2a52535c.getConnection(<generated>)
> 	at org.apache.geronimo.security.realm.providers.SQLLoginModule.login(SQLLoginModule.java:175)
> 	... 43 more
>
>
>
>
> I created the security realm in the following way (to reproduce the error):
>
> 1. Create a new database called testdb, create and fill tables for users
> and groups.
> SQL statements:
>
> create table users (
> userid varchar(15) primary key,
> password varchar(15),
> username varchar(20)
> );
> create table groups (
> userid varchar(15),
> groupname varchar(20),
> primary key (userid, groupname)
> );
> insert into users values ('admin', 'password', 'Administrator');
> insert into groups values ('admin', 'AdminGroup');
>
>
> 2. Create Database pool (Database Pools -> Using the Geronimo database pool
> wizard)
>
> Step 1
> - Name: testpool
> - Database type: Derby embedded
> Step 2:
> - JDBC Driver (pre defined value): org.apache.derby.jdbc.EmbeddedDriver
> - Driver JAR: org.apache.derby/derby/10.1.1.0/jar
> - Database: testdb
> Step 3:
> JDBC connect url (pre defined): jdbc:derby:testdb
>
>
>
> 3. Create Security Realm (Security Realms -> Add new security realm)
> Step 1:
> - Name of realm: testrealm
> - Realm type: Database (SQL) Realm
> Step 2:
> - User select SQL: select userid, password from users where userid=?
> - Group select: select userid, groupname from groups where userid=?
> - Database pool: testpool
> Step 3:
> - Leave all unchecked an press "Test a login"
>
>
> You'll get the error after entering username and password..
>
> Has anybody an idea what's going wrong? I had a similar problem in Geronimo 1.1 which was a bug. But JIRA says it should be fixed in 1.1.1.
>
>
> Best regards,
>
> Markus
>
> Stelle Deine Fragen bei Lycos iQ -  http://iq.lycos.de/qa/ask/