Return-Path: Delivered-To: apmail-openejb-commits-archive@www.apache.org Received: (qmail 2570 invoked from network); 10 Sep 2009 09:44:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Sep 2009 09:44:23 -0000 Received: (qmail 67440 invoked by uid 500); 10 Sep 2009 09:44:23 -0000 Delivered-To: apmail-openejb-commits-archive@openejb.apache.org Received: (qmail 67423 invoked by uid 500); 10 Sep 2009 09:44:23 -0000 Mailing-List: contact commits-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openejb.apache.org Delivered-To: mailing list commits@openejb.apache.org Received: (qmail 67255 invoked by uid 99); 10 Sep 2009 09:44:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2009 09:44:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2009 09:44:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 90840234C004 for ; Thu, 10 Sep 2009 02:43:57 -0700 (PDT) Message-ID: <3723744.1252575837577.JavaMail.jira@brutus> Date: Thu, 10 Sep 2009 02:43:57 -0700 (PDT) From: "David Blevins (JIRA)" To: commits@openejb.apache.org Subject: [jira] Commented: (OPENEJB-1068) org.apache.openejb.OpenEJBException: Unable to extract jar. in MacOS X In-Reply-To: <1880991198.1251928592693.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENEJB-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753525#action_12753525 ] David Blevins commented on OPENEJB-1068: ---------------------------------------- I can reproduce this with a "+" in the path. We added that particular code due to issues with paths containing spaces. I cracked out a windows machine and have been trying to reproduce the space issue as part of more basic encoded/decoded tests. Going to have to dig up the original issue and see if I can reproduce it before I feel comfortable removing the URL decoding. > org.apache.openejb.OpenEJBException: Unable to extract jar. in MacOS X > ----------------------------------------------------------------------- > > Key: OPENEJB-1068 > URL: https://issues.apache.org/jira/browse/OPENEJB-1068 > Project: OpenEJB > Issue Type: Bug > Components: deployment > Affects Versions: 3.0.1 > Environment: MacOS X and SUN SDK 1.6.0_13" > Reporter: Luciano Resende > Fix For: 3.0.1 > > > 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); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.