2

非常喜欢你的好作品,我在部署我的 ejb-jar 时遇到了 glassfish 服务器 4 的问题。我已经安装了 xampp,所以我从那里使用 mysql。我也在使用netbeans。我使用 connector/j 驱动程序为 mysql 创建了一个数据源,然后我将其用作我的 jta 数据源。我似乎无法在线找到任何解决方案。谢谢这是异常的堆栈跟踪:

INFO:   EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b

WARNING:   Problem while unregistering MBean: javax.management.InstanceNotFoundException: TopLink:Name=Development-file_/C_/Users/FOO/Documents/NetBeansProjects/Project/Project-ejb/build/classes/_Project-ejbPU,Type=Configuration

WARNING:   Problem while unregistering MBean: javax.management.InstanceNotFoundException: TopLink:Name=Session(file_/C_/Users/FOO/Documents/NetBeansProjects/Project/Project-ejb/build/classes/_Project-ejbPU)

INFO:   file:/C:/Users/FOO/Documents/NetBeansProjects/Project/Project-ejb/build/classes/_Project-ejbPU logout successful

SEVERE:   java.lang.StackOverflowError
    at org.eclipse.persistence.internal.helper.DatabaseField.hashCode(DatabaseField.java:400)
    at java.util.HashMap.get(HashMap.java:317)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:874)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)
    at org.eclipse.persistence.mappings.OneToOneMapping.getFieldClassification(OneToOneMapping.java:882)

SEVERE:   Exception while deploying the app [Project-ejb]

SEVERE:   Exception during lifecycle processing

org.glassfish.deployment.common.DeploymentException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [Project-ejbPU] failed. Close all factories for this PersistenceUnit.
Internal Exception: java.lang.StackOverflowError
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createDeployFailedPersistenceException(EntityManagerSetupImpl.java:816)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:756)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:304)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:336)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:302)
    at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:451)
    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
    at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:492)
    at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:398)
    at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
4

2 回答 2

1

在我的情况下,我跟踪了完整的跟踪,直到到达与我的代码相关的某事,在我的情况下,我遇到了一个命名查询的问题:

Grave: Excepción al desplegar la aplicación [segeca_restful] : 异常 [EclipseLink-28019] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [segeca_restfulPU] 部署失败. 关闭此 PersistenceUnit 的所有工厂。 内部异常:异常 [EclipseLink-0] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b):org.eclipse.persistence.exceptions.JPQLException 异常描述:语法错误解析 [SELECT p FROM Peticion p WHERE p.usuarioIdusuario.idusuario := idusuario]。[31, 73] 表达式不是有效的条件表达式。

也许在你的情况下,根本原因可能是另一个,但我认为如果你检查 glassfish 的日志,你会找到它。

祝你好运,

问候,

卡尔。

于 2014-11-25T22:16:07.550 回答
0

您好,我遇到过类似的问题,但根本原因不同。我正在为多个 Web 项目使用同一个持久性项目。所以我的解决方案是从应用程序服务器取消部署所有项目。重建它们并仅部署我需要的项目。有一些缓存。

于 2013-11-25T07:00:54.347 回答