You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Edoardo Panfili <ed...@aspix.it> on 2010/07/16 19:23:20 UTC

tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Hy,

I did I try with tomcat 7 uploading my application (that works fine with 
6.0.26). the application does not starts up and I can see

----------------------------------
16-lug-2010 19.15.15 org.apache.catalina.startup.ContextConfig parseWebXml
GRAVE: Parse error in application web.xml file at 
jndi:/localhost/application/WEB-INF/web.xml
java.lang.IllegalArgumentException: taglib definition not consistent 
with specification version
----------------------------------

the start of taglib.tld is
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<taglib 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/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
------------------------------------

and the start of web.xml is
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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_5.xsd" version="2.5">
------------------------------------

I did some try but none usefull (nothing also on goole).
Can I use taglib 2.1 with servlet 2.5? Where can I find this kind of 
informations?

thank you
Edoardo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Mark Thomas <ma...@apache.org>.
On 19/07/2010 08:02, Edoardo Panfili wrote:
> On 17/07/10 16.28, Mark Thomas wrote:
>>>> >>  <jsp-config>
>>>> >>      <tablib>
>>>> >>       ...
>>>> >>      </taglib>
>>>> >>  </jsp-config?
>>> >  but this one works! also with the wrong schemaLocation.
>>> >  Without your help I can't figure the meaning of the exception. Is
>>> Tomcat
>>> >  supposing a specification version using the presence/absence of
>>> this tag?
>>> >  thank you.
>> No. Tomcat 7 is requiring that if you declare your web application to be
>> using version 2.5 of the Servlet specification that you declare your tag
>> libraries as required by schema for that version of the spec. You were
>> trying to use an old way old defining tag libraries from an older (2.3?)
>> version of the spec.
> 
> Ok, I am declaring the use of a specific version of the specification
> and then I use (my mistake obviously!) an older schema in my web.xml...
> Is a SAX exception more appropriate during the parsing of web.xml?

If you enabled validation, you'd probably get one.

> JSR site is the only place to find this kind of informations? Is there a
> place where I can find the different characteristics (and schemas) of
> the different sevlet/jsp/taglibs specification?

Not that I am aware of.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Edoardo Panfili <ed...@aspix.it>.
On 17/07/10 16.28, Mark Thomas wrote:
>>> >>  <jsp-config>
>>> >>      <tablib>
>>> >>       ...
>>> >>      </taglib>
>>> >>  </jsp-config?
>> >  but this one works! also with the wrong schemaLocation.
>> >  Without your help I can't figure the meaning of the exception. Is Tomcat
>> >  supposing a specification version using the presence/absence of this tag?
>> >  thank you.
> No. Tomcat 7 is requiring that if you declare your web application to be
> using version 2.5 of the Servlet specification that you declare your tag
> libraries as required by schema for that version of the spec. You were
> trying to use an old way old defining tag libraries from an older (2.3?)
> version of the spec.

Ok, I am declaring the use of a specific version of the specification 
and then I use (my mistake obviously!) an older schema in my web.xml... 
Is a SAX exception more appropriate during the parsing of web.xml?

JSR site is the only place to find this kind of informations? Is there a 
place where I can find the different characteristics (and schemas) of 
the different sevlet/jsp/taglibs specification?

Thank you again
Edoardo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Mark Thomas <ma...@apache.org>.
On 17/07/2010 15:21, Edoardo Panfili wrote:
> On 17/07/10 15.57, Mark Thomas wrote:
>> On 17/07/2010 14:16, Edoardo Panfili wrote:
>>> On 17/07/10 12.50, Mark Thomas wrote:
>>>> The tag lib element is not correct. It should be:
>>>>
>>>> <taglib xmlns="http://java.sun.com/xml/ns/javaee"
>>>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>>         http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
>>>>         version="2.1">
>>>>
>>>> Note the difference in the xsi:schemaLocation
>>>
>>> I changed the element but it raises the same error.
>>
>> OK. At least that is one possible issue fixed.
>>
>> How are you defining you taglibs in web.xml? Are you using:
>>
>> <tablib>
>>   ...
>> </taglib>
> this one
> 
> 
>> <jsp-config>
>>    <tablib>
>>     ...
>>    </taglib>
>> </jsp-config?
> but this one works! also with the wrong schemaLocation.
> Without your help I can't figure the meaning of the exception. Is Tomcat
> supposing a specification version using the presence/absence of this tag?
> thank you.

No. Tomcat 7 is requiring that if you declare your web application to be
using version 2.5 of the Servlet specification that you declare your tag
libraries as required by schema for that version of the spec. You were
trying to use an old way old defining tag libraries from an older (2.3?)
version of the spec.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Edoardo Panfili <ed...@aspix.it>.
On 17/07/10 15.57, Mark Thomas wrote:
> On 17/07/2010 14:16, Edoardo Panfili wrote:
>> On 17/07/10 12.50, Mark Thomas wrote:
>>> The tag lib element is not correct. It should be:
>>>
>>> <taglib xmlns="http://java.sun.com/xml/ns/javaee"
>>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>         http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
>>>         version="2.1">
>>>
>>> Note the difference in the xsi:schemaLocation
>>
>> I changed the element but it raises the same error.
>
> OK. At least that is one possible issue fixed.
>
> How are you defining you taglibs in web.xml? Are you using:
>
> <tablib>
>   ...
> </taglib>
this one


> <jsp-config>
>    <tablib>
>     ...
>    </taglib>
> </jsp-config?
but this one works! also with the wrong schemaLocation.
Without your help I can't figure the meaning of the exception. Is Tomcat 
supposing a specification version using the presence/absence of this tag?
thank you.


>> After that I removed the whole<taglib>  element, now the file is
>> incorrect I know, but the exception is still there, with another one "he
>> markup in the document following the root element must be well-formed."
>> the second is comprensible for me. Is it possible that the error is in
>> another file?
>
> No. Looks like you removed the<tablib ...>  element but left the</taglib>.
>
yes. I was only I try (removing the element the error remains, it was 
possible that the error was not there).

Thank you again
Edoardo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Mark Thomas <ma...@apache.org>.
On 17/07/2010 14:16, Edoardo Panfili wrote:
> On 17/07/10 12.50, Mark Thomas wrote:
>> The tag lib element is not correct. It should be:
>>
>> <taglib xmlns="http://java.sun.com/xml/ns/javaee"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>        http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
>>        version="2.1">
>>
>> Note the difference in the xsi:schemaLocation
> 
> I changed the element but it raises the same error.

OK. At least that is one possible issue fixed.

How are you defining you taglibs in web.xml? Are you using:

<tablib>
 ...
</taglib>

or

<jsp-config>
  <tablib>
   ...
  </taglib>
</jsp-config?

?

> After that I removed the whole <taglib> element, now the file is
> incorrect I know, but the exception is still there, with another one "he
> markup in the document following the root element must be well-formed."
> the second is comprensible for me. Is it possible that the error is in
> another file?

No. Looks like you removed the <tablib ...> element but left the </taglib>.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Edoardo Panfili <ed...@aspix.it>.
On 17/07/10 12.50, Mark Thomas wrote:
> On 16/07/2010 18:23, Edoardo Panfili wrote:
>> Hy,
>>
>> I did I try with tomcat 7 uploading my application (that works fine with
>> 6.0.26). the application does not starts up and I can see
>
> The tag lib element is not correct. It should be:
>
> <taglib xmlns="http://java.sun.com/xml/ns/javaee"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>        http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
>        version="2.1">
>
> Note the difference in the xsi:schemaLocation

I changed the element but it raises the same error.
After that I removed the whole <taglib> element, now the file is 
incorrect I know, but the exception is still there, with another one "he 
markup in the document following the root element must be well-formed." 
the second is comprensible for me. Is it possible that the error is in 
another file?

Edoardo


>>
>> ----------------------------------
>> 16-lug-2010 19.15.15 org.apache.catalina.startup.ContextConfig parseWebXml
>> GRAVE: Parse error in application web.xml file at
>> jndi:/localhost/application/WEB-INF/web.xml
>> java.lang.IllegalArgumentException: taglib definition not consistent
>> with specification version
>> ----------------------------------
>>
>> the start of taglib.tld is
>> ------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <taglib 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/javaee/web-jsptaglibrary_2_1.xsd"
>>
>> version="2.1">
>> ------------------------------------
>>
>> and the start of web.xml is
>> ------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <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_5.xsd" version="2.5">
>> ------------------------------------
>>
>> I did some try but none usefull (nothing also on goole).
>> Can I use taglib 2.1 with servlet 2.5? Where can I find this kind of
>> informations?
>>
>> thank you
>> Edoardo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 7: IllegalArgumentException: taglib definition not consistent with specification version

Posted by Mark Thomas <ma...@apache.org>.
On 16/07/2010 18:23, Edoardo Panfili wrote:
> Hy,
> 
> I did I try with tomcat 7 uploading my application (that works fine with
> 6.0.26). the application does not starts up and I can see

The tag lib element is not correct. It should be:

<taglib xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
      version="2.1">

Note the difference in the xsi:schemaLocation

Mark


> 
> ----------------------------------
> 16-lug-2010 19.15.15 org.apache.catalina.startup.ContextConfig parseWebXml
> GRAVE: Parse error in application web.xml file at
> jndi:/localhost/application/WEB-INF/web.xml
> java.lang.IllegalArgumentException: taglib definition not consistent
> with specification version
> ----------------------------------
> 
> the start of taglib.tld is
> ------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <taglib 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/javaee/web-jsptaglibrary_2_1.xsd"
> 
> version="2.1">
> ------------------------------------
> 
> and the start of web.xml is
> ------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <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_5.xsd" version="2.5">
> ------------------------------------
> 
> I did some try but none usefull (nothing also on goole).
> Can I use taglib 2.1 with servlet 2.5? Where can I find this kind of
> informations?
> 
> thank you
> Edoardo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org