Jetty fails with j2ee 2.4

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty fails with j2ee 2.4

Glenn Silverman
Jetty 5.XX does not support schema declarations in web-app element of
web.xml and no DOCTYPE declation, as in:

<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

Is there a work-around??????

Glenn...




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

RE: Jetty fails with j2ee 2.4

rasto1968
This works fine for me, I've been using this type of declaration in my web
apps for over a year now. When you say Jetty doesn't support it, what do you
mean ? Error messages ?

Rob

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Glenn
Silverman
Sent: 14 October 2005 18:16
To: [hidden email]
Subject: [Jetty-support] Jetty fails with j2ee 2.4

Jetty 5.XX does not support schema declarations in web-app element of
web.xml and no DOCTYPE declation, as in:

<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

Is there a work-around??????

Glenn...




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

RE: Jetty fails with j2ee 2.4

Glenn Silverman-2
I get the following console text when I try to run the app:


[java] 10:15:28.750 EVENT  Started SocketListener on 0.0.0.0:8081
    [java] 10:15:28.750 WARN!!
    [java] org.mortbay.util.MultiException[org.xml.sax.SAXParseException:
Document root element "web-app", must match DOCTYPE root "null".]
    [java] at org.mortbay.http.HttpServer.start(HttpServer.java:640)
    [java] at org.mortbay.jetty.Server.main(Server.java:429)
    [java] [0]=org.xml.sax.SAXParseException: Document root element
"web-app", must match DOCTYPE root "null".

Glenn...

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Robert
Stone
Sent: Monday, October 17, 2005 1:26 AM
To: [hidden email]
Subject: RE: [Jetty-support] Jetty fails with j2ee 2.4


This works fine for me, I've been using this type of declaration in my web
apps for over a year now. When you say Jetty doesn't support it, what do you
mean ? Error messages ?

Rob

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Glenn
Silverman
Sent: 14 October 2005 18:16
To: [hidden email]
Subject: [Jetty-support] Jetty fails with j2ee 2.4

Jetty 5.XX does not support schema declarations in web-app element of
web.xml and no DOCTYPE declation, as in:

<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

Is there a work-around??????

Glenn...




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Jetty fails with j2ee 2.4

Kristian Nordal
On Oct 17, 2005, at 7:20 PM, Glenn Silverman wrote:

> I get the following console text when I try to run the app:
>
>
> [java] 10:15:28.750 EVENT  Started SocketListener on 0.0.0.0:8081
>     [java] 10:15:28.750 WARN!!
>     [java] org.mortbay.util.MultiException
> [org.xml.sax.SAXParseException:
> Document root element "web-app", must match DOCTYPE root "null".]
>     [java]     at org.mortbay.http.HttpServer.start(HttpServer.java:
> 640)
>     [java]     at org.mortbay.jetty.Server.main(Server.java:429)
>     [java] [0]=org.xml.sax.SAXParseException: Document root element
> "web-app", must match DOCTYPE root "null".

I've had error like this before, I think its related to your  
dependencies. With my latest set of dependencies it seems to work  
correctly, here's a list of what I'm currently using (pasted directly  
from my maven 2 pom):

<dependencies>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
       <version>1.0.4</version>
     </dependency>
     <dependency>
       <groupId>commons-el</groupId>
       <artifactId>commons-el</artifactId>
       <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>jetty</groupId>
       <artifactId>org.mortbay.jetty</artifactId>
       <version>5.1.4</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler-jdt</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-runtime</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>servlet-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jsp-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <version>2.6.2</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xmlParserAPIs</artifactId>
       <version>2.6.2</version>
     </dependency>
</dependencies>

>
> Glenn...
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Robert
> Stone
> Sent: Monday, October 17, 2005 1:26 AM
> To: [hidden email]
> Subject: RE: [Jetty-support] Jetty fails with j2ee 2.4
>
>
> This works fine for me, I've been using this type of declaration in  
> my web
> apps for over a year now. When you say Jetty doesn't support it,  
> what do you
> mean ? Error messages ?
>
> Rob
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Glenn
> Silverman
> Sent: 14 October 2005 18:16
> To: [hidden email]
> Subject: [Jetty-support] Jetty fails with j2ee 2.4
>
> Jetty 5.XX does not support schema declarations in web-app element of
> web.xml and no DOCTYPE declation, as in:
>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> Is there a work-around??????

--
Regards,
Kristian


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

RE: Jetty fails with j2ee 2.4

Glenn Silverman-2
Kristian,

I put the dependencies you listed in my POM (I'm using maven 1.0.2) and
still get the error re: web-app and DOCTYPE root "null".

Do I need a DOCTYPE declaration in my web.xml and if so, what dtd does
it need to refer to in order to work correctly.

Glenn...

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Kristian
Nordal
Sent: Monday, October 17, 2005 10:50 AM
To: [hidden email]
Subject: Re: [Jetty-support] Jetty fails with j2ee 2.4


On Oct 17, 2005, at 7:20 PM, Glenn Silverman wrote:

> I get the following console text when I try to run the app:
>
>
> [java] 10:15:28.750 EVENT  Started SocketListener on 0.0.0.0:8081
>     [java] 10:15:28.750 WARN!!
>     [java] org.mortbay.util.MultiException
> [org.xml.sax.SAXParseException:
> Document root element "web-app", must match DOCTYPE root "null".]
>     [java]     at org.mortbay.http.HttpServer.start(HttpServer.java:
> 640)
>     [java]     at org.mortbay.jetty.Server.main(Server.java:429)
>     [java] [0]=org.xml.sax.SAXParseException: Document root element
> "web-app", must match DOCTYPE root "null".

I've had error like this before, I think its related to your  
dependencies. With my latest set of dependencies it seems to work  
correctly, here's a list of what I'm currently using (pasted directly  
from my maven 2 pom):

<dependencies>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
       <version>1.0.4</version>
     </dependency>
     <dependency>
       <groupId>commons-el</groupId>
       <artifactId>commons-el</artifactId>
       <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>jetty</groupId>
       <artifactId>org.mortbay.jetty</artifactId>
       <version>5.1.4</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler-jdt</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-runtime</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>servlet-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jsp-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <version>2.6.2</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xmlParserAPIs</artifactId>
       <version>2.6.2</version>
     </dependency>
</dependencies>

>
> Glenn...
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Robert
> Stone
> Sent: Monday, October 17, 2005 1:26 AM
> To: [hidden email]
> Subject: RE: [Jetty-support] Jetty fails with j2ee 2.4
>
>
> This works fine for me, I've been using this type of declaration in  
> my web
> apps for over a year now. When you say Jetty doesn't support it,  
> what do you
> mean ? Error messages ?
>
> Rob
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Glenn
> Silverman
> Sent: 14 October 2005 18:16
> To: [hidden email]
> Subject: [Jetty-support] Jetty fails with j2ee 2.4
>
> Jetty 5.XX does not support schema declarations in web-app element of
> web.xml and no DOCTYPE declation, as in:
>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> Is there a work-around??????

--
Regards,
Kristian


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Jetty fails with j2ee 2.4

Kristian Nordal

On Oct 17, 2005, at 10:40 PM, Glenn Silverman wrote:

Kristian,

I put the dependencies you listed in my POM (I'm using maven 1.0.2) and
still get the error re: web-app and DOCTYPE root "null".

Do I need a DOCTYPE declaration in my web.xml and if so, what dtd does
it need to refer to in order to work correctly.

Yes, you need a DOCTYPE declaration (at least for the 2.3 servlet api). If you are using 2.3, then you need this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
...
</web-app>

For 2.4, this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="NameOfWebApp" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
...
</web-app>

The dependencies listed should support both I think.

I got the same kind of errors even with DOCTYPE declarations, it only went away when I found the right dependency's and version combinations. I can't say for sure if this was the whole problem, but I believe so. If you are missing the DOCTYPE declaration, then maybe it will work now.

Glenn... 

-----Original Message-----
[[hidden email]]On Behalf Of Kristian
Nordal
Sent: Monday, October 17, 2005 10:50 AM
Subject: Re: [Jetty-support] Jetty fails with j2ee 2.4


On Oct 17, 2005, at 7:20 PM, Glenn Silverman wrote:


I get the following console text when I try to run the app:


[java] 10:15:28.750 EVENT  Started SocketListener on 0.0.0.0:8081
    [java] 10:15:28.750 WARN!!
    [java] org.mortbay.util.MultiException 
[org.xml.sax.SAXParseException:
Document root element "web-app", must match DOCTYPE root "null".]
    [java]     at org.mortbay.http.HttpServer.start(HttpServer.java: 
640)
    [java]     at org.mortbay.jetty.Server.main(Server.java:429)
    [java] [0]=org.xml.sax.SAXParseException: Document root element
"web-app", must match DOCTYPE root "null".


I've had error like this before, I think its related to your  
dependencies. With my latest set of dependencies it seems to work  
correctly, here's a list of what I'm currently using (pasted directly  
from my maven 2 pom):

<dependencies>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
       <version>1.0.4</version>
     </dependency>
     <dependency>
       <groupId>commons-el</groupId>
       <artifactId>commons-el</artifactId>
       <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>jetty</groupId>
       <artifactId>org.mortbay.jetty</artifactId>
       <version>5.1.4</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-compiler-jdt</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jasper-runtime</artifactId>
       <version>5.5.9</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>servlet-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>tomcat</groupId>
       <artifactId>jsp-api</artifactId>
       <version>5.0.18</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <version>2.6.2</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xmlParserAPIs</artifactId>
       <version>2.6.2</version>
     </dependency>
</dependencies>



Glenn...

-----Original Message-----
[[hidden email]]On Behalf Of Robert
Stone
Sent: Monday, October 17, 2005 1:26 AM
Subject: RE: [Jetty-support] Jetty fails with j2ee 2.4


This works fine for me, I've been using this type of declaration in  
my web
apps for over a year now. When you say Jetty doesn't support it,  
what do you
mean ? Error messages ?

Rob

-----Original Message-----
[[hidden email]] On Behalf Of Glenn
Silverman
Sent: 14 October 2005 18:16
Subject: [Jetty-support] Jetty fails with j2ee 2.4

Jetty 5.XX does not support schema declarations in web-app element of
web.xml and no DOCTYPE declation, as in:

<web-app id="WebApp_ID" version="2.4"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

Is there a work-around??????


--
God luck,
Kristian


Reply | Threaded
Open this post in threaded view
|

Re: Jetty fails with j2ee 2.4

Eric Rizzo
In reply to this post by Glenn Silverman-2
On 10/17/05, Glenn Silverman <[hidden email]> wrote:

> I get the following console text when I try to run the app:
>
>
> [java] 10:15:28.750 EVENT  Started SocketListener on 0.0.0.0:8081
>     [java] 10:15:28.750 WARN!!
>     [java] org.mortbay.util.MultiException[org.xml.sax.SAXParseException:
> Document root element "web-app", must match DOCTYPE root "null".]
>     [java]      at org.mortbay.http.HttpServer.start(HttpServer.java:640)
>     [java]      at org.mortbay.jetty.Server.main(Server.java:429)
>     [java] [0]=org.xml.sax.SAXParseException: Document root element
> "web-app", must match DOCTYPE root "null".

I think I've seen this when an older XML parser was being used. Are
you sure there is no JAR for Crimson or some other XML parser that
does not support the above type of XML on your classpath (one place
some people forget to look is in the ext directory of their JRE lib).

HTH,
Eric


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Jetty fails with j2ee 2.4

Greg Wilkins-5
In reply to this post by Glenn Silverman

Glenn,

can you run the template webapp that is bundled with Jetty?
ie out of the box just run

  java -jar start.jar

the template webapp uses

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
   xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version="2.4">


How is your runtime different to the standard jetty environment?
Make sure you have a recent version of xerces and the xml APIs in your classpath.

regards



Glenn Silverman wrote:

> Jetty 5.XX does not support schema declarations in web-app element of
> web.xml and no DOCTYPE declation, as in:
>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> Is there a work-around??????
>
> Glenn...
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support