Print stream not initialized in DefaultUpdateHandler
See original GitHub issueHello @mordechaim - I’m encountering some kind of initialization problem that kicks of a NPE which prevents me from understanding why the update is failing.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.io.PrintStream.println(String)" because "this.out" is null
at org.update4j.service.DefaultUpdateHandler.clearln(DefaultUpdateHandler.java:153)
at org.update4j.service.DefaultUpdateHandler.failed(DefaultUpdateHandler.java:74)
at org.update4j.ConfigImpl.doUpdate(ConfigImpl.java:396)
at org.update4j.Configuration.update(Configuration.java:915)
at org.update4j.service.DefaultBootstrap.updateFirst(DefaultBootstrap.java:206)
at org.update4j.service.DefaultBootstrap.main(DefaultBootstrap.java:147)
at org.update4j.Bootstrap.start(Bootstrap.java:297)
at org.update4j.Bootstrap.start(Bootstrap.java:280)
at org.update4j.Bootstrap.start(Bootstrap.java:182)
at org.update4j.Bootstrap.main(Bootstrap.java:113)
This is a fairly standard wrapper / business setup and I am inclined to believe that it could be a module-related problem, as it only happens when making an update using a custom jlinked JRE. The JRE is jlinked from Corretto and the release details are
JAVA_VERSION="17.0.0.35.1"
MODULES="java.base java.datatransfer java.xml java.prefs java.desktop java.logging java.management java.security.sasl java.naming java.net.http java.scripting java.transaction.xa java.sql jdk.crypto.ec jdk.jsobject jdk.unsupported jdk.unsupported.desktop jdk.xml.dom"
So what am I looking at? Is this a PBKAC? Am I missing a module that update4j requires but was afraid to ask? 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
java.lang.NullPointerException: Cannot invoke "java.io ...
ConfigImpl line 396 "handler.failed(t)" internally calls the DefaultUpdateHandler.clearln. This printStream has not yet been initialized, ...
Read more >java - A PrintStream that does nothing - Stack Overflow
The problem is in the initialisation order. Static fields are initialised in the order that you have declared them ("textual order"), ...
Read more >PrintStream (Java Platform SE 7 ) - Oracle Help Center
Creates a new print stream. This stream will not flush automatically. Parameters: out - The output stream to which values and objects will...
Read more >Java PrintStream Class - CodeGym
Today we'll talk about the Java PrintStream class and everything it can do. Actually, you are already familiar with two methods.
Read more >java.io.PrintStream.<init> java code examples | Tabnine
Popular methods of PrintStream ... Put the line separator String onto the print stream. ensureOpen. Check to make sure that the stream has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was fixed in #142 but I never got around to releasing it. Check out this conversation.
If you’re not using the archive update mechanism your shouldn’t have required the module I first place. Am I missing something?
I’m reopening this issue so I’ll remember to do a release when I get around.