Iは、JBoss-AS-7.1.1(休止状態)のJPA実装を使用する必要がなく、アプリケーションをデプロイするとき、サーバーアプリケーションがこのメッセージを示す:jbossがこのURLに適したドライバを見つけられないのはなぜですか?
Could not obtain connection to query metadata : No suitable driver found for jdbc:oracle:thin:@localhost:1521:xe
Iグローバルモジュールとしてojdbc6ジャーを添加しました。
<?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>
詳細情報:
ことでこれは私のpersistence.xmlの念である
using driver [oracle.jdbc.OracleDriver] at URL [jdbc:oracle:thin:@localhost:1521:xe]
:実際には、サーバーは、クラスパスにドライバクラスを見つけることができていることを示しこの全く同じパラメータを使用してデータソースを作成し、このデータソースを使用するためにpersistence.xmlを更新し、完全に機能しました。
だから、どうすればいいですか? jboss 7は非データソース接続をサポートしていますか?何が問題なの?
JBoss版7は、データベースドライバが付属していません
でした。質問にojdbc6.jarを追加したのが分かります。 –