• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Java program kicking out error

 
Greenhorn
Posts: 7
Eclipse IDE Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My program is kicking out an error and I'm not sure that I know why it is doing it.  I have already tried to debug myself, but the Eclipse IDE doesn't give me any errors.  Any help will be appreciated.


 
Sheriff
Posts: 4643
582
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Pritchardson wrote:My program is kicking out an error and I'm not sure that I know why it is doing it.


What specifically is the error?  Is there any stack trace or other details that you can share?
 
Rancher
Posts: 517
15
Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My program is kicking out an error ...



Please tell what is that kicked out error?
 
Adam Pritchardson
Greenhorn
Posts: 7
Eclipse IDE Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I should have include the error message in Eclipse. It is below:

Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Children: duplicate children added: parent = ClockPane@95b12a3
at javafx.graphics/javafx.scene.Parent$3.onProposedChange(Unknown Source)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.addAll(Unknown Source)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.addAll(Unknown Source)
at ClockPane.paintClock(ClockPane.java:111)
at ClockPane.setCurrentTime(ClockPane.java:68)
at ClockPane.<init>(ClockPane.java:15)
at DisplayClock.start(DisplayClock.java:13)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
... 1 more
Exception running application DisplayClock
 
Adam Pritchardson
Greenhorn
Posts: 7
Eclipse IDE Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't really know how to read that error, I can see that the first line states there is an exception in the start method, but I don't know what the exception is. As I said the Eclipse IDE isn't giving me any help.
 
Ron McLeod
Sheriff
Posts: 4643
582
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would start by looking at Caused by: java.lang.IllegalArgumentException: Children: duplicate children added: parent = ClockPane@95b12a3

Where do you add children to ClockPane?
 
Adam Pritchardson
Greenhorn
Posts: 7
Eclipse IDE Notepad Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:I would start by looking at Caused by: java.lang.IllegalArgumentException: Children: duplicate children added: parent = ClockPane@95b12a3

Where do you add children to ClockPane?



Thank you.  I found my duplicate argument. It was at line 111.  I looked over that thing 1000 times and didn't find it until tonight.  Thank you again.
 
Ron McLeod
Sheriff
Posts: 4643
582
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Pritchardson wrote:I found my duplicate argument. It was at line 111.


Great  

Since you are using Eclipse, there would have been some warnings present in the IDE: a yellow triangle icon in the gutter, a wavy yellow line on line 85, and a warning of an unused local variable in the Problems view.  While these don't point directly to the problem, you would have figured-out your problem quickly if you would have investigated what they were trying to tell you.

 
Adam Pritchardson
Greenhorn
Posts: 7
Eclipse IDE Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you agin
 
Nothing up my sleeve ... and ... presto! A tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic