Eclipse链接异常

时间:2011-04-21 09:31:39

标签: jpa glassfish eclipselink

我尝试部署从表中检索数据的服务,并使用带有Glassfish的REST Jersey将其覆盖在https上我做的是我配置了https并且它也可以工作我测试了jpa它可以从表中检索数据,但问题是当我在jpa处理和服务泽西之间合并时,它会抛出以下异常,所以如果有人有解决方案,请告诉我做什么来解决这个问题谢谢:

java.lang.ExceptionInInitializerError

root cause

Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: WebappClassLoader (delegate=true; repositories=WEB-INF/classes/) Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [] failed. Internal Exception: Exception [EclipseLink-7305] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException Exception Description: An exception was thrown while processing the mapping file from URL: [file:glassfish/domains/domain1/eclipseApps//WEB-INF/classes/META-INF/orm.xml], error using JPA 1.0 orm.xsd was [Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setCascade], [getCascade] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[m_cascade] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setDiscriminatorColumn], [getDiscriminatorColumn] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[m_discriminatorColumn] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setDiscriminatorClasses], [getDiscriminatorClasses] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_discriminatorClasses] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setJoinColumns], [getJoinColumns] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_joinColumns] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setPrivateOwned], [getPrivateOwned] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_privateOwned-->orm:private-owned/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setSelectedColumns], [getSelectedColumns] in the object [org.eclipse.persistence.internal.jpa.metadata.locking.OptimisticLockingMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_selectedColumns] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.locking.OptimisticLockingMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setType], [getType] in the object [org.eclipse.persistence.internal.jpa.metadata.locking.OptimisticLockingMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_type-->@type] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.locking.OptimisticLockingMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransientAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransientAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setHints], [getHints] in the object [org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_hints] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setParameters], [getParameters] in the object [org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_parameters] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setColumn], [getColumn] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[m_column] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setTemporal], [getTemporal] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[m_temporal] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setConvert], [getConvert] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_convert-->orm:convert/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor --> [])

Exception [EclipseLink-86] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The instance variable [m_validation] in the class [org.eclipse.persistence.internal.jpa.metadata.PrimaryKeyMetadata] is not accessible. Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_validation-->@validation] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.PrimaryKeyMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setOrderBy], [getOrderBy] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_orderBy-->orm:order-by/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setQuery], [getQuery] in the object [org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_query-->orm:query/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setGetMethodName], [getGetMethodName] in the object [org.eclipse.persistence.internal.jpa.metadata.mappings.AccessMethodsMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_getMethodName-->@get-method] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.mappings.AccessMethodsMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.mappings.MapKeyMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.mappings.MapKeyMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setDescription], [getDescription] in the object [org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EmbeddableAccessor] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_description-->orm:description/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EmbeddableAccessor --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setStrategy], [getStrategy] in the object [org.eclipse.persistence.internal.jpa.metadata.sequencing.GeneratedValueMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_strategy-->@strategy] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.sequencing.GeneratedValueMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setXMLMappingMetadataComplete], [getXMLMappingMetadataComplete] in the object [org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_xmlMappingMetadataComplete-->orm:xml-mapping-metadata-complete/text()] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setName], [getName] in the object [org.eclipse.persistence.internal.jpa.metadata.sequencing.SequenceGeneratorMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[m_name-->@name] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.sequencing.SequenceGeneratorMetadata --> [])

Exception [EclipseLink-87] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The methods [setUniqueConstraints], [getUniqueConstraints] in the object [org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata] are not accessible Internal Exception: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[m_uniqueConstraints] Descriptor: XMLDescriptor(org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata --> [])

java.lang.NullPointerException

java.lang.NullPointerException

java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)

java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)

1 个答案:

答案 0 :(得分:1)

发生错误是因为您在JVM中启用了安全管理器并且已禁用反射权限。您需要将此权限授予eclipselink jar,或者通常。

EclipseLink在Glassfish中没有此问题,那么您如何访问JPA?您是否在远程客户端上使用JPA?完整的异常堆栈有助于确定这一点。