Re: NullPointerException in ModificationWatcher
Hi Martin. Thank you for your reply. I have created a ticket in JIRA. https://issues.apache.org/jira/browse/WICKET-6971 >Which JDK flavor and version do you use ? I wrote in the ticket about the URLConnection instance and my development environments, which I forgot to mention in my email. Regards, Ryo Tsunoda. 2022年4月11日(月) 15:46 Martin Grigorov : > Hi, > > On Sat, Apr 9, 2022 at 3:14 PM Ryo Tsunoda > wrote: > > > Hi. > > > > Sometimes this exception occurs after I edit the CSS. > > Developed with Eclipse (Checked Build Automatically) + Tomcat. > > > > > > 2022-04-09 19:28:48.252 | ERROR | [ModificationWatcher Task] | > > org.apache.wicket.util.thread.Task | Unhandled exception thrown by user > > code in task ModificationWatcher > > java.lang.NullPointerException: null > > at org.apache.wicket.util.io.Connections.close(Connections.java:133) > > ~[wicket-util-8.14.0.jar:8.14.0] > > at > > > > > org.apache.wicket.core.util.resource.UrlResourceStream.updateContentLength(UrlResourceStream.java:247) > > ~[wicket-core-8.14.0.jar:8.14.0] > > at > > > > > org.apache.wicket.core.util.resource.UrlResourceStream.lastModifiedTime(UrlResourceStream.java:224) > > ~[wicket-core-8.14.0.jar:8.14.0] > > at > > > > > org.apache.wicket.markup.MarkupResourceStream.lastModifiedTime(MarkupResourceStream.java:148) > > ~[wicket-core-8.14.0.jar:8.14.0] > > at > > > > > org.apache.wicket.util.watch.ModificationWatcher.checkModified(ModificationWatcher.java:157) > > ~[wicket-util-8.14.0.jar:8.14.0] > > at > > > > > org.apache.wicket.util.watch.ModificationWatcher$1.run(ModificationWatcher.java:143) > > ~[wicket-util-8.14.0.jar:8.14.0] > > at org.apache.wicket.util.thread.Task$1.run(Task.java:116) > > [wicket-util-8.14.0.jar:8.14.0] > > at java.lang.Thread.run(Thread.java:829) [?:?] > > > > > > connection.getInputStream() returns null. > > > > > https://github.com/apache/wicket/blob/wicket-8.x/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java#L133 > > > > Should wicket check null here? > > > > We could add this check, yes! > > > > > Or is there a problem with the null return situation itself? (Is it a > > problem other than wicket? Eclipse build?) > > > > Which JDK flavor and version do you use ? > UrlConnection#getInputStream() should either return non-null InputStream or > should throw an Exception. > sun.net.www.protocol.file.FileURLConnection#getInputStream() behaves the > same way in Oracle JDK 1.8 and 17. > > > > > > > Has anyone had the same problem? > > If anyone knows of a workaround, please let me know. > > > > Please file a ticket in JIRA! > > > > > > > Regards, > > Ryo Tsunoda. > > >
Re: NullPointerException in ModificationWatcher
Hi, On Sat, Apr 9, 2022 at 3:14 PM Ryo Tsunoda wrote: > Hi. > > Sometimes this exception occurs after I edit the CSS. > Developed with Eclipse (Checked Build Automatically) + Tomcat. > > > 2022-04-09 19:28:48.252 | ERROR | [ModificationWatcher Task] | > org.apache.wicket.util.thread.Task | Unhandled exception thrown by user > code in task ModificationWatcher > java.lang.NullPointerException: null > at org.apache.wicket.util.io.Connections.close(Connections.java:133) > ~[wicket-util-8.14.0.jar:8.14.0] > at > > org.apache.wicket.core.util.resource.UrlResourceStream.updateContentLength(UrlResourceStream.java:247) > ~[wicket-core-8.14.0.jar:8.14.0] > at > > org.apache.wicket.core.util.resource.UrlResourceStream.lastModifiedTime(UrlResourceStream.java:224) > ~[wicket-core-8.14.0.jar:8.14.0] > at > > org.apache.wicket.markup.MarkupResourceStream.lastModifiedTime(MarkupResourceStream.java:148) > ~[wicket-core-8.14.0.jar:8.14.0] > at > > org.apache.wicket.util.watch.ModificationWatcher.checkModified(ModificationWatcher.java:157) > ~[wicket-util-8.14.0.jar:8.14.0] > at > > org.apache.wicket.util.watch.ModificationWatcher$1.run(ModificationWatcher.java:143) > ~[wicket-util-8.14.0.jar:8.14.0] > at org.apache.wicket.util.thread.Task$1.run(Task.java:116) > [wicket-util-8.14.0.jar:8.14.0] > at java.lang.Thread.run(Thread.java:829) [?:?] > > > connection.getInputStream() returns null. > > https://github.com/apache/wicket/blob/wicket-8.x/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java#L133 > > Should wicket check null here? > We could add this check, yes! > Or is there a problem with the null return situation itself? (Is it a > problem other than wicket? Eclipse build?) > Which JDK flavor and version do you use ? UrlConnection#getInputStream() should either return non-null InputStream or should throw an Exception. sun.net.www.protocol.file.FileURLConnection#getInputStream() behaves the same way in Oracle JDK 1.8 and 17. > > Has anyone had the same problem? > If anyone knows of a workaround, please let me know. > Please file a ticket in JIRA! > > Regards, > Ryo Tsunoda. >
NullPointerException in ModificationWatcher
Hi. Sometimes this exception occurs after I edit the CSS. Developed with Eclipse (Checked Build Automatically) + Tomcat. 2022-04-09 19:28:48.252 | ERROR | [ModificationWatcher Task] | org.apache.wicket.util.thread.Task | Unhandled exception thrown by user code in task ModificationWatcher java.lang.NullPointerException: null at org.apache.wicket.util.io.Connections.close(Connections.java:133) ~[wicket-util-8.14.0.jar:8.14.0] at org.apache.wicket.core.util.resource.UrlResourceStream.updateContentLength(UrlResourceStream.java:247) ~[wicket-core-8.14.0.jar:8.14.0] at org.apache.wicket.core.util.resource.UrlResourceStream.lastModifiedTime(UrlResourceStream.java:224) ~[wicket-core-8.14.0.jar:8.14.0] at org.apache.wicket.markup.MarkupResourceStream.lastModifiedTime(MarkupResourceStream.java:148) ~[wicket-core-8.14.0.jar:8.14.0] at org.apache.wicket.util.watch.ModificationWatcher.checkModified(ModificationWatcher.java:157) ~[wicket-util-8.14.0.jar:8.14.0] at org.apache.wicket.util.watch.ModificationWatcher$1.run(ModificationWatcher.java:143) ~[wicket-util-8.14.0.jar:8.14.0] at org.apache.wicket.util.thread.Task$1.run(Task.java:116) [wicket-util-8.14.0.jar:8.14.0] at java.lang.Thread.run(Thread.java:829) [?:?] connection.getInputStream() returns null. https://github.com/apache/wicket/blob/wicket-8.x/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java#L133 Should wicket check null here? Or is there a problem with the null return situation itself? (Is it a problem other than wicket? Eclipse build?) Has anyone had the same problem? If anyone knows of a workaround, please let me know. Regards, Ryo Tsunoda.