Menu

#8 Null pointer exception on WAR file export

open
nobody
None
5
2003-05-07
2003-05-07
Anonymous
No

We get a null pointer exception when we try to export a
WAR file. We are using Eclipse V2.1.0, Build ID
200303272130 and your WebApp Plug-In V2.0.0.

It seems to be the same error as already submitted with
bug ID "697869 WAR export error".

However there are detailed error messages log in the
Eclipse .log file. Refer to the attached .zip file for details.

Sincerely

Thomas Raddatz

E-Mail: thomas.raddatz@gfd.de

Discussion

  • Nobody/Anonymous

    Logged error messages on WAR file export

     
  • Oliver Gries

    Oliver Gries - 2003-05-08

    Logged In: YES
    user_id=571857

    Hi,

    this is just a small bug in the class
    WarFileExportOperation.java.

    Just replace the if statement in the method

    protected void exportResource(IResource resource) throws
    InterruptedException ...

    with

    <snipp>
    if (resource.getType() == IResource.FILE) {
    if (!resource.getName
    ().startsWith(".") //$NON-NLS-1$
    && !
    resource.getName().equalsIgnoreCase("tomcat-users.xml") //
    $NON-NLS-1$
    &&
    ((exportJavaFiles
    //
    patched by OG: 08.05.2003

    && "java".equalsIgnoreCase
    (resource.getFileExtension()) //$NON-NLS-1$
    || (!
    ("java".equalsIgnoreCase(resource.getFileExtension())))))) { //
    $NON-NLS-1$

    </snipp>

    and it works.

    Dear Admin, hope this helps .... ;-))

    (Believe me, there are files which don't have an extension.)

    Cheers
    Oliver

     

Log in to post a comment.

MongoDB Logo MongoDB