0 Replies Latest reply on Nov 11, 2006 5:17 AM by mrbahr

    Tomcat and Login Realm

    mrbahr
      Hi All,

      I am trying to configure a tomcat user realm and set the authentication to use the container managed realm. I set up the tomcat config.xml to have the following realm:

      <Realm className="org.apache.catalina.realm.JDBCRealm"
      driverName="oracle.jdbc.driver.OracleDriver"
      connectionURL="jdbc:oracle:thin:@tpglaptop:1521:XE"
      connectionName="xxxxxyyyyy" connectionPassword="xxxxxx"
      userTable="userMaster" userNameCol="userName" userCredCol="password"
      userRoleTable="realmRole" roleNameCol="roleName" />

      In the flex services-config.xml I uncommented out the line:

      <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>

      Then in my flex app, I issue the following command:

      service.setCredentials(login,password);

      On the server, I get the following error:

      Throwable in RtmpReader thread: java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      at flex.messaging.security.TomcatLoginCommand.doAuthentication(TomcatLoginCommand.java:46)
      at flex.messaging.security.LoginManager.login(LoginManager.java:138)
      at flex.messaging.services.AuthenticationService.decodeAndLogin(AuthenticationService.java:8 8)
      at flex.messaging.services.AuthenticationService.serviceCommand(AuthenticationService.java:6 1)
      at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java:622)
      at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:298)
      at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java: 682)
      at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665 )
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPo olExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolEx ecutor.java:690)
      at java.lang.Thread.run(Thread.java:595)
      Throwable in RtmpReader thread: java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      at flex.messaging.security.TomcatLoginCommand.doAuthentication(TomcatLoginCommand.java:46)
      at flex.messaging.security.LoginManager.login(LoginManager.java:138)
      at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java: 608)
      at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665 )
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPo olExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolEx ecutor.java:690)
      at java.lang.Thread.run(Thread.java:595)
      Throwable in RtmpReader thread: java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      java.lang.NoClassDefFoundError: flex/messaging/security/TomcatLoginHolder
      at flex.messaging.security.TomcatLoginCommand.doAuthentication(TomcatLoginCommand.java:46)
      at flex.messaging.security.LoginManager.login(LoginManager.java:138)
      at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java: 608)
      at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665 )
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPo olExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolEx ecutor.java:690)
      at java.lang.Thread.run(Thread.java:595)

      I've been looking through the different flex jars and can't find that object. Any idea why its looking for it and where I would find it. Any thoughts. Have I forgotten something in the cofiguration?

      Thanks for your help.

      Tom