Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Trying to debug someone else's use of p2(Getting a NoClassDefFound exception for a class not related to the build?)
Trying to debug someone else's use of p2 [message #1354538] Wed, 14 May 2014 05:55 Go to next message
David Wynter is currently offline David Wynter
Messages: 4542
Registered: July 2009
Senior Member
Hi,

I am left with someone else's implementation of an ant build.xml that uses p2 to build a product. The author has gone, so no help available there. I am not sure if it is my Eclipse install that has missing plugins or if it is because I am on Mac and he was ArchLinux, but I get:

     [java] replace.p2.product:
     [java]      [copy] Copying 1 file to /Users/david/workspace/edmbuild/build/features/org.eclipse.pde.build.container.feature/product
     [java] BUILD FAILED
     [java] /Users/david/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/productBuild/productBuild.xml:44: The following error occurred while executing this line:
     [java] /Users/david/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/build.xml:118: The following error occurred while executing this line:
     [java] /Users/david/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/templates/headless-build/customTargets.xml:12: The following error occurred while executing this line:
     [java] /Users/david/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/productBuild/allElements.xml:20: The following error occurred while executing this line:
     [java] /Users/david/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/genericTargets.xml:190: The following error occurred while executing this line:
     [java] /Users/david/workspace/edmbuild/build/assemble.org.eclipse.pde.build.container.feature.all.xml:25: The following error occurred while executing this line:
     [java] /Users/david/workspace/edmbuild/build/assemble.org.eclipse.pde.build.container.feature.all.xml:33: java.lang.NoClassDefFoundError: scala/tools/eclipse/logging/StreamRedirect$$anonfun$2$$anonfun$apply$2
     [java] 	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$2.apply(StreamRedirect.scala:35)
     [java] 	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$2.apply(StreamRedirect.scala:35)
     [java] 	at scala.tools.eclipse.logging.StreamRedirect$Redirect.write(StreamRedirect.scala:61)
     [java] 	at java.io.PrintStream.write(PrintStream.java:480)
     [java] 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
     [java] 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
     [java] 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
     [java] 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
     [java] 	at java.io.PrintStream.write(PrintStream.java:527)
     [java] 	at java.io.PrintStream.print(PrintStream.java:669)
     [java] 	at java.io.PrintStream.println(PrintStream.java:806)
     [java] 	at org.eclipse.pde.internal.build.tasks.IdReplaceTask.execute(IdReplaceTask.java:289)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)


I had a look at /Users/david/workspace/edmbuild/build/assemble.org.eclipse.pde.build.container.feature.all, line 25 is the top line below and the line 33 is the "replace.p2.product" target.

	<target name="main">
		<antcall target="replace.p2.product"/>
		<assemble  config="macosx.cocoa.x86_64" element="org.eclipse.pde.build.container.feature" dot="." scriptPrefix="assemble"		/>
		<antcall target="generate.p2.metadata"/>
	</target>
	<target name="replace.p2.product">
		<copy file="/Users/david/workspace/edmbuild/plugins/com.yambina.edm.cdoserver/CDOServer.product" tofile="${buildDirectory}/features/org.eclipse.pde.build.container.feature/product/CDOServer.product" overwrite="true"/>
		<eclipse.idReplacer productFilePath="${buildDirectory}/features/org.eclipse.pde.build.container.feature/product/CDOServer.product"
		                    selfVersion="1.0.0.${p2.product.qualifier}" 
		                    pluginIds="com.yambina.edm.cdoserver:0.0.0,1.0.0.201405131658,com.yambina.edm.server.commons:0.0.0,1.0.0.201405131658,org.eclipse.core.contenttype:0.0.0,3.4.200.v20130326-1255,org.eclipse.core.jobs:0.0.0,3.5.300.v20130429-1813,org.eclipse.core.runtime:0.0.0,3.9.100.v20131218-1515,org.eclipse.emf.cdo:0.0.0,4.2.1.v20140218-1709,org.eclipse.emf.cdo.common:0.0.0,4.2.1.v20140218-1709,org.eclipse.emf.cdo.common.db:0.0.0,3.0.301.v20140218-1830,org.eclipse.emf.cdo.net4j:0.0.0,4.1.101.v20140218-1709,org.eclipse.emf.cdo.server:0.0.0,4.2.1.v20140218-1709,org.eclipse.emf.cdo.server.db:0.0.0,4.2.1.v20140218-1709,org.eclipse.emf.cdo.server.net4j:0.0.0,4.1.1.v20140218-1709,org.eclipse.emf.common:0.0.0,2.9.2.v20131212-0545,org.eclipse.emf.ecore:0.0.0,2.9.2.v20131212-0545,org.eclipse.emf.ecore.change:0.0.0,2.9.0.v20131212-0545,org.eclipse.emf.ecore.xmi:0.0.0,2.9.1.v20131212-0545,org.eclipse.equinox.app:0.0.0,1.3.100.v20130327-1442,org.eclipse.equinox.common:0.0.0,3.6.200.v20130402-1505,org.eclipse.equinox.launcher:0.0.0,1.3.0.v20130327-1440,org.eclipse.equinox.preferences:0.0.0,3.5.100.v20130422-1538,org.eclipse.equinox.registry:0.0.0,3.5.301.v20130717-1549,org.eclipse.net4j:0.0.0,4.2.1.v20140218-1709,org.eclipse.net4j.db:0.0.0,4.2.1.v20140218-1709,org.eclipse.net4j.db.h2:0.0.0,4.2.1.v20140218-1830,org.eclipse.net4j.tcp:0.0.0,4.1.101.v20140218-1830,org.eclipse.net4j.util:0.0.0,3.3.1.v20140218-1709,org.eclipse.osgi:0.0.0,3.9.1.v20140110-1610,org.eclipse.swt:0.0.0,3.102.1.v20140206-1334,org.h2:0.0.0,1.3.168.v201212121212,org.eclipse.core.runtime.compatibility.registry:0.0.0,3.5.200.v20130514-1256,org.eclipse.equinox.weaving.hook:0.0.0,1.0.200.v20130327-1442,org.eclipse.swt.cocoa.macosx.x86_64:0.0.0,3.102.1.v20140206-1358,"/>
	</target>


I note that the class missing, scala/tools/eclipse/logging/StreamRedirect, is not in any of the plugins listed. So not sure how it is supposed to fit into the build. Can someone explain? I have no idea in fact why a scala plugin might even be included in this product build?

Thx.

David

[Updated on: Wed, 14 May 2014 05:55]

Report message to a moderator

Re: Trying to debug someone else's use of p2 [message #1354837 is a reply to message #1354538] Wed, 14 May 2014 08:53 Go to previous message
David Wynter is currently offline David Wynter
Messages: 4542
Registered: July 2009
Senior Member
Hi,

I found I needed to add "Scala IDE for Eclipse dev support" plugin, but I have no idea why it is required. I have noted that about every 4th run I get this error, even with the plugin added. This is with an unaltered build.xml and build.properties each time. I just live with it now.

Thx.

David

[Updated on: Fri, 16 May 2014 09:15]

Report message to a moderator

Previous Topic:Setting an environment variable from p2.inf?
Next Topic:FrameworkAdmin Service is not started as expected
Goto Forum:
  


Current Time: Mon Jul 28 14:27:19 EDT 2014

Powered by FUDForum. Page generated in 0.02780 seconds