question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellij unable to build java project with manifold-preprocessor

See original GitHub issue

When building application using manifold preprocessor through intellij it gives out null reference, consequently if you compile the application using “mvn compile” it compiles fine. Due to which unable to debug the application

To Reproduce Steps to reproduce the behavior:

  1. Create simple java maven project (e.g maven-archetype-quickstart)
  2. Modify pom.xml using the following link https://github.com/manifold-systems/manifold/tree/master/manifold-deps-parent/manifold-preprocessor#Maven
  3. Now build application from intellij

Desktop

  • OS Type & Version: Windows 10
  • Java/JDK version: 11.0.11
  • IDE version (IntelliJ IDEA): 2021.2.1 (CE)
  • Manifold version: 2022.1.14
  • Manifold IntelliJ plugin version: 2021.2.48

Stack trace

java: Internal error: 
java.lang.NullPointerException
	at manifold.util.concurrent.ConcurrentWeakHashMap.get(ConcurrentWeakHashMap.java:1009)
	at manifold.util.ReflectUtil.getRawMethodFromCache(ReflectUtil.java:1149)
	at manifold.util.ReflectUtil.getMethodFromCache(ReflectUtil.java:1139)
	at manifold.util.ReflectUtil._method(ReflectUtil.java:325)
	at manifold.util.ReflectUtil.method(ReflectUtil.java:315)
	at manifold.util.ReflectUtil.method(ReflectUtil.java:298)
	at manifold.internal.javac.JavacPlugin.overrideJavacToolEnter(JavacPlugin.java:203)
	at manifold.internal.javac.JavacPlugin.init(JavacPlugin.java:195)
	at manifold.internal.javac.JavacPluginBootstrap.init(JavacPluginBootstrap.java:49)
	at jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.initPlugins(BasicJavacTask.java:215)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.prepareCompiler(JavacTaskImpl.java:199)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:101)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
	at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:238)
	at org.jetbrains.jps.incremental.java.JavaBuilder.lambda$compileJava$2(JavaBuilder.java:514)
	at org.jetbrains.jps.incremental.java.JavaBuilder.invokeJavac(JavaBuilder.java:560)
	at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:512)
	at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:355)
	at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:280)
	at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:234)
	at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1485)
	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1123)
	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1268)
	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1088)
	at org.jetbrains.jps.incremental.IncProjectBuilder.access$1200(IncProjectBuilder.java:69)
	at org.jetbrains.jps.incremental.IncProjectBuilder$BuildParallelizer$1.run(IncProjectBuilder.java:1028)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ahmed6262445commented, Jun 7, 2022

@rsmckinney, Thanks for your time and help, it works now. It seems that there was some issue with configuration of Intellij, removing the configuration from %APPDATA%\Roaming\JetBrains fixed it. I’ll let you know if I narrow it down.

Thank you.

0reactions
ahmed6262445commented, Jun 7, 2022

@rsmckinney thank you will try to run sample project provided by you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compile and build applications with IntelliJ IDEA - JetBrains
Learn how to compile and build applications, automatically build a project, trigger the compilation before running, check the compilation ...
Read more >
When source code has errors: The Manifold plugins makes ...
For some days, I noticed that IntelliJ becomes very slow as soon as the code has errors. Now, unfortunately, I was able to...
Read more >
Java preprocessing support in Intellij IDEA - Stack Overflow
I've worked extensively with Java pre-processors and IntelliJ IDEA. ... be the Manifold preprocessor which integrates with the Java compiler ...
Read more >
A Preprocessor for Java - Manifold
This is the rationale behind the new preprocessor from the Manifold project. Note Java does offer a very limited version of conditional compilation...
Read more >
Manifold is a Java compiler plugin, its features include ...
Maybe, although most of what I see are either ideas that have already been considered and rejected (a preprocessor, properties, extension ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found