commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wayne <whwa...@gmail.com>
Subject Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(ZZ)V
Date Wed, 08 Jun 2011 07:22:52 GMT
Jörg. Thank you for your comments

there is Ant Build content including classpath definition:

<project name='JPPF-Node' default="run" basedir=".">

	<!-- =========================================================================
-->
	<!--                          Property definitions
         -->
	<!-- =========================================================================
-->
		
	<property name="build.properties.file" value="${basedir}/build.properties"/>
    <property file="${build.properties.file}"/>
	<property name="lib.dir"    value="${basedir}/lib"/>
	<property name="config.dir"  value="${basedir}/config"/>
	<property name="classes.dir" value="${basedir}/classes"/>	
	<property name="src.dir"     value="${basedir}/src"/>


	<!-- =========================================================================
-->
	<!--                           Classpath definitions
         -->
	<!-- =========================================================================
-->
 <path id="project.classpath">
	<pathelement location="${config.dir}"/>
	<pathelement location="${classes.dir}"/>
	<fileset dir="${lib.dir}" includes="**/*.jar"/>
 </path>
		

  <path id="run.classpath">
		<pathelement location="${config.dir}"/>
		<fileset dir="${lib.dir}" includes="**/*.jar"/>
  </path>
  	<!-- =========================================================================
-->
  	<!--                                    Clean
           -->
  	<!-- =========================================================================
-->

  	  <target name="clean">
  	    <delete dir="${classes.dir}" quiet="true"/>
  	  	<delete dir="instrumentedclasses" quiet="true"/>
  	  </target>

  	<!-- =========================================================================
-->
  	<!--                                    Init
           -->
  	<!-- =========================================================================
-->
  		
  		<target name="init" description="Initialize ressources">
  	 		<mkdir dir="${classes.dir}"/>
  			<mkdir dir="instrumentedclasses"/>
  		</target>
		
	<!-- =========================================================================
-->
	<!--                                  Compile
         -->
	<!-- =========================================================================
-->

	<target name="compile">

			<javac srcdir="" destdir="classes"
				debug="on" deprecation="off" optimize="on" includes="**/*.java">
		    <classpath refid="project.classpath"/>
		    <compilerarg line="-Xlint:unchecked"/>
				<src path="src"/>
			</javac>

			<copy todir="instrumentedclasses">
			 <fileset dir ="classes">
			   <include name ="org/jppf/comm/discovery/JPPFConnectionInformation.class"/>
			 </fileset>
			</copy>
	   </target>

	<!-- =========================================================================
-->
	<!--                                  instrument
         -->
	<!-- =========================================================================
-->
	
	<taskdef name="javaflow"
classname="org.apache.commons.javaflow.ant.AntRewriteTask">
				<classpath id = "project.class.path">
					     <fileset dir = "lib">
					        <include name = "**/commons-javaflow-20060411.jar"/>
					     	<include name = "**/bcel-5.2.jar"/>
					     </fileset>
					</classpath>
		</taskdef>
	
	<target name="javaflow" depends="compile">
		<javaflow srcdir="classes" dstdir="instrumentedclasses" mode ="ASM">
			  <include name="**/*.class" />
			</javaflow>
	</target>
			
	<!-- =========================================================================
-->
	<!--                                    Build
         -->
	<!-- =========================================================================
-->

	<target name="build" description="build the application"
depends="clean, init, compile,javaflow">
		<delete dir="${classes.dir}" quiet="true"/>
		<mkdir dir="${classes.dir}"/>
		<copy todir ="${classes.dir}">
		   <fileset dir ="instrumentedclasses">
		   </fileset>
		</copy>
	</target>

	<!-- =========================================================================
-->
	<!--                     Run the framework processes
         -->
	<!-- =========================================================================
-->

	<!-- to run a single node -->
	<target name="run" depends="build">
		<java fork="yes" classname="org.jppf.node.NodeLauncher"
classpathref="run.classpath">
			<!--<jvmarg value="-server"/>-->
			<jvmarg value="-Xmx16m"/>
			<jvmarg value="-Dlog4j.configuration=log4j-node.properties" />
			<jvmarg value="-Djppf.config=jppf-node.properties" />
		</java>
	</target>

	<!-- for compatibility with previous versions -->
	<target name="run.node" depends="run"/>

</project>


2011/6/8 Jörg Schaible <joerg.schaible@scalaris.com>:
> Hi Wayne,
>
> wayne wrote:
>
>> I list my classpath info as follow:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>> <classpathentry kind="src" path="src/java"/>
>> <classpathentry kind="src" path="src/resources"/>
>> <classpathentry kind="con"
>> path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry
>> combineaccessrules="false" kind="src" path="/JPPF"/> <classpathentry
>> kind="lib" path="F:/jppfrun/JPPF-2.4-node/lib/jppf-common-node.jar"/>
>> <classpathentry kind="lib"
>> path="F:/jppfrun/JPPF-2.4-node/lib/jppf-common-node-src.jar"/>
>> <classpathentry kind="lib"
>> path="F:/jppfrun/JPPF-2.4-node/lib/log4j-1.2.15.jar"/>
>> <classpathentry kind="lib"
>> path="F:/jppfrun/JPPF-2.4-node/lib/slf4j-api-1.6.1.jar"/>
>> <classpathentry kind="lib"
>> path="F:/jppfrun/JPPF-2.4-node/lib/slf4j-log4j12-1.6.1.jar"/>
>> <classpathentry kind="lib" path="C:/Documents and
>> Settings/whwayne/Desktop/jar/commons-logging-1.1.1-bin/commons-
> logging-1.1.1/commons-logging-1.1.1.jar"/>
>> <classpathentry kind="output" path="classes"/>
>> </classpath>
>
> Just some general comments on the classpath:
> 1/ jppf-common-node-src.jar does not belong to the classpath at all
> 2/ either use slf4j or commons-logging, but not both at the same time
>
> BTW: Sorry, I missed your first posting of the classpath. Therefore was my
> last mail harsher than it should have been.
>
> However, I fail now to see the relation to Javaflow. What has this Eclipse
> project to do with the Ant built.xml where you try to use the Javaflow Ant
> task? The classpath of the Ant build is what is of real interest ...
>
>> Torsten, what is mvn clean test by the way?
>
> He assumed that you build with Maven, but from your Eclipse classpath above,
> this is clearly not the case.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>



-- 
..............................................
Mime
View raw message