Search code examples
javajakarta-eeglassfishear

how to resolve The content of element type "application" is incomplete, it must match "(icon?,display-name,description?,module+,security-role*)".?


i am getting the below error in the console when i'm trying to run my application on glassfish.

SEVERE: DPL8015: Invalid Deployment Descriptors in Deployment descriptor file META-INF/application.xml in archive
    " The content of element type "application" is incomplete, it must match "(icon?,display-name,description?,module+,security-role*)".

i have the following code in my "application.xml"

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
    "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
<application>
  <display-name>MTCpreprint</display-name>
</application>

What should be done to resolve this issue?


Solution

  • Based on this part of the error message:

    it must match "(icon?,display-name,description?,module+,security-role*)"

    I would suggest that a <module>...</module> element is a required part of your XML. At least one such element must be present.

    • ? – indicates optional
    • + – indicates one or more
    • * – indicates zero or more