WSO2 EMM java.lang.reflect.InvocationTargetException - java

I'm new with WSO2 products. I try WSO2 EMM and when I try to start emm 1.1.0 I get the following errors. I tried on Ubuntu, Debian and Windows and always the same issue.
It doesn't happen with the 1.0.0
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:622)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
at org.wso2.carbon.server.CarbonLauncher.launch(CarbonLauncher.java:117)
at org.wso2.carbon.server.Main.launchCarbon(Main.java:163)
at org.wso2.carbon.server.Main.main(Main.java:95)
... 6 more
I already saw these errors but there was no answers.
Any ideas ?
Antoine

Ok, I answer to my own question, may be it could help...
It's still not working on linux, but it's now working on windows.
The only thing I did is ti strickly respect the folder name and structure
Let my explain:
When it was not working the structure of the folder was:
c:\wsoemm\bin...
now it's
c:\wso2\wsoeme-1.1.0\bin
This is the only thing I did to make it working
I would prefer running WSO2 EMM on linux so any help would be great.
Antoine

After 3 days it's now working on linux
you have to change the file null.ini wich is located at
/wherever you put the folder/wso2/wso2emm-1.1.0/repository/components/default
the default file is:
-install
/home/nira/git/EMM/product-emm/modules/p2-profile-gen/target/wso2carbon-core-4.2.0/repository/components/default
change it to:
-install
/wherever you put the folder/wso2/wso2emm-1.1.0/repository/components/default
That's it

Related

Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError: <init> when I execute a .jar file

This evening, I downloaded a .jar file from Jsqlquiz website. However, when I try to execute it in the terminal, I have these two displayed exceptions (I'm on Windows 10) :
Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError:
at com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
at com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:830)
and
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
at com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:830)
I check my java's versions to see if I have a bad/old one, but all is on date :
JDK 13.0.1
JRE 1.8.0_241
JavaFX 11.0.2
I found answers on this forum but none helped me. :
Write java -jar filename.jar in a .bat file and execute it.
Extract the folder and try to run it.
Place jdk-13.0.1\bin and Java\jre1.8.0_241\bin above the Common_Files\Oracle\Java\javapath (I deleted it finally, it was the easiest way to try to fix my problem).
If anyone here thinks they can help me, tell me! :)
Okay, after hours spent fixing my problem, I finally found it for myself!
For all those who have the same problem, follow what I will say:
There must be ONLY one version of Java on your pc (wether it's the JDK or JRE). So, only keep the java version you want and try to compile your file with java -jar fileName.jar and it should work.
I myself had the JDK and the JRE, both added to the path of the environment variables. So the error came from here.
The only thing I don't understand is why the JRE created a problem during the execution when I had put the path of the JDK above.

Any idea how to fix this? Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError

My application uses javafx 11.0.1 and is shipped bundled with a jlinked version of openjdk 11. It runs fine for the vast majority of the users but few of them are getting this stack:
Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError: <init>
at com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
at com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Unknown Source)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Unknown Source)
I found some discussion related to the same exception but regarding Maven+Eclipse, here and here. The issue is very similar, user reporting it, do have other java installations and uninstalling them solves the issue, so basically leaving my bundled openjdk as the only option the application starts, but if there is another Java installed on the system, the wrong .dll is picked up and the application crashes with the above stacktrace.
I tried the suggested java.library.path workaround but users are saying it doesn't solve. Unfortunately I cannot reproduce it myself, any idea on how to solve it or what to ask the users reporting it?
EDIT: we fixed the exe generated by lauch4j here and the bash script here. The idea is basically to restrict/change the PATH env variable to avoid the wrong dll being picked up.
We fixed the exe generated by lauch4j here and the bash script here. The idea is basically to restrict/change the PATH env variable to avoid the wrong dll being picked up.

Maven1.x: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

After OS update from Windows 7 to Windows 10, I'm facing following error:
Apache Maven
intelligent projects ~
v. 1.0.2
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:93)
at org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:202)
at org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:180)
at org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:146)
at org.apache.maven.plugin.PluginManager.loadScript(PluginManager.java:1109)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:1135)
at org.apache.maven.plugin.PluginManager.initialiseHousingPluginContext(PluginManager.java:770)
at org.apache.maven.plugin.PluginManager.prepAttainGoal(PluginManager.java:725)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:656)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
You have encountered an unknown error running Maven. Please help us to correct
this problem by following these simple steps:
- read the Maven FAQ at http://maven.apache.org/faq.html
- run the same command again with the '-e' parameter, eg maven -e jar
As my application is using Maven1 and JDK1.4, I'm running eclipse:generate-classpath command.
I also tried to add xerces and xercesImpl jars via maven. Also added these two jars in C:\Dev\Jdks\jdk1.8.0_31\jre\lib\ext directory. Still getting the same error. Can anyone please help? I'll be greatful, Thanks in advance.

Unable to Acquire the State Change Lock

Our products are using the latest production-ready release of SWT, 3.7.2. Now since no one back then knew what the next Java version would be called (and how would they know that 8 came after 7, that's like higher mathematics), we were forced to swap the org.eclipse.osgi from 3.7.2 to 3.10.0, so that we can now support Java 8. While that's maybe not the best of ideas, in theory it should work.
Of course, being the major screw-up that Eclipse Luna is, there is this one "error" when we start our applications (about 50 percent of the time, I'd guess):
org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.0.v20140606-1445"; singleton:="true" [id=0] STARTED [STARTED] invalid
at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:44)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:170)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.startBundles(ConfigApplier.java:307)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:108)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:936)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:319)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:242)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:172)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:115)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:320)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232)
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:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
There's not much information on the web what the problem is, most suggest to just delete the workspace, but for most it only happens when starting up Eclipse, not the final applications - nonetheless, I deleted workspaces and the runtime-folders. Nothing helps. The "error" gets thrown in the exported product as well, but as far as I can tell, everything still works as expected.
Is there a way to fix it? And if not, is there a way to just hide that stupid exception (disable logging for a moment, clearing the log, whatever, I'm not picky)?
I solved problem by following these simple steps,
Go to your eclipse directory and open configuration directory.
open org.eclipse.osgi directory.
open .manager folder.
Delete .fileTableLock file.
Restart your eclipse.
This looks like the framework start up starts simpleconfigurator which tries to start the framework again. The framework detects this recursion and throws an exception to escape it. The problem appears to be in simpleconfigurator attempting the start the framework which is starting it.
I faced same issue.Deleting the given .log file from configuration folder and restarting eclipse should resolve your problem.
I use Red Hat Developer Studio 10.4 (Eclipse 4.6) and i tried use Eclipse Checkstyle plugin.
After install i restarted my IDE and received the crash notification.
I tried all suggestions but only when i delete a file called framework.info.34 my problem was solved.
This file is in %eclipse_home%/configuration/org.eclipse.osgi folder.
Issue pop-up after upgrading eclipse neon through update-site along with installation of some new plugins.
Step 01:
I removed .fileTable.* lock files from ${eclipse_home}/configuration/org.eclipse.osgi/.manager directory.
Step 02:
Removed osgi cache and other plugins cache by starting in eclipse clean mode
eclipse -clean
i have the same issue,
i removed the files from respective places
1) "eclipse\configuration\org.eclipse.osgi.manager"
.fileTableLock
.fileTable3
.fileTable4
2) eclipse\configuration
*.log
after that i opened the eclipse, it worked with out any restart of PC.
for people that have this problem until runing eclipse in runtime from eclipse :
clean folder :
[yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi/.manager
[yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi remove all files (not folder)
then add to your configuration -clean as programm arg
The solution is simple. Just start your eclipse in clean mode.
Find location of "eclipse.exe" file. (Let's assume : C:\eclipse\eclipse.exe )
Go to run command (Windows+R)
Enter [location] +[space][-]clean
Ex: C:\eclipse\eclipse.exe -clean
Faced the same issue . Remove the .fileTableLock from "eclipse\configuration\org.eclipse.osgi.manager" and restart eclipse . It works .

error after sofware upgrade with eclipse

I recently updated some of the addons for eclipse (3.7). To do so, I started eclipse with sudo (as not doing so caused some errors while installing new Software earlier). Now I get an error immediatly before the splash screen would appear when I start eclipse without using sudo:
!ENTRY org.eclipse.equinox.launcher 4 0 2012-09-20 12:27:48.447
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
I do not get this error when I start eclipse with "sudo eclipse". Any suggestions on how to solve this issue? I am using Ubuntu 11.04.
Cheers
Nebwi
A wild guess. This could be permission issue.
Did you give permissions to the folders as a sudo. Please right click and see the properties of the files in org.eclipse.core.runtime.adaptor.EclipseStarter
And give the read and execute permissions and try. Hope this may help.
While you were "sudo"ing, you may have changed ownership of the files so that you can no longer read them as you. In a command window cd to you install and type:
ls -al
If the owner is root, then you will need to change it back to you. To do this you really need to know your group. It could be your username, the word "staff", "user" etc. To find out for sure, just do that same ls command in your home directory. If you need to change the owners, then type:
sudo chown -R yourUserName.yourUserGroup *
On some unix systems it is "yourUserName:yourUserGroup". Then try eclipse.

Categories

Resources