You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by "Mark R. Diggory" <md...@latte.harvard.edu> on 2002/10/07 16:43:27 UTC

Can't deploy Custom Tag Library on Microsoth Windoz

I keep getting these parsing exceptions when I try to load my custom 
taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.

> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.3
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> PARSE error at line 1 column -1
> org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8 char
>  -- is an XML encoding declaration missing?" (line number may be too low).
> No tags
> No tags


I know this is coming from some parsing error when the tld is parsed. 
But even if I put the tld file into different encodings (ISO-8859-1). I 
still get the exceptions.

example tld header:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN"
         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
...

-Mark Diggory



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Craig R. McClanahan wrote:

>>I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.
>>
>>When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...
>>
>>-Mark
>>
>>p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.
>>
>>    
>>
>
>Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
>but I'm not trying to use any UTF-8 characters in my TLDs either.
>
>Craig
>  
>

I hadn't thought I was using any special UTF-8 characters in my tld's. 
But the default encoding set by the XML Editor I'm using was UTF-8. 
Again I tried to save the file in another ISO format and was successfull 
in saving it in that format and parsing it in that format externally. 
The parser used by tomcat was still barking that it couldn't parse it, 
that there was a non-UTF-8 charater present.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Craig R. McClanahan wrote:

>>I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.
>>
>>When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...
>>
>>-Mark
>>
>>p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.
>>
>>    
>>
>
>Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
>but I'm not trying to use any UTF-8 characters in my TLDs either.
>
>Craig
>  
>

I hadn't thought I was using any special UTF-8 characters in my tld's. 
But the default encoding set by the XML Editor I'm using was UTF-8. 
Again I tried to save the file in another ISO format and was successfull 
in saving it in that format and parsing it in that format externally. 
The parser used by tomcat was still barking that it couldn't parse it, 
that there was a non-UTF-8 charater present.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Why does one java process continue to run and take more and more CPU?

Posted by Brandon Cruz <bc...@norvax.com>.
Running Tomcat 3.2.4, Sun JDK 1.3.1_01, AJP13, Apache 1.3.x on Linux.  One
java process seems to keep running and take more and more CPU as time goes
on.  It just slowly keeps growing and slowing down the system.  Right now, I
look and it has been running for 2338 minutes and is taking 48.9% of the
CPU.

Has anyone had this problem with this environment or can anyone help me
solve this?

Brandon



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 15:46:31 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Cc: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> Are you testing on Windows with j2sdk1.4?
>

Among other combinations, yes.

Beyond my own use, anybody using the Java Web Services Developer Pack
(JWSDP) download from Sun is doing exactly this as well, since it's based
on an earlier 4.1 version of Tomcat.

For further testing, grab the "standard" tag library from Jakarta Taglibs
(it's the basis for the RI of the JSP Standard Tag Library) and deploy it
on your favorite Tomcat+JDK+OS combinations -- it uses exactly the same
techniques to process TLD files.

Craig


> Craig R. McClanahan wrote:
>
> >Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
> >but I'm not trying to use any UTF-8 characters in my TLDs either.
> >
> >Craig
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 15:46:31 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Cc: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> Are you testing on Windows with j2sdk1.4?
>

Among other combinations, yes.

Beyond my own use, anybody using the Java Web Services Developer Pack
(JWSDP) download from Sun is doing exactly this as well, since it's based
on an earlier 4.1 version of Tomcat.

For further testing, grab the "standard" tag library from Jakarta Taglibs
(it's the basis for the RI of the JSP Standard Tag Library) and deploy it
on your favorite Tomcat+JDK+OS combinations -- it uses exactly the same
techniques to process TLD files.

Craig


> Craig R. McClanahan wrote:
>
> >Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
> >but I'm not trying to use any UTF-8 characters in my TLDs either.
> >
> >Craig
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Are you testing on Windows with j2sdk1.4?

Craig R. McClanahan wrote:

>Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
>but I'm not trying to use any UTF-8 characters in my TLDs either.
>
>Craig
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Are you testing on Windows with j2sdk1.4?

Craig R. McClanahan wrote:

>Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
>but I'm not trying to use any UTF-8 characters in my TLDs either.
>
>Craig
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 15:18:57 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> >
> >
> >If you access your XML parser through the JAXP APIs (which Tomcat does for
> >its own use), there is a standard and portable mechanism for selecting the
> >parser implementation to be used -- see the JAXP specification for
> >details.
> >
> >
> >Craig McClanahan
> >
> >
> >
> No, this has to strictly deal with default tomcat installation startup
> and what it uses as a default when loading taglibraries. Not with which
> parser I prefer to use in a particular webapplication.
>

You can configure the parser Tomcat itself uses by setting up
jaxp.properties in $CATALINA_HOME/server/classes (or in a jar file in
server/lib).

> If I setup my taglibrary Jar with
>
> /META-INF/taglib.tld
>
> and configure my web.xml file to load from the Jar file.
>
>     <taglib>
>         <taglib-uri>/thedata-taglib-validation-0.1</taglib-uri>
>         <taglib-location>/WEB-INF/lib/Validation.jar</taglib-location>
>     </taglib>
>
> Then the default installations of Tomcat versions 4.0.3, 4.0.5, 4.1 all
> fail to load the taglib because of the following error:
>
> PARSE error at line 1 column -1
> > >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> > >> UTF-8 char
> > >>  -- is an XML encoding declaration missing?" (line number may be too
> > >> low).
>
> This seems to happen on windows and not linux.
>
> I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.
>
> When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...
>
> -Mark
>
> p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.
>

Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
but I'm not trying to use any UTF-8 characters in my TLDs either.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 15:18:57 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> >
> >
> >If you access your XML parser through the JAXP APIs (which Tomcat does for
> >its own use), there is a standard and portable mechanism for selecting the
> >parser implementation to be used -- see the JAXP specification for
> >details.
> >
> >
> >Craig McClanahan
> >
> >
> >
> No, this has to strictly deal with default tomcat installation startup
> and what it uses as a default when loading taglibraries. Not with which
> parser I prefer to use in a particular webapplication.
>

You can configure the parser Tomcat itself uses by setting up
jaxp.properties in $CATALINA_HOME/server/classes (or in a jar file in
server/lib).

> If I setup my taglibrary Jar with
>
> /META-INF/taglib.tld
>
> and configure my web.xml file to load from the Jar file.
>
>     <taglib>
>         <taglib-uri>/thedata-taglib-validation-0.1</taglib-uri>
>         <taglib-location>/WEB-INF/lib/Validation.jar</taglib-location>
>     </taglib>
>
> Then the default installations of Tomcat versions 4.0.3, 4.0.5, 4.1 all
> fail to load the taglib because of the following error:
>
> PARSE error at line 1 column -1
> > >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> > >> UTF-8 char
> > >>  -- is an XML encoding declaration missing?" (line number may be too
> > >> low).
>
> This seems to happen on windows and not linux.
>
> I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.
>
> When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...
>
> -Mark
>
> p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.
>

Works for me with no problems on all 4.0.x and 4.1.x versions of Tomcat;
but I'm not trying to use any UTF-8 characters in my TLDs either.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
>
>
>If you access your XML parser through the JAXP APIs (which Tomcat does for
>its own use), there is a standard and portable mechanism for selecting the
>parser implementation to be used -- see the JAXP specification for
>details.
>  
>
>Craig McClanahan
>
>  
>
No, this has to strictly deal with default tomcat installation startup 
and what it uses as a default when loading taglibraries. Not with which 
parser I prefer to use in a particular webapplication.

If I setup my taglibrary Jar with

/META-INF/taglib.tld

and configure my web.xml file to load from the Jar file.

    <taglib>
        <taglib-uri>/thedata-taglib-validation-0.1</taglib-uri>
        <taglib-location>/WEB-INF/lib/Validation.jar</taglib-location>
    </taglib>

Then the default installations of Tomcat versions 4.0.3, 4.0.5, 4.1 all 
fail to load the taglib because of the following error:

PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).

This seems to happen on windows and not linux.

I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.

When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...

-Mark

p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
>
>
>If you access your XML parser through the JAXP APIs (which Tomcat does for
>its own use), there is a standard and portable mechanism for selecting the
>parser implementation to be used -- see the JAXP specification for
>details.
>  
>
>Craig McClanahan
>
>  
>
No, this has to strictly deal with default tomcat installation startup 
and what it uses as a default when loading taglibraries. Not with which 
parser I prefer to use in a particular webapplication.

If I setup my taglibrary Jar with

/META-INF/taglib.tld

and configure my web.xml file to load from the Jar file.

    <taglib>
        <taglib-uri>/thedata-taglib-validation-0.1</taglib-uri>
        <taglib-location>/WEB-INF/lib/Validation.jar</taglib-location>
    </taglib>

Then the default installations of Tomcat versions 4.0.3, 4.0.5, 4.1 all 
fail to load the taglib because of the following error:

PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).

This seems to happen on windows and not linux.

I've tried numerous encodings in my tld file, it always says UTF-8 even when I'm not encoded in UTF-8. It was pointed out that this is a bug in an old version of Xerces. But, when I install LE versions, I'm not using Xerces, I'm using the default Crimson parser in j2sdk 1.4.

When I pull my tld's out of the Jar files reference the external copies in web.xml everything loads ok, so it looks like it is definitly a problem in some Jar URLConnection...

-Mark

p.s. I'm not trying to just get an installation to work, I want my users to just be able to download tomcat, install it out of the box and install my taglibray jar. I want them to reference the "jar" in the web.xml and not the tld file and I want it work an all versions of Tomcat 4.0 thru 4.1 tested on both Windows and Linux.







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 14:45:15 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Cc: tomcat-user@jakarta.apache.org
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> Well, I installed 4.0.3 regular version instead of LE, now I assume I
> should be using the Xerces parser thats part of tomcat, but I still get
> the exceptions. Since j2sdk has its own installation of an xml parser
> (Crimson, go figure which Moron came up with the idea to default package
> a buggy xml parser into the j2sdk and then force us to configure some
> stupid config buried inside the jdk installation just to get out of it.
> What up with that Sun!).
>
> Is there a way I can configure tomcat to use a different XML parser
> without messing around in the jdk?
>
> Hey Sun, if your listening! I don't want the jdk to set a "default XML
> parser", I would never want jdk to set a "default xml parser". Its
> "Always" the case that I want to use "MY SELECTED XML PARSER" never
> never never would I want it to "JUST DEFAULT to some parser that I've
> never used before in my life", expecially one that is buggy!
>

If you access your XML parser through the JAXP APIs (which Tomcat does for
its own use), there is a standard and portable mechanism for selecting the
parser implementation to be used -- see the JAXP specification for
details.

> -Mark

Craig McClanahan


>
> Mark R. Diggory wrote:
>
> > I keep getting these parsing exceptions when I try to load my custom
> > taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
> >
> >> Starting service Tomcat-Standalone
> >> Apache Tomcat/4.0.3
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> No tags
> >> No tags
> >
> >
> >
> > I know this is coming from some parsing error when the tld is parsed.
> > But even if I put the tld file into different encodings (ISO-8859-1).
> > I still get the exceptions.
> >
> > example tld header:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag
> > Library 1.2//EN"
> >         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> > <taglib>
> > ...
> >
> > -Mark Diggory
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 Oct 2002, Mark R. Diggory wrote:

> Date: Mon, 07 Oct 2002 14:45:15 -0400
> From: Mark R. Diggory <md...@latte.harvard.edu>
> Reply-To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> To: Tag Libraries Developers List <ta...@jakarta.apache.org>
> Cc: tomcat-user@jakarta.apache.org
> Subject: Re: Can't deploy Custom Tag Library on Microsoth Windoz
>
> Well, I installed 4.0.3 regular version instead of LE, now I assume I
> should be using the Xerces parser thats part of tomcat, but I still get
> the exceptions. Since j2sdk has its own installation of an xml parser
> (Crimson, go figure which Moron came up with the idea to default package
> a buggy xml parser into the j2sdk and then force us to configure some
> stupid config buried inside the jdk installation just to get out of it.
> What up with that Sun!).
>
> Is there a way I can configure tomcat to use a different XML parser
> without messing around in the jdk?
>
> Hey Sun, if your listening! I don't want the jdk to set a "default XML
> parser", I would never want jdk to set a "default xml parser". Its
> "Always" the case that I want to use "MY SELECTED XML PARSER" never
> never never would I want it to "JUST DEFAULT to some parser that I've
> never used before in my life", expecially one that is buggy!
>

If you access your XML parser through the JAXP APIs (which Tomcat does for
its own use), there is a standard and portable mechanism for selecting the
parser implementation to be used -- see the JAXP specification for
details.

> -Mark

Craig McClanahan


>
> Mark R. Diggory wrote:
>
> > I keep getting these parsing exceptions when I try to load my custom
> > taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
> >
> >> Starting service Tomcat-Standalone
> >> Apache Tomcat/4.0.3
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> PARSE error at line 1 column -1
> >> org.xml.sax.SAXParseException: Character conversion error: "Malformed
> >> UTF-8 char
> >>  -- is an XML encoding declaration missing?" (line number may be too
> >> low).
> >> No tags
> >> No tags
> >
> >
> >
> > I know this is coming from some parsing error when the tld is parsed.
> > But even if I put the tld file into different encodings (ISO-8859-1).
> > I still get the exceptions.
> >
> > example tld header:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag
> > Library 1.2//EN"
> >         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> > <taglib>
> > ...
> >
> > -Mark Diggory
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Well, I installed 4.0.3 regular version instead of LE, now I assume I 
should be using the Xerces parser thats part of tomcat, but I still get 
the exceptions. Since j2sdk has its own installation of an xml parser 
(Crimson, go figure which Moron came up with the idea to default package 
a buggy xml parser into the j2sdk and then force us to configure some 
stupid config buried inside the jdk installation just to get out of it. 
What up with that Sun!).

Is there a way I can configure tomcat to use a different XML parser 
without messing around in the jdk?

Hey Sun, if your listening! I don't want the jdk to set a "default XML 
parser", I would never want jdk to set a "default xml parser". Its 
"Always" the case that I want to use "MY SELECTED XML PARSER" never 
never never would I want it to "JUST DEFAULT to some parser that I've 
never used before in my life", expecially one that is buggy!

-Mark

Mark R. Diggory wrote:

> I keep getting these parsing exceptions when I try to load my custom 
> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>
>> Starting service Tomcat-Standalone
>> Apache Tomcat/4.0.3
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> No tags
>> No tags
>
>
>
> I know this is coming from some parsing error when the tld is parsed. 
> But even if I put the tld file into different encodings (ISO-8859-1). 
> I still get the exceptions.
>
> example tld header:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
> ...
>
> -Mark Diggory
>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Well, I installed 4.0.3 regular version instead of LE, now I assume I 
should be using the Xerces parser thats part of tomcat, but I still get 
the exceptions. Since j2sdk has its own installation of an xml parser 
(Crimson, go figure which Moron came up with the idea to default package 
a buggy xml parser into the j2sdk and then force us to configure some 
stupid config buried inside the jdk installation just to get out of it. 
What up with that Sun!).

Is there a way I can configure tomcat to use a different XML parser 
without messing around in the jdk?

Hey Sun, if your listening! I don't want the jdk to set a "default XML 
parser", I would never want jdk to set a "default xml parser". Its 
"Always" the case that I want to use "MY SELECTED XML PARSER" never 
never never would I want it to "JUST DEFAULT to some parser that I've 
never used before in my life", expecially one that is buggy!

-Mark

Mark R. Diggory wrote:

> I keep getting these parsing exceptions when I try to load my custom 
> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>
>> Starting service Tomcat-Standalone
>> Apache Tomcat/4.0.3
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> No tags
>> No tags
>
>
>
> I know this is coming from some parsing error when the tld is parsed. 
> But even if I put the tld file into different encodings (ISO-8859-1). 
> I still get the exceptions.
>
> example tld header:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
> ...
>
> -Mark Diggory
>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Here's my environment:

j2sdk 1.4.0
Ant 1.5.1
tomcat LE 4.1.12

I have no idea which implementation of Xerces it is using out of these 
installations. But these are the only locations that I think Xerces is 
getting picked up from are Ant and j2sdk. I though j2sdk used Crimson?

thanks,
-Mark


Jean-Francois Arcand wrote:

> Which version of Xerces are you using? If it's 2.2, there is a bug 
> associated with the problem:
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282
>
> -- Jeanfrancois
>
>
>
> Mark R. Diggory wrote:
>
>> I keep getting these parsing exceptions when I try to load my custom 
>> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>>
>>> Starting service Tomcat-Standalone
>>> Apache Tomcat/4.0.3
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> No tags
>>> No tags
>>
>>
>>
>>
>> I know this is coming from some parsing error when the tld is parsed. 
>> But even if I put the tld file into different encodings (ISO-8859-1). 
>> I still get the exceptions.
>>
>> example tld header:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
>> Library 1.2//EN"
>>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
>> <taglib>
>> ...
>>
>> -Mark Diggory
>>
>>
>>
>> --
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
> This doesn't seem to happen with the standard.jar and I'm totally 
> copying its layout and the version information at the beginning of the 
> file accept for the encoding being UTF-8 instead of ISO...

Well, I notice that the standard jar also stores the files under thier 
own names and not /meta-inf/taglib.tld. I would suspect this is why this 
error doesn't show up with the standard taglib, and probibly with any of 
the other taglibraries at Jakarta as well, because they all do not use 
the /meta-inf/taglib.tld convention outlined in the JSP specification. 
They all bank on the new clauses which say you can put the taglib under 
any name in the /meta-inf/ as long as it has a tld. extension. But I bet 
this particular clause isn't tested in Jasper/Tomcat yet?  Plus I notice 
that the jakarta taglibs also reley on the the tld being in the WEB-INF 
instead of in the Jar. The one in the Jar is never really getting used! 
The one in WEB-INF is getting loaded. I bet this is a bug. It smells 
like a bug to me...

>
> The beginning of my files look like this
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
>    <tlib-version>1.1</tlib-version>
>    <jsp-version>1.2</jsp-version>
>    <short-name>Conditional</short-name>
>
> The beginning of the standard.jar files looks like this
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
>    <tlib-version>1.0</tlib-version>
>    <jsp-version>1.2</jsp-version>
>
> I'm generating my tld files using Forte4J because I like the code 
> generation capabilities. It forces the tld files to be UTF-8. I really 
> don't think that should be so much of a problem. Expecially if when 
> the tld is outside of the jar it working fine. This seems to be 
> something to do with the mechanism that gets the tld from the Jar file 
> (which I have absolutely no knowledge of, or want to explore in any 
> detail personally). Could it be trying to force a specific encoding 
> onto the parser? Or could it not be setting the encoding appropriately 
> in the parser. I know that when you set a Char/Stream to the parser 
> you have tell the parser its encoding. I would suspect there is a 
> difference in the code between pulling from the Jar vs. Pulling it 
> from the file. Probibly something like getting the resource from a 
> JarUrlConnection vs pulling it from some resource location.
>
> I'll play with the encodings again, but I doubt it will effect 
> anything in the long run. Again, I don't get any problems from 
> validating this file directly using Xerces 1.4.4.
>
> -Mark Diggory
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
> This doesn't seem to happen with the standard.jar and I'm totally 
> copying its layout and the version information at the beginning of the 
> file accept for the encoding being UTF-8 instead of ISO...

Well, I notice that the standard jar also stores the files under thier 
own names and not /meta-inf/taglib.tld. I would suspect this is why this 
error doesn't show up with the standard taglib, and probibly with any of 
the other taglibraries at Jakarta as well, because they all do not use 
the /meta-inf/taglib.tld convention outlined in the JSP specification. 
They all bank on the new clauses which say you can put the taglib under 
any name in the /meta-inf/ as long as it has a tld. extension. But I bet 
this particular clause isn't tested in Jasper/Tomcat yet?  Plus I notice 
that the jakarta taglibs also reley on the the tld being in the WEB-INF 
instead of in the Jar. The one in the Jar is never really getting used! 
The one in WEB-INF is getting loaded. I bet this is a bug. It smells 
like a bug to me...

>
> The beginning of my files look like this
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
>    <tlib-version>1.1</tlib-version>
>    <jsp-version>1.2</jsp-version>
>    <short-name>Conditional</short-name>
>
> The beginning of the standard.jar files looks like this
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
>    <tlib-version>1.0</tlib-version>
>    <jsp-version>1.2</jsp-version>
>
> I'm generating my tld files using Forte4J because I like the code 
> generation capabilities. It forces the tld files to be UTF-8. I really 
> don't think that should be so much of a problem. Expecially if when 
> the tld is outside of the jar it working fine. This seems to be 
> something to do with the mechanism that gets the tld from the Jar file 
> (which I have absolutely no knowledge of, or want to explore in any 
> detail personally). Could it be trying to force a specific encoding 
> onto the parser? Or could it not be setting the encoding appropriately 
> in the parser. I know that when you set a Char/Stream to the parser 
> you have tell the parser its encoding. I would suspect there is a 
> difference in the code between pulling from the Jar vs. Pulling it 
> from the file. Probibly something like getting the resource from a 
> JarUrlConnection vs pulling it from some resource location.
>
> I'll play with the encodings again, but I doubt it will effect 
> anything in the long run. Again, I don't get any problems from 
> validating this file directly using Xerces 1.4.4.
>
> -Mark Diggory
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
When I was working with LE versions of Tomcat I believe it was 
defaulting to whatever is in j2sdk1.4.0. I think this is Crimson, only 
because the code for Crimson is in the src.zip of j2sdk. What I saw with 
that was the following parsing error:

PARSE error at line 1 column -1
org.xml.sax.SAXParseException: Character conversion error: "Malformed 
UTF-8 char
 -- is an XML encoding declaration missing?" (line number may be too low).

So I got sick of trying to solve that and went and got all the full 
versions. Now whatever version of Xerces is present in the full versions 
1.4.4 (I think) I'm not sure about Tomcat 4.1. Does that use Xerces2?

Then the error becomes less obvious
PARSE error at line 1 column 1
org.xml.sax.SAXParseException: The markup in the document preceding the 
root ele
ment must be well-formed.

So, I don't think its the parser specifically. I pull the tld files out 
of the Jar and reference them directly in the web.xml file and they work 
fine with not exceptions. If there's a tld in any of my custom tag jar 
files I get the exception. This doesn't seem to happen with the 
standard.jar and I'm totally copying its layout and the version 
information at the beginning of the file accept for the encoding being 
UTF-8 instead of ISO...

The beginning of my files look like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN"
        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.1</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>Conditional</short-name>

The beginning of the standard.jar files looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN"
  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>

I'm generating my tld files using Forte4J because I like the code 
generation capabilities. It forces the tld files to be UTF-8. I really 
don't think that should be so much of a problem. Expecially if when the 
tld is outside of the jar it working fine. This seems to be something to 
do with the mechanism that gets the tld from the Jar file (which I have 
absolutely no knowledge of, or want to explore in any detail 
personally). Could it be trying to force a specific encoding onto the 
parser? Or could it not be setting the encoding appropriately in the 
parser. I know that when you set a Char/Stream to the parser you have 
tell the parser its encoding. I would suspect there is a difference in 
the code between pulling from the Jar vs. Pulling it from the file. 
Probibly something like getting the resource from a JarUrlConnection vs 
pulling it from some resource location.

I'll play with the encodings again, but I doubt it will effect anything 
in the long run. Again, I don't get any problems from validating this 
file directly using Xerces 1.4.4.

-Mark Diggory



Jean-Francois Arcand wrote:

> Which version of Xerces are you using? If it's 2.2, there is a bug 
> associated with the problem:
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282
>
> -- Jeanfrancois
>
>
>
> Mark R. Diggory wrote:
>
>> I keep getting these parsing exceptions when I try to load my custom 
>> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>>
>>> Starting service Tomcat-Standalone
>>> Apache Tomcat/4.0.3
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> No tags
>>> No tags
>>
>>
>>
>>
>> I know this is coming from some parsing error when the tld is parsed. 
>> But even if I put the tld file into different encodings (ISO-8859-1). 
>> I still get the exceptions.
>>
>> example tld header:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
>> Library 1.2//EN"
>>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
>> <taglib>
>> ...
>>
>> -Mark Diggory
>>
>>
>>
>> --
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
When I was working with LE versions of Tomcat I believe it was 
defaulting to whatever is in j2sdk1.4.0. I think this is Crimson, only 
because the code for Crimson is in the src.zip of j2sdk. What I saw with 
that was the following parsing error:

PARSE error at line 1 column -1
org.xml.sax.SAXParseException: Character conversion error: "Malformed 
UTF-8 char
 -- is an XML encoding declaration missing?" (line number may be too low).

So I got sick of trying to solve that and went and got all the full 
versions. Now whatever version of Xerces is present in the full versions 
1.4.4 (I think) I'm not sure about Tomcat 4.1. Does that use Xerces2?

Then the error becomes less obvious
PARSE error at line 1 column 1
org.xml.sax.SAXParseException: The markup in the document preceding the 
root ele
ment must be well-formed.

So, I don't think its the parser specifically. I pull the tld files out 
of the Jar and reference them directly in the web.xml file and they work 
fine with not exceptions. If there's a tld in any of my custom tag jar 
files I get the exception. This doesn't seem to happen with the 
standard.jar and I'm totally copying its layout and the version 
information at the beginning of the file accept for the encoding being 
UTF-8 instead of ISO...

The beginning of my files look like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN"
        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.1</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>Conditional</short-name>

The beginning of the standard.jar files looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN"
  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>

I'm generating my tld files using Forte4J because I like the code 
generation capabilities. It forces the tld files to be UTF-8. I really 
don't think that should be so much of a problem. Expecially if when the 
tld is outside of the jar it working fine. This seems to be something to 
do with the mechanism that gets the tld from the Jar file (which I have 
absolutely no knowledge of, or want to explore in any detail 
personally). Could it be trying to force a specific encoding onto the 
parser? Or could it not be setting the encoding appropriately in the 
parser. I know that when you set a Char/Stream to the parser you have 
tell the parser its encoding. I would suspect there is a difference in 
the code between pulling from the Jar vs. Pulling it from the file. 
Probibly something like getting the resource from a JarUrlConnection vs 
pulling it from some resource location.

I'll play with the encodings again, but I doubt it will effect anything 
in the long run. Again, I don't get any problems from validating this 
file directly using Xerces 1.4.4.

-Mark Diggory



Jean-Francois Arcand wrote:

> Which version of Xerces are you using? If it's 2.2, there is a bug 
> associated with the problem:
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282
>
> -- Jeanfrancois
>
>
>
> Mark R. Diggory wrote:
>
>> I keep getting these parsing exceptions when I try to load my custom 
>> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>>
>>> Starting service Tomcat-Standalone
>>> Apache Tomcat/4.0.3
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> PARSE error at line 1 column -1
>>> org.xml.sax.SAXParseException: Character conversion error: 
>>> "Malformed UTF-8 char
>>>  -- is an XML encoding declaration missing?" (line number may be too 
>>> low).
>>> No tags
>>> No tags
>>
>>
>>
>>
>> I know this is coming from some parsing error when the tld is parsed. 
>> But even if I put the tld file into different encodings (ISO-8859-1). 
>> I still get the exceptions.
>>
>> example tld header:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
>> Library 1.2//EN"
>>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
>> <taglib>
>> ...
>>
>> -Mark Diggory
>>
>>
>>
>> --
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Jasper complains when parsing valid TLD (was: Can't deploy Custom Tag Library ... )

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Jean-Francois Arcand wrote:

> Well, after reading all you mail/exchange (look at my 
> email-address....Craig have the same ;-) ), you should take time to 
> think/re-read your stuff before sending that type of email. I know 
> it's frustrating, but ..... 

Point well taken, I apoligize if anyone found it irritating. I know I 
can be overbearing sometimes with my opinion. ;-)  But I'll still argue 
that Sun made some bad decisions in packaging all this "stuff" into j2sdk.

> Anyway, back to real work! I have a feeling that you tld file is maybe 
> not xml compliant or you are facing a bug that I have fixed with 
> Xerces in Tomcat:
>
> But IMBW..I'm sure it's something like that. Maybe Forte4J (made by 
> SUN ;-) ) is doing something under the hood......also, try with Xerces 
> 2.1. I know, Crimson has the same problem, but maybe there is a bug in 
> both version. Anyway, I'm probably not the best person for that 
> problem, but try to post you problem on the xerces-j mailling list 
> (xml.apache.org). Maybe you will have sometings better than my 
> recommendation....
>
> -- Jeanfrancois

With this in mind, I decided to provide a test example to see if it is 
truly an issue with Tomcat and not with Forte. So I took the log tag out 
of the examples directory and placed it into its own log.jar with tld 
descriptor. In this war one can see the following layout.

/Test/WEB-INF/lib/log.jar (containing the examples/log tag classes and 
tld file).
/Test/WEB-INF/web.xml (tag descriptor referencing the jar file)
/Test/WEB-INF/build.xml (how the log jar was built)
/Test/jsp (example)

What I've found is that ther are two issues going on

1.) The taglib cannot load in 4.0.3, but does load successfully in 
4.0.4+ and 4.1.* so this is a bug in 4.0.3 LE and Full on WindowsXP/J2sdk.
2.) Since it works on 4.0.4+ and 4.1.* versions of 
Tomcat/WindowsXP/J2sdk, there is *something else wrong* with my taglibs 
that causing failure on those platforms.

I guess I can live without it working on 4.0.3, I'm trying to upgrade 
anyways, if required I can provide a *work-around* for my developers...

So, on 4.1.* with logging cranked way up, I've been seeing errors that 
Jasper encountered a TEI class when the tld already has a variable? Very 
wierd error. Here's an example of a tag in my taglib, if anyone sees 
anything wrong with this please let me know, it is still valid against 
the dtd. (again this was a tld generated by Forte4J).

    <tag>
        <name>catch</name>
        <tag-class>edu.harvard.hmdc.taglib.conditional.CatchTag</tag-class>
        
<tei-class>edu.harvard.hmdc.taglib.conditional.CatchTagTEI</tei-class>
        <body-content>JSP</body-content>
        <description/>
        <variable>
            <name-from-attribute>name</name-from-attribute>
            <variable-class>java.lang.Throwable</variable-class>
            <declare>true</declare>
            <scope>NESTED</scope>
        </variable>
        <attribute>
            <name>class_name</name>
            <required>true</required>
            <rtexprvalue>false</rtexprvalue>
            <type>String</type>
        </attribute>
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
            <type>String</type>
        </attribute>
        <example/>
    </tag>

Here is the exception in 4.1.12

org.apache.jasper.JasperException: null(-1,-1) variable subelement 
defined in tld when TagExtraInfo class 
edu.harvard.hmdc.taglib.conditional.CatchTagTEI is non-null
    at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
    at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:386)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:273)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183)
    at 
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
    at org.apache.jasper.compiler.Parser

I get the feeling Forte is generating more information than Jasper Likes.

-Mark

Jasper complains when parsing valid TLD (was: Can't deploy Custom Tag Library ... )

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Jean-Francois Arcand wrote:

> Well, after reading all you mail/exchange (look at my 
> email-address....Craig have the same ;-) ), you should take time to 
> think/re-read your stuff before sending that type of email. I know 
> it's frustrating, but ..... 

Point well taken, I apoligize if anyone found it irritating. I know I 
can be overbearing sometimes with my opinion. ;-)  But I'll still argue 
that Sun made some bad decisions in packaging all this "stuff" into j2sdk.

> Anyway, back to real work! I have a feeling that you tld file is maybe 
> not xml compliant or you are facing a bug that I have fixed with 
> Xerces in Tomcat:
>
> But IMBW..I'm sure it's something like that. Maybe Forte4J (made by 
> SUN ;-) ) is doing something under the hood......also, try with Xerces 
> 2.1. I know, Crimson has the same problem, but maybe there is a bug in 
> both version. Anyway, I'm probably not the best person for that 
> problem, but try to post you problem on the xerces-j mailling list 
> (xml.apache.org). Maybe you will have sometings better than my 
> recommendation....
>
> -- Jeanfrancois

With this in mind, I decided to provide a test example to see if it is 
truly an issue with Tomcat and not with Forte. So I took the log tag out 
of the examples directory and placed it into its own log.jar with tld 
descriptor. In this war one can see the following layout.

/Test/WEB-INF/lib/log.jar (containing the examples/log tag classes and 
tld file).
/Test/WEB-INF/web.xml (tag descriptor referencing the jar file)
/Test/WEB-INF/build.xml (how the log jar was built)
/Test/jsp (example)

What I've found is that ther are two issues going on

1.) The taglib cannot load in 4.0.3, but does load successfully in 
4.0.4+ and 4.1.* so this is a bug in 4.0.3 LE and Full on WindowsXP/J2sdk.
2.) Since it works on 4.0.4+ and 4.1.* versions of 
Tomcat/WindowsXP/J2sdk, there is *something else wrong* with my taglibs 
that causing failure on those platforms.

I guess I can live without it working on 4.0.3, I'm trying to upgrade 
anyways, if required I can provide a *work-around* for my developers...

So, on 4.1.* with logging cranked way up, I've been seeing errors that 
Jasper encountered a TEI class when the tld already has a variable? Very 
wierd error. Here's an example of a tag in my taglib, if anyone sees 
anything wrong with this please let me know, it is still valid against 
the dtd. (again this was a tld generated by Forte4J).

    <tag>
        <name>catch</name>
        <tag-class>edu.harvard.hmdc.taglib.conditional.CatchTag</tag-class>
        
<tei-class>edu.harvard.hmdc.taglib.conditional.CatchTagTEI</tei-class>
        <body-content>JSP</body-content>
        <description/>
        <variable>
            <name-from-attribute>name</name-from-attribute>
            <variable-class>java.lang.Throwable</variable-class>
            <declare>true</declare>
            <scope>NESTED</scope>
        </variable>
        <attribute>
            <name>class_name</name>
            <required>true</required>
            <rtexprvalue>false</rtexprvalue>
            <type>String</type>
        </attribute>
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
            <type>String</type>
        </attribute>
        <example/>
    </tag>

Here is the exception in 4.1.12

org.apache.jasper.JasperException: null(-1,-1) variable subelement 
defined in tld when TagExtraInfo class 
edu.harvard.hmdc.taglib.conditional.CatchTagTEI is non-null
    at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
    at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:386)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:273)
    at 
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183)
    at 
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
    at org.apache.jasper.compiler.Parser

I get the feeling Forte is generating more information than Jasper Likes.

-Mark

Re: Can't deploy Custom Tag Library on Microsoth Windoz

Posted by Jean-Francois Arcand <jf...@apache.org>.
Which version of Xerces are you using? If it's 2.2, there is a bug 
associated with the problem:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282

-- Jeanfrancois



Mark R. Diggory wrote:

> I keep getting these parsing exceptions when I try to load my custom 
> taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.
>
>> Starting service Tomcat-Standalone
>> Apache Tomcat/4.0.3
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> PARSE error at line 1 column -1
>> org.xml.sax.SAXParseException: Character conversion error: "Malformed 
>> UTF-8 char
>>  -- is an XML encoding declaration missing?" (line number may be too 
>> low).
>> No tags
>> No tags
>
>
>
> I know this is coming from some parsing error when the tld is parsed. 
> But even if I put the tld file into different encodings (ISO-8859-1). 
> I still get the exceptions.
>
> example tld header:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
> Library 1.2//EN"
>         "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
> <taglib>
> ...
>
> -Mark Diggory
>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>