I'm following this guide: https://docs.oracle.com/cd/E56351_01/doc.30/e87809/getting-started-with-RESTful-services.htm#AELIG90200
but I got stuck in "F.2 Create a RESTful Service from a SQL Query".
In the folder where Oracle REST Data Services was installed, I entered the following command in a command prompt:
java -jar ords.war user test_developer "SQL Developer"
and I got this error:
java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.base/java.lang.Class.getDeclaredFields(Unknown Source)
at oracle.dbtools.injector.impl.__Reflections.constantFields(__Reflectio ns.java:30)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:356)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:378)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:310)
at oracle.dbtools.common.di.Services$Builder.add(Services.java:409)
at oracle.dbtools.common.di.Services$Builder.load(Services.java:474)
at oracle.dbtools.common.app.ApplicationContext.loadServices(Application Context.java:167)
at oracle.dbtools.cmdline.Commands.main(Commands.java:345)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandl er
at java.base/java.lang.ClassLoader.findClass(Unknown Source)
at oracle.dbtools.jarcl.JarClassLoader.findClass(JarClassLoader.java:63)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.base/java.lang.Class.getDeclaredFields(Unknown Source)
at oracle.dbtools.injector.impl.__Reflections.constantFields(__Reflectio ns.java:30)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:356)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:378)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:310)
at oracle.dbtools.common.di.Services$Builder.add(Services.java:409)
at oracle.dbtools.common.di.Services$Builder.load(Services.java:474)
at oracle.dbtools.common.app.ApplicationContext.loadServices(Application Context.java:167)
at oracle.dbtools.cmdline.Commands.main(Commands.java:345)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.lang.ClassLoader.findClass(Unknown Source)
at oracle.dbtools.jarcl.JarClassLoader.findClass(JarClassLoader.java:63)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.base/java.lang.Class.getDeclaredFields(Unknown Source)
at oracle.dbtools.injector.impl.__Reflections.constantFields(__Reflectio ns.java:30)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:356)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:378)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.add(InjectorImpl.ja va:310)
at oracle.dbtools.common.di.Services$Builder.add(Services.java:409)
at oracle.dbtools.common.di.Services$Builder.load(Services.java:474)
at oracle.dbtools.common.app.ApplicationContext.loadServices(Application Context.java:167)
at oracle.dbtools.cmdline.Commands.main(Commands.java:345)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.lang.ClassLoader.findClass(Unknown Source)
at oracle.dbtools.jarcl.JarClassLoader.findClass(JarClassLoader.java:63)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Unknown Sour ce)
at java.base/java.lang.Class.getDeclaredConstructors(Unknown Source)
at oracle.dbtools.injector.impl.__Reflections.getConstructorsAnnotatedWi th(__Reflections.java:56)
at oracle.dbtools.injector.impl.Constructors.getInjectConstructors(Const ructors.java:39)
at oracle.dbtools.injector.impl.DependencyGraph.annotatedConstructor(Dep endencyGraph.java:416)
at oracle.dbtools.injector.impl.DependencyGraph.dependencies(DependencyG raph.java:204)
at oracle.dbtools.injector.impl.DependencyGraph.graph(DependencyGraph.ja va:297)
at oracle.dbtools.injector.impl.DependencyGraph.<init>(DependencyGraph.j ava:55)
at oracle.dbtools.injector.impl.DependencyGraph.<init>(DependencyGraph.j ava:37)
at oracle.dbtools.injector.impl.DependencyGraph$Builder.build(Dependency Graph.java:490)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.build(InjectorImpl. java:385)
at oracle.dbtools.injector.impl.InjectorImpl$Builder.build(InjectorImpl. java:310)
at oracle.dbtools.common.di.Services$Builder.build(Services.java:416)
at oracle.dbtools.common.di.Services$Builder.build(Services.java:431)
at oracle.dbtools.conf.ConfigurationSettings.injectConfigurationSettingV alues(ConfigurationSettings.java:48)
at oracle.dbtools.common.app.ApplicationContext.<init>(ApplicationContex t.java:98)
at oracle.dbtools.common.app.ApplicationContext.<init>(ApplicationContex t.java:48)
at oracle.dbtools.cmdline.Commands.main(Commands.java:345)
... 5 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandl er
at java.base/java.lang.ClassLoader.findClass(Unknown Source)
at oracle.dbtools.jarcl.JarClassLoader.findClass(JarClassLoader.java:63)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 24 more
Why is this for? and How to fix it?
An issue with Java 9 and addressed in this SO post
Your issue can be worked around by issuing this
java -jar --add-modules java.xml.bind ords.war user test_developer "SQL Developer"
Also, if you're wanting to build RESTful Services with ORDS, you can also use SQL Developer and simply connect to the REST enabled schema and use the REST feature in the connection tree. I talk about this here.
Related
My previous question was deleted here because it was considered as duplicate. I say it's not because the answers were about java itself while mine is about charles proxy and those answers didn't resolve my problem.
I had installed jdk-17.0.1 and jre1.8.0_311 on my machine when I tried to open charles proxy 4.6.2 on double click but nothing happened, the application didn't start. I try to open via command prompt by typing Charles.exe and this error is shown
java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge
at java.desktop/java.awt.Toolkit.newAWTError(Unknown Source)
at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at de.sciss.syntaxpane.DefaultSyntaxKit.<clinit>(DefaultSyntaxKit.java:105)
at com.xk72.charles.gui.lib.UIUtils.<clinit>(Unknown Source)
at com.xk72.charles.gui.s.h(Unknown Source)
at com.xk72.charles.gui.Main.c(Unknown Source)
at com.xk72.charles.Main.b(Unknown Source)
at com.xk72.charles.gui.Main.main(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 com.xk72.lib.a.a(Unknown Source)
at com.xk72.charles.gui.MainWithClassLoader.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.java.accessibility.AccessBridge
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
... 24 more
I'm using Windows 10 64bit. %JAVA_HOME% is also setup
For me going to C:\Users\my account\.accessibility.properties and commenting out every line by adding a # a front of it worked.(I at least don't need the accessibility)
Found this solution at: Exception in thread "main" java.awt.AWTError: Assistive Technology not found
I have been working on an application with JavaFX and spring boot, it workes fine when I launch it from the Eclipse IDE but if I run the generated jar using :
java -jar AppXX.jar it gives me the error below:
Exception in Application init method
Exception in thread "main" 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 org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.RuntimeException: Exception in Application init 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: javafx.fxml.LoadException:
file:/C:/Users/XX/target/MDV2.0-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/X/anotherProject/view/Welcome.fxml
at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at com.X.anotherProject.AnotherProjectApplication.init(AnotherProjectApplication.java:42)
... 3 more
Caused by: 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 com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor36.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.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
... 7 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Node.fireEvent(Unknown Source)
at com.X.anotherProject.Controller.WelcomeController.FireAnEvent(WelcomeController.java:464)
at com.X.anotherProject.Controller.WelcomeController.initialize(WelcomeController.java:338)
... 17 more
Caused by: 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 com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor36.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.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
... 31 more
Caused by: javafx.fxml.LoadException:
file:/C:/Users/XX/target/MDV2.0-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/X/anotherProject/view/Kits%20de%20migration.fxml
at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at com.sopraMdv.anotherProject.Controller.WelcomeController.loadInMainPane(WelcomeController.java:453)
at com.X.anotherProject.Controller.WelcomeController.press(WelcomeController.java:398)
... 41 more
Caused by: 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 com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor36.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.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
... 46 more
Caused by: java.lang.IllegalStateException: Location is not set.
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at com.X.anotherProject.Controller.WelcomeController.loadInMainPane(WelcomeController.java:453)
at com.X.anotherProject.Controller.KitListController.AddElemnt(KitListController.java:115)
at com.X.anotherProject.Controller.KitListController.initialize(KitListController.java:98)
... 56 more
this is how I load the FXML file in my class :
public static void main(String[] args) {
Application.launch(args);
}
#Override
public void init() throws Exception {
springContext = SpringApplication.run(AnotherProjectApplication.class);
FXMLLoader fxmlLoader= new FXMLLoader(getClass().getResource("/com/X/anotherProject/view/Welcome.fxml"));
springContext.getAutowireCapableBeanFactory().autowireBean(this);
fxmlLoader.setControllerFactory(AnotherProjectApplication.springContext::getBean);
rootNode=fxmlLoader.load();
}
note that I have checked a lot of related problems and none of them worked.
The thing is that getClass().getResource() cannot find the FXML file.
When I opened the jar with Winrar I found the file in the given path :
file:/C:/Users/XX/target/MDV2.0-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/X/anotherProject/view/Welcome.fxml
Here i have my artifact output layout. I included jfoenix lib so i don't have any problems with running my project.
Build was successful. Now i have these files in my artifacts folder
And when i run my jar file i still get this output
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.NoClassDefFoundError: com/sun/javafx/css/StyleConverterImpl
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at com.jfoenix.controls.JFXButton$StyleableProperties.<clinit>(JFXButton.java:208)
at com.jfoenix.controls.JFXButton.<init>(JFXButton.java:156)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at main.Main.start(Main.java:15)
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
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.StyleConverterImpl
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 37 more
Exception running application main.Main
I use jdk1.8_171 and run using jre1.8_171. What's the problem here?
Comment by fabian is correct. i was actually running my app with Java >= 9. Adding jfoenix lib for Java 9 solved the problem.
I created quite complex project with JavaFX and now I'm having some trouble deploying it, as I never deployed any app in Java before.
I tried using Intellij "Build artificial" but I always get "Error: corrupted jarfile" when I try to open the the Jar it builds.
Any suggestions? I'm using external libraries from Maven and some local ones too if it helps...
Edit:
Ok I changed some of the settings in the Make Artificial, now I don't get that error.
I get this Exception, seems it can't file the fxml file...
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.NullPointerException: Location is required.
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at sample.Main.start(Main.java:20)
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 sample.Main
SOLVED!: just played with the fxml files patches and it fixed it...
I'm trying to launch a runnable JAR file via web start, but am encountering an error with java not being able to find an external JAR (I think). When running the JNLP file, JWS starts, but then states that the application cannot be opened due to this error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
at DevChat.canConnect(DevChat.java:326)
at DevChat.<init>(DevChat.java:89)
at DevChat.main(DevChat.java:348)
... 9 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.net.ftp.FTPClient
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 12 more
The external JAR file mentioned, apache commons, is embedded in the runnable JAR and the JAR runs fine on it's own, just not in JWS. Suggestions?