From derby-dev-return-74478-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Wed Dec 02 03:40:47 2009 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 42718 invoked from network); 2 Dec 2009 03:40:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Dec 2009 03:40:47 -0000 Received: (qmail 19315 invoked by uid 500); 2 Dec 2009 03:40:46 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 19217 invoked by uid 500); 2 Dec 2009 03:40:45 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 19209 invoked by uid 99); 2 Dec 2009 03:40:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2009 03:40:44 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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; Wed, 02 Dec 2009 03:40:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D208234C045 for ; Tue, 1 Dec 2009 19:40:20 -0800 (PST) Message-ID: <442668200.1259725220629.JavaMail.jira@brutus> Date: Wed, 2 Dec 2009 03:40:20 +0000 (UTC) From: "Francois Orsini (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4458) Dalvik / Andoid compatibility In-Reply-To: <1030655028.1259683580642.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4458?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1278= 4610#action_12784610 ]=20 Francois Orsini commented on DERBY-4458: ---------------------------------------- > Seems like if there is an improvement needed, it is in the android 'dx'= tool, isn't it? You would think so but according to the Dalvik lead engineer, it is not: http://www.mail-archive.com/android-developers@googlegroups.com/msg29593.ht= ml This warning (not an error) is also reported by 'dx' translating some other= Java libraries, not just derby.jar. Unless I'm mistaken, derby.jar GA is built using Java 1.4 which is obviousl= y not a modern compiler? my guess is that this warning would disappear if b= uilding with Java 1.5 or 1.6. In any case, this is apparently NOT a blocking issue - Thomas was also repo= rting a Java OutOfMemory error which can be solved in Dalvik by increasing = the heap size in dx.bat... Of course, even if the translation succeeds, Derby will not run, causing al= l kinds of errors due to its dynamic generated bytecode not being translate= d by the Dalvik VM at runtime, which is obviously a separate issue by itsel= f. > Dalvik / Andoid compatibility > ----------------------------- > > Key: DERBY-4458 > URL: https://issues.apache.org/jira/browse/DERBY-4458 > Project: Derby > Issue Type: Improvement > Affects Versions: 10.5.3.0 > Environment: dx 1.2 (from the Android SDK 2.0) running on Java 1.= 6 > Reporter: Thomas G=C3=B6rres > Priority: Blocker > > derby.jar cannot be used on mobile devices running the Android OS. Androi= d uses Dalvik as runtime environment, and the classfiles from derby.jar can= not be translated to Dalvik byte code. > Steps to repeat: > 1. get the Android SDK from http://developer.android.com > 2. navigate to [android-sdk]/platforms/android-1.5/tools > 3. execute ./dx --dex path/to/derby.jar > The dx tool should convert the JRE byte code to Dalvik byte code. Instead= , it spits out this warning several time: > warning: Ignoring InnerClasses attribute for an anonymous inner class tha= t doesn't come with an associated EnclosingMethod attribute. (This class wa= s probably produced by a broken compiler.) > Then it runs out of memory: > java.lang.OutOfMemoryError: Java heap space > =09at com.android.dx.rop.code.ThrowingInsn.withNewRegisters(ThrowingInsn.= java:116) > =09at com.android.dx.ssa.NormalSsaInsn.toRopInsn(NormalSsaInsn.java:122) > =09at com.android.dx.ssa.back.SsaToRop.convertInsns(SsaToRop.java:386) > =09at com.android.dx.ssa.back.SsaToRop.convertBasicBlock(SsaToRop.java:36= 5) > =09at com.android.dx.ssa.back.SsaToRop.convertBasicBlocks(SsaToRop.java:3= 00) > =09at com.android.dx.ssa.back.SsaToRop.convertToRop(SsaToRop.java:277) > =09at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:118) > =09at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:7= 1) > =09at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:103) > =09at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74) > =09at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java= :269) > =09at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131= ) > =09at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85) > =09at com.android.dx.command.dexer.Main.processClass(Main.java:297) > =09at com.android.dx.command.dexer.Main.processFileBytes(Main.java:276) > =09at com.android.dx.command.dexer.Main.access$100(Main.java:56) > =09at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228) > =09at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOp= ener.java:245) > =09at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener= .java:130) > =09at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.ja= va:108) > =09at com.android.dx.command.dexer.Main.processOne(Main.java:245) > =09at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183) > =09at com.android.dx.command.dexer.Main.run(Main.java:139) > =09at com.android.dx.command.dexer.Main.main(Main.java:120) > =09at com.android.dx.command.Main.main(Main.java:87) --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.