Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7159621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:15:41+00:00 2026-05-28T13:15:41+00:00

I created 2 maven projects, a web application fxserver2 and a web library SleepyFox

  • 0

I created 2 maven projects, a web application fxserver2 and a web library SleepyFox.

I then created a src/main/resources/META-INF/web-fragment.xml file in SleepyFox that I’d like to be automatically “included” into my fxserver web.xml

Unfortunately, I’m getting an error that looks like this:

24-Jan-2012 19:38:50 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor fxserver2.xml from /Users/sparkyspider/Tomcat/apache-tomcat-7.0.12/conf/Catalina/localhost
24-Jan-2012 19:38:50 org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)

and then

24-Jan-2012 19:38:50 org.apache.catalina.startup.ContextConfig parseWebXml
SEVERE: Parse error in application web.xml file at jndi:/localhost/fxserver2/WEB-INF/lib/SleepyFox-0.9.jar!/META-INF/web-fragment.xml
org.xml.sax.SAXParseException: Premature end of file.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) 

The second error seems to indicate that the correct file is indeed being read, but I have no idea why its giving me a premature end of file error.

I included my fxserver2 web.xml

<?xml version="1.0"?>
<web-app>   
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
</web-app>

And also my SleepyFox web-fragment.xml

<web-fragment>
    <listener>
        <listener-class>com.foxbomb.fxserver2.ApplicationContext</listener-class>
    </listener>
</web-fragment>

Any advice greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:15:42+00:00Added an answer on May 28, 2026 at 1:15 pm

    I think you need to mention the web-app_3_0.xsd schema in your main web.xml which also loads web-common_3_0.xsd automatically. This common schema has elements like session-config>

    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
             http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             version="3.0">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Maven web application with text files in src/main/webapp/textfilesdir As I understand
I'm trying to create a web application using maven, tomcat and hibernate. Now I'm
I have created a web application using Jersey and Dynamic Web Project of Eclipse.
I'm using M2E to create Maven archetype projects (in this case a simple web
I have the following servlet coded in /src/main/java/examples/web/SimpleServlet.java : package examples.web; import java.io.IOException; import
I have a Flex/Java web application that uses Maven as a build tool. Currently,
High Level Goal: Create a single Maven Web Application project that can be used
I just converted one of our web projects from NetBeans ANT to Maven 2
I have following Maven projects set up: PM-Core PM-Web (with a dependency to PM-Core)
Following this question (in short: I have created a web project with maven and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.