Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1068

org.apache.openejb.OpenEJBException: Unable to extract jar. in MacOS X

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Component/s: deployment
    • Labels:
      None
    • Environment:
      MacOS X and SUN SDK 1.6.0_13"

      Description

      OpenEJBExceptions trying to introspect WebArchive :
      Caused by: org.apache.tuscany.sca.contribution.service.ContributionReadException:
      org.apache.openejb.OpenEJBException: Unable to extract jar. error in
      opening zip file: error in opening zip file
      at org.apache.tuscany.sca.contribution.jee.JavaEEModuleHelper.getMetadataCompleteModules(JavaEEModuleHelper.java:42)
      at org.apache.tuscany.sca.contribution.jee.impl.JavaEEIntrospectorImpl.introspectWebArchive(JavaEEIntrospectorImpl.java:80)

      This seems like a openEJB bug, Mac OS X are generating temp files with
      in the names (e.g
      /var/folders/PI/PIxzw8eOGJmebuUgCle+ek+++TI/Tmp/temp4648477624506672403.war)
      and the code in their DeploymentLoader file tries to decode the file
      name causing the plus sign to be substituted by spaces thus causing a
      the file path to be invalid and generating a internal exception. The
      patch below seems to resolve this problem, but I'm not very familiar
      with the OpenEJB code to calim this is a proper fix

      Index: openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
      ===================================================================
      — openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java (revision
      810677)
      +++ openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java (working
      copy)
      @@ -148,7 +148,8 @@
      return appModule;
      } else if (WebModule.class.equals(moduleClass)) {
      String moduleId = toFile(baseUrl).getName();

      • String warPath = URLs.toFilePath(baseUrl);
        + //String warPath = URLs.toFilePath(baseUrl);
        + String warPath = baseUrl.getPath();

      AppModule appModule = new
      AppModule(OpenEJB.class.getClassLoader(), warPath);
      addWebModule(appModule, warPath,
      OpenEJB.class.getClassLoader(), null, moduleId);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dblevins David Blevins
                Reporter:
                lresende Luciano Resende
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: