You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/07/29 00:41:57 UTC

DO NOT REPLY [Bug 51580] New: Severe error deploying WAR application (ExpandWar error)

https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

             Bug #: 51580
           Summary: Severe error deploying WAR application (ExpandWar
                    error)
           Product: Tomcat 7
           Version: 7.0.19
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: cleonf@gmail.com
    Classification: Unclassified


Created attachment 27330
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27330
Catalina log file with the error.

When trying to deploy a WAR application (50MB approx) I get:

"SEVERE: Error deploying web application archive gestaoApolices.war
java.lang.NullPointerException"

Complete stacktrace is attached.

I've seen in the sources that this might be related with the correction of
"Bugzilla 33636"

Let me know if the war file is needed, in case you're not able to reproduce the
problem.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


[Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Ankur <An...@live.in> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |public_html/jSearchEngine.w
                   |                            |ar

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

--- Comment #8 from Cleon <cl...@gmail.com> 2011-08-13 20:17:31 UTC ---
Created attachment 27385
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27385
Minimal war to reproduce the problem

Here's the file. There's no special env settings, just import the file.

Regards,
   Cléon

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement

--- Comment #6 from Mark Thomas <ma...@apache.org> 2011-08-01 21:23:28 UTC ---
I'm not overly concerned about this. If you want to patch it, go ahead. If you
don't I'll eventually close this as WONTFIX.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

--- Comment #3 from Cleon <cl...@gmail.com> 2011-07-30 00:21:30 UTC ---
Actually was using the zip's Ant task to produce the war file and I didn't
realized that because it's a automatically generated build.xml from Google GWT.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


[Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Chuck Caldarale <ch...@unisys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|public_html/jSearchEngine.w |
                   |ar                          |

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> 2011-08-01 18:35:58 UTC ---
It seems like adding a null check here would be good, since NPE in Tomcat looks
like a bug in Tomcat instead of an error in the WAR file. I'm re-opening for
that reason.

Please re-close INVALID if you are adamant about not having a null check.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #12 from Christopher Schultz <ch...@christopherschultz.net> 2011-09-20 20:33:33 UTC ---
Fixed in trunk and 7.0.x branch. Will be included in 7.0.22 onward.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> 2011-07-30 14:32:59 UTC ---
Zip uses platform default encoding to encode file names.
JAR uses UTF-8.


java.lang.NullPointerException
        at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:407)
        at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:138)

It looks as if InputStream reference in ExpandWar#expand(InputStream, File) was
null. That is an earlier call to jarFile.getInputStream(jarEntry) on
ExpandWar.java:135 returned null.

The Javadoc for JarFile#getInputStream(ZipEntry) does not say that it can
return null. I would have expected a ZipException here.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Mark Thomas <ma...@apache.org> 2011-07-29 21:25:24 UTC ---
Your WAR file is not valid. I suspect it was created with a zip utility rather
than with jar. The default character sets are different. You need to use jar if
you have file names that are use non-ASCII characters.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |major

--- Comment #7 from Christopher Schultz <ch...@christopherschultz.net> 2011-08-12 19:02:50 UTC ---
Cleon, can you attach a minimal WAR file that reproduces this issue? Also, if
there are any environmental settings necessary, such as expandWars="false",
please let me know.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Re: DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Konstantin,

On 8/25/2011 10:08 AM, Konstantin Kolinko wrote:
> 1. You have a typo in LC_CTYPE command above, s/8851/8859/

Thanks, I'll check that.

> 2. It might be that it reads the characters correctly, but fails to print them.
> 
> If it were reading UTF-8 characters as ISO-8859-1, wouldn't there be
> several '?'s, one for each byte?

Yeah, it might be a problem printing to the terminal rather than reading
from the archive.

-chris


Re: DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/8/25  <bu...@apache.org>:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51580
>
> --- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> 2011-08-25 13:55:26 UTC ---
> (In reply to comment #4)
>> Zip uses platform default encoding to encode file names.
>> JAR uses UTF-8.
>
> I'm not so sure that's true:
>
> $ echo $LC_CTYPE
> en_US.UTF-8
>
> $ jar tvf 51580.war
>     0 Sat Aug 13 21:06:34 EDT 2011 text_extraction_rules/
>   594 Sat Aug 13 21:06:34 EDT 2011
> text_extraction_rules/Cliente-TextExtractRules-Açoreana.properties
>   570 Sat Aug 13 21:06:34 EDT 2011
> text_extraction_rules/Cliente-TextExtractRules-Liberty.properties
>
> $ LC_CTYPE=en_US.ISO-8851-1 jar tvf 51580.war
>     0 Sat Aug 13 21:06:34 EDT 2011 text_extraction_rules/
>   594 Sat Aug 13 21:06:34 EDT 2011
> text_extraction_rules/Cliente-TextExtractRules-A?oreana.properties
>   570 Sat Aug 13 21:06:34 EDT 2011

> When my file.encoding ends up being ISO-8859-1, jar acts just as stupidly as
> zip.

1. You have a typo in LC_CTYPE command above, s/8851/8859/
2. It might be that it reads the characters correctly, but fails to print them.

If it were reading UTF-8 characters as ISO-8859-1, wouldn't there be
several '?'s, one for each byte?

Best regards,
Konstantin Kolinko

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> 2011-08-25 13:55:26 UTC ---
(In reply to comment #4)
> Zip uses platform default encoding to encode file names.
> JAR uses UTF-8.

I'm not so sure that's true:

$ echo $LC_CTYPE
en_US.UTF-8

$ jar tvf 51580.war 
     0 Sat Aug 13 21:06:34 EDT 2011 text_extraction_rules/
   594 Sat Aug 13 21:06:34 EDT 2011
text_extraction_rules/Cliente-TextExtractRules-Açoreana.properties
   570 Sat Aug 13 21:06:34 EDT 2011
text_extraction_rules/Cliente-TextExtractRules-Liberty.properties

$ LC_CTYPE=en_US.ISO-8851-1 jar tvf 51580.war 
     0 Sat Aug 13 21:06:34 EDT 2011 text_extraction_rules/
   594 Sat Aug 13 21:06:34 EDT 2011
text_extraction_rules/Cliente-TextExtractRules-A?oreana.properties
   570 Sat Aug 13 21:06:34 EDT 2011
text_extraction_rules/Cliente-TextExtractRules-Liberty.properties

$ unzip -v 51580.war 
Archive:  51580.war
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 2011-08-13 21:06 00000000 
text_extraction_rules/
     594  Stored      594   0% 2011-08-13 21:06 3271f2b8 
text_extraction_rules/Cliente-TextExtractRules-A?oreana.properties
     570  Stored      570   0% 2011-08-13 21:06 a00a7a2c 
text_extraction_rules/Cliente-TextExtractRules-Liberty.properties
--------          -------  ---                            -------
    1164             1164   0%                            3 files


When my file.encoding ends up being ISO-8859-1, jar acts just as stupidly as
zip.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement

--- Comment #9 from Mark Thomas <ma...@apache.org> 2011-08-15 10:55:06 UTC ---
Changing back to an enhancement. There is no Tomcat bug here.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

Cleon <cl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from Cleon <cl...@gmail.com> 2011-07-28 23:18:19 UTC ---
I've just find out that the problem was in a specific file within the WAR:

"Cliente-TextExtractRules-Açoreana.properties"

The file name has Portuguese accented char "ç".

After replace the char by "c" in that file, the deployment was done ok.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51580] Severe error deploying WAR application (ExpandWar error)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51580

--- Comment #11 from Christopher Schultz <ch...@christopherschultz.net> 2011-08-25 15:18:55 UTC ---
Interestingly enough, Apache Ant's "zip" and "jar" tasks both have an
"encoding" attribute to control the charset used for filenames, but they have a
subtle difference in their default configurations.

The <zip> task defaults to the platform's default encoding while the <jar> task
defaults to UTF-8 with a *strong* warning not to change the default <jar>
encoding unless you know what you're doing.

http://ant.apache.org/manual/Tasks/zip.html#encoding

So it looks like Cleon must have used <zip> instead of the much more
appropriate <war> task to create his WAR file.

Still, I think it's a good idea to throw a different kind of exception. NPEs
make it look like there is an actual bug in Tomcat which is certainly not the
case.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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