I need to use jpa implementation of jboss-as-7.1.1 (hibernate) but when deploying the application, the server application shows this message:
Could not obtain connection to query metadata : No suitable driver found for jdbc:oracle:thin:@localhost:1521:xe
I added ojdbc6 jar as a global module. In fact, server indicates it is able to find the driver class in the class path:
using driver [oracle.jdbc.OracleDriver] at URL [jdbc:oracle:thin:@localhost:1521:xe]
This is my persistence.xml just in case:
<?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="HBOService">
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:xe"/>
<property name="hibernate.connection.username" value="HBOWEB"/>
<property name="hibernate.connection.password" value="****"/>
</properties>
</persistence-unit>
</persistence>
More info:
By the way I used this exact same parameters, created a datasource, updated my persistence.xml to use this datasource and it worked perfectly.
So, what's the deal? Does jboss 7 support non datasource connections? What could be the problem?