JBoss在启动时验证模式失败

时间:2014-10-30 13:04:37

标签: java eclipse jboss

我试图在eclipse luna中启动一个JBOSS 5.1。 尝试部署我的应用程序时,收到以下错误:

08:20:44,492 WARN  [SaxJBossXBParser] schema_reference.4: Failed to read schema document 'http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ vfsfile:/C:/(...)/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_AS_5.11414613613116/deploy/mywarfile.war/WEB-INF/classes/META-INF/persistence.xml[6,15]

我确定我的JPA persistence.xml是正确的,因为我使用外部工具使用xsd对其进行了验证。只留下一个选项:JBOSS无法获取* .xsd文件。

由于我在公司防火墙下,我最初的猜测是尝试将代理设置(proxySet,proxyHost,proxyPort,proxyUser和proxyPassword)放在java VM选项中(在eclipse启动配置中)。这也行不通。

任何线索?

给定: Eclipse 4.4 JBOSS 5.1(无法更改为更新版本) JPA 2.1 + Hibernate

1 个答案:

答案 0 :(得分:0)

这个问题是因为JBOSS 5.1不支持JPA 2.1。将其更改为JPA 1.0解决了它。

相关问题