Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » "Unknown constant pool type 19" during Java 9 build with module declaration
"Unknown constant pool type 19" during Java 9 build with module declaration [message #1774432] Sat, 14 October 2017 09:30 Go to next message
ecl ecl is currently offline ecl eclFriend
Messages: 9
Registered: October 2017
Junior Member
I created a simple Java 9 hello world application (an example is here https://github.com/CodeFX-org/demo-jpms-hello-world). Whenever I declare a module, the Java builder fails with the following message:

Quote:

Errors running builder 'Java Builder' on project 'demo-jpms-hello-world-master'.
Unknown constant pool type 19


Subsequent tries to run the hello world program naturally fail, the error message is as follows:

Quote:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module org.codefx.demo.jpms_hello_world not found


Commenting out all content of module-info.java makes the builder and the program execution run as expected.

At the same time, compiling and running from the command line works as expected. Using the above hello world example, this is the code that works:

javac -d target/classes $(find src -name '*.java')

jar --create --file target/jpms-hello-world.jar --main-class org.codefx.demo.jpms.HelloModularWorld -C target/classes .

java --module-path target/jpms-hello-world.jar --module org.codefx.demo.jpms_hello_world


I am running Eclipse Oxygen.1a Release (4.7.1a) on Java 9+181.

As suggest by Eric Rizzo, this is a repost of https://www.eclipse.org/forums/index.php/t/1089414/.
Re: "Unknown constant pool type 19" during Java 9 build with module declaration [message #1774441 is a reply to message #1774432] Sat, 14 October 2017 13:26 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1528
Registered: July 2009
Senior Member
Quote:
Errors running builder 'Java Builder' on project 'demo-jpms-hello-world-master'.
Unknown constant pool type 19


Some plug-in invoked during the build is not Java 9-aware.

Please look up the exact version of plug-in org.eclipse.jdt.core.

Additionally, if there was an exception, the Error Log view should (hopefully) contain a corresponding stack trace (or look in .metadata/.log). What does it say?
Re: "Unknown constant pool type 19" during Java 9 build with module declaration [message #1774461 is a reply to message #1774432] Sun, 15 October 2017 15:46 Go to previous messageGo to next message
ecl ecl is currently offline ecl eclFriend
Messages: 9
Registered: October 2017
Junior Member
Thank you very much for the plug-in hint.

I was using Lombok, not in this particular project, but in eclipse. Removing it solved the problem (apparently, Lombok has no eclipse support for Java 9 yet).

For anybody else searching for a troublesome plug-in: I did not find any information in the Error Log view or .metadata/.log, but starting eclipse from command line revealed the stack trace.
Re: "Unknown constant pool type 19" during Java 9 build with module declaration [message #1774538 is a reply to message #1774461] Mon, 16 October 2017 22:08 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1528
Registered: July 2009
Senior Member
Quote:
I was using Lombok


thanks for letting us know.
Yes, Lombok is always a candidate to look out for, in case of mysterious errors.
Previous Topic:Selectively redirect only stdout to a file
Next Topic:Problem with WindowBuilder on MacBook
Goto Forum:
  


Current Time: Fri Dec 15 23:44:05 GMT 2017

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

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