Deployment failed


An error has occurred when i deploy a ear file

the content is:
Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.
EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [DocDoku-PU] failed.

Internal Exception: Exception [EclipseLink-7305] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.
ValidationException
Exception Description: An exception was thrown while processing the mapping file from URL: [file:/F:/Java/docdoku/payara41/glassfish/domains/domain1/applications/docdoku-plm-server-ear1/docdoku-plm-server-ejb_jar/META-INF/orm.xml].

Internal Exception: Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.
XMLMarshalException

Exception Description: A descriptor with default root element {Java Persistence API: XML Schemas}entity-mappings was not found in the project. Please see serve … msg.seeServerLog

if someone can help me with this, I would appreciate it!

Heya,

i guess the server cannot find the persistence.xml.

And Eclipselink 2.6.4 is very old i guess. :clock9:

Cheers

With Payara version 4.X the eclipse version already fits and has nothing to do with the Deplyoment error.

Can you show us your orm.xml?

Steven

orm.xml :slight_smile:

<?xml version="1.0" encoding="UTF-8" ?>

<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence"
             version="2.0">
    <entity class="com.docdoku.plm.server.core.hooks.SNSWebhookApp">
        <convert converter="com.docdoku.plm.server.storage.CryptoConverter" attribute-name="awsSecret"/>
    </entity>
    <entity class="com.docdoku.plm.server.core.hooks.SimpleWebhookApp">
        <convert converter="com.docdoku.plm.server.storage.CryptoConverter" attribute-name="authorization"/>
    </entity>

    <entity class="com.docdoku.plm.server.core.common.OAuthProvider">
        <convert converter="com.docdoku.plm.server.storage.CryptoConverter" attribute-name="clientID"/>
        <convert converter="com.docdoku.plm.server.storage.CryptoConverter" attribute-name="secret"/>
    </entity>

</entity-mappings>

Where did you create the persistence unit (DocDoku-PU)? About the Payara itself (JDBC configuration) or about the payara-resources.xml?
It doesn’t seem to find it during deployment. If you configured payara-resources.xml, it should be in the deployment jar/war. Have you checked this?

The orm.xml looks correct.

Steven


I followed the project’s installation configuration documentation to configure。

Blockquote Go under Resources > JDBC > JDBC Resources and create the jdbc resource associated with the DocDokuPLMPool , enter jdbc/docdokuPU as the JNDI name.

installation guide

I create a JDBC resource " docdokuPU " on the administartion console.

The persistence.xml is :grinning:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="https://xmlns.jcp.org/xml/ns/persistence
                                 http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
				version="2.1">
    <persistence-unit name="DocDoku-PU" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>jdbc/docdokuPU</jta-data-source>
        <class>com.docdoku.plm.server.core.admin.PlatformOptions</class>
        <class>com.docdoku.plm.server.core.admin.WorkspaceFrontOptions</class>
        <class>com.docdoku.plm.server.core.admin.WorkspaceBackOptions</class>
        <class>com.docdoku.plm.server.core.common.Account</class>
        <class>com.docdoku.plm.server.core.common.BinaryResource</class>
        <class>com.docdoku.plm.server.core.common.Organization</class>
        <class>com.docdoku.plm.server.core.common.User</class>
        <class>com.docdoku.plm.server.core.common.UserGroup</class>
        <class>com.docdoku.plm.server.core.common.Workspace</class>
        <class>com.docdoku.plm.server.core.common.ProvidedAccount</class>
        <class>com.docdoku.plm.server.core.common.OAuthProvider</class>
        <class>com.docdoku.plm.server.core.change.ChangeItem</class>
        <class>com.docdoku.plm.server.core.change.ChangeIssue</class>
        <class>com.docdoku.plm.server.core.change.ChangeOrder</class>
        <class>com.docdoku.plm.server.core.change.ChangeRequest</class>
        <class>com.docdoku.plm.server.core.change.Milestone</class>
        <class>com.docdoku.plm.server.core.notification.TagUserSubscription</class>
        <class>com.docdoku.plm.server.core.notification.TagUserGroupSubscription</class>
        <class>com.docdoku.plm.server.core.change.ModificationNotification</class>
        <class>com.docdoku.plm.server.core.configuration.ProductConfiguration</class>
        <class>com.docdoku.plm.server.core.configuration.ProductBaseline</class>
        <class>com.docdoku.plm.server.core.configuration.BaselinedPart</class>
        <class>com.docdoku.plm.server.core.configuration.PartCollection</class>
        <class>com.docdoku.plm.server.core.configuration.ProductInstanceIteration</class>
        <class>com.docdoku.plm.server.core.configuration.ProductInstanceMaster</class>
        <class>com.docdoku.plm.server.core.configuration.PathDataIteration</class>
        <class>com.docdoku.plm.server.core.configuration.PathDataMaster</class>
        <class>com.docdoku.plm.server.core.document.DocumentIteration</class>
        <class>com.docdoku.plm.server.core.document.DocumentLink</class>
        <class>com.docdoku.plm.server.core.document.DocumentMaster</class>
        <class>com.docdoku.plm.server.core.document.DocumentMasterTemplate</class>
        <class>com.docdoku.plm.server.core.document.DocumentRevision</class>
        <class>com.docdoku.plm.server.core.meta.Folder</class>
        <class>com.docdoku.plm.server.core.document.IterationChangeSubscription</class>
        <class>com.docdoku.plm.server.core.document.StateChangeSubscription</class>
        <class>com.docdoku.plm.server.core.configuration.DocumentBaseline</class>
        <class>com.docdoku.plm.server.core.configuration.DocumentCollection</class>
        <class>com.docdoku.plm.server.core.configuration.BaselinedDocument</class>
        <class>com.docdoku.plm.server.core.gcm.GCMAccount</class>
        <class>com.docdoku.plm.server.core.log.DocumentLog</class>
        <class>com.docdoku.plm.server.core.log.PartLog</class>
        <class>com.docdoku.plm.server.core.log.WorkspaceLog</class>
        <class>com.docdoku.plm.server.core.meta.DefaultAttributeTemplate</class>
        <class>com.docdoku.plm.server.core.meta.InstanceAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceAttributeTemplate</class>
        <class>com.docdoku.plm.server.core.meta.InstanceBooleanAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceDateAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceListOfValuesAttribute</class>
        <class>com.docdoku.plm.server.core.meta.ListOfValuesAttributeTemplate</class>
        <class>com.docdoku.plm.server.core.meta.InstanceNumberAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceTextAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceLongTextAttribute</class>
        <class>com.docdoku.plm.server.core.meta.InstanceURLAttribute</class>
        <class>com.docdoku.plm.server.core.meta.ListOfValues</class>
        <class>com.docdoku.plm.server.core.meta.Tag</class>
        <class>com.docdoku.plm.server.core.product.ConfigurationItem</class>
        <class>com.docdoku.plm.server.core.product.DateBasedEffectivity</class>
        <class>com.docdoku.plm.server.core.product.Effectivity</class>
        <class>com.docdoku.plm.server.core.product.Geometry</class>
        <class>com.docdoku.plm.server.core.product.LotBasedEffectivity</class>
        <class>com.docdoku.plm.server.core.product.PartIteration</class>
        <class>com.docdoku.plm.server.core.product.PartMaster</class>
        <class>com.docdoku.plm.server.core.product.PartMasterTemplate</class>
        <class>com.docdoku.plm.server.core.product.PartRevision</class>
        <class>com.docdoku.plm.server.core.product.PartSubstituteLink</class>
        <class>com.docdoku.plm.server.core.product.PartUsageLink</class>
        <class>com.docdoku.plm.server.core.product.SerialNumberBasedEffectivity</class>
        <class>com.docdoku.plm.server.core.product.Marker</class>
        <class>com.docdoku.plm.server.core.product.Layer</class>
        <class>com.docdoku.plm.server.core.product.CADInstance</class>
        <class>com.docdoku.plm.server.core.product.Conversion</class>
        <class>com.docdoku.plm.server.core.product.Import</class>
        <class>com.docdoku.plm.server.core.product.PartNumberAttributeTemplate</class>
        <class>com.docdoku.plm.server.core.product.InstancePartNumberAttribute</class>
        <class>com.docdoku.plm.server.core.security.ACL</class>
        <class>com.docdoku.plm.server.core.security.ACLUserEntry</class>
        <class>com.docdoku.plm.server.core.security.ACLUserGroupEntry</class>
        <class>com.docdoku.plm.server.core.security.Credential</class>
        <class>com.docdoku.plm.server.core.security.PasswordRecoveryRequest</class>
        <class>com.docdoku.plm.server.core.security.UserGroupMapping</class>
        <class>com.docdoku.plm.server.core.security.WorkspaceUserGroupMembership</class>
        <class>com.docdoku.plm.server.core.security.WorkspaceUserMembership</class>
        <class>com.docdoku.plm.server.core.sharing.SharedEntity</class>
        <class>com.docdoku.plm.server.core.sharing.SharedPart</class>
        <class>com.docdoku.plm.server.core.sharing.SharedDocument</class>
        <class>com.docdoku.plm.server.core.workflow.WorkspaceWorkflow</class>
        <class>com.docdoku.plm.server.core.workflow.Activity</class>
        <class>com.docdoku.plm.server.core.workflow.ActivityModel</class>
        <class>com.docdoku.plm.server.core.workflow.ParallelActivity</class>
        <class>com.docdoku.plm.server.core.workflow.ParallelActivityModel</class>
        <class>com.docdoku.plm.server.core.workflow.SequentialActivity</class>
        <class>com.docdoku.plm.server.core.workflow.SequentialActivityModel</class>
        <class>com.docdoku.plm.server.core.workflow.Task</class>
        <class>com.docdoku.plm.server.core.workflow.TaskModel</class>
        <class>com.docdoku.plm.server.core.workflow.Workflow</class>
        <class>com.docdoku.plm.server.core.workflow.WorkflowModel</class>
        <class>com.docdoku.plm.server.core.workflow.Role</class>
        <class>com.docdoku.plm.server.core.query.Query</class>
        <class>com.docdoku.plm.server.core.query.QueryRule</class>
        <class>com.docdoku.plm.server.core.query.QueryContext</class>
        <class>com.docdoku.plm.server.core.product.PathToPathLink</class>
        <class>com.docdoku.plm.server.core.meta.StatusChange</class>
        <class>com.docdoku.plm.server.core.hooks.Webhook</class>
        <class>com.docdoku.plm.server.core.hooks.SimpleWebhookApp</class>
        <class>com.docdoku.plm.server.core.hooks.SNSWebhookApp</class>
        <class>com.docdoku.plm.server.core.hooks.WebhookApp</class>

        <class>com.docdoku.plm.server.storage.CryptoConverter</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
            <property name="javax.persistence.schema-generation.database.action" value="create"/>
            <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
            <property name="javax.persistence.schema-generation.scripts.create-target" value="create.sql"/>
            <property name="javax.persistence.schema-generation.scripts.drop-target" value="drop.sql"/>
            ${sharedCacheModeInclude}
            ${clusterPropertiesInclude}
        </properties>
    </persistence-unit>
</persistence>

Hey,

can I see the persistence.xml once after you build the project. Should be in the jar/war file. So I can see if the placeholders are filled correctly.

 ${sharedCacheModeInclude}
 ${clusterPropertiesInclude}

Steven

After build the project ,the persistence.xml is:

-<properties>

<property name="javax.persistence.schema-generation.database.action" value="create"/>

<property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>

<property name="javax.persistence.schema-generation.scripts.create-target" value="create.sql"/>

<property name="javax.persistence.schema-generation.scripts.drop-target" value="drop.sql"/>

<property name="javax.persistence.sharedCache.mode" value="ALL"/>

</properties>