title: getting error Invalid Oracle URL specified: OracleDataSource.makeURL
body: <p>I am getting error when I try to run my application on Server. I am suing eclipse and glass fish server 4. I made a glassfish-resources.xml file and put it in the WEB-INF directory. When I try to run on server. I get the following exception</p>
  
  <pre><code>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.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
  at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
  at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
  at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
  at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
  .....
  </code></pre>
  
  <p>Here is my glassfish-resources.xml file</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-connection-pool name="java:app/myOracleConnectionPool"  
                  res-type="javax.sql.ConnectionPoolDataSource"  
                  datasource-classname="oracle.jdbc.pool.OracleConnectionPoolDataSource"&gt;  
  
          &lt;property name="User" value="system" /&gt;  
          &lt;property name="Port" value="1521" /&gt;  
          &lt;property name="DatabaseName" value="XE" /&gt;  
          &lt;property name="ServerName" value="127.0.0.1" /&gt;  
          &lt;property name="Url" value="jdbc:oracle:thin:@127.0.0.1:1521:XE" /&gt;  
          &lt;property name="URL" value="jdbc:oracle:thin:@127.0.0.1:1521:XE" /&gt; 
          &lt;property name="Password" value="xxxx" /&gt;  
      &lt;/jdbc-connection-pool&gt;  
  
  
      &lt;jdbc-resource enabled="true"  
              jndi-name="java:app/jdbc/myOracleDatasource"  
              object-type="user"  
              pool-name="java:app/myOracleConnectionPool"&gt;  
          &lt;description /&gt;  
      &lt;/jdbc-resource&gt;  
  &lt;/resources&gt; 
  </code></pre>
  
  <p>here is my persistence.xml file</p>
  
  <pre><code>&lt;persistence-unit name="chapter11PU" transaction-type="JTA"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
      &lt;jta-data-source&gt;java:app/jdbc/myOracleDatasource&lt;/jta-data-source&gt;
      &lt;properties&gt;
          &lt;property name="eclipselink.target-database" value="Oracle"/&gt;
          &lt;property name="javax.persistence.schema-generation-action" value="drop-and-create"/&gt;
          &lt;property name="javax.persistence.schema-generation-target" value="scripts"/&gt; 
          &lt;property name="javax.persistence.ddl-create-script-target" value="createfoo.sql"/&gt; 
          &lt;property name="javax.persistence.ddl-drop-script-target" value="dropfoo.sql"/&gt; 
          &lt;property name="eclipselink.deploy-on-startup" value="true"/&gt;
          &lt;property name="eclipselink.application-location" value="/tmp"/&gt;
  
          &lt;!-- To log SQL queries --&gt;
          &lt;property name="eclipselink.logging.level.sql" value="FINE"/&gt;
          &lt;property name="eclipselink.logging.parameters" value="true"/&gt;
          &lt;property name="eclipselink.logging.level" value="INFO"/&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p>I have also put ojdbc6.jar in the lib/ext folder. I am using oracle 11g release 2. Why I am getting invalid url error?</p>
  
  <p>I have also check the connection in the SQL Developer and it is working, with user system and my password.</p>
  
  <p>Thanks</p>