Menu

EOFException

Help
EJlol
2015-07-27
2020-05-21
  • EJlol

    EJlol - 2015-07-27

    Hello,

    At our systems the DJNativeSwingBrowser works perfectly fine, however at our customer system sadly it does not. At the customer system it only works when it's run as administrator, this is of course not desired. At our system it can be both run as normal user as well as administrator. This leads us to think it is some kind rights issue. After checking the customers log we found the following error message:

    java.lang.RuntimeException: java.io.EOFException
    at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.openChannel(OutProcessSocketsMessagingInterface.java:67)
    at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface.initialize(MessagingInterface.java:57)
    at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.<init>(OutProcessSocketsMessagingInterface.java:32)
    at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface$SwingOutProcessSocketsMessagingInterface.<init>(OutProcessSocketsMessagingInterface.java:162)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.createOutProcessMessagingInterface(SWTNativeInterface.java:1072)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.createOutProcessCommunicationChannel(SWTNativeInterface.java:811)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:342)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
    at nl.semlab.meditra.nts.activex.launcher.browser.DJNativeSwingBrowser.start(DJNativeSwingBrowser.java:71)
    at nl.semlab.meditra.nts.activex.launcher.SessionManager.<init>(SessionManager.java:123)
    at nl.semlab.meditra.nts.activex.launcher.SessionManager.getInstance(SessionManager.java:92)
    at nl.semlab.meditra.nts.activex.launcher.Launcher.initSession(Launcher.java:123)
    at nl.semlab.meditra.nts.activex.launcher.Launcher.assess(Launcher.java:398)
    at nl.semlab.meditra.nts.activex.launcher.Launcher.createCall(Launcher.java:338)
    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.plugin.javascript.JSInvoke.invoke(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.plugin.javascript.JSClassLoader.invoke(Unknown Source)
    at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
    at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
    at sun.plugin.com.BeanDispatchImpl.invoke(Unknown Source)
    Caused by: java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.core.OutProcessSocketsMessagingInterface.openChannel(OutProcessSocketsMessagingInterface.java:65)
    ... 26 more</init></init></init></init>

    The customer uses Windows 2008 R2 64-bit server. The JRE being used is 1.6.0_11.
    Which settings could cause this error message? And what could we do to solve this problem?

     
  • Christopher Deckers

    Hi,

    In the default configuration, a separate JVM is launched and communicates with the first one through a socket. The questions I have are:
    1. Do we know if the separate process is successfully launched?
    2. Are there any restrictions on ports on local system that can be opened by a process?

    There are various system properties you could activate and then look in the console:
    -Dnativeswing.peervm.debug.printStartMessage=true
    -Dnativeswing.peervm.debug.printStopMessage=true
    -Dnativeswing.peervm.debug.printCommandLine=true

    Hope this helps,
    -Christopher

     
  • EJlol

    EJlol - 2015-08-14

    Thank you for your help. We added the mentioned properties and ran it on our customer's server. We got the following error.

    NativeSwing[1]: Starting peer VM #1
    NativeSwing[1]: Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
    NativeSwing[1]: no swt-win32-4427 in java.library.path
    NativeSwing[1]: no swt-win32 in java.library.path
    NativeSwing[1]: Can't load library: \networkshare\hosting$\Environment\swt-win32-4427.dll
    NativeSwing[1]: Can't load library: \networkshare\hosting$\Environment\swt-win32.dll
    NativeSwing[1]:
    NativeSwing[1]: at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    NativeSwing[1]: at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    NativeSwing[1]: at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
    NativeSwing[1]: at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
    NativeSwing[1]: at java.lang.Class.forName0(Native Method)
    NativeSwing[1]: at java.lang.Class.forName(Unknown Source)
    NativeSwing[1]: at org.eclipse.swt.graphics.Device.<clinit>(Unknown Source)
    NativeSwing[1]: at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$OutProcess.runNativeSide(SWTNativeInterface.java:1273)
    NativeSwing[1]: at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.main_(SWTNativeInterface.java:1461)
    NativeSwing[1]: at chrriis.dj.nativeswing.swtimpl.NativeInterface.main(NativeInterface.java:224)</clinit></clinit></clinit>

    Turned out this problem was caused due to the user.home folder not being accessible because it was defined as a network share which Java can't handle.
    We solved it by placing the required dlls manually in a known location and setting the swt.library.path property to this location. Now the dlls are loaded and the browser does start

     
    • RICARDO CORONA GUZMAN

      Hi EJlol

      I have the same problen

      Could you help my to resolve it please?

      How Can I edit the swt.library.path property?

      Cheers

       
  • Christopher Deckers

    Hi,

    I had never heard of this issue before; I am glad you found the root cause!
    And thanks for letting me know, this is useful for future reference.

    Cheers,
    -Christopher

     

Log in to post a comment.

MongoDB Logo MongoDB