0
votes

I am trying to deploy a war application (the application was written to be deployed on jetty and it access an underlying postgres database) on a glassfish 4 application server. I used the GlassFish admin console to deploy the war file and I am getting the following error at the admin console :

Error occurred during deployment: Exception while deploying the app [examples-simulated-2.1.0] : org.xml.sax.SAXParseException; lineNumber: 85; columnNumber: 17; Deployment descriptor file WEB-INF/web.xml in archive [examples-simulated-2.1.0]. cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":servlet-class, "http://java.sun.com/xml/ns/javaee":jsp-file}' is expected.. Please see server.log for more details.

You can see the server.log here :

http://pastebin.com/AKiFufq4

Any ideas on how to fix that? Thank you.

1

1 Answers

0
votes

It is very possible that you have your elements in the web.xml in wrong order - for instance you need to define context params before servlet definition. See the proper order of elements here, it's an older article but I guess this really didn't change much.