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.

Haskforce Plugin interferes with Java Builds

See original GitHub issue

First of all thanks for the great work on the Haskforce plugin. It is very useful while taking my first steps in the Haskell world.

However I ran into an issue with a Java project today, that uses 1.6 as target JVM. The default JVM installed on my system is 1.8. Got Intellij2016 with Haskforce 0.3-beta.32 plugin installed. When when I tried to rebuild my Java project today, I got the following error:

Error:Internal error: (java.lang.UnsupportedClassVersionError) com/intellij/execution/ExecutionException : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: com/intellij/execution/ExecutionException : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.haskforce.jps.HaskForceBuilder.createModuleLevelBuilders(HaskForceBuilder.java:20)
    at org.jetbrains.jps.incremental.BuilderRegistry.<init>(BuilderRegistry.java:54)
    at org.jetbrains.jps.incremental.BuilderRegistry.<init>(BuilderRegistry.java:33)
    at org.jetbrains.jps.incremental.BuilderRegistry$Holder.<clinit>(BuilderRegistry.java:36)
    at org.jetbrains.jps.incremental.BuilderRegistry.getInstance(BuilderRegistry.java:43)
    at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:132)
    at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:294)
    at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
    at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
    at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)

Since the stacktrace shows some Haskforce methods, I decided to disable the Haskforce plugin. After that rebuilding Java projects worked fine again.

Note that things are also working fine if I configure 1.8 as target JVM also. Myself and a colleague were able to reproduce the issue with a minimal Java project also.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
carymrobbinscommented, Apr 5, 2017

Note that the resolution to this was to simply not run the module builders if the running Java version was < 8. So using Java 8 features should generally be ok.

1reaction
carymrobbinscommented, Aug 3, 2016

@LeanderK - No, actually HaskForce is built with Java 8. However, the external builder modules (jps-shared and jps-plugin) target Java 6. So only those modules are restricted to Java 6 features.

Read more comments on GitHub >

github_iconTop Results From Across the Web

haskell - IntelliJ Haskforce plugin - run error - Stack Overflow
Doing a build is successful, and creates a Pgm.exe in the ./dist/build/Pgm directory. Is there some additional setup or configuration needed?
Read more >
carymrobbins/intellij-haskforce - Gitter
When I tried to use your plugin all toolbars (project view, terminal, todo etc.) vanished and were no longer activateable under View->Tool\ Windows....
Read more >
Tweets with replies by HaskForce (@haskforce) / Twitter
An Intellij Plugin for the Eta programming language - GitHub ... Haskforce Plugin interferes with Java Builds · Issue #278 · carymrobbins/intellij-haskforce.
Read more >
HaskForce - IntelliJ IDEs Plugin - JetBrains Marketplace
If you encounter any issues, please submit them on our bug tracker. v0.3.46. IDEA 2021.1 Support (requires Java 11). v0.3.45. IDEA 2020.3 Support;...
Read more >
How to set up IntelliJ to build Haskell projects with Stack – iTecNote
I have the HaskForce plugin installed on IntelliJ. The Build, Execution, Deployment -> Compiler -> Haskell Compiler tab gives you a choice between...
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