You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Николай Ижиков <ni...@gmail.com> on 2010/04/12 13:38:23 UTC
Build with Maven. OutOfMemoryError
Hi, guys.
I try to build tika-0.7 with maven.
I execute
$ mvn -Dmaven.test.skip=true install
and I got following error.
Can you tell me how to build tika with maven?
my
MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xmx2048M
Error text:
[INFO]
------------------------------------------------------------------------
[INFO] Building Apache Tika application
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\java\tika-0.7\tika-app\src\main\resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\java\tika-0.7\tika-app\src\test\resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Not compiling test sources
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
java.lang.OutOfMemoryError: Java heap space
at java.util.LinkedHashMap.init(LinkedHashMap.java:223)
at java.util.HashMap.<init>(HashMap.java:210)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:181)
at aQute.lib.osgi.Clazz.packageReference(Clazz.java:645)
at aQute.lib.osgi.Clazz.doClassReference(Clazz.java:413)
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:262)
at aQute.lib.osgi.Clazz.<init>(Clazz.java:101)
at aQute.lib.osgi.Analyzer.analyzeJar(Analyzer.java:1647)
at
aQute.lib.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:1563)
at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:108)
at aQute.lib.osgi.Builder.analyze(Builder.java:294)
at aQute.lib.osgi.Builder.doConditional(Builder.java:260)
at aQute.lib.osgi.Builder.build(Builder.java:75)
at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:391)
at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:282)
at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:236)
at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
--
С уважением, Николай Ижиков
NIzhikov@gmail.com
ICQ - 272690153
Re: Build with Maven. OutOfMemoryError
Posted by hpstricker <st...@epublius.de>.
Has your issue been solved in the meanwhile? I am running in the same
problem, with the same MAVEN_OPTS settings.
--
View this message in context: http://lucene.472066.n3.nabble.com/Build-with-Maven-OutOfMemoryError-tp713263p905888.html
Sent from the Apache Tika - Development mailing list archive at Nabble.com.
Re: Build with Maven. OutOfMemoryError
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
2010/4/12 Николай Ижиков <ni...@gmail.com>:
> [INFO] [bundle:bundle {execution: default-bundle}]
> java.lang.OutOfMemoryError: Java heap space
Building the tika-app bundle requires quite a bit of memory (about
150MB on my system), so if you get this error then increasing the
maximum memory with MAVEN_OPTS should help. The following works for
me:
$ MAVEN_OPTS=-Xmx256m mvn clean install
> MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xmx2048M
The -Xmx setting here should be plenty enough, but why are you
connecting the Maven build to a debugger? See [1] for the recommended
way of attaching a debugger to the test suite of a Maven build.
[1] http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html
BR,
Jukka Zitting