Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Duplicate Name and Signature( java.lang.ClassFormatError: Duplicate field name&signature in class file )
Duplicate Name and Signature [message #1090119] Mon, 19 August 2013 18:38 Go to next message
Milan Shrestha is currently offline Milan Shrestha
Messages: 5
Registered: July 2013
Junior Member
I am getting
"java.lang.ClassFormatError: Duplicate field name&signature in class file "
error while trying to compile and run a aspect in my web project through Maven. However, it works fine if I compile and run through eclipse IDE using ADJT. I am using AspectJ 1.7.0.

My Pom.xml has been configured as below:
<build>
<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<execution>
						<!-- Modifying output directory of default compile because non-weaved 
							classes must be stored in separate folder to not confuse ajc by reweaving 
							already woven classes (which leads to to ajc error message like "bad weaverState.Kind: 
							-115") -->
						<id>default-compile</id>
						<configuration>
							<compilerArguments>
								<d>WebContent/unwoven-classes</d>
							</compilerArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<!-- AspectJ plugin -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>aspectj-maven-plugin</artifactId>
				<version>1.4</version>
				<configuration>
					<showWeaveInfo>true</showWeaveInfo>
					<complianceLevel>1.6</complianceLevel>
					<source>1.6</source>
					<target>1.6</target>
					<weaveDirectories>
						<weaveDirectory>WebContent/unwoven-classes</weaveDirectory>
					</weaveDirectories>
					<sources>
						<source>
							<basedir>src</basedir>
							<includes>
								<include>**/QueryProfilerAspect.java</include>

							</includes>

						</source>
					</sources>

				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjrt</artifactId>
						<version>${org.aspectj.version}</version>
					</dependency>
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjtools</artifactId>
						<version>${org.aspectj.version}</version>
						<scope>compile</scope>
					</dependency>
				</dependencies>

				<executions>
					<execution>
						<!-- Compile and weave aspects after all classes compiled by javac -->
						<phase>process-classes</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>


	</build>



Any idea what may be going wrong in here?




Re: Duplicate Name and Signature [message #1090682 is a reply to message #1090119] Tue, 20 August 2013 13:50 Go to previous message
Milan Shrestha is currently offline Milan Shrestha
Messages: 5
Registered: July 2013
Junior Member
Resolved the issue. Seems like 1.4 has some problems I changed it to 1.2 and its working now.
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.2</version>
Previous Topic:Plug-in to send data to excel?
Next Topic:roxy Authentication Required
Goto Forum:
  


Current Time: Fri Sep 19 21:58:21 GMT 2014

Powered by FUDForum. Page generated in 0.01577 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software