Hi all !
I'm Marco a university student from Naples. For my thesis i'm developing a
webapplication using tomee... i have the following problem:

This is my contex.xml file:

<Context antiJARLocking="true" 
         path="/priscaxorchestra" 
         reloadable="true" 
         sessionCookieName="NapleSquareSessionCookie">

    <Resource auth="Container" name="jdbc/mysqlnaplesquare" 
              singleton="true"
              driverClassName="com.mysql.jdbc.Driver"
              defaultAutoCommit="false"
              removeAbandoned="true"
              removeAbandonedTimeout="180"
              commitOnReturn="true"
              type="javax.sql.DataSource"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              maxActive="100" initialSize="10"
              testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
              maxIdle="100" minIdle="5" maxWait="30000"
              testOnBorrow="true" testOnReturn="false"
              validationQuery="SELECT 1"
              validationInterval="60000"
              closeMethod="close"
              username="USER"
              password="PSWD"
              url="jdbc:mysql://localhost:3306/naplesquareDB" />
    
    <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.DataSourceRealm"
               userTable="users" userNameCol="nickname"
userCredCol="password"
               userRoleTable="users" roleNameCol="role" 
               localDataSource="true" dataSourceName="jdbc/mysqlnaplesquare"
/>
    </Realm>
</Context>

This is my web.xml:
<web>

... Servlet stuff and security constraint....

<resource-ref>
        <description>DB Connection</description>
        <res-ref-name>jdbc/mysqlnaplesquare</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

</web>

I have configured a form authentication login... but when i'll try to login
i get the following exception:
Dec 04, 2013 1:20:57 PM org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name "module/Object" not found.
        at
org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:197)
        at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:151)
        at
org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:126)
        at
org.apache.openejb.core.ivm.naming.IntraVmJndiReference.getObject(IntraVmJndiReference.java:43)
        at
org.apache.openejb.core.ivm.naming.Reference.getContent(Reference.java:40)
        at
org.apache.xbean.naming.reference.SimpleReference$SimpleObjectFactory.getObjectInstance(SimpleReference.java:137)
        at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
        at 
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:394)
        at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:285)
        at
org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:146)
        at
org.apache.catalina.realm.LockOutRealm.authenticate(LockOutRealm.java:180)
        at
org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:146)
        at org.apache.tomee.catalina.TomEERealm.authenticate(TomEERealm.java:43)
        at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:296)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:450)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)


It seems that it could not find the Resource that i have defined...
(jdbc/mysqlnaplesquare2)... 
Could you help me ?



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Context-xml-Realms-and-JNDI-tp4666548.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to