Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Compilation issue with 2.15.0 #379

Unanswered
tarioch asked this question in Q&A
Mar 19, 2024 · 7 comments · 4 replies
Discussion options

When trying to upgrade from 2.14.2 to 2.15.0, we now get compilation errors like

Internal compiler error: java.lang.Exception: org.eclipse.jdt.internal.compiler.problem.AbortCompilation: 
 Pb(347) The type org.apache.commons.logging.Log cannot be resolved. It is indirectly referenced from required type
 org.springframework.core.io.support.PathMatchingResourcePatternResolver at
 org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:172)

We're using eclipse compiler with org.eclipse.jdt version 3.35.0

and changing the version of plexus-compiler ferom 2.14.2 to 2.15.0 is the only change.

Is there any known reason for this?

You must be logged in to vote

Replies: 7 comments · 4 replies

Comment options

  • can you provide your maven-compiler-plugin configuration?
  • which version of m-compiler-p do you use?
  • please also execute mvn compile -X and provide output like:
[INFO] --- compiler:3.12.1:compile (default-compile) @ xxxx ---
[DEBUG] Using thread pool with 5 threads to resolve descriptors.
[DEBUG] Collector skip mode enabled
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=11084, ConflictMarker.markTime=12708, ConflictMarker.nodeCount=21, ConflictIdSorter.graphTime=7083, ConflictIdSorter.topsortTime=7250, ConflictIdSorter.conflictIdCount=15, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=73084, ConflictResolver.conflictItemCount=21, BfDependencyCollector.collectTime=7985666, BfDependencyCollector.transformTime=119334}
[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:3.12.1
[DEBUG]    org.apache.maven.shared:maven-shared-utils:jar:3.4.2:compile
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.36:compile
[DEBUG]       commons-io:commons-io:jar:2.11.0:compile
[DEBUG]    org.apache.maven.shared:maven-shared-incremental:jar:1.1:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]    org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[DEBUG]       org.ow2.asm:asm:jar:9.6:compile
[DEBUG]       com.thoughtworks.qdox:qdox:jar:2.0.3:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-api:jar:2.14.2:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-manager:jar:2.14.2:compile
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]       org.codehaus.plexus:plexus-xml:jar:3.0.0:compile (version managed from default)
[DEBUG]    org.codehaus.plexus:plexus-compiler-javac:jar:2.14.2:runtime
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:4.0.0:compile

You must be logged in to vote
0 replies
Comment options

<plugin>
	<artifactId>maven-compiler-plugin</artifactId>
	<groupId>org.apache.maven.plugins</groupId>
	<version>3.12.1</version>
	<executions>
		<execution>
			<id>default-compile</id>
			<goals>
				<goal>compile</goal>
			</goals>
			<configuration>
				<compilerId>eclipse</compilerId>
				<compilerArgs>
					<arg>-properties</arg>
					<arg>${project.basedir}/.settings/org.eclipse.jdt.core.prefs</arg>
					<arg>-log</arg>
					<arg>${project.build.directory}/ecj.xml</arg>
				</compilerArgs>
				<showWarnings>true</showWarnings>
				<showDeprecation>true</showDeprecation>
				<parameters>true</parameters>
			</configuration>
		</execution>
		<execution>
			<id>default-testCompile</id>
			<goals>
				<goal>testCompile</goal>
			</goals>
			<configuration>
				<compilerId>eclipse</compilerId>
				<compilerArgs>
					<arg>-properties</arg>
					<arg>${project.basedir}/.settings/org.eclipse.jdt.core.prefs</arg>
					<arg>-log</arg>
					<arg>${project.build.directory}/test-ecj.xml</arg>
				</compilerArgs>
				<showWarnings>true</showWarnings>
				<showDeprecation>true</showDeprecation>
				<parameters>true</parameters>
			</configuration>
		</execution>
	</executions>
	<dependencies>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-compiler-eclipse</artifactId>
			<version>2.15.0</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-compiler-api</artifactId>
			<version>2.15.0</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>ecj</artifactId>
			<version>${ecj-version}</version>
		</dependency>
	</dependencies>
	<configuration>
		<forceJavacCompilerUse>true</forceJavacCompilerUse>
		<parameters>true</parameters>
		<annotationProcessorPaths>
			<path>
				<groupId>org.hibernate.validator</groupId>
				<artifactId>hibernate-validator-annotation-processor</artifactId>
				<version>${hibernate-validator-version}</version>
			</path>
		</annotationProcessorPaths>
	</configuration>
</plugin>

[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:3.12.1
[DEBUG]    org.codehaus.plexus:plexus-compiler-eclipse:jar:2.15.0:runtime
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.36:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-api:jar:2.15.0:runtime
[DEBUG]    org.eclipse.jdt:ecj:jar:3.35.0:runtime
[DEBUG]    org.apache.maven.shared:maven-shared-utils:jar:3.4.2:compile
[DEBUG]       commons-io:commons-io:jar:2.11.0:compile
[DEBUG]    org.apache.maven.shared:maven-shared-incremental:jar:1.1:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]    org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[DEBUG]       org.ow2.asm:asm:jar:9.6:compile
[DEBUG]       com.thoughtworks.qdox:qdox:jar:2.0.3:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-manager:jar:2.14.2:compile
[DEBUG]       org.codehaus.plexus:plexus-xml:jar:3.0.0:compile (version managed from default)
[DEBUG]    org.codehaus.plexus:plexus-compiler-javac:jar:2.14.2:runtime
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:4.0.0:compile
You must be logged in to vote
1 reply
@pzygielo
Comment options

Not saying it's the reason but org.codehaus.plexus:plexus-compiler-manager:jar:2.14.2:compile seems at least to be not in sync with other plexus-compiler-*. Maybe it doesn't have to be, IDK.

But I'm successfully using 2.15.0 with NEWER ecj (3.37.0).

Comment options

I tried to manually increase plexus-xompiler-manager to 2.15.0, still same result :(

[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:3.12.1
[DEBUG]    org.codehaus.plexus:plexus-compiler-eclipse:jar:2.15.0:runtime
[DEBUG]       javax.inject:javax.inject:jar:1:runtime
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.36:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-api:jar:2.15.0:runtime
[DEBUG]    org.codehaus.plexus:plexus-compiler-manager:jar:2.15.0:runtime
[DEBUG]       org.codehaus.plexus:plexus-xml:jar:3.0.0:runtime (version managed from default)
[DEBUG]    org.eclipse.jdt:ecj:jar:3.35.0:runtime
[DEBUG]    org.apache.maven.shared:maven-shared-utils:jar:3.4.2:compile
[DEBUG]       commons-io:commons-io:jar:2.11.0:compile
[DEBUG]    org.apache.maven.shared:maven-shared-incremental:jar:1.1:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]    org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[DEBUG]       org.ow2.asm:asm:jar:9.6:compile
[DEBUG]       com.thoughtworks.qdox:qdox:jar:2.0.3:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-javac:jar:2.14.2:runtime
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:4.0.0:compile
You must be logged in to vote
1 reply
@pzygielo
Comment options

And what about newer ecj?

Comment options

Tried now with 3.37.0, still same result

[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:3.12.1
[DEBUG]    org.codehaus.plexus:plexus-compiler-eclipse:jar:2.15.0:runtime
[DEBUG]       javax.inject:javax.inject:jar:1:runtime
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.36:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-api:jar:2.15.0:runtime
[DEBUG]    org.codehaus.plexus:plexus-compiler-manager:jar:2.15.0:runtime
[DEBUG]       org.codehaus.plexus:plexus-xml:jar:3.0.0:runtime (version managed from default)
[DEBUG]    org.eclipse.jdt:ecj:jar:3.37.0:runtime
[DEBUG]    org.apache.maven.shared:maven-shared-utils:jar:3.4.2:compile
[DEBUG]       commons-io:commons-io:jar:2.11.0:compile
[DEBUG]    org.apache.maven.shared:maven-shared-incremental:jar:1.1:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]    org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[DEBUG]       org.ow2.asm:asm:jar:9.6:compile
[DEBUG]       com.thoughtworks.qdox:qdox:jar:2.0.3:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-javac:jar:2.14.2:runtime
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:4.0.0:compile
You must be logged in to vote
2 replies
@pzygielo
Comment options

Reproducer would help, probably.

@tarioch
Comment options

I'll look into a smaller reproduction, one thing I noticed, the error message is coming from compiler.apt.dispatch, so I think that is something that is tied to the annotationProcessorPaths, are you using this as well?

Comment options

While working on the reproduction, I think I figured it out.

Looks like with 2.14.2 the apt processing was working even if there are some missing transitive dependencies, that isn't working anymore with 2.15.0. Concrete case was that we have an exclusion on spring for spring-jcl because we use slf4j and have it replaced with jcl-over-slf4j. We had only added jcl-over-slf4j where we are actually running it and not in the common module, now we have to add it to the compilation of the common module and then I think it should be good.

You must be logged in to vote
0 replies
Comment options

Unfortunately that was just one case, now found another where I think it's an issue. In this case I have one module which compiles fine and has a compile dependency to something, another module now depends on the first module and now fails with a similar issue, but in that case because it depends on the first module, the dependency should be included. So I think somehow transitive dependencies are not correctly included for the APT processing. I'll try to create a reproduction for it.

You must be logged in to vote
0 replies
Comment options

I gave up on this, for now I'm dropping the APT processing, then everything works.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.