hibernate连接oracle11g
老是连接不上 报错:
2009-5-10 12:48:16 oracle.jdbc.driver.OracleDriver registerMBeans
严重: Error while registering Oracle JDBC Diagnosability MBean.
javax.management.MalformedObjectNameException: Invalid character '
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>
<session-factory>
<property name="connection.username">test</property>
<property name="connection.url">jdbc:oracle:oci8:@test</property>
<property name="dialect">
org.hibernate.dialect.Oracle9Dialect
</property>
<property name="myeclipse.connection.profile">test</property>
<property name="connection.password">test</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="show_sql">true</property>
<mapping resource="com/idvas/de/aas/User.hbm.xml" />
</session-factory>
</hibernate-configuration>
请高手帮忙看看,oracle11g要导哪个包? 我导的是ojdbc5
------解决方案--------------------
<property name="connection.url">jdbc:oracle:oci8:@test </property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:数据库</property>
换成下面这个方式 试试