title: javax.resource.ResourceException: IJ000453: Unable to get managed connection
body: <p>Hi i am using Spring 3 application on Jboss 7.1 final and i have mysql community server database created, and i added the datasource in <strong>standalone.xml</strong> file as follows:</p>
  
  <pre><code>&lt;datasources&gt;
  
                  &lt;datasource jta="true" jndi-name="java:/myapp" pool-name="myapp_pool" enabled="true" use-java-context="true" use-ccm="true"&gt;
                      &lt;connection-url&gt;jdbc:mysql://localhost:3306/myapp&lt;/connection-url&gt;
                      &lt;driver&gt;com.mysql.jdbc&lt;/driver&gt;
                      &lt;security&gt;
                          &lt;user-name&gt;root&lt;/user-name&gt;
                          &lt;password&gt;root&lt;/password&gt;
                      &lt;/security&gt;
                  &lt;/datasource&gt;
                  &lt;drivers&gt;
  
                      &lt;driver name="com.mysql.jdbc" module="com.mysql.jdbc"&gt;
                          &lt;xa-datasource-class&gt;com.mysql.jdbc.jdbc2.optional.MysqlXADataSource&lt;/xa-datasource-class&gt;
                      &lt;/driver&gt;
                  &lt;/drivers&gt;
              &lt;/datasources&gt;
  </code></pre>
  
  <p>but i am getting following exception:</p>
  
  <pre><code>Caused by: java.sql.SQLException: Could not retrieve transation read-only status server
  
  Caused by: java.sql.SQLException: Unknown system variable 'tx_read_only'
  
  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-4) HHH000319: Could not get database metadata: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/myapp
  
  Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/myapp
  
  Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
  
  Caused by: javax.resource.ResourceException: Could not create connection
  
  Caused by: java.sql.SQLException: Could not retrieve transation read-only status server
  
  Caused by: java.sql.SQLException: Unknown system variable 'tx_read_only'
  
  
  15:19:21,063 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-4) HHH000299: Could not complete schema update: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/myapp
  
  Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/myapp
  
  Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
  
  Caused by: javax.resource.ResourceException: Could not create connection
  
  Caused by: java.sql.SQLException: Could not retrieve transation read-only status server
  
  Caused by: java.sql.SQLException: Unknown system variable 'tx_read_only'
  
  
  15:19:21,997 INFO  [org.springframework.security.web.DefaultSecurityFilterChain] (MSC service thread 1-4) Creating filter chain: org.springframework.security.web.util.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@152c70f, org.springframework.security.web.authentication.logout.LogoutFilter@18aae91, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1cabeb0, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@1ad45f1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@cb0e99, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@12b676c, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@92e514, org.springframework.security.web.session.SessionManagementFilter@1fd8fa0, org.springframework.security.web.access.ExceptionTranslationFilter@1e05472, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@c82e42]
  15:19:22,019 INFO  [org.springframework.security.config.http.DefaultFilterChainValidator] (MSC service thread 1-4) Checking whether login URL '/' is accessible with your configuration
  15:19:22,040 WARN  [org.springframework.security.config.http.DefaultFilterChainValidator] (MSC service thread 1-4) Anonymous access to the login page doesn't appear to be enabled. This is almost certainly an error. Please check your configuration allows unauthenticated access to the configured login page. (Simulated access was rejected: org.springframework.security.access.AccessDeniedException: Access is denied)
  15:19:22,304 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA UserTransaction: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@252981
  15:19:22,306 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA TransactionManager: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@16ce36
  15:19:22,307 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA TransactionSynchronizationRegistry: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@13c50d0
  15:19:22,314 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA UserTransaction: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@252981
  15:19:22,316 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA TransactionManager: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@16ce36
  15:19:22,317 INFO  [org.springframework.transaction.jta.JtaTransactionManager] (MSC service thread 1-4) Using JTA TransactionSynchronizationRegistry: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@13c50d0
  15:19:22,338 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-4) Root WebApplicationContext: initialization completed in 6170 ms
  15:19:22,442 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/myapp'
  15:19:25,434 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC service thread 1-4) Running on PrimeFaces 4.0-SNAPSHOT
  15:19:25,435 INFO  [org.omnifaces.eventlistener.VersionLoggerEventListener] (MSC service thread 1-4) Using OmniFaces version 1.5-SNAPSHOT-20130422
  15:19:25,440 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Monitoring jndi:/default-host/myapp/WEB-INF/faces-config.xml for modifications
  15:19:25,488 INFO  [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /myapp
  15:19:25,497 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin console listening on http://127.0.0.1:9990
  15:19:25,498 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 19299ms - Started 435 of 513 services (76 services are passive or on-demand)
  15:19:25,685 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "myapp.war"
  </code></pre>
  
  <p>i removed the lines after the exception because the post limit.
  please advise about this exception.</p>