0

我创建了一个 spring 项目,后来我将其部署在 glassfish 上,该应用程序最初正在运行。但是当我添加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="sidoPU" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>myDatasource</jta-data-source>
        <properties>
            <property name="hibernate.show_sql" value="true" />
            <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
            <property name="hibernate.hbm2ddl.auto" value="create-drop" />
            <property name="hibernate.transaction.manager_lookup_class"
                value="org.hibernate.transaction.SunONETransactionManagerLookup" />
            <property name="hibernate.transaction.factory_class"
                value="org.hibernate.transaction.JTATransactionFactory" />
        </properties>
    </persistence-unit>
</persistence>

浏览时:http: //java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd,加载不出来。

关于这个问题的任何想法或解决方法?

4

1 回答 1

1

我认为这与整个 java.net、java.sun.com、Kenai 项目等由于维护原因而停机有关。

https://blogs.oracle.com/theaquarium/entry/outage_on_java_net_apr

于 2012-04-30T11:22:13.757 回答