You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Chad Preisler <ch...@gmail.com> on 2020/11/11 22:00:28 UTC
JDK 15: Netbeans 12.1 thinks text blocks are still preview
Netbeans 12.1 appears to still think text blocks are still a preview feature while using JDK 15. I wanted to get this on your radar. Is there any way to make the IDE see the text block as valid without preview turned on?
I'm using a maven project and the project compiles fine without preview turned on, but the IDE still marks the code as an error and gives an option to "Enable Preview Feature". When I turn preview features on, I can't run an individual unit test in Netbeans. There appears to be some issue with the forked maven JDK not getting the preview flag turned on when running the test. For that reason I'd prefer to not use the preview feature.
Here is the Netbeans info:
Product Version: Apache NetBeans IDE 12.1
Java: 15.0.1; OpenJDK 64-Bit Server VM 15.0.1+9
Runtime: OpenJDK Runtime Environment 15.0.1+9
System: Linux version 5.3.0-46-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/chad/.netbeans/12.1
Cache directory: /home/chad/.cache/netbeans/12.1
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem with null pointer and stack trace
Posted by HRH <hr...@yahoo.com.INVALID>.
This mailing list is geared to address issues regarding the Netbeans application and perhaps not the right place to procure answers regarding software programming problems. I suggest, using sites like stackoverflow, Github, coderanch, etc. where an abundance of contributions are available from developers worldwide and you have much better chance in getting an answer.
Although a cursory glance at the stack trace indicates the exception is in Java FX native code (event handling in this case) but in reality such problem stems from an uninitialized setup or a configuration in your Java code that propegates into the lower libraries.
Best,hrh
On Thursday, November 12, 2020, 8:23:10 PM GMT+3:30, Chris Olsen <co...@mchsi.com> wrote:
Hello, Everyone --
I am faced with a bit of difficulty tracking down a null pointer. I am only slightly experienced with Exceptions, but thus far I seem to have been relatively successful at using them in my code. However, my new problem is that I cannot connect the null pointer exception to any of my code. I believe I have the error surrounded by the try-catch block, but the stack trace seems to me to be only telling me about deep down in java code. I have printed part of the stack trace below. In the actual run, this is repeated, as more than one Mouse Dragging event is being detected. The first three lines are just System.outs of my code line numbers.
I tried using the Netbeans debugger (which I am not at all familiar with) and got the same output.
Any suggestions for how I might approach this error detection are much appreciated!
-- Chris
-----------------------------------------------------------
190 ----- DragableAnchorPane, begin resizeViaMouse(MouseEvent event)
195 -----===== state = S_RESIZE
243 ----- DragableAnchorPane, end resizeViaMouse(MouseEvent event)
java.lang.NullPointerException
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:214)
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:644)
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:607)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:479)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:328)
at javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:832)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Problem with null pointer and stack trace
Posted by Chris Olsen <co...@mchsi.com>.
Hello, Everyone --
I am faced with a bit of difficulty tracking down a null pointer. I am only slightly experienced with Exceptions, but thus far I seem to have been relatively successful at using them in my code. However, my new problem is that I cannot connect the null pointer exception to any of my code. I believe I have the error surrounded by the try-catch block, but the stack trace seems to me to be only telling me about deep down in java code. I have printed part of the stack trace below. In the actual run, this is repeated, as more than one Mouse Dragging event is being detected. The first three lines are just System.outs of my code line numbers.
I tried using the Netbeans debugger (which I am not at all familiar with) and got the same output.
Any suggestions for how I might approach this error detection are much appreciated!
-- Chris
-----------------------------------------------------------
190 ----- DragableAnchorPane, begin resizeViaMouse(MouseEvent event)
195 -----===== state = S_RESIZE
243 ----- DragableAnchorPane, end resizeViaMouse(MouseEvent event)
java.lang.NullPointerException
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:214)
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:644)
at javafx.graphics/com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:607)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:479)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:328)
at javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:832)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: JDK 15: Netbeans 12.1 thinks text blocks are still preview
Posted by Chad Preisler <ch...@gmail.com>.
The problem with text blocks does not exist in 12.2 RC1.
The issue with running a single test with preview enabled does still exist in 12.2 RC1. Although it has gotten better. I'm able to eliminate the problem by adding the "enable-preview" flag to the Surefire plugin. In 12.1 that did not work. Here is the section of the maven POM file that I edited by hand to make the unit tests run. The surefire plugin node existed before I enabled preview in the editor. I added the --enable-preview argument.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<jvm>/usr/lib/jvm/jdk-15.0.1+9/bin/java</jvm>
<argLine>--enable-preview</argLine>
</configuration>
</plugin>
Product Version: Apache NetBeans IDE 12.2-rc1
Java: 15.0.1; OpenJDK 64-Bit Server VM 15.0.1+9
Runtime: OpenJDK Runtime Environment 15.0.1+9
System: Linux version 5.3.0-46-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/chad/.netbeans/12.2-rc1
Cache directory: /home/chad/.cache/netbeans/12.2-rc1
Anyway, thanks for the help. I'm able to use text blocks without preview enabled now.
On 2020/11/11 22:25:03, Geertjan Wielenga <ge...@googlemail.com.INVALID> wrote:
> 12.1 does not support JDK 15. If it runs on JDK 15, that’s nice, but it
> does not officially support it.
>
> Please try your scenario instead in 12.2, currently in beta, which does
> support JDK 15.
>
> http://mail-archives.apache.org/mod_mbox/netbeans-dev/202011.mbox/%3Cfc423e41-bd3c-e7be-0d26-a4741f6b2ad4@gmail.com%3E
>
> Gj
>
> On Wed, 11 Nov 2020 at 23:00, Chad Preisler <ch...@gmail.com> wrote:
>
> > Netbeans 12.1 appears to still think text blocks are still a preview
> > feature while using JDK 15. I wanted to get this on your radar. Is there
> > any way to make the IDE see the text block as valid without preview turned
> > on?
> >
> > I'm using a maven project and the project compiles fine without preview
> > turned on, but the IDE still marks the code as an error and gives an option
> > to "Enable Preview Feature". When I turn preview features on, I can't run
> > an individual unit test in Netbeans. There appears to be some issue with
> > the forked maven JDK not getting the preview flag turned on when running
> > the test. For that reason I'd prefer to not use the preview feature.
> >
> > Here is the Netbeans info:
> >
> > Product Version: Apache NetBeans IDE 12.1
> > Java: 15.0.1; OpenJDK 64-Bit Server VM 15.0.1+9
> > Runtime: OpenJDK Runtime Environment 15.0.1+9
> > System: Linux version 5.3.0-46-generic running on amd64; UTF-8; en_US (nb)
> > User directory: /home/chad/.netbeans/12.1
> > Cache directory: /home/chad/.cache/netbeans/12.1
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: users-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: JDK 15: Netbeans 12.1 thinks text blocks are still preview
Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
12.1 does not support JDK 15. If it runs on JDK 15, that’s nice, but it
does not officially support it.
Please try your scenario instead in 12.2, currently in beta, which does
support JDK 15.
http://mail-archives.apache.org/mod_mbox/netbeans-dev/202011.mbox/%3Cfc423e41-bd3c-e7be-0d26-a4741f6b2ad4@gmail.com%3E
Gj
On Wed, 11 Nov 2020 at 23:00, Chad Preisler <ch...@gmail.com> wrote:
> Netbeans 12.1 appears to still think text blocks are still a preview
> feature while using JDK 15. I wanted to get this on your radar. Is there
> any way to make the IDE see the text block as valid without preview turned
> on?
>
> I'm using a maven project and the project compiles fine without preview
> turned on, but the IDE still marks the code as an error and gives an option
> to "Enable Preview Feature". When I turn preview features on, I can't run
> an individual unit test in Netbeans. There appears to be some issue with
> the forked maven JDK not getting the preview flag turned on when running
> the test. For that reason I'd prefer to not use the preview feature.
>
> Here is the Netbeans info:
>
> Product Version: Apache NetBeans IDE 12.1
> Java: 15.0.1; OpenJDK 64-Bit Server VM 15.0.1+9
> Runtime: OpenJDK Runtime Environment 15.0.1+9
> System: Linux version 5.3.0-46-generic running on amd64; UTF-8; en_US (nb)
> User directory: /home/chad/.netbeans/12.1
> Cache directory: /home/chad/.cache/netbeans/12.1
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>