Community
Participate
Working Groups
After pasting text into source code editor and saving the changes I got the Message IWAV0138E: Remote VM terminated too soon. See .log file for trace of output. For VM "Project (Simulation1)-VM for Simulation1". a few times. And then also a null pointer exception occured. After closing and restarting eclipse the message and error rised again. Eclipse hangs up completly.
Created attachment 22497 [details] Java source code file with which error occured after pasting line >>> public native void initialisiereNativeCode(); <<< and saving the message and error occured
Is this is still valid in the latest build?
yes, this is still very much valid... hosed everything several times over. i'll try to narrow down what exactly it is, all i hadd to do was open the attached file with the VE.
problem is here: static { try { System.loadLibrary("Simulation"); } catch (UnsatisfiedLinkError e) { System.out.println(">>> Die Datei Simulation.dll konnte nicht gefunden werden!"); System.exit(1); } }
Created attachment 24840 [details] log file this is the log you get after uncommenting the above mentioned lines and reloading the file.
Its pretty obvious that the remote VM is dead if an instance of this class is created on it. There might as well be static{ System.exit(1); } code in the class. The question arises as to why an instance of this class was created? It turns out that codegen tries to determine if it needs to create a THIS bean using introspection at ----------------------------------- ThisReferenceRule.useInheritance(ThisReferenceRule.java:114) ----------------------------------- and introspection for some reason might be trying to create an instance. The stacktrace of the codegen call is : ---------------------------------------------- java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124) at java.io.DataOutputStream.flush(DataOutputStream.java:101) at org.eclipse.jem.internal.proxy.common.remote.Commands.sendGetClassCommand(Commands.java:1282) at org.eclipse.jem.internal.proxy.remote.REMConnection.getClass(REMConnection.java:135) at org.eclipse.jem.internal.proxy.remote.REMStandardBeanTypeProxyFactory.getClassReturn(REMStandardBeanTypeProxyFactory.java:389) at org.eclipse.jem.internal.proxy.remote.REMStandardBeanTypeProxyFactory.createBeanTypeProxy(REMStandardBeanTypeProxyFactory.java:202) at org.eclipse.jem.internal.proxy.remote.REMStandardBeanTypeProxyFactory.getBeanTypeProxy(REMStandardBeanTypeProxyFactory.java:368) at org.eclipse.jem.internal.proxy.remote.REMStandardBeanTypeProxyFactory.getBeanTypeProxy(REMStandardBeanTypeProxyFactory.java:271) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.introspect(BeaninfoClassAdapter.java:754) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.introspectIfNecessary(BeaninfoClassAdapter.java:472) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.introspectIfNecessary(BeaninfoClassAdapter.java:459) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.getEStructuralFeatures(BeaninfoClassAdapter.java:1073) at org.eclipse.jem.java.impl.JavaClassImpl.getEStructuralFeatures(JavaClassImpl.java:394) at org.eclipse.jem.java.impl.JavaClassImpl.getProperties(JavaClassImpl.java:1308) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.allProperties(BeaninfoClassAdapter.java:1202) at org.eclipse.jem.internal.beaninfo.adapters.BeaninfoClassAdapter.getAllProperties(BeaninfoClassAdapter.java:1081) at org.eclipse.jem.java.impl.JavaClassImpl.getAllProperties(JavaClassImpl.java:1349) at org.eclipse.ve.internal.java.codegen.java.rules.ThisReferenceRule.useInheritance(ThisReferenceRule.java:114) at org.eclipse.ve.internal.java.codegen.java.TypeVisitor.createThisIfNecessary(TypeVisitor.java:115) at org.eclipse.ve.internal.java.codegen.java.TypeVisitor.visit(TypeVisitor.java:210) at org.eclipse.ve.internal.java.codegen.java.JavaBeanModelBuilder.visitType(JavaBeanModelBuilder.java:512) at org.eclipse.ve.internal.java.codegen.java.JavaBeanModelBuilder.build(JavaBeanModelBuilder.java:417) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.reverseParse(JavaSourceTranslator.java:830) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.decodeDocument(JavaSourceTranslator.java:910) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.loadModel(JavaSourceTranslator.java:576) at org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEditorPart$Setup.run(JavaVisualEditorPart.java:1977) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) --------------------------------------- For me the IDE is still working, but VE becomes useless as remote VM dies constantly. Assigning to Joe to determine why introspection might be loading the class. If I comment out the static{} block, everything works fine.
The class is loaded by the VM for the Project that does introspection to determine its shape. Istatic blocks are called on class load and during this it fails to load the library and exits the VM. Ideally you should put your dll (or lib on Linux/Unix) into the library path. The only way to do this right now is for you to update the /lib directory of the JRE/SDK that you are using for the Project that you are working in. Another thing that might work is to stop the exit, so try something like } catch { if (!java.beans.Beans.isDesignTime()){ System.exit(0); } } Having said that we should not freeze up quite so badly when the BeanInfo VM dies so rather than close this I will leave it open and defer to 1.2 so we can think of making the BeanInfo VM death more graceful