title: Invalid Oracle URL specified: OracleDataSource.makeURL in Arquillian ITest
body: <p>I persist with every error I get thrown and mostly always work out the solution.  I find a good walk helps.  But this one has me stumped, I've been staring at this same error all day.  Like Ticcie in <a href="https://stackoverflow.com/questions/1332869/invalid-oracle-url-specified-oracledatasource-makeurl">Invalid Oracle URL specified: OracleDataSource.makeURL</a> suggests, the error message does nothing to help understand what is wrong.</p>
  
  <pre><code>SEVERE: Exception during lifecycle processing
  org.glassfish.deployment.common.DeploymentException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
  Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Invalid Oracle URL specified: OracleDataSource.makeURL
  Error Code: 0
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:762)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204)
  </code></pre>
  
  <p>I am doing Arquillian Integration Testing for a Java EE 7 EAR application.  Its been going well using JPA and the DerbyDb but I now need to test Native Oracle DB (11g) SQL.  So I've setup a new testing project to connect to an OracleDB using EclipseLink.</p>
  
  <p>I CAN connect to the database through the Eclipse IDE DataSource explorer and ping it no problems.  </p>
  
  <p>I DO connect to a sister Oracle database in Glassfish standalone and ping it no problems.</p>
  
  <p>But the Arquillian Test cannot connect to it with the above ambiguous error.  It would be nice if the error said what exactly is the problem.</p>
  
  <p>I use exactly the same URL as I have with the Eclipse IDE DataSource explorer:</p>
  
  <pre><code>jdbc:oracle:thin:@marina.work.com:1521:orcl
  </code></pre>
  
  <p>The Arquillian setup is the same as I did for DerbyDb (pretty-much same as <a href="http://arquillian.org/guides/testing_java_persistence/" rel="nofollow noreferrer">http://arquillian.org/guides/testing_java_persistence/</a>) with these variations for OracleDB:</p>
  
  <p><code>src/main/resources-glassfish-embedded/sun-resources.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"&gt;
  &lt;resources&gt;
      &lt;jdbc-resource pool-name="ArquillianOraclePool" jndi-name="jdbc/arquillian" /&gt;
      &lt;jdbc-connection-pool name="ArquillianOraclePool" res-type="javax.sql.DataSource" datasource-classname="oracle.jdbc.pool.OracleDataSource" 
          is-isolation-level-guaranteed="false" &gt;
      &lt;/jdbc-connection-pool&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><code>src/main/resources-glassfish-embedded/test-persistence.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="
        http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
      &lt;persistence-unit name="esaarch01-pu" transaction-type="JTA"&gt;
          &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
          &lt;jta-data-source&gt;jdbc/arquillian&lt;/jta-data-source&gt;
          &lt;jar-file&gt;test.jar&lt;/jar-file&gt;
          &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.Url" value="jdbc:oracle:thin:@marina.work.com:1521:orcl" /&gt;
              &lt;property name="javax.persistence.jdbc.Password" value="demo" /&gt;
              &lt;property name="javax.persistence.jdbc.User" value="test" /&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver" /&gt;  &lt;!-- driver. --&gt;
              &lt;property name="javax.persistence.jdbc.platform" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform" /&gt;
              &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables" /&gt;
              &lt;property name="eclipselink.logging.level" value="FINE" /&gt;
              &lt;property name="eclipselink.logging.level.sql" value="FINE" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>I've introduced XML well-formedness errors such as text in the <code>properties</code> element and receive the following error.  This shows that this file is being picked up for the correct purposes:</p>
  
  <pre><code>java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 16; Deployment descriptor file META-INF/persistence.xml in archive [test.jar].  cvc-complex-type.2.3: Element 'properties' cannot have character [children], because the ...
  </code></pre>
  
  <p>I've tried different property names but none change the error message.  Which makes me think that the URL property isn't being picked up at all.  </p>
  
  <p>I've tried different variations of the URL (with matching mods for name and password):</p>
  
  <pre><code>javax.persistence.jdbc.url URL Url (three variations)
  eclipselink.jdbc.url URL Url (three variations)
  </code></pre>
  
  <p>No variation works.  Same error.</p>
  
  <p>It would be really nice if the exception can be more specific about what it can and cannot find.</p>
  
  <p>My question is, can anyone tell me the solution or suggest what's wrong or something I can try and work out what is going wrong?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've posted this question on the Oracle forums and included the entire stack trace and the sample minimal code plus some instructions.  If anyone is keen to look at it I'd be grateful.</p>
  
  <p><a href="https://forums.oracle.com/message/11152777#11152777" rel="nofollow noreferrer">https://forums.oracle.com/message/11152777#11152777</a></p>