title: JMS Connection problems in Tomcat
body: <p>I'm trying to port an old,large, Weblogic-based application to Tomcat. The application uses Spring, EclipseLink, and an Oracle database.</p>
  
  <p>There are two different database connections, both almost identical. The connectivity to the JSF pages work fine. Unfortunately the one to the JMS (Oracle AQ) doesn't. Here's the error I'm getting:</p>
  
  <blockquote>
    <p>myapp    | 17:17:34,177 ERROR XmlMessageListenerContainer.refreshConnectionUntilSuccessful Could not refresh JMS Connection for destination 'SPFR_EVENT_Q' - retrying using FixedBackOff{interval=5000, currentAttempts=4, maxAttempts=unlimited}. Cause: Error creating the db_connection; nested exception is java.lang.ClassCastException: com.sun.proxy.$Proxy51 cannot be cast to oracle.jdbc.internal.OracleConnection</p>
  </blockquote>
  
  <p>Here is the relevant connection:</p>
  
  <pre><code>&lt;Resource
     name="jdbc/myAQDS"
     auth="Container"
     type="javax.sql.DataSource"
     factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
     driverClassName="oracle.jdbc.OracleDriver"
     url="jdbc:oracle:thin:theurlhere"
     username="theuser"
     password="thepassword"
     maxTotal="150"
     maxIdle="10"
   /&gt;
  </code></pre>
  
  <p>Any ideas what's causing this? I googled for the specific error, and came up completely empty handed.</p>