I was trying to cache the results for later use. However, I have
undone that change. Latest version is 0.0.213
Kind regards,
Peter Kriens
SM> Hi Peter,
SM> The new versions of Bnd (post 0.0.198) appear to use a lot more memory
SM> than they used to... for example almost 80m when bundling XML jarfiles.
SM> I've tracked this down to additional data held in Clazz instances, which
SM> are kept alive by the "classSpace" map in the Processor when analyzing
SM> the bundle classpath.
SM> Does the processor need to keep all this data, or can some of it be freed
SM> after the class has been analyzed? (there is a reset method in Clazz - if
SM> this is called after the class is processed then the memory usage drops
SM> dramatically, but I'm not sure if calling reset affects later processing...)
SM> Anyway, would appreciate it if you could look into this issue - thanks!
SM> On 18/11/2007, Stuart McCulloch <[EMAIL PROTECTED]> wrote:
SM> FYI, Bnd v0.0.198 uses 16m whereas v0.0.199 uses 79m while bundling xml-api
SM> On 18/11/2007, Stuart McCulloch < [EMAIL PROTECTED]> wrote:
SM> On 18/11/2007, Clement Escoffier <[EMAIL PROTECTED]> wrote:
SM>
SM> Hello,
SM> I am trying to build commons bundle with the latest maven-bundle-plugin (to
SM> get OBR support). It works fine except for xml-api where the error is really
SM> strange. It throws an OutOfMemory error (java heap space) when
SM> "bundlelizing" the project. The build works when using the
SM> maven-bundle-plugin 1.0.0. Somebody know how to solve this error ?
SM> well I tried the latest bundle-plugin code with the old Bnd library (
0.0.160)
SM> and didn't get any OOM, so it looks like the new version is more memory
SM> hungry... but it does do a lot more checking
SM> you could try increasing the heap available to Maven using MAVEN_OPTS
SM> looks like "export MAVEN_OPTS=-Xmx128m" is enough, although I then
SM> see a build error due to a missing import...
SM> Clement
SM> [WARNING] Include-Resource: overriding
SM> META-INF\LICENSE=src/main/resources/META-INF/LICENSE,META-INF\NOTICE=src/mai
SM> n/resources/META-INF/NOTICE with src/main/resources,
SM> @xercesImpl-2.8.1.jar!/META-INF/services/** ,
SM> @xalan-2.7.0.jar!/META-INF/services/** (add {maven-resources} if you want to
SM> include the maven resources)
SM> java.lang.OutOfMemoryError: Java heap space
SM> at java.util.Arrays.copyOfRange(Arrays.java :3209)
SM> at java.lang.String.<init>(String.java:216)
SM> at java.io.DataInputStream.readUTF(DataInputStream.java:644)
SM> at java.io.DataInputStream.readUTF(DataInputStream.java:547)
SM> at aQute.lib.osgi.Clazz.constantUtf8(Clazz.java:308)
SM> at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:92)
SM> at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
SM> at aQute.lib.osgi.Processor.analyzeJar(Processor.java:153)
SM> at
SM> aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java:71)
SM> at aQute.lib.osgi.Verifier.verify(Verifier.java:354)
SM> at aQute.lib.osgi.Builder.doVerify(Builder.java:207)
SM> at aQute.lib.osgi.Builder.build(Builder.java:50)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:276)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:172)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:164)
SM> at
SM> org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManage
SM> r.java:443)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
SM> cycleExecutor.java:539)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
SM> (DefaultLifecycleExecutor.java:480)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
SM> ycleExecutor.java:459)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
SM> ures(DefaultLifecycleExecutor.java:311)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
SM> ultLifecycleExecutor.java:278)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycle
SM> Executor.java:143)
SM> at
SM> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
SM> at
SM> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
SM> at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
SM> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
SM> at
SM> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
SM> )
SM> at
SM>
SM> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
SM> .java:25)
SM> at java.lang.reflect.Method.invoke(Method.java:597)
SM> at
SM> org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315)
SM> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
SM> at
SM> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
SM> java.lang.OutOfMemoryError : Java heap space
SM> at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:84)
SM> at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
SM> at aQute.lib.osgi.Processor.analyzeJar(Processor.java :153)
SM> at
SM> aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java:71)
SM> at aQute.lib.osgi.Verifier.verify(Verifier.java:354)
SM> at aQute.lib.osgi.Builder.doVerify(Builder.java :207)
SM> at aQute.lib.osgi.Builder.build(Builder.java:50)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:276)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute (BundlePlugin.java:172)
SM> at
SM> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:164)
SM> at
SM> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
SM> r.java :443)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
SM> cycleExecutor.java:539)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
SM> (DefaultLifecycleExecutor.java:480)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
SM> ycleExecutor.java:459)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
SM> ures(DefaultLifecycleExecutor.java:311)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
SM> ultLifecycleExecutor.java:278)
SM> at
SM> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycle
SM> Executor.java:143)
SM> at
SM> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
SM> at
SM> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
SM> at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
SM> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
SM> at
SM> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
SM> )
SM> at
SM>
SM> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
SM> .java:25)
SM> at java.lang.reflect.Method.invoke(Method.java:597)
SM> at
SM> org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315)
SM> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
SM> at
SM> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
SM> at org.codehaus.classworlds.Launcher.main (Launcher.java:375)
SM> java.lang.OutOfMemoryError: Java heap space
SM> at java.util.Arrays.copyOfRange(Arrays.java:3209)
SM> at java.lang.String.<init>(String.java:216)
SM> at java.io.DataInputStream.readUTF (DataInputStream.java:644)
SM> at java.io.DataInputStream.readUTF(DataInputStream.java:547)
SM> at aQute.lib.osgi.Clazz.constantUtf8(Clazz.java:308)
SM> at aQute.lib.osgi.Clazz.parseClassFile (Clazz.java:92)
SM> at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
SM> .
SM> --
SM> Clement Escoffier
SM> Grenoble University
SM> +33 (0) 4 76 51 40 24
SM> http://clement.plop-plop.net
SM> --
SM> Cheers, Stuart
SM> --
SM> Cheers, Stuart
--
Peter Kriens Tel +33467542167
9C, Avenue St. Drézéry AOL,Yahoo: pkriens
34160 Beaulieu, France ICQ 255570717
Skype pkriens Fax +1 8153772599