Duplicate Class Error When Compiling
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About duplicate class error in ant build Us Learn more about Stack Overflow the company Business Learn more about hiring
Duplicate Class Error Netbeans
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Java Duplicate Class Error
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up maven compilation error: duplicate classes
Error Compiling Arduino Uno
up vote 8 down vote favorite 3 In my maven2 project I have a directory ${basedir}/autogen that contains some autogenerated source code files produced by wsdl2java. When running mvn compile I get an compilation error, because of duplicate classes, that lives in ${basedir}/autogen. This is true. But what is the compilation phase doing in ${basedir}/autogen? I have not told maven to add this directory as a error compiling shader psspecularalpha arma 3 source directory. And there seems to be no way of telling maven to ignore the directory. maven-2 maven-plugin share|improve this question edited Jul 30 '09 at 21:34 Rich Seller 61k16143161 asked May 19 '09 at 11:57 vpalle 2601613 @vpalle can you list the duplicated class names? are they dupes of javax.* classes? –sal May 26 '09 at 14:24 I am having a similar issue I need to digest a wsdl web service and a schema xsd. Neither has all I need, but in the overlap there are dups which then throw duplicat class errors on compile. –Adam Jun 23 '10 at 17:30 add a comment| 6 Answers 6 active oldest votes up vote 16 down vote I had the same problem when using the maven-processor-plugin and found that the solution was to configure the maven-compiler plugin as follows:
This Site Careers Other all forums Forum: Ant, Maven and Other Build Tools duplicate class error when compiling with ant Baiju Varugese Ranch error compiling cython file Hand Posts: 74 posted 10 years ago hi, i am error compiling movie premiere pro getting following error while building the project using ant, if i compile the same file with javac error compiling css asset i it compiling fine. Compiling 252 source files to D:\ProjectBuild\PMTP3\temp\WEB-INF\classes [javac] D:\ProjectBuild\PMTP3\source\java\com\otx\pms\actions\si\AddStrategicIssue.java:56: duplicate class: com.otx.pms.actions.si.AddStrategicIssue [javac] public class AddStrategicIssue extends Action please help me Srikanth Raghavan http://stackoverflow.com/questions/882295/maven-compilation-error-duplicate-classes Ranch Hand Posts: 389 posted 10 years ago Well, I am not an expert with ant. But I had a similar issue wherein I had a class in two jar files. So, it errored out in a similar way. See if you have two jar files containing the same class. Matt Harrah Ranch Hand https://coderanch.com/t/108527/tools/duplicate-class-error-compiling-ant Posts: 54 posted 10 years ago The problem here is NOT the fact that you have the class defined in two jars. When you have the same class in more than one jar, the classpath mechanism will ensure that the first one is used and the second one is ignored silently, so this is not your error. The problem here is that you have source for the same class/package in more than one location/directory trying to get compiled in the same task. Srikanth Raghavan Ranch Hand Posts: 389 posted 10 years ago I apologize for not reading the question properly. I guess Matt is right. Sorry for misleading. Post Reply Bookmark Topic Watch Topic New Topic Similar Threads Eclips error Sun webservices tutorial Javac compile error webservice compiler error Javac error All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter Contact Us | advertise | mobile view | Powered by JForum | Copyright © 1998-2016 Paul Wheaton
class when there is no duplicate class Summary: Reporting duplicate class when there is no duplicate class Status: REOPENED Product: java Classification: Unclassified Component: Source Version: 7.3 https://netbeans.org/bugzilla/show_bug.cgi?id=226360 Hardware: PC Windows 7 x64 Priority: P3 (vote) TargetMilestone: 7.3 Assigned To: Svata Dedic QA Contact: issues@java URL: Whiteboard: Keywords: Depends on: Blocks: Show dependency tree /graph Reported: 2013-02-19 16:43 UTC by cmd1234 Modified: https://issues.apache.org/jira/browse/MCOMPILER-235 2016-01-01 05:50 UTC (History) CC List: 1 user (show) MackSix See Also: Issue Type: DEFECT Exception Report : Attachments uplocateclass.png (102.43 KB, image/png) 2014-06-03 09:21 UTC, Zom-B Details View All Add an attachment (proposed error compiling patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description cmd1234 2013-02-19 16:43:26 UTC Its actually version 7.3 RC2 Get duplicate class error when there is no duplicate class. Program compiles up correctly with no errors. Have deleted cache files, but problem persists. When loaded into Netbeans 7.2 I have no problems at all. Comment 1 cmd1234 2013-02-19 17:09:23 UTC duplicate class error Got around the problem I didn't know that netbeans has two places where is caches files. had deleted ~/Library/Application\ Support/NetBeans/7.3rc2 but also need to delete ~/Library/Caches/NetBeans/7.3rc2 so its just the old cache problem. Comment 2 Tomas Danek 2013-02-27 15:31:50 UTC closing then. Comment 3 psammalisto 2013-03-22 19:19:28 UTC I got that error when I copied a backup over the file in src folder. I could find the class name only in the class file and in project properties as main.class, it cannot be found e.g. anywhere in files in ~folder. Comment 4 Tomas Danek 2013-04-10 09:14:46 UTC Did you try wiping out the cache (like ~/Library/Caches/NetBeans/7.3 ) ? (In reply to comment #3) > I got that error when I copied a backup over the file in src folder. I could > find the class name only in the class file and in project properties as > main.class, it cannot be found e.g. anywhere in files in ~folder. Comment 5 Zom-B 2014-06-03 09:13:30 UTC I encountered this in 8.0 RC2 When I refactor/rename the class, the error goes away. When I add a new variable somewhere with the old name as the type, the autocompletion suggests it along with the new name, but javadoc for the old name is missing. No ed
due to MCOMPILER-157 when compiler is called twice or moreAgile Board ExportXMLWordPrintableJSON Details Type: Bug Status: Closed Priority: Major Resolution: Fixed Affects Version/s: 3.2 Fix Version/s: 3.5.1 Labels: None Environment: Maven 3.2.3 Description I tried to upgrade our projects to use the compiler 3.2 and instead of 3.1 Classical builds are ok but site builds are KO because for various reasons (reports) the lifecycle is forked and thus the compiler is called twice (or more) and fails because it finds duplicated classes Example : [INFO] ------------------------------------------------------------------------ [INFO] Building eXo Commons - Common Services 4.1.x-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-java-version) @ commons-component-common --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven-version) @ commons-component-common --- [INFO] [INFO] --- buildnumber-maven-plugin:1.3:create (default) @ commons-component-common --- [INFO] [INFO] --- jacoco-maven-plugin:0.7.2.201409121644:prepare-agent (prepare-ut-agent) @ commons-component-common --- [INFO] argLine set to -javaagent:/srv/ciagent/workspace/commons-master-site/.repository/org/jacoco/org.jacoco.agent/0.7.2.201409121644/org.jacoco.agent-0.7.2.201409121644-runtime.jar=destfile=/srv/ciagent/workspace/commons-master-site/sources/commons-component-common/target/jacoco.exec,append=true [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ commons-component-common --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 5 resources [INFO] [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ commons-component-common --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 97 source files to /srv/ciagent/workspace/commons-master-site/sources/commons-component-common/target/classes [WARNING] Supported source version 'RELEASE_5' from annotation processor 'org.chromattic.apt.ChromatticProcessor' less than -source '1.7' [INFO] About to process the type org.exoplatform.settings.chromattic.SettingsRoot [INFO] About to process the type org.ex