java.lang.ExceptionInInitializerError

37 views
Skip to first unread message

jayen...@gmail.com

unread,
Sep 4, 2017, 11:14:57 PM9/4/17
to ComfyJ Forum
Hi,

We are using comfyj-2.8.jar and jniwrap-3.8.3.24078.jar.
Everything was working fine but few days back suddenly we are getting "java.lang.ExceptionInInitializerError".
The error occurs randomly. After analyzing the code we have found that the issue occurs while executing the below code segment:

OleMessageLoop.start();
NativeResourceCollector.getInstance().start();


We don't have any other information as this issue occurs only in production and also we don't have exception stack trace.

Environment details:
Java 1.6,
Windows 7,10


Thanks & Regards,
Jayendra Singh     
     

Anna Dolbina

unread,
Sep 6, 2017, 6:40:21 AM9/6/17
to jayen...@gmail.com, ComfyJ Forum
Hello Jayendra,

It is quite difficult to determine the cause of the exception without the exception stack trace or a sample that can be used to reproduce the same issue in our environment.

Is it possible to wrap the code given in your original post in a try/catch clause and collect the complete exception stack trace using any means available in your application? You may use SLF4j logging that is used by ComfyJ itself.

Sincerely,
Anna


--
You received this message because you are subscribed to the Google Groups "ComfyJ Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to comfyj-forum+unsubscribe@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/comfyj-forum/8f37cc9c-c024-40e0-970b-6e72a8719251%40teamdev.com.

jayen...@gmail.com

unread,
Sep 6, 2017, 6:57:31 AM9/6/17
to ComfyJ Forum, jayen...@gmail.com
Hi Anna,

As the issue is reported in production environment, so it will be very helpful if you provide the solution ASAP... :)
please find the stack trace.

Java page stack trace: java.lang.ExceptionInInitializerError
at com.jniwrapper.win32 .system.Kernel32.isUnicode (Kernel32.java:77)
at com.jniwrapper.win32.FunctionName. <clinit> (FunctionName.java:24)
at com.jniwrapper.win32.MessageLoopThread. <clinit> (MessageLoopThread.java:24 )
at com.scandihealth.ccs.ccsclient.ccsbase.CPMSubModule.environmentInitialize (CPMSubModule.java:683)
at com.scandihealth.portalbridge.CPMBridge.EnvironmentInitialize (CPMBridge.java:505) to sun.reflect.NativeMethodAccessorImpl.invoke0 (native method )
at sun.r. eflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at com.jnbridge.jnbcore.JNBDispatcher.voidVirtualCall (Unknown Source)
at com.jnbridge.jnbcore.JNBDispatcher.call (Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.a (Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest (Unknown Source) Caused city: com.jniwrapper.JNIWrapperException: java.io.FileNotFoundException: C: \ Users \ abc5 \ AppData \ Local \ Temp \ jniwrap-3.8.3.24078.Build.3.8.3 \ jniwrap.dll (The process can not access the file , because it is used by another process) Caused city: java.io.FileNotFoundException: C: \ Users \ abc5\ AppData \ Local \ Temp \ jniwrap-3.8.3.24078.Build.3.8.3 \ jniwrap.dll (The process can not access the file as it is used by another process)

Regards,
Jayendra Singh




On Wednesday, September 6, 2017 at 4:10:21 PM UTC+5:30, Anna Dolbina wrote:
Hello Jayendra,

It is quite difficult to determine the cause of the exception without the exception stack trace or a sample that can be used to reproduce the same issue in our environment.

Is it possible to wrap the code given in your original post in a try/catch clause and collect the complete exception stack trace using any means available in your application? You may use SLF4j logging that is used by ComfyJ itself.

Sincerely,
Anna


On Tue, Sep 5, 2017 at 6:14 AM, <jayen...@gmail.com> wrote:
Hi,

We are using comfyj-2.8.jar and jniwrap-3.8.3.24078.jar.
Everything was working fine but few days back suddenly we are getting "java.lang.ExceptionInInitializerError".
The error occurs randomly. After analyzing the code we have found that the issue occurs while executing the below code segment:

OleMessageLoop.start();
NativeResourceCollector.getInstance().start();


We don't have any other information as this issue occurs only in production and also we don't have exception stack trace.

Environment details:
Java 1.6,
Windows 7,10


Thanks & Regards,
Jayendra Singh     
     

--
You received this message because you are subscribed to the Google Groups "ComfyJ Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to comfyj-forum...@teamdev.com.

Anna Dolbina

unread,
Sep 6, 2017, 7:10:25 AM9/6/17
to jayen...@gmail.com, ComfyJ Forum
Hello Jayendra,

Thank you for providing the stack trace!

It appears that the native JNIWraller library (jniwrap.dll) is locked by a Java process when another Java process tries to unpack and overwrite it. This is a known issue that is present in the previous versions of ComfyJ. The corresponding behavior was modified in the latest versions of ComfyJ to avoid such issues.

Could you please try your application with the latest version of ComfyJ and let us know the result?

Sincerely,
Anna



To unsubscribe from this group and stop receiving emails from it, send an email to comfyj-forum+unsubscribe@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/comfyj-forum/0c57b334-0818-420f-bbd5-20d3d6fc7760%40teamdev.com.

jayen...@gmail.com

unread,
Sep 6, 2017, 7:18:04 AM9/6/17
to ComfyJ Forum, jayen...@gmail.com
Hi Anna,

Thanks for the response.
currently we are using comfyj-2.8.jar and jniwrap-3.8.3.24078.jar.
So to resolve this issue what version should we go for and from where to download the updated library.

Regards,
Jayendra Singh

Sincerely,
Anna



Anna Dolbina

unread,
Sep 6, 2017, 7:28:03 AM9/6/17
to jayen...@gmail.com, ComfyJ Forum
Hello Jayendra,

You can download the latest version of ComfyJ from the product's official web page:
https://www.teamdev.com/comfyj

Sincerely,
Anna



To unsubscribe from this group and stop receiving emails from it, send an email to comfyj-forum+unsubscribe@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/comfyj-forum/da31f251-6122-4263-a246-ef1cf124d4bf%40teamdev.com.

jayen...@gmail.com

unread,
Sep 7, 2017, 1:00:59 AM9/7/17
to ComfyJ Forum, jayen...@gmail.com
Hi Anna,

As you have mentioned the jniwrap.dll is locked by a Java process when another Java process tries to unpack and overwrite it.
I have one doubt here, if jniwrap.dll is locked by any other program like any antivirus or something else then in this case update to the latest comfij lib resolve the problem or not?

Thanks & Regards,
Jayendra Singh
Sincerely,
Anna



Anna Dolbina

unread,
Sep 7, 2017, 6:25:10 AM9/7/17
to jayen...@gmail.com, ComfyJ Forum
Hello Jayendra,

Yes, updating to the latest ComfyJ version should resolve the issue.

The updated logic will unpack the DLL to the folder with the unique generated name. This name will be different for two different Java processes, therefore, ComfyJ will not try to overwrite the locked DLL file.

Please let us know if you have any further questions.

Sincerely,
Anna



To unsubscribe from this group and stop receiving emails from it, send an email to comfyj-forum+unsubscribe@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/comfyj-forum/d0523bf3-8078-46ce-b3c0-d1560e85b9af%40teamdev.com.

Reply all
Reply to author
Forward
0 new messages