[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: JBoss AS 4.2.0 with MySQL

fmi2 do-not-reply at jboss.com
Tue Aug 14 22:27:48 EDT 2007


Hi I am having the same deployment error, but I have the right file name and I think I have taken all the required steps as suggested in the documentation/posts/articles etc that I have read.

These are the configuration files that I have

Jboss-web.xml in my WEB-INF

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" 
  | 		"http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
  | <jboss-web>
  | 	<security-domain>java:/jaas/surveytool</security-domain>
  | </jboss-web>
  | 

mysql-ds.xml in jboss-4.2.0.GA/sever/tomcat/deploy

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!-- $Id: mysql-ds.xml 41016 2006-02-07 14:23:00Z acoliver $ -->
  | <!--  Datasource config for MySQL using 3.0.9 available from:
  | http://www.mysql.com/downloads/api-jdbc-stable.html
  | -->
  | 
  | <datasources> 
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDS</jndi-name>
  |     <connection-url>jdbc:mysql://localhost:3306/surveytool</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>fatimot</user-name>
  |     <password>s</password>
  |     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
  |     <!-- should only be used on drivers after 3.22.1 with "ping" support
  |     <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
  |     -->
  |     <!-- sql to call when connection is created
  |     <new-connection-sql>some arbitrary sql</new-connection-sql>
  |       -->
  |     <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
  |     <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
  |       -->
  | 
  |     <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |   </local-tx-datasource>
  | </datasources>
  | 

login-confing.xml 

  | <?xml version='1.0'?>
  | <!DOCTYPE policy PUBLIC
  |       "-//JBoss//DTD JBOSS Security Config 3.0//EN"
  |       "http://www.jboss.org/j2ee/dtd/security_config.dtd">
  | 
  | <!-- The XML based JAAS login configuration read by the
  | org.jboss.security.auth.login.XMLLoginConfig mbean. Add
  | an application-policy element for each security domain.
  | 
  | The outline of the application-policy is:
  | <application-policy name="security-domain-name">
  |   <authentication>
  |     <login-module code="login.module1.class.name" flag="control_flag">
  |       <module-option name = "option1-name">option1-value</module-option>
  |       <module-option name = "option2-name">option2-value</module-option>
  |       ...
  |     </login-module>
  | 
  |     <login-module code="login.module2.class.name" flag="control_flag">
  |       ...
  |     </login-module>
  |     ...
  |   </authentication>
  | </application-policy>
  | 
  | -->
  | 
  |  
  | 
  | 
  | <policy>
  |     <!-- Used by clients within the application server VM such as
  |     mbeans and servlets that access EJBs.
  |     -->
  |     <application-policy name = "client-login">
  |        <authentication>
  |           <login-module code = "org.jboss.security.ClientLoginModule"
  |              flag = "required">
  |              <!-- Any existing security context will be restored on logout -->
  |              <module-option name="restore-login-identity">true</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  | 	 <!-- Security domain for Surveytool -->
  |     <application-policy name = "surveytool">
  |        <authentication>
  |           <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
  |              flag = "required">
  |              <module-option name = "unauthenticatedIdentity">guest</module-option>
  |              <module-option name = "dsJndiName">java:/MySqlDS</module-option>
  |              <module-option name = "principalsQuery">SELECT PASSWORD FROM USERS WHERE USERID=?</module-option>
  |              <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM USER_ROLES WHERE USERID=?</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  |     
  |     <!-- Security domain for JBossMQ -->
  |     <application-policy name = "jbossmq">
  |        <authentication>
  |           <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
  |              flag = "required">
  |              <module-option name = "unauthenticatedIdentity">guest</module-option>
  |              <module-option name = "dsJndiName">java:/$datasourceName</module-option>
  |              <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
  |              <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  |     <!-- Security domain for JBossMQ when using file-state-service.xml
  |     <application-policy name = "jbossmq">
  |        <authentication>
  |           <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
  |              flag = "required">
  |              <module-option name = "unauthenticatedIdentity">guest</module-option>
  |              <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  |     -->
  | 
  |     <!-- Security domains for testing new jca framework -->
  |     <application-policy name = "HsqlDbRealm">
  |        <authentication>
  |           <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
  |              flag = "required">
  |              <module-option name = "principal">sa</module-option>
  |              <module-option name = "userName">sa</module-option>
  |              <module-option name = "password"></module-option>
  |              <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=$datasourceName</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  |     <application-policy name = "JmsXARealm">
  |        <authentication>
  |           <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
  |              flag = "required">
  |              <module-option name = "principal">guest</module-option>
  |              <module-option name = "userName">guest</module-option>
  |              <module-option name = "password">guest</module-option>
  |              <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  |     <!-- A template configuration for the jmx-console web application. This
  |       defaults to the UsersRolesLoginModule the same as other and should be
  |       changed to a stronger authentication mechanism as required.
  |     -->
  |     <application-policy name = "jmx-console">
  |        <authentication>
  |           <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
  |              flag = "required">
  |            <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
  |            <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  |     <!-- A template configuration for the web-console web application. This
  |       defaults to the UsersRolesLoginModule the same as other and should be
  |       changed to a stronger authentication mechanism as required.
  |     -->
  |     <application-policy name = "$webConsoleDomain">
  |        <authentication>
  |           <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
  |              flag = "required">
  |              <module-option name="usersProperties">web-console-users.properties</module-option>
  |              <module-option name="rolesProperties">web-console-roles.properties</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 
  |     <!-- A template configuration for the JBossWS web application (and transport layer!).
  |       This defaults to the UsersRolesLoginModule the same as other and should be
  |       changed to a stronger authentication mechanism as required.
  |     -->
  |     <application-policy name="JBossWS">
  |       <authentication>
  |         <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
  |           flag="required">
  |           <module-option name="usersProperties">props/jbossws-users.properties</module-option>
  |           <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
  |           <module-option name="unauthenticatedIdentity">anonymous</module-option>
  |         </login-module>
  |       </authentication>
  |     </application-policy>
  | 
  |     <!-- The default login configuration used by any security domain that
  |     does not have a application-policy entry with a matching name
  |     -->
  |     <application-policy name = "other">
  |        <!-- A simple server login module, which can be used when the number 
  |        of users is relatively small. It uses two properties files:
  |        users.properties, which holds users (key) and their password (value).
  |        roles.properties, which holds users (key) and a comma-separated list of
  |        their roles (value).
  |        The unauthenticatedIdentity property defines the name of the principal
  |        that will be used when a null username and password are presented as is
  |        the case for an unuathenticated web client or MDB. If you want to
  |        allow such users to be authenticated add the property, e.g.,
  |        unauthenticatedIdentity="nobody"
  |        -->
  |        <authentication>
  |           <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
  |              flag = "required" />
  |        </authentication>
  |     </application-policy>
  | 
  | </policy>
  |  
  | 

With just the mysql-ds.xml file in the tomcat/deploy directory I get the following output/deployment error


  | wkstn15-101:/Applications/jboss-4.2.0.GA/bin fatimotidowu$ ./run.sh -c tomcat
  | =========================================================================
  | 
  |   JBoss Bootstrap Environment
  | 
  |   JBOSS_HOME: /Applications/jboss-4.2.0.GA
  | 
  |   JAVA: java
  | 
  |   JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
  | 
  |   CLASSPATH: /Applications/jboss-4.2.0.GA/bin/run.jar
  | 
  | =========================================================================
  | 
  | 11:30:04,005 INFO  [Server] Starting JBoss (MX MicroKernel)...
  | 11:30:04,006 INFO  [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
  | 11:30:04,013 INFO  [Server] Home Dir: /Applications/jboss-4.2.0.GA
  | 11:30:04,014 INFO  [Server] Home URL: file:/Applications/jboss-4.2.0.GA/
  | 11:30:04,015 INFO  [Server] Patch URL: null
  | 11:30:04,015 INFO  [Server] Server Name: tomcat
  | 11:30:04,015 INFO  [Server] Server Home Dir: /Applications/jboss-4.2.0.GA/server/tomcat
  | 11:30:04,015 INFO  [Server] Server Home URL: file:/Applications/jboss-4.2.0.GA/server/tomcat/
  | 11:30:04,015 INFO  [Server] Server Log Dir: /Applications/jboss-4.2.0.GA/server/tomcat/log
  | 11:30:04,015 INFO  [Server] Server Temp Dir: /Applications/jboss-4.2.0.GA/server/tomcat/tmp
  | 11:30:04,016 INFO  [Server] Root Deployment Filename: jboss-service.xml
  | 11:30:04,291 INFO  [ServerInfo] Java version: 1.5.0_07,Apple Computer, Inc.
  | 11:30:04,291 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_07-87,"Apple Computer, Inc."
  | 11:30:04,291 INFO  [ServerInfo] OS-System: Mac OS X 10.4.10,i386
  | 11:30:04,648 INFO  [Server] Core system initialized
  | 11:30:05,687 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
  | 11:30:11,533 INFO  [Embedded] Catalina naming disabled
  | 11:30:11,597 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
  | 11:30:11,598 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
  | 11:30:11,910 INFO  [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
  | 11:30:11,912 INFO  [Catalina] Initialization processed in 314 ms
  | 11:30:11,912 INFO  [StandardService] Starting service jboss.web
  | 11:30:11,916 INFO  [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
  | 11:30:11,971 INFO  [StandardHost] XML validation disabled
  | 11:30:12,011 INFO  [Catalina] Server startup in 99 ms
  | 11:30:12,155 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
  | 11:30:12,529 INFO  [WebappLoader] Dual registration of jndi stream handler: factory already defined
  | 11:30:13,348 INFO  [TomcatDeployer] deploy, ctxPath=/breastcancer, warUrl=.../tmp/deploy/tmp20656breastcancer-exp.war/
  | 11:30:13,499 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
  | 11:30:13,662 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
  | 
  | --- Packages waiting for a deployer ---
  | org.jboss.deployment.DeploymentInfo at 5406db59 { url=file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml }
  |   deployer: null
  |   status: null
  |   state: INIT_WAITING_DEPLOYER
  |   watch: file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml
  |   altDD: null
  |   lastDeployed: 1187105413145
  |   lastModified: 1187105413000
  |   mbeans:
  | 
  | --- Incompletely deployed packages ---
  | org.jboss.deployment.DeploymentInfo at 5406db59 { url=file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml }
  |   deployer: null
  |   status: null
  |   state: INIT_WAITING_DEPLOYER
  |   watch: file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml
  |   altDD: null
  |   lastDeployed: 1187105413145
  |   lastModified: 1187105413000
  |   mbeans:
  | 
  | 

With the application war in the deployment directory I get the following, which is basically the same as above.


  | =========================================================================
  | 
  |   JBoss Bootstrap Environment
  | 
  |   JBOSS_HOME: /Applications/jboss-4.2.0.GA
  | 
  |   JAVA: java
  | 
  |   JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
  | 
  |   CLASSPATH: /Applications/jboss-4.2.0.GA/bin/run.jar
  | 
  | =========================================================================
  | 
  | 21:54:09,216 INFO  [Server] Starting JBoss (MX MicroKernel)...
  | 21:54:09,220 INFO  [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
  | 21:54:09,229 INFO  [Server] Home Dir: /Applications/jboss-4.2.0.GA
  | 21:54:09,229 INFO  [Server] Home URL: file:/Applications/jboss-4.2.0.GA/
  | 21:54:09,230 INFO  [Server] Patch URL: null
  | 21:54:09,230 INFO  [Server] Server Name: tomcat
  | 21:54:09,230 INFO  [Server] Server Home Dir: /Applications/jboss-4.2.0.GA/server/tomcat
  | 21:54:09,231 INFO  [Server] Server Home URL: file:/Applications/jboss-4.2.0.GA/server/tomcat/
  | 21:54:09,231 INFO  [Server] Server Log Dir: /Applications/jboss-4.2.0.GA/server/tomcat/log
  | 21:54:09,231 INFO  [Server] Server Temp Dir: /Applications/jboss-4.2.0.GA/server/tomcat/tmp
  | 21:54:09,232 INFO  [Server] Root Deployment Filename: jboss-service.xml
  | 21:54:09,957 INFO  [ServerInfo] Java version: 1.5.0_07,Apple Computer, Inc.
  | 21:54:09,957 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_07-87,"Apple Computer, Inc."
  | 21:54:09,958 INFO  [ServerInfo] OS-System: Mac OS X 10.4.10,i386
  | 21:54:10,673 INFO  [Server] Core system initialized
  | 21:54:12,654 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
  | 21:54:23,616 INFO  [Embedded] Catalina naming disabled
  | 21:54:23,704 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
  | 21:54:23,705 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
  | 21:54:24,129 INFO  [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
  | 21:54:24,131 INFO  [Catalina] Initialization processed in 425 ms
  | 21:54:24,131 INFO  [StandardService] Starting service jboss.web
  | 21:54:24,134 INFO  [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
  | 21:54:24,182 INFO  [StandardHost] XML validation disabled
  | 21:54:24,215 INFO  [Catalina] Server startup in 84 ms
  | 21:54:24,698 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
  | 21:54:25,398 INFO  [WebappLoader] Dual registration of jndi stream handler: factory already defined
  | 21:54:26,643 INFO  [TomcatDeployer] deploy, ctxPath=/breastcancer, warUrl=.../tmp/deploy/tmp26878breastcancer-exp.war/
  | 21:54:26,818 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
  | 21:54:28,648 INFO  [TomcatDeployer] deploy, ctxPath=/surveytool, warUrl=.../tmp/deploy/tmp26879surveytool-exp.war/
  | 21:54:28,813 INFO  [[/surveytool]] Initializing Spring root WebApplicationContext
  | 21:54:28,814 INFO  [ContextLoader] Root WebApplicationContext: initialization started
  | 21:54:28,879 INFO  [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext at 436056: display name [Root WebApplicationContext]; startup date [Tue Aug 14 21:54:28 EDT 2007]; root of context hierarchy
  | 21:54:29,115 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [surveytool/objects/services-config.xml]
  | 21:54:29,299 INFO  [XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext at 436056]: org.springframework.beans.factory.support.DefaultListableBeanFactory at f7a060
  | 21:54:29,354 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory at f7a060: defining beans [user]; root of factory hierarchy
  | 21:54:29,422 INFO  [ContextLoader] Root WebApplicationContext: initialization completed in 608 ms
  | 21:54:29,443 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
  | 
  | --- Packages waiting for a deployer ---
  | org.jboss.deployment.DeploymentInfo at 5406db59 { url=file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml }
  |   deployer: null
  |   status: null
  |   state: INIT_WAITING_DEPLOYER
  |   watch: file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml
  |   altDD: null
  |   lastDeployed: 1187142866445
  |   lastModified: 1187142866000
  |   mbeans:
  | 
  | --- Incompletely deployed packages ---
  | org.jboss.deployment.DeploymentInfo at 5406db59 { url=file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml }
  |   deployer: null
  |   status: null
  |   state: INIT_WAITING_DEPLOYER
  |   watch: file:/Applications/jboss-4.2.0.GA/server/tomcat/deploy/mysql-ds.xml
  |   altDD: null
  |   lastDeployed: 1187142866445
  |   lastModified: 1187142866000
  |   mbeans:
  | 
  | 

Any advice would be greatly appreciated. Thank you

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074245#4074245

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074245



More information about the jboss-user mailing list