Caros,
Ao tentar exportar o schema para o Sql Server 2005, ocorre o seguinte erro: “Unable to get managed connection for MSSQLDS”
(O Sql Server 2005 está configurado corretamente)
Alguém tem alguma idéia?
O Data Source:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=TestJPA</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
<password>senha</password>
<check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
<metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
O persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
version="1.0">
<persistence-unit name="TestEJB">
<jta-data-source>java:/MSSQLDS</jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServer2005Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
</properties>
</persistence-unit>
</persistence>