非常喜欢你的好作品,我在部署我的 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)