Java general questions

General information about Neurotechnology and its software

Re: java.lang.ExceptionInInitializerError

Postby Jorgtdna » May 23, 2016 19:25

dyegocarmo wrote:I'm running the code inside Glassfish 4.1 server with jdk 8 with neurotec sdk 5.1 :

final String components = "Biometrics.FingerExtraction";
LibraryManager.initLibraryPath();
NLicense.obtainComponents(serverAddress, 5000, components);

and i get :
Code: Select all

   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
   at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
   at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
   at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
   ... 95 more
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:45)
   at com.neurotec.licensing.NLicense.<clinit>(NLicense.java:51)
   at us.linkedby.link.base.util.fingerprint.BaseFingerprintUtil.createTemplate(BaseFingerprintUtil.java:51)
   ... 146 more
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:115)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:171)
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:42)
   ... 148 more
Caused by: java.lang.ExceptionInInitializerError
   at com.sun.jna.Platform.<clinit>(Platform.java:102)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:101)
   ... 150 more
Caused by: java.lang.NullPointerException
   at com.sun.jna.Native.extractFromResourcePath(Native.java:797)
   at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:751)
   at com.sun.jna.Native.loadNativeLibrary(Native.java:737)
   at com.sun.jna.Native.<clinit>(Native.java:129)
   ... 152 more

Grave:   javax.ejb.EJBException
   at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
   at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
   at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
   at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)

Any Help ?

Tnks !

Hi,

I have the same exception, I'm working with Glassfish 4.1 and JDK 1.8, Neurotechnology SDK 6.0, and I've done set delgate = false in the Glassfish-web.xml into Wars, And i dont have succes.

I fallow the Oracle Guide about this, but nor works.

What else Could you suggest me to fix my Exception?
Code: Select all
Caused by: java.lang.NoSuchMethodError: com.sun.jna.Native.setCallbackThreadInitializer(Lcom/sun/jna/Callback;Lcom/sun/jna/CallbackThreadInitializer;)V
   at com.neurotec.lang.NTypes.setCallbackThreadInitializer(NTypes.java:271)
   at com.neurotec.lang.NTypes.getPointerForCallback(NTypes.java:276)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:228)
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
   ... 122 more

Thanks a lot
Jorgtdna
 
Posts: 3
Joined: Jul 22, 2015 05:04

Re: java.lang.ExceptionInInitializerError

Postby MartynasV » May 27, 2016 08:24

Jorgtdna wrote:Hi,

I have the same exception, I'm working with Glassfish 4.1 and JDK 1.8, Neurotechnology SDK 6.0, and I've done set delgate = false in the Glassfish-web.xml into Wars, And i dont have succes.

I fallow the Oracle Guide about this, but nor works.

What else Could you suggest me to fix my Exception?
Code: Select all
Caused by: java.lang.NoSuchMethodError: com.sun.jna.Native.setCallbackThreadInitializer(Lcom/sun/jna/Callback;Lcom/sun/jna/CallbackThreadInitializer;)V
   at com.neurotec.lang.NTypes.setCallbackThreadInitializer(NTypes.java:271)
   at com.neurotec.lang.NTypes.getPointerForCallback(NTypes.java:276)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:228)
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
   ... 122 more

Thanks a lot

Hello,

Make sure that all library files are copied to Glassfish library folder.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 344
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Error under eclipse help me please

Postby tounzi-amine » Jun 23, 2016 16:41

hello every one
i working with java under eclipse,what i want to do is to try the sample face given by neurotechnology,so i imtegrated this classes in java application project
so i"m getting these errors .
Please guys if anyone could help me i whould be greatful.

Code: Select all
Obtaining licenses from server /local:5000
Biometrics.Standards.Other: not obtained
Exception in thread "main" java.lang.ExceptionInInitializerError
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:45)
   at com.neurotec.licensing.NLicense.<clinit>(NLicense.java:52)
   at com.neurotec.samples.util.LicenseManager.obtain(LicenseManager.java:129)
   at com.neurotec.samples.util.LicenseManager.obtain(LicenseManager.java:112)
   at com.neurotec.samples.biometrics.standards.ANTemplateSample.main(ANTemplateSample.java:56)
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:131)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:171)
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:42)
   ... 4 more
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library "NCore": JNA native support (win32-x86/NCore.dll) not found in resource path (C:UsersSimoworkspaceFacein;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-client.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-gui.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-xml.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavastax-api.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavastax.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaxpp3.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavajna.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-core.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-licensing.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-gui.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-processing.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavacommons-io.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasamples-utils.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaabis-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaantemplate-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-virtual.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavadevices-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaenrollment-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafcrecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafirecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafmrecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaiirecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavalatent-fingerprint-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavamysql-connector-java.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-client-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-gui-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-cluster.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-cluster-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-core-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-virtual-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-gui-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-licensing-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-processing-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-native-macosx-universal.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasqlite-jdbc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaserver-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-faces-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-fingers-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-irises-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-voices-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava   emplate-conversion-sample.jar)
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:220)
   at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:322)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:123)
   ... 6 more


Admin: merged to "Java general questions"
tounzi-amine
 
Posts: 1
Joined: Jun 23, 2016 16:22

Re: Error under eclipse help me please

Postby MartynasV » Jun 27, 2016 11:55

tounzi-amine wrote:hello every one
i working with java under eclipse,what i want to do is to try the sample face given by neurotechnology,so i imtegrated this classes in java application project
so i"m getting these errors .
Please guys if anyone could help me i whould be greatful.

Code: Select all
Obtaining licenses from server /local:5000
Biometrics.Standards.Other: not obtained
Exception in thread "main" java.lang.ExceptionInInitializerError
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:45)
   at com.neurotec.licensing.NLicense.<clinit>(NLicense.java:52)
   at com.neurotec.samples.util.LicenseManager.obtain(LicenseManager.java:129)
   at com.neurotec.samples.util.LicenseManager.obtain(LicenseManager.java:112)
   at com.neurotec.samples.biometrics.standards.ANTemplateSample.main(ANTemplateSample.java:56)
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:131)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:171)
   at com.neurotec.licensing.NLicensing.<clinit>(NLicensing.java:42)
   ... 4 more
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library "NCore": JNA native support (win32-x86/NCore.dll) not found in resource path (C:UsersSimoworkspaceFacein;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-client.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-gui.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-xml.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavastax-api.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavastax.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaxpp3.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavajna.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-core.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-licensing.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-gui.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-processing.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavacommons-io.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasamples-utils.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaabis-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaantemplate-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-virtual.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavadevices-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaenrollment-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafcrecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafirecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavafmrecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaiirecord-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavalatent-fingerprint-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavamysql-connector-java.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-client-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-gui-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-biometrics-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-cluster.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-cluster-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-core-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-devices-virtual-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-gui-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-licensing-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-media-processing-javadoc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava
eurotec-native-macosx-universal.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasqlite-jdbc.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavaserver-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-faces-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-fingers-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-irises-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJavasimple-voices-sample.jar;C:UsersSimoDesktopFace-recognitionNeurotec_Biometric_6_0_SDK_Trial_2016-03-18Neurotec_Biometric_6_0_SDK_TrialBinJava   emplate-conversion-sample.jar)
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:220)
   at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:322)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:123)
   ... 6 more

Hello,

Program requires native libraries to run, you can specify working directory via Eclipse:
Go to "Run" > "Run Configurations..." > choose your "Java Application" configuration(create new if doesn't exists) > select "Arguments" tab > In(Arguments tab) "Working directory" choose "Other", then click "File System" button, then choose "SDK\Bin\YOUR_PLATFORM" directory > click "Apply", run Java application.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 344
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

java.lang.NoClassDefFoundError: Could not initialize class

Postby sultan0805099 » Jun 29, 2016 07:06

I am trying to convert verify-face project from desktop application to web project in java . For this I have the following servlet .

Code: Select all
public class VeriFaceServlet extends HttpServlet {

    /**
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
     * methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        try (PrintWriter out = response.getWriter()) {
            /* TODO output your page here. You may use following sample code. */
            out.println("<!DOCTYPE html>");
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet VeriFaceServlet</title>");           
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet VeriFaceServlet at " + request.getContextPath() + "</h1>");
            out.println("</body>");
            out.println("</html>");
        }
    }

    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /**
     * Handles the HTTP <code>GET</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
         String referenceImage = request.getParameter("referenceImage");
        String candidateImage = request.getParameter("candidateImage");;
         try
         {
             List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
            JSONObject json = new JSONObject();
           
            VerifyFace verifyFace = new VerifyFace();
            VerifyFaceParameter verifyFaceParameter = verifyFace.MatchTwoImage(referenceImage, candidateImage);
               
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Value", verifyFaceParameter.getValue());
            map.put("Message", verifyFaceParameter.getMessage());
            list.add(map);
            json.put("Balance_Inquiry", list);
               
             
            System.out.println("Balance_Inquiry = " + list);
            response.addHeader("Access-Control-Allow-Origin", "*");
            response.setContentType("application/json");
            response.setCharacterEncoding("UTF-8");
            response.getWriter().print(json.toString());
            response.getWriter().flush();
            // System.out.println("Response Completed... ");
         }
         catch (IOException ex) {
            Logger.getLogger(VeriFaceServlet.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * Handles the HTTP <code>POST</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
       
        String referenceImage = request.getParameter("referenceImage");
        String candidateImage = request.getParameter("candidateImage");;
         try
         {
             List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
            JSONObject json = new JSONObject();
           
            VerifyFace verifyFace = new VerifyFace();
            VerifyFaceParameter verifyFaceParameter = verifyFace.MatchTwoImage(referenceImage, candidateImage);
               
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Value", verifyFaceParameter.getValue());
            map.put("Message", verifyFaceParameter.getMessage());
            list.add(map);
            json.put("Balance_Inquiry", list);
               
             
            System.out.println("Balance_Inquiry = " + list);
            response.addHeader("Access-Control-Allow-Origin", "*");
            response.setContentType("application/json");
            response.setCharacterEncoding("UTF-8");
            response.getWriter().print(json.toString());
            response.getWriter().flush();
            // System.out.println("Response Completed... ");
         }
         catch (IOException ex) {
            Logger.getLogger(VeriFaceServlet.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * Returns a short description of the servlet.
     *
     * @return a String containing servlet description
     */
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>

}


But when I am trying to run this servlet , I am getting following exception .

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.NoClassDefFoundError: Could not initialize class com.neurotec.licensing.NLicense
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:101)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)


Why am I getting this error ? How can I solve this ? Please help me .

Admin: merged to "Java general questions"
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 07:15

sultan0805099 wrote:I am trying to convert verify-face project from desktop application to web project in java . For this I have the following servlet .

Code: Select all
public class VeriFaceServlet extends HttpServlet {

    /**
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
     * methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        try (PrintWriter out = response.getWriter()) {
            /* TODO output your page here. You may use following sample code. */
            out.println("<!DOCTYPE html>");
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet VeriFaceServlet</title>");           
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet VeriFaceServlet at " + request.getContextPath() + "</h1>");
            out.println("</body>");
            out.println("</html>");
        }
    }

    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /**
     * Handles the HTTP <code>GET</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
         String referenceImage = request.getParameter("referenceImage");
        String candidateImage = request.getParameter("candidateImage");;
         try
         {
             List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
            JSONObject json = new JSONObject();
           
            VerifyFace verifyFace = new VerifyFace();
            VerifyFaceParameter verifyFaceParameter = verifyFace.MatchTwoImage(referenceImage, candidateImage);
               
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Value", verifyFaceParameter.getValue());
            map.put("Message", verifyFaceParameter.getMessage());
            list.add(map);
            json.put("Balance_Inquiry", list);
               
             
            System.out.println("Balance_Inquiry = " + list);
            response.addHeader("Access-Control-Allow-Origin", "*");
            response.setContentType("application/json");
            response.setCharacterEncoding("UTF-8");
            response.getWriter().print(json.toString());
            response.getWriter().flush();
            // System.out.println("Response Completed... ");
         }
         catch (IOException ex) {
            Logger.getLogger(VeriFaceServlet.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * Handles the HTTP <code>POST</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
       
        String referenceImage = request.getParameter("referenceImage");
        String candidateImage = request.getParameter("candidateImage");;
         try
         {
             List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
            JSONObject json = new JSONObject();
           
            VerifyFace verifyFace = new VerifyFace();
            VerifyFaceParameter verifyFaceParameter = verifyFace.MatchTwoImage(referenceImage, candidateImage);
               
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Value", verifyFaceParameter.getValue());
            map.put("Message", verifyFaceParameter.getMessage());
            list.add(map);
            json.put("Balance_Inquiry", list);
               
             
            System.out.println("Balance_Inquiry = " + list);
            response.addHeader("Access-Control-Allow-Origin", "*");
            response.setContentType("application/json");
            response.setCharacterEncoding("UTF-8");
            response.getWriter().print(json.toString());
            response.getWriter().flush();
            // System.out.println("Response Completed... ");
         }
         catch (IOException ex) {
            Logger.getLogger(VeriFaceServlet.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * Returns a short description of the servlet.
     *
     * @return a String containing servlet description
     */
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>

}


But when I am trying to run this servlet , I am getting following exception .

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.NoClassDefFoundError: Could not initialize class com.neurotec.licensing.NLicense
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:101)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)


Why am I getting this error ? How can I solve this ? Please help me .

Hi,

Make sure native libraries are set correctly through working directory parameter. Native libraries are available in SDK\bin\<os>\ directories
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby sultan0805099 » Jun 29, 2016 07:20

Martynas wrote:Hi,

Make sure native libraries are set correctly through working directory parameter. Native libraries are available in SDK\bin\<os>\ directories

I have imported all of the jar file from sdk/bin/java folder But still I am getting this error . How can I solve this ? Please help me .
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 07:51

sultan0805099 wrote:I have imported all of the jar file from sdk/bin/java folder But still I am getting this error . How can I solve this ? Please help me .

Hi,

jars are wrappers for the native dlls/so files. Please ensure that your application has an access and loads dlls/so files from the SDK.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby sultan0805099 » Jun 29, 2016 07:57

Martynas wrote:Hi,

jars are wrappers for the native dlls/so files. Please ensure that your application has an access and loads dlls/so files from the SDK.

I have copied target folder to my project in src directory . All dlls are there . Where have I to put dll folder in my web project ? Please help me .
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 08:09

sultan0805099 wrote:I have copied target folder to my project in src directory . All dlls are there . Where have I to put dll folder in my web project ? Please help me .

Hello,

dlls should be placed in the path, which would be accessed by your application. You can i.e. add the path to dlls into System environmental variable PATH (restart the machine after that). So all application would be able to access them. Either you need to copy dlls into working folder of your application.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby sultan0805099 » Jun 29, 2016 08:14

Martynas wrote:Hello,

dlls should be placed in the path, which would be accessed by your application. You can i.e. add the path to dlls into System environmental variable PATH (restart the machine after that). So all application would be able to access them. Either you need to copy dlls into working folder of your application.

I want to know the path where I should place the dll .
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 08:18

sultan0805099 wrote:I want to know the path where I should place the dll .

Hello,

take a look at this link. Maybe it will help you.
We aren't experts in servlets.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby sultan0805099 » Jun 29, 2016 08:29

Martynas wrote:Hello,

take a look at this link. Maybe it will help you.
We aren't experts in servlets.

I am loading dll by the following code :

Code: Select all
System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\libopenblas.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometricClient.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometrics.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NCore.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NdmDigitalPersonaUareU.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NLicensing.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMedia.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMediaProc.dll");


But I am getting the following exceptions :

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.UnsatisfiedLinkError: C:\Users\Sultan\Documents\NetBeansProjects\VerifyFace\src\target\classes\NBiometricClient.dll: Can't find dependent libraries
   java.lang.ClassLoader$NativeLibrary.load(Native Method)
   java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
   java.lang.Runtime.load0(Runtime.java:809)
   java.lang.System.load(System.java:1083)
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:35)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)


How can I solve this exception ? Please help me
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 08:35

sultan0805099 wrote:I am loading dll by the following code :

Code: Select all
System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\libopenblas.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometricClient.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometrics.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NCore.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NdmDigitalPersonaUareU.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NLicensing.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMedia.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMediaProc.dll");


But I am getting the following exceptions :

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.UnsatisfiedLinkError: C:\Users\Sultan\Documents\NetBeansProjects\VerifyFace\src\target\classes\NBiometricClient.dll: Can't find dependent libraries
   java.lang.ClassLoader$NativeLibrary.load(Native Method)
   java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
   java.lang.Runtime.load0(Runtime.java:809)
   java.lang.System.load(System.java:1083)
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:35)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)


How can I solve this exception ? Please help me

Hello,

first of all load the NCore.dll, then NMedia.dll and NMediaProc.dll, then NBiometrics.dll and tehn other dlls.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby sultan0805099 » Jun 29, 2016 08:39

Martynas wrote:Hello,

first of all load the NCore.dll, then NMedia.dll and NMediaProc.dll, then NBiometrics.dll and tehn other dlls.

I am loading dll by the following code according to your advice :
Code: Select all
System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\libopenblas.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NCore.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMedia.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMediaProc.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometrics.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometricClient.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NdmDigitalPersonaUareU.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NLicensing.dll");



But still I am getting the following exceptions :

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.UnsatisfiedLinkError: C:\Users\Sultan\Documents\NetBeansProjects\VerifyFace\src\target\classes\NBiometricClient.dll: Can't find dependent libraries
   java.lang.ClassLoader$NativeLibrary.load(Native Method)
   java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
   java.lang.Runtime.load0(Runtime.java:809)
   java.lang.System.load(System.java:1083)
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:39)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)



How can I solve this exception ? Please help me
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: java.lang.NoClassDefFoundError: Could not initialize cla

Postby Martynas » Jun 29, 2016 09:00

sultan0805099 wrote:I am loading dll by the following code according to your advice :
Code: Select all
System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\libopenblas.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NCore.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMedia.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMediaProc.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometrics.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometricClient.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NdmDigitalPersonaUareU.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NLicensing.dll");



But still I am getting the following exceptions :

Code: Select all
javax.servlet.ServletException: Servlet execution threw an exception
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.UnsatisfiedLinkError: C:\Users\Sultan\Documents\NetBeansProjects\VerifyFace\src\target\classes\NBiometricClient.dll: Can't find dependent libraries
   java.lang.ClassLoader$NativeLibrary.load(Native Method)
   java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
   java.lang.Runtime.load0(Runtime.java:809)
   java.lang.System.load(System.java:1083)
   com.neurotec.tutorials.biometrics.VerifyFace.MatchTwoImage(VerifyFace.java:39)
   com.neurotec.tutorials.biometrics.VeriFaceServlet.doGet(VeriFaceServlet.java:77)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)



How can I solve this exception ? Please help me

please use:
Code: Select all
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\libopenblas.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NCore.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMedia.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NMediaProc.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometrics.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NLicensing.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NDevices.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NdmDigitalPersonaUareU.dll");
                System.load("C:\\Users\\Sultan\\Documents\\NetBeansProjects\\VerifyFace\\src\\target\\classes\\NBiometricClient.dll");
               
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

How to get NFace from BufferedImage in Java

Postby sultan0805099 » Jul 11, 2016 07:17

I am running VerifyFace project given with SDK . In there , I have got NFace from String filename . The code is as follows :

Code: Select all
private static NSubject createSubject(String fileName, String subjectId) {
      NSubject subject = new NSubject();
      subject.setId(subjectId);
      NFace face = new NFace();
      face.setFileName(fileName);
      subject.getFaces().add(face);
      return subject;
   }


Now I want to get NFace from BufferedImage in Java . How can I do that ?

Admin: merged to "Java general questions"
sultan0805099
 
Posts: 17
Joined: Jun 13, 2016 08:52

Re: How to get NFace from BufferedImage in Java

Postby MartynasV » Jul 11, 2016 10:47

sultan0805099 wrote:I am running VerifyFace project given with SDK . In there , I have got NFace from String filename . The code is as follows :

Code: Select all
private static NSubject createSubject(String fileName, String subjectId) {
      NSubject subject = new NSubject();
      subject.setId(subjectId);
      NFace face = new NFace();
      face.setFileName(fileName);
      subject.getFaces().add(face);
      return subject;
   }


Now I want to get NFace from BufferedImage in Java . How can I do that ?

Hello,

ByteBuffer.wrap(byte[])
NImage.FromMemory(ByteBuffer)
face.setImage(NImage)
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 344
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Docs on including native dependences in Java app?

Postby mogoodrich » Aug 17, 2016 13:47

I"ve been working on writing a Java application for fingerprint scanning. I"ve successfully been able to run the examples and have started writing my own code, but one thing I"ve been struggling with is how to bundle the proper native libraries (dlls for Windows, *.so for Linux, into a distribution package). I"ve been able to get my custom app to run in Linux, but only by manually install the Linux .so files in a Lib directory. I have not yet been able to get it to run in Windows.

From the examples, it"s not clear how the native libraries are bundled and/or accessed... or at least I"m not looking in the right place for it. Any pointers?

Thanks,
Mark

Admin: merged to "Java general questions"
mogoodrich
 
Posts: 7
Joined: Aug 17, 2016 13:36

Re: Docs on including native dependences in Java app?

Postby Martynas » Aug 22, 2016 09:26

mogoodrich wrote:I"ve been working on writing a Java application for fingerprint scanning. I"ve successfully been able to run the examples and have started writing my own code, but one thing I"ve been struggling with is how to bundle the proper native libraries (dlls for Windows, *.so for Linux, into a distribution package). I"ve been able to get my custom app to run in Linux, but only by manually install the Linux .so files in a Lib directory. I have not yet been able to get it to run in Windows.

From the examples, it"s not clear how the native libraries are bundled and/or accessed... or at least I"m not looking in the right place for it. Any pointers?

Thanks,
Mark

Hello,

our SDK uses standard library loading mechanism. The location of native libraries from the SDK, depends on the OS specific. i.e. in case of Windows operating system, native dlls could be placed either to the working folder of the application, either to any of the folder on the computer, which path is added to System or User environmental variable PATH.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

compiling Java samples

Postby Minh Pham » Sep 14, 2016 04:15

I also have a problem with compiling Java sample.
Event the eclipse cannot download artifact for Neurotec Biometric libraries.
Code: Select all
Description   Resource   Path   Location   Type
Missing artifact com.neurotec:neurotec-biometrics-gui:jar:9.0.0.0   pom.xml   /server-sample   line 46   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-biometrics:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-cluster:jar:9.0.0.0   pom.xml   /server-sample   line 54   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-core:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-devices:jar:9.0.0.0   pom.xml   /server-sample   line 50   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-gui:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-licensing:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-media-processing:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-media:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec.samples:samples-utils:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact net.java.dev.jna:jna:jar:4.2.2-Neurotec   pom.xml   /server-sample   line 4   Maven Dependency Problem

Could you help me on this?
What Eclipse version and Maven version did you use? or how to compile it?

Admin: merged to "Java general questions"
Minh Pham
 
Posts: 1
Joined: Sep 14, 2016 04:01

Re: Neurotec_Biometric_9_0_SDK_Trial Java samples

Postby vaidasz » Sep 14, 2016 13:48

Minh Pham wrote:I also have a problem with compiling Java sample.
Event the eclipse cannot download artifact for Neurotec Biometric libraries.
Code: Select all
Description   Resource   Path   Location   Type
Missing artifact com.neurotec:neurotec-biometrics-gui:jar:9.0.0.0   pom.xml   /server-sample   line 46   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-biometrics:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-cluster:jar:9.0.0.0   pom.xml   /server-sample   line 54   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-core:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-devices:jar:9.0.0.0   pom.xml   /server-sample   line 50   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-gui:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-licensing:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-media-processing:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec:neurotec-media:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact com.neurotec.samples:samples-utils:jar:9.0.0.0   pom.xml   /server-sample   line 4   Maven Dependency Problem
Missing artifact net.java.dev.jna:jna:jar:4.2.2-Neurotec   pom.xml   /server-sample   line 4   Maven Dependency Problem

Could you help me on this?
What Eclipse version and Maven version did you use? or how to compile it?


Hello,

First of all execute the command “mvn clean install” in “Samples\Biometrics\Java” folder of the SDK. This command will copy all required jars from the SDK to local repository.
Then IDE you are using will be able to find them.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 580
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

java.lang.UnsatisfiedLinkError: Unable to load library "NCor

Postby xthewiz » Jan 16, 2017 07:48

Hi, could someone please help me for this problem.

I am newbie for this SDK and using Netbean on OSX.

Here is my pgd.conf

Code: Select all
mode = server


Next, I choose to Open Project and select "<Download>/neurotic_sdk_dir/Samples/BiometricS/Java/simple-fingers-sample"

I config VM Option to this

Code: Select all
-Djava.library.path=/Users/xthewiz/Downloads/neurotic_sdk/Bin/Java


I have right-clicked project name "Simple Fingers Sample" and click on "Clean and Build", this task is success.
Then I run com.neurotec.samples.SimpleFingersApplication and below is the error I got.

Code: Select all
cd /Users/xthewiz/Downloads/neurotic_sdk/Samples/Biometrics/Java/simple-fingers-sample; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home "/Applications/NetBeans/NetBeans 8.1.app/Contents/Resources/NetBeans/java/maven/bin/mvn" "-Dexec.args=-Djava.library.path=/Users/xthewiz/Downloads/neurotic_sdk/Bin/Java -classpath %classpath com.neurotec.samples.SimpleFingersApplication" -Dexec.executable=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java -Dexec.workingdir=/Users/xthewiz/Downloads/neurotic_sdk/Bin/Java org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
Scanning for projects...
                                                                       
------------------------------------------------------------------------
Building Simple Fingers Sample 9.0.0.0
------------------------------------------------------------------------

--- exec-maven-plugin:1.2.1:exec (default-cli) @ simple-fingers-sample ---
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:49)
   at com.neurotec.images.NImages.<clinit>(NImages.java:35)
   at com.neurotec.samples.EnrollFromImage.initGUI(EnrollFromImage.java:340)
   at com.neurotec.samples.BasePanel.init(BasePanel.java:32)
   at com.neurotec.samples.MainPanel.initGUI(MainPanel.java:63)
   at com.neurotec.samples.MainPanel.<init>(MainPanel.java:51)
   at com.neurotec.samples.SimpleFingersApplication$1.run(SimpleFingersApplication.java:38)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:140)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:171)
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
   ... 20 more
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library "NCore": Native library (darwin/libNCore.dylib) not found in resource path ([file:/Users/xthewiz/Downloads/neurotic_sdk/Samples/Biometrics/Java/simple-fingers-sample/target/classes/, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics-client/9.0.0.0/neurotec-biometrics-client-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics-gui/9.0.0.0/neurotec-biometrics-gui-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-devices/9.0.0.0/neurotec-devices-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/net/java/dev/jna/jna/4.2.2-Neurotec/jna-4.2.2-Neurotec.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-core/9.0.0.0/neurotec-core-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-licensing/9.0.0.0/neurotec-licensing-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-gui/9.0.0.0/neurotec-gui-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-media/9.0.0.0/neurotec-media-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-media-processing/9.0.0.0/neurotec-media-processing-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics/9.0.0.0/neurotec-biometrics-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/samples/samples-utils/9.0.0.0/samples-utils-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar])
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:277)
   at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:132)


I have no idea how to resolve this issue, please give me an advice.
xthewiz
 
Posts: 2
Joined: Jan 16, 2017 07:28

Re: Java general questions

Postby xthewiz » Jan 16, 2017 10:25

Hi,

I am using Biometric 9.0.0.0 trial version, where I develop by Java on Mac OS Sierra, the IDE is Netbean 8.1.

First, I followed Activation guide and this is my pgd.conf

Code: Select all
mode = server


Then I follow this step:
1. Select "Open Project", and select "<neurotec_sdk_dir/Samples/Biometrics/Java"
2. Right click on project nam and select "Clean and Build"
3. Select Modules -> Simple Fingers Sample, then right click and select "Open Project"
4. Right click at newly created project "Simple Fingers Sample" and select "Clean and Build"
5. Right click and select Run, choose com.neurotec.samples.SimpleFingersApplication as a main class.

Then below is error message I got, I have no idea how to resolve this problem, could someone please help me...

Code: Select all
cd /Users/xthewiz/Downloads/neurotic_sdk/Samples/Biometrics/Java/simple-fingers-sample; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home M2_HOME=/Users/xthewiz/Library/maven /Users/xthewiz/Library/maven/bin/mvn "-Dexec.args=-classpath %classpath com.neurotec.samples.SimpleFingersApplication" -Dexec.executable=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
Scanning for projects...
                                                                       
------------------------------------------------------------------------
Building Simple Fingers Sample 9.0.0.0
------------------------------------------------------------------------

--- exec-maven-plugin:1.2.1:exec (default-cli) @ simple-fingers-sample ---
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:49)
   at com.neurotec.images.NImages.<clinit>(NImages.java:35)
   at com.neurotec.samples.EnrollFromImage.initGUI(EnrollFromImage.java:340)
   at com.neurotec.samples.BasePanel.init(BasePanel.java:32)
   at com.neurotec.samples.MainPanel.initGUI(MainPanel.java:63)
   at com.neurotec.samples.MainPanel.<init>(MainPanel.java:51)
   at com.neurotec.samples.SimpleFingersApplication$1.run(SimpleFingersApplication.java:38)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:140)
   at com.neurotec.lang.NTypes.<clinit>(NTypes.java:171)
   at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
   ... 20 more
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library "NCore": Native library (darwin/libNCore.dylib) not found in resource path ([file:/Users/xthewiz/Downloads/neurotic_sdk/Samples/Biometrics/Java/simple-fingers-sample/target/classes/, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics-client/9.0.0.0/neurotec-biometrics-client-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics-gui/9.0.0.0/neurotec-biometrics-gui-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-devices/9.0.0.0/neurotec-devices-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/net/java/dev/jna/jna/4.2.2-Neurotec/jna-4.2.2-Neurotec.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-core/9.0.0.0/neurotec-core-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-licensing/9.0.0.0/neurotec-licensing-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-gui/9.0.0.0/neurotec-gui-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-media/9.0.0.0/neurotec-media-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-media-processing/9.0.0.0/neurotec-media-processing-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/neurotec-biometrics/9.0.0.0/neurotec-biometrics-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/com/neurotec/samples/samples-utils/9.0.0.0/samples-utils-9.0.0.0.jar, file:/Users/xthewiz/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar])
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:277)
   at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:132)
   ... 22 more
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 5.664 s
Finished at: 2017-01-16T17:24:07+07:00
Final Memory: 6M/155M
------------------------------------------------------------------------
xthewiz
 
Posts: 2
Joined: Jan 16, 2017 07:28

Re: Java general questions

Postby Martynas » Jan 16, 2017 13:34

Hi,

You need to put all the frameworks from SDK "Frameworks" folder to one of the following locations depending on your needs on your machine:
1. /System/Library/Frameworks
2. /Library/Frameworks
3. ~/Library/Frameworks
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2205
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Java general questions

Postby Jorge Cabero » Feb 01, 2018 16:54

Hi, I"m new I"m working with "ABIS - SAMPLE" in Java.
I managed to enroll a subject with a finger template in MySQL Server database. My Question is:

Is it possible to separate the fingers from the template and save these in image files?

I looked at this code:

NBiometricTask.getSubjects (). get (0) .getFingers (). get (0) .getImage ()


To get NImage, but always come back null.

I can not find the solution.

SDK version 10.0 TRIAL.

Thank you
Jorge Cabero
 
Posts: 1
Joined: Feb 01, 2018 16:28

Re: Java general questions

Postby MartynasV » Feb 02, 2018 08:41

Jorge Cabero wrote:Hi, I"m new I"m working with "ABIS - SAMPLE" in Java.
I managed to enroll a subject with a finger template in MySQL Server database. My Question is:

Is it possible to separate the fingers from the template and save these in image files?

I looked at this code:

NBiometricTask.getSubjects (). get (0) .getFingers (). get (0) .getImage ()


To get NImage, but always come back null.

I can not find the solution.

SDK version 10.0 TRIAL.

Thank you

Hello Jorge,

Answer is NO, because template doesn't contain images(it only contains extracted data from images). If you want to save images, then you will have to do that additionally, for that you could use our "Custom Data"(look into our documentation) feature, using it you can enroll binary data to database via our API.

Note: Custom data does not work via NServer.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 344
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Previous

Return to Public

Who is online

Users browsing this forum: No registered users and 6 guests