Just upgraded to Windows 10 and Eclipse mars no more starts - java

I just upgraded to windows 10 and eclipse mars no more starts.
However my older eclipse v3.7.0 works all fine.
I followed the answers under this link:
Just installed Windows 10 and Eclipse no more starts
However it seems that I might have messed up something else too. Maybe deleted some files or dirs I am not able to figure out.
When I start eclipse I get this stack trace:
java.lang.RuntimeException: Error initializing storage.
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:77)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
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.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at org.eclipse.osgi.container.ModuleDatabase$Persistence.readWire(ModuleDatabase.java:1168)
at org.eclipse.osgi.container.ModuleDatabase$Persistence.load(ModuleDatabase.java:1028)
at org.eclipse.osgi.container.ModuleDatabase.load(ModuleDatabase.java:879)
at org.eclipse.osgi.storage.Storage.<init>(Storage.java:146)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:86)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
... 10 more
Please let me know what might be going wrong.
Thanks
Sachin

Related

Eclipse no reasons errors

i have been using eclipse, mars, neon and oxygen and i always had the same problem after some days/weeks of using its.
When i press run. It sometimes likes not to work and with no reason scream
Error: Could not find or load main class test.PingSwitchPing
and sometimes after i press run a few more times it suddenly works...
other times when i make some changes to code eclipse doesn't compile to make changes and run old code...
this time it is giving me something that it can't even replicate right now so i cant show error message, but basically the error was about not seeing class path to external libraries and to other parts of code that where in diffrent folder. While it was in phase on loading javafx application.
Why is it so unstable ? it is really piss me off becouse sometimes i am loosing hours to fight with it...
Sometimes i remove .m2 folder and redonwload everyting and it is helping. Cleaning project do nothing to this.
Sometimes restarting pc and eclipse works other times it dosen't...
I was just writing that i can't replicate main error but when i changed on line of code and run then it occurs. When i change it back nothing change. it still dosent work and dont want to work...
Exception in thread "JavaFX Application Thread" Exception in thread "main" 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 sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.NullPointerException
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
... 5 more
java.lang.NoClassDefFoundError: org/quartz/SchedulerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$155(LauncherImpl.java:352)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.quartz.SchedulerException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more
It once even let me write this
scene.getStylesheets().add("My.css");
and it worked event when this file was in .../workspace
when project was in .../workspace/MavenProjectName
It is just so unrelabile...

SSL using RSAL Toolkit not encapsulated by a jar Error

I'm running a 3rd party app which fails with the following stacktrace when trying to create a SSL connection to a server:
The root exception is this:
Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.
at com.rsa.jcm.f.hq.a(Unknown Source)
at com.rsa.jcm.f.jg.b(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.a(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.load(Unknown Source)
... 43 more
Has anyone seen this occur when connecting over SSL that uses RSA? I've worked the google and there isn't anything obvious as to why this would happen.
This particular error happens on a Mac, and I've got a windows version of the same app which works correctly. Main difference being they bundle the JRE in the windows version, so I checked various security policies etc but there are no great differences in the JRE on windows vs the JRE on my mac.
The full stacktrace looks like this:
Caused by: java.lang.Error: Problem loading module.
at com.rsa.cryptoj.o.ju.g(Unknown Source)
at com.rsa.cryptoj.o.ju.c(Unknown Source)
at com.rsa.cryptoj.o.gd.a(Unknown Source)
at com.rsa.cryptoj.o.dm.b(Unknown Source)
at com.rsa.cryptoj.o.dm.<clinit>(Unknown Source)
at com.rsa.cryptoj.o.me.newInstance(Unknown Source)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.<init>(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485)
at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190)
at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342)
at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:300)
at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576)
at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:512)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:73)
at com.somevendor.client.common.spring.remoting.http.e.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at com.somevendor.client.common.spring.remoting.http.SecureHttpInvokerRequestExecutor.executePostMethod(Unknown Source)
at org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor.doExecuteRequest(CommonsHttpInvokerRequestExecutor.java:140)
at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:136)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:192)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:174)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:142)
... 7 more
Caused by: 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:601)
... 39 more
Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.
at com.rsa.jcm.f.hq.a(Unknown Source)
at com.rsa.jcm.f.jg.b(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.a(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.load(Unknown Source)
... 43 more
Answering as I worked it out (5 years ago..). This exception happens when there is whitespace in the fully qualified path to the jar file that is been executed.
So this works:
/Users/stringy05/app/app.jar
But if you use a path with a space:
/Volumes/Macintosh HD/Users/stringy05/app/app.jar
Then it fails. When this originally happened I had a soft link in /Users/stringy05 to another hard disk, so either java or the OS was resolving the link path to the real path and it would fail.

Application only works in Eclipse

I'm doing a college project using Java and Eclipse. The app works perfectly in Eclipse, but when I export it as Runnable Java File it doesn't work. No any error is shown, and nothing is opened.
Do you have any tutorial about how to export it correctly? The application is too long to post here. However, if you need to see any part of code just ask.
EDIT : Error returned by console
Exception in thread "main" 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.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.ClassCastException: sun.net.www.protocol.jar.JarURLConnecti
on$JarURLInputStream cannot be cast to java.io.BufferedInputStream
Here is one good article on jar creation and execution http://javarevisited.blogspot.in/2012/03/how-to-create-and-execute-jar-file-in.html
I've solved the problem! I don't know why, but It was caused by BufferedInputStream so I changed it by InputStream and the application works perfectly, thanks everybody!

Java3D - Some classes not found but classpath is set correctly

I have a class that uses Java3D that successfully compiles, although when I try to run it it says: Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/j3d/Canvas3D,
With the following stack trace:
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Stuff I have already tried:
I couldn't even get it to compile until I copied the Java3D jars into /jre/lib/ext/.
I have the latest Java, Java3D and I am using Notepad++ and I have tried reinstalling Java3D.
I have set the classpath/path correctly.
There are no errors in the code.
I can run normal Java applications I have created.
I have tried using the classpath thing when running the application (java -classpath blahblah ApplicationName).
I have checked inside the jars and the classes (including Canvas3D) are definitely in there.
Not everything you say is true.
IF the classes are in the jars, and IF you have set the classpath correctly, THEN you would not get this message.
I suspect you have a build path confused with a classpath (which is mostly associated with runtime, where build path is associated with compile time). Without knowing more details of your runtime environment, it's hard to be more specific.
It always puzzles me how someone with a problem they cannot solve asserts so definitely that all these things are set up "correctly": how do you know? Isn't the problem some evidence to the contrary, at least enough for a small doubt?

UnsatisifiedLinkError - Any idea on how to fix this?

Exception in thread "main" 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.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: com.melloware.jintellitype.JIntellitypeException: Could not load JIntellitype.dll from local file system or from inside JAR
at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:114)
at com.melloware.jintellitype.JIntellitype.getInstance(JIntellitype.java:174)
at CaptureScreen.registerHotkeys(CaptureScreen.java:163)
at CaptureScreen.<init>(CaptureScreen.java:100)
at CaptureScreen.main(CaptureScreen.java:199)
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\B\AppData\Local\Temp: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:99)
... 9 more
I get this error when I run from the command line, however, it does not cause any issues with my program running on my machine, however, on other peoples machines the program will not run at all.
I have never come across this error before and fairly confused.. mostly that it runs fine on my machine, but not on others even though it throws this error on both.
This is a classpath error. Its likely that you have it set up right for compile time but not runtime. Make sure that either your jar is in the right location and/or that you've set your classpath to include the jar.
Go to the Jintellitype website, download the source, add it to your download folder and then move the .dll files into the folder with the Jitellitype classes after building the project

Categories