Gwt Material Design: MaterialSlider not working in classic dev mode - gwt

Here is the exception that gets displayed on the Browser.
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.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423) at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Unknown Source) Caused by:
com.google.gwt.core.client.JavaScriptException: (null)
#gwt.material.design.jquery.client.api.JQuery::$(Lcom/google/gwt/dom/client/Element;)([JavaScript
object(8)]): null at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java) at
gwt.material.design.jquery.client.api.JQuery.$(JQuery.java:167) at
gwt.material.design.client.base.MaterialWidget.$this(MaterialWidget.java:157)
at
com.mdesign.vadiraj.client.MaterialDesignWithCarousel.onModuleLoad(MaterialDesignWithCarousel.java:32)
... 9 more
Here is the exception from Eclipse console.
14:34:14.799 [ERROR] [materialdesignwithcarousel] Unable to load
module entry point class
com.mdesign.vadiraj.client.MaterialDesignWithCarousel (see associated
exception for details)
com.google.gwt.core.client.JavaScriptException: (null)
#gwt.material.design.jquery.client.api.JQuery::$(Lcom/google/gwt/dom/client/Element;)([JavaScript
object(8)]): null
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java:167)
at gwt.material.design.client.base.MaterialWidget.$this(MaterialWidget.java:157)
at com.mdesign.vadiraj.client.MaterialDesignWithCarousel.onModuleLoad(MaterialDesignWithCarousel.java:32)
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.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Unknown Source)
This is my project setup - Java 1.8 | GWT 2.8.1 | Classic dev-mode
inherits name="gwt.material.design.jquery.JQuery"
inherits name='gwt.material.design.GwtMaterialWithJQuery'
inherits name="gwt.material.design.GwtMaterialDesignBasic"
Attaching the code snippet from the Entrypoint class
public void onModuleLoad() {
MaterialSlider slider = new MaterialSlider();
RootPanel.get().add(slider);
slider.add(new Label("safrfsdhhdf"));
slider.add(new Button("I am a button"));
slider.add(new TextArea());
slider.add(new MaterialSwitch(true));
}

GWT Material Design uses JsInterop which doesn't work in legacy dev mode (nobody should continue to use legacy dev mode these days anyway, it's been deprecated for years)

Related

Why does macOS installer built with Install4j 6 throw run-time exception with JRE 10?

I get the following run-time exception running a macOS installer built with Install4j 6.1.6, running with JRE 10.0.2+13:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:105)
at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58)
at com.install4j.runtime.installer.Installer.main(Installer.java:46)
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.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.desktop/javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:96)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at com.install4j.runtime.installer.frontend.WizardScreenExecutor.<init>(WizardScreenExecutor.java:49)
at com.install4j.runtime.installer.frontend.InstallerWizardScreenExecutor.<init>(InstallerWizardScreenExecutor.java:18)
at com.install4j.runtime.installer.Installer$2.run(Installer.java:99)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.ApplicationListener
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)
... 19 more
The same installer works fine with only JRE 8u161 installed. Is there a way to get around this exception?
install4j 6 does not work with Java 9+, you have to use at least install4j 7.

java.lang.ClassNotFoundException: javax.persistence.spi.PersistenceUnitInfo from JPA Console

I am getting below error whenever I am trying to connect to the Database using JPA Console.
I am connecting to oracle 12c DB.
java.lang.ClassNotFoundException: javax.persistence.spi.PersistenceUnitInfo
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.jpaconsole.engine.impl.query.QueryExcecutorBuilder.build(QueryExcecutorBuilder.java:19)
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.jpaconsole.engine.query.QueryExecutorManager.getQueryExecutor(QueryExecutorManager.java:59)
at com.jpaconsole.plugin.Activator.setQueryExecutor(Activator.java:114)
at com.jpaconsole.plugin.progress.ConfigureJPAOperation.run(ConfigureJPAOperation.java:30)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Below screen shot for more visibility
Here is the screen shot which says in the classpath:
Now, I'm getting another error:
java.lang.NullPointerException
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:391)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.jpaconsole.engine.impl.query.EntityManagerBuilder.build(EntityManagerBuilder.java:47)
at com.jpaconsole.engine.impl.query.QueryExcecutorBuilder.build(QueryExcecutorBuilder.java:19)
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.jpaconsole.engine.query.QueryExecutorManager.getQueryExecutor(QueryExecutorManager.java:59)
at com.jpaconsole.plugin.Activator.setQueryExecutor(Activator.java:114)
at com.jpaconsole.plugin.progress.ConfigureJPAOperation.run(ConfigureJPAOperation.java:30)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Getting java.lang.UnsatisfiedLinkError with install4j 6.1.4 and JRE 1.8.0_121

We upgraded to latest JRE/install4j for our minor upgrade installer, and we started getting the following error when we try to use install4j API:
2017-02-17 19:29:42 SEVERE: #{14} [StandardContext.loadOnStartup] Servlet [ConfigServlet] in web application [] threw load() exception
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Misc.<clinit>(Unknown Source)
at com.install4j.api.windows.WinEnvVars.getenv(Unknown Source)
at com.install4j.runtime.installer.helper.InstallerUtil.is64BitWindows(Unknown Source)
at com.install4j.api.Util.is64BitWindows(Unknown Source)
...
We get the same error when we try to launch the uninstaller:
Exception:
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Win32UserInfo.<clinit>(Unknown Source)
at com.install4j.runtime.installer.platform.UserInfo.isAdminGroup(Unknown Source)
at com.install4j.api.Util.isAdminGroup(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initAdminRights(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initCommandLine(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.main(Unknown Source)
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.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
What is causing this?
There is a mismatch between the API JAR file (i4jruntime.jar) and the native library (i4jinst.dll). It seems that you have an old version of i4jruntime.jar in your classpath.

JavaFX Eclipse Exception

I'm trying to figure out this error that starts after I refactor name of the project.(I tried reinstall Eclipse, create new workspace etc.)
My code was working well before that. If code is needed I can edit it later. Thanks for all advices.
Exception in Application start method
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.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
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 sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Unknown Source)
at javafx.scene.image.Image.<init>(Unknown Source)
at time.Run.start(Run.java:34)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
... 1 more
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
... 12 more
Exception running application time.Run

generating xtext artifacts errors

I am trying to create a new DSL grammar, so I have developed an ecore model and imported to the xtext grammar file, the xtext file has generated and without errors. later on I have faced mainly 3 errors:
a noisy pop up error "An error has occurred. See error log for more details. java.lang.NullPointerException"
when I try to generate the xtext artifacts, it was terminated after a lot of errors, and the errors in below
++++++++++++++++++++++++++++++++++++++++++++++++++++++
0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri 'C:\Users\MAISA\Desktop\eclipse-epsilon-1.2-win32-x86_64\workspace'
141 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - Problems instantiating module org.xtext.example.mydsl.WSNDSL:
java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: Problems instantiating module org.xtext.example.mydsl.WSNDSL:
java.lang.reflect.InvocationTargetException
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:95)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
at org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:56)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments
(Mwe2ExecutionEngine.java:143)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:114)
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 org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:296)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:66)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments
(Mwe2ExecutionEngine.java:142)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:114)
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 org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:296)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:66)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:80)
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 org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:296)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:66)
at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:93)
... 4 more
Caused by: 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 org.eclipse.emf.mwe2.language.factory.SettingProviderImpl$1$1.setValue(SettingProviderImpl.java:54)
... 29 more
Caused by: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface metamodel.MetamodelPackage
at org.eclipse.emf.mwe.utils.StandaloneSetup.addRegisterGeneratedEPackage(StandaloneSetup.java:430)
... 34 more
am new to xtext and eclipse, and appreciate any help to solve my errors.
Thanks
AYMEN
can you check your workflow. You need to have the scanClassPath = true
and to register your meta-model. See the following example :
Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
}
....
....
component = Generator {
....
language = auto-inject {
loadedResource = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel"
....
}
}