oracle11g - Invalid Oracle URL specified: OracleDataSource.makeURL in Arquillian ITest -


i persist every error thrown , work out solution. find walk helps. 1 has me stumped, i've been staring @ same error day. ticcie in invalid oracle url specified: oracledatasource.makeurl suggests, error message nothing understand wrong.

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 connection. cause: connection not allocated because: invalid oracle url specified: oracledatasource.makeurl error code: 0     @ org.eclipse.persistence.internal.jpa.entitymanagersetupimpl.deploy(entitymanagersetupimpl.java:762)     @ org.eclipse.persistence.internal.jpa.entitymanagerfactorydelegate.getabstractsession(entitymanagerfactorydelegate.java:204) 

i doing arquillian integration testing java ee 7 ear application. been going using jpa , derbydb need test native oracle db (11g) sql. i've setup new testing project connect oracledb using eclipselink.

i can connect database through eclipse ide datasource explorer , ping no problems.

i connect sister oracle database in glassfish standalone , ping no problems.

but arquillian test cannot connect above ambiguous error. nice if error said problem.

i use same url have eclipse ide datasource explorer:

jdbc:oracle:thin:@marina.work.com:1521:orcl 

the arquillian setup same did derbydb (pretty-much same http://arquillian.org/guides/testing_java_persistence/) these variations oracledb:

src/main/resources-glassfish-embedded/sun-resources.xml

<?xml version="1.0" encoding="utf-8"?> <!doctype resources public "-//glassfish.org//dtd glassfish application server 3.1 resource definitions//en" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> <resources>     <jdbc-resource pool-name="arquillianoraclepool" jndi-name="jdbc/arquillian" />     <jdbc-connection-pool name="arquillianoraclepool" res-type="javax.sql.datasource" datasource-classname="oracle.jdbc.pool.oracledatasource"          is-isolation-level-guaranteed="false" >     </jdbc-connection-pool> </resources> 

src/main/resources-glassfish-embedded/test-persistence.xml

<?xml version="1.0" encoding="utf-8"?> <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">     <persistence-unit name="esaarch01-pu" transaction-type="jta">         <provider>org.eclipse.persistence.jpa.persistenceprovider</provider>         <jta-data-source>jdbc/arquillian</jta-data-source>         <jar-file>test.jar</jar-file>         <exclude-unlisted-classes>false</exclude-unlisted-classes>         <properties>             <property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@marina.work.com:1521:orcl" />             <property name="javax.persistence.jdbc.password" value="demo" />             <property name="javax.persistence.jdbc.user" value="test" />             <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.oracledriver" />  <!-- driver. -->             <property name="javax.persistence.jdbc.platform" value="org.eclipse.persistence.platform.database.oracle.oracleplatform" />             <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />             <property name="eclipselink.logging.level" value="fine" />             <property name="eclipselink.logging.level.sql" value="fine" />         </properties>     </persistence-unit> </persistence> 

i've introduced xml well-formedness errors such text in properties element , receive following error. shows file being picked correct purposes:

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 ... 

i've tried different property names none change error message. makes me think url property isn't being picked @ all.

i've tried different variations of url (with matching mods name , password):

javax.persistence.jdbc.url url url (three variations) eclipselink.jdbc.url url url (three variations) 

no variation works. same error.

it nice if exception can more specific can , cannot find.

my question is, can tell me solution or suggest what's wrong or can try , work out going wrong?

update

i've posted question on oracle forums , included entire stack trace , sample minimal code plus instructions. if keen @ i'd grateful.

https://forums.oracle.com/message/11152777#11152777

driver type not provided, case, used "thin" xaproperties.drivertype="thin", please find similar config case.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -