2011-04-21 115 views
1

我嘗試部署服務,從表中檢索數據,並通過https使用REST Jersey與Glassfish顯示服務器我所做的是我配置了https,它的工作原理還測試了一個jpa它可以從表中檢索數據,但是問題是,當我JPA的治療和服務新澤西州之間的合併,它拋出以下異常,因此,如果任何人有一個解決方案,請告訴我該怎麼CA如何解決這個問題的感謝:異常EclipseLink

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

的錯誤發生,因爲你有安全管理器在您的JVM中啓用並禁用了反射權限。您需要將此權限授予eclipselink jar或一般。

EclipseLink在Glassfish中沒有這個問題,那麼如何訪問JPA?您是否在遠程客戶端上使用JPA?完整的異常堆棧將有助於確定這一點。

相關問題