No such method error only in raspberry pi - java

fed up with raspberry pi.....
i have created a javaFX application from windows 7 using netbeans 7.3.1 , jdk 1.7 ..
application has included some external jar including javafx-dialogs-0.0.3,jaybird etc..
its all works fine with windows 7,ubuntu and centOS
Then i tried to run the same application jar from command line in raspberry pi..
but it gives Exception like "noSuchMethoderror " and exiting the application..
what may be the issue ???
am using same jar during comple and run time..
here is full stack
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: com.sun.javafx.css.StyleManager.getPseudoclassMask(Ljava/lang/String;)J
at javafx.scene.control.Dialogs$FXDialog$RootPane.<clinit>(Dialogs.java:1310)
at javafx.scene.control.Dialogs$FXDialog.<init>(Dialogs.java:1131)
at javafx.scene.control.Dialogs$FXDialog.<init>(Dialogs.java:1088)
at javafx.scene.control.Dialogs$DialogTemplate.<init>(Dialogs.java:616)
at javafx.scene.control.Dialogs.showSimpleContentDialog(Dialogs.java:494)
at javafx.scene.control.Dialogs.showInformationDialog(Dialogs.java:266)
at displayshelftry.Utilities.propertySettings(Utilities.java:325)
at displayshelftry.DisplayShelfTry.run(DisplayShelfTry.java:356)
at displayshelftry.DisplayShelfTry.start(DisplayShelfTry.java:1150)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294)
at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:861)
at com.sun.glass.ui.lens.LensApplication.access$1700(LensApplication.java:58)
at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:914)
... 1 more
thanks...

Try building you app with jdk8. jdk8 usually should run jdk7 built jars as well, but it's not yet released and rasberry pi was supported only since jdk8.
Also official pi vs javafx page claims that not all demos will work on pi (note it's not yet released product): https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi
So you may want to try BrickBreaker instead of DisplayShelf :)

Related

Graphics Device initialization failed for : d3d, sw on windows xp 32-bit using JDK 1.8.0u131 and NetBeans 8.2

Client use Windows xp 32-bit so I don't have other choices.
I've developed JavaFX application using JDK 1.8.0u131 and NetBeans 8.2 32-bit
I'm getting the following error:
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:221)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:205)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:217)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
... 5 more
Java Result: 1
I've no choice to use upgraded versions of libraries to get rid of this issue.
I've installed JDK7u4 and NetBeans IDE 7.1 and problem is solved but I can't migrate my project cause I have used higher version of libraries to develop JavaFX application.
Use JDK-7u4 and NetBeans IDE 7.1 for developing JavaFX on Windows XP.
Need to switch back to swing.

Java Stackoverflow on Debian OS

I am running maven based java test automation framework. When I run this on windows it runs fine , but when I run on Debian OS , it shows stack-overflow error . Error(few lines snapshot) shown below . Eclipse on windows is 2018-09 and Debian it is -Neon.1a Release (4.6.1). I am using Java SE 1.8 on both. How is it possible that java code works fine on windows but same code throws error on Debian? How do we debug , stackoverflow error ?
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at Framework.Framework.run(Framework.java:217)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.StackOverflowError
at sun.util.calendar.ZoneInfo.getOffsets(ZoneInfo.java:236)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2340)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2312)
at java.util.Calendar.setTimeInMillis(Calendar.java:1804)
at java.util.Calendar$Builder.build(Calendar.java:1508)
at sun.util.locale.provider.CalendarProviderImpl.getInstance(CalendarProviderImpl.java:88)
at java.util.Calendar.createCalendar(Calendar.java:1666)
at java.util.Calendar.getInstance(Calendar.java:1613)
at com.aventstack.extentreports.ExtentObservable.collectRunInfo(ExtentObservable.java:441)
at com.aventstack.extentreports.ExtentObservable.addLog(ExtentObservable.java:309)
at com.aventstack.extentreports.ExtentTest.addLog(ExtentTest.java:359)
at com.aventstack.extentreports.ExtentTest.log(ExtentTest.java:308)
at com.aventstack.extentreports.ExtentTest.log(ExtentTest.java:333)
at Framework.Reporter.ReportError(Reporter.java:231)
at Framework.Browser$1.initialValue(Browser.java:156)
at Framework.Browser$1.initialValue(Browser.java:1)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
at java.lang.ThreadLocal.get(ThreadLocal.java:170)
at Framework.Browser.getDriver(Browser.java:172)
at Framework.Reporter.ReportError(Reporter.java:237)
at Framework.Browser$1.initialValue(Browser.java:156)
at Framework.Browser$1.initialValue(Browser.java:1)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
at java.lang.ThreadLocal.get(ThreadLocal.java:170)
at Framework.Browser.getDriver(Browser.java:172)
at Framework.Reporter.ReportError(Reporter.java:237)
at Framework.Browser$1.initialValue(Browser.java:156)
at Framework.Browser$1.initialValue(Browser.java:1)

Connecting VisualVM to program running on OpenJDK 10 under windows 8.1 does not work

I am trying to profile my java application running on OpenJDK 10 using VisualVM 1.4.2 under windows 8.1 but when opening a connection to app in VisualVM, exception is thrown
java.lang.IllegalArgumentException: Unexpected composite type for ThreadInfo
at sun.management.ThreadInfoCompositeData.validateCompositeData(ThreadInfoCompositeData.java:372)
at sun.management.ThreadInfoCompositeData.getInstance(ThreadInfoCompositeData.java:68)
at java.lang.management.ThreadInfo.<init>(ThreadInfo.java:263)
at java.lang.management.ThreadInfo.from(ThreadInfo.java:794)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1018)
Caused: java.io.InvalidObjectException: Failed to invoke from(CompositeData)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.invalidObjectException(DefaultMXBeanMappingFactory.java:1457)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1021)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeMapping.fromNonNullOpenValue(DefaultMXBeanMappingFactory.java:919)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$NonNullMXBeanMapping.fromOpenValue(DefaultMXBeanMappingFactory.java:133)
at com.sun.jmx.mbeanserver.ConvertingMethod.fromOpenReturnValue(ConvertingMethod.java:131)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:168)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
Caused: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy13.getThreadInfo(Unknown Source)
at com.sun.tools.visualvm.jmx.impl.JmxSupport.isReadOnlyConnection(JmxSupport.java:126)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.isTakeThreadDumpSupported(JmxModelImpl.java:369)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.resolveThreads(ApplicationThreadsViewProvider.java:85)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:49)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:45)
at com.sun.tools.visualvm.core.ui.DataSourceViewsManager.getViews(DataSourceViewsManager.java:136)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.openWindowAndAddView(DataSourceWindowManager.java:206)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.access$000(DataSourceWindowManager.java:50)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager$2.run(DataSourceWindowManager.java:117)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
the issue seems very similar to Cannot open some applications in VisualVM but the accepted workaround doesn't work for me. Any suggestions, please?
Previous lower java versions worked, btw.
EDIT:
OracleJDK 11 does not work as well
It looks like you are hitting JDK bug JDK-8165005. Please upgrade JDK 8 to JDK 8u152 or newer.

Can VisualVM profile Java 9 applications?

Hello I am trying to optimise my application, I've had JProfiler installed for the last 2 weeks but the trial period is up and I can't afford the megabucks.
I want to use VisualVM but I can't get it to work.
I installed version 1.4 from their website but when I try and open my application for profiling it does nothing. (Other available processes do open, like the intellij ide)
The error reported is as follows:
java.lang.IllegalArgumentException: Unexpected composite type for ThreadInfo
at sun.management.ThreadInfoCompositeData.validateCompositeData(ThreadInfoCompositeData.java:372)
at sun.management.ThreadInfoCompositeData.getInstance(ThreadInfoCompositeData.java:68)
at java.lang.management.ThreadInfo.<init>(ThreadInfo.java:263)
at java.lang.management.ThreadInfo.from(ThreadInfo.java:794)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1018)
Caused: java.io.InvalidObjectException: Failed to invoke from(CompositeData)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.invalidObjectException(DefaultMXBeanMappingFactory.java:1457)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1021)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeMapping.fromNonNullOpenValue(DefaultMXBeanMappingFactory.java:919)
at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$NonNullMXBeanMapping.fromOpenValue(DefaultMXBeanMappingFactory.java:133)
at com.sun.jmx.mbeanserver.ConvertingMethod.fromOpenReturnValue(ConvertingMethod.java:131)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:168)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
Caused: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy14.getThreadInfo(Unknown Source)
at com.sun.tools.visualvm.jmx.impl.JmxSupport.isReadOnlyConnection(JmxSupport.java:126)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.isTakeThreadDumpSupported(JmxModelImpl.java:369)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.resolveThreads(ApplicationThreadsViewProvider.java:85)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:49)
at com.sun.tools.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:45)
at com.sun.tools.visualvm.core.ui.DataSourceViewsManager.getViews(DataSourceViewsManager.java:136)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.openWindowAndAddView(DataSourceWindowManager.java:206) at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.access$000(DataSourceWindowManager.java:50)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager$2.run(DataSourceWindowManager.java:117)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
It looks like something to do with incompatible Java types? My application was compiled and run with JDK9. I've noticed VisualVM isn't even included in the java download any more. Is there a way around this?
Thanks.

Java JPG codec won't work

I have problem with my tomcat application, after changing the server and installing the last version of tomcat7 my application won't read/load jpg files..
I installed imageio and jai on the server, try to change java version but every time I have the same error..
Anybody have an idea?
Error: One factory fails for the operation "jpeg"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getWidth(RenderedOp.java:2179)
The whole error log can be found here -> http://paste.ubuntu.com/7653452/.
Update: The problem is related to grails plugin called ImageTools
If you look at the code for JPEGImageDecoder you'll see it depends on com.sun.image.codec.jpeg.ImageFormatException in its imports.
However, com.sun.image.codec.jpeg was removed from Java 7 onwards.
So likely the problem is that JAI is simply out of date, and you would have to use a Java 6 runtime to use it.

Categories