0 Replies Latest reply on Nov 7, 2002 7:37 AM by Jordan Thomas

    Could not find security-domain with MySQL

    Jordan Thomas Newbie

      Hi,

      I am getting an error that I just can not seem to work out. What I am trying to do is simply deploy my ejb's into JBoss using mySql as my DS. I am getting an error which says:

      org.jboss.deployment.DeploymentException: Could not find the security-domain specified for this container, name=MySqlDbRealm;

      Clearly this means that jboss is not finding my security-domain however I can not see any problems with my .xml files. Is there something that I am doing wrong? What could be causing this problem? Below are pieces of my xml code.

      thanks for your help

      Jordan

      -----------------------------
      jboss.xml
      -----------------------------



      <security-domain>MySqlDbRealm</security-domain>
      <unauthenticated-principal>root</unauthenticated-principal>
      ....


      -----------------------------
      jbosscmp-jdbc.xml
      -----------------------------
      <jbosscmp-jdbc>

      java:/MySqlDS
      <datasource-mapping>mySQL</datasource-mapping>
      <preferred-relation-mapping>relation-table</preferred-relation-mapping>

      ...
      </jbosscmp-jdbc>

      -----------------------------
      login-conf.xml
      -----------------------------
      ...
      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">root</module-option>
      <module-option name = "userName">root</module-option>
      <module-option name = "password">root</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
      </login-module>

      </application-policy>
      ...


      -----------------------------
      mysql-service.xml
      -----------------------------



      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->


      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      MySqlDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://jot-pc/scoop_ejb</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">root</config-property>
      <config-property name="Password" type="java.lang.String">root</config-property>



      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper




      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager
      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer