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: 390
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: 390
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: 2217
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: 2217
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: 2217
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: 2217
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: 2217
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: 2217
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: 390
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: 2217
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: 585
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: 2217
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: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Sep 24, 2018 15:49

I created a new project on based *SimpleFaceSample" (Netbeans). At the moment that run the project, i get this error

Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:83)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:326)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: Unable to load library 'NCore': Native library (linux-x86-64/libNCore.so) not found in resource path ([file:/home/superaccess/NetBeansProjects/demo1/target/classes/, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics-client/10.0.0.0/neurotec-biometrics-client-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics-gui/10.0.0.0/neurotec-biometrics-gui-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-devices/10.0.0.0/neurotec-devices-10.0.0.0.jar, file:/home/superaccess/.m2/repository/org/simpleframework/simple-xml/2.6.2/simple-xml-2.6.2.jar, file:/home/superaccess/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar, file:/home/superaccess/.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar, file:/home/superaccess/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar, file:/home/superaccess/.m2/repository/ant-contrib/ant-contrib/20020829/ant-contrib-20020829.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics/10.0.0.0/neurotec-biometrics-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-core/10.0.0.0/neurotec-core-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-licensing/10.0.0.0/neurotec-licensing-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/samples/samples-utils/10.0.0.0/samples-utils-10.0.0.0.jar, file:/home/superaccess/.m2/repository/net/java/dev/jna/jna/4.5.0/jna-4.5.0.jar, file:/home/superaccess/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/home/superaccess/.m2/repository/com/neurotec/samples/abis-sample/10.0.0.0/abis-sample-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-gui/10.0.0.0/neurotec-gui-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-media/10.0.0.0/neurotec-media-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-media-processing/10.0.0.0/neurotec-media-processing-10.0.0.0.jar])


I readed about configure the path where .so is, but i do that and not works.
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Sep 25, 2018 10:42

superaccess wrote:I created a new project on based *SimpleFaceSample" (Netbeans). At the moment that run the project, i get this error

Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:83)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:326)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: Unable to load library 'NCore': Native library (linux-x86-64/libNCore.so) not found in resource path ([file:/home/superaccess/NetBeansProjects/demo1/target/classes/, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics-client/10.0.0.0/neurotec-biometrics-client-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics-gui/10.0.0.0/neurotec-biometrics-gui-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-devices/10.0.0.0/neurotec-devices-10.0.0.0.jar, file:/home/superaccess/.m2/repository/org/simpleframework/simple-xml/2.6.2/simple-xml-2.6.2.jar, file:/home/superaccess/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar, file:/home/superaccess/.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar, file:/home/superaccess/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar, file:/home/superaccess/.m2/repository/ant-contrib/ant-contrib/20020829/ant-contrib-20020829.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-biometrics/10.0.0.0/neurotec-biometrics-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-core/10.0.0.0/neurotec-core-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-licensing/10.0.0.0/neurotec-licensing-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/samples/samples-utils/10.0.0.0/samples-utils-10.0.0.0.jar, file:/home/superaccess/.m2/repository/net/java/dev/jna/jna/4.5.0/jna-4.5.0.jar, file:/home/superaccess/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/home/superaccess/.m2/repository/com/neurotec/samples/abis-sample/10.0.0.0/abis-sample-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-gui/10.0.0.0/neurotec-gui-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-media/10.0.0.0/neurotec-media-10.0.0.0.jar, file:/home/superaccess/.m2/repository/com/neurotec/neurotec-media-processing/10.0.0.0/neurotec-media-processing-10.0.0.0.jar])


I readed about configure the path where .so is, but i do that and not works.

Hello,

Yes, you have to set where .so files are located. You can do the in couple of ways:
  • Set the "jna.library.path" property at the start of application and provide path to directory where .so files are located.
  • Use linux variable "LD_LIBRARY_PATH" and set path.
.so files are located in"SDK\Lib\Linux_x86_64" directory.


Also make sure that you have removed "LibraryManager.initLibraryPath();" line from your code(it has hard-coded paths to lib directories within our SDK structure, when you create your own application, then you shouldn't' use it, as it can cause issues).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Sep 25, 2018 20:22

Hello,

How i set et the "jna.library.path" property at the start of application ?

I already set the environment variable with the /Neurotec_Biometric_10_0_SDK/Lib/Linux_x86_64


Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:81)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:323)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: no NCore in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:142)
   ... 20 more


Thank you for you support
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Sep 26, 2018 09:23

superaccess wrote:Hello,

How i set et the "jna.library.path" property at the start of application ?

I already set the environment variable with the /Neurotec_Biometric_10_0_SDK/Lib/Linux_x86_64


Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:81)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:323)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: no NCore in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:142)
   ... 20 more


Thank you for you support

Hello,
Code: Select all
        System.setProperty("jna.library.path", "c:\\jnadll");
          System.setProperty("java.library.path", "c:\\jnadll");
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Sep 26, 2018 13:48

I'm working on linux. The java.library.path has /home/superaccess/Neurotec_Biometric_10_0_SDK/Lib/Linux_x86_64 and the error is the same.I'm really stuck because I can not move forward

Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:82)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:324)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: no NCore in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:142)
   ... 20 more
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Sep 26, 2018 14:06

superaccess wrote:I'm working on linux. The java.library.path has /home/superaccess/Neurotec_Biometric_10_0_SDK/Lib/Linux_x86_64 and the error is the same.I'm really stuck because I can not move forward

Code: Select all
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
   at com.neurotec.lang.NCore.<clinit>(NCore.java:145)
   at com.neurotec.lang.NObject.<clinit>(NObject.java:176)
   at com.supervisa.enroll.FaceTools.<init>(FaceTools.java:40)
   at com.supervisa.enroll.FaceTools.getInstance(FaceTools.java:28)
   at com.supervisa.enroll.EnrollFramCamara.<init>(EnrollFramCamara.java:82)
   at com.supervisa.enroll.EnrollFramCamara$1.run(EnrollFramCamara.java:324)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   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:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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.UnsatisfiedLinkError: no NCore in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.neurotec.lang.NCore.<clinit>(NCore.java:142)
   ... 20 more

Hello,

Try specifing LD_LIBRARY_PATH at the startup at the application: LD_LIBRARY_PATH=[PATH_TO_LIBRARIES] java –jar YOUR_APPLICATION.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Sep 26, 2018 15:55

Hello,

Thank you for answering. Now, i execute .jar and the new error is

Code: Select all
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/neurotec/devices/NDeviceType
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
   at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
   at java.lang.Class.getMethod0(Class.java:3018)
   at java.lang.Class.getMethod(Class.java:1784)
   at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
   at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.neurotec.devices.NDeviceType
   at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   ... 7 more
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Sep 27, 2018 08:51

superaccess wrote:Hello,

Thank you for answering. Now, i execute .jar and the new error is

Code: Select all
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/neurotec/devices/NDeviceType
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
   at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
   at java.lang.Class.getMethod0(Class.java:3018)
   at java.lang.Class.getMethod(Class.java:1784)
   at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
   at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.neurotec.devices.NDeviceType
   at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   ... 7 more

Hello,

Now your application doesn't find .jar files, store them to the same location as .so (jars are located in "SDK\Bin\Java" dir).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 04, 2018 22:06

Hi,

Now, i want to enroll and save in postgresql database. I checked AbisSample but in my case, i don't need all these configuration. My question is, Can i do all the configuration the database in a class ?. Or there is any other example that explain the conecction to a postgresql DB.

I have understood, that only need the DSN, the TABLE NAME and Database Schema(Remote Server schema).

Thanks for you help
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 05, 2018 08:18

superaccess wrote:Hi,

Now, i want to enroll and save in postgresql database. I checked AbisSample but in my case, i don't need all these configuration. My question is, Can i do all the configuration the database in a class ?. Or there is any other example that explain the conecction to a postgresql DB.

I have understood, that only need the DSN, the TABLE NAME and Database Schema(Remote Server schema).

Thanks for you help

Hello,

"SDK\Tutorials\Biometrics\CS\EnrollToSQLiteDatabaseCS" - enroll biometrics to SQLite database.
"SDK\Tutorials\Biometrics\CS\IdentifyOnSQLiteDatabaseCS" - identify biometrics on SQLite database.
These tutorials shows how to work on SQLite database, if you want to use other database you will need to do that using ODBC connection. You just need to use “SetDatabaseConnectionToOdbc” instead of “SetDatabaseConnectionToSQLite”(don't need to change anything else):
biometricClient.SetDatabaseConnectionToOdbc("Dsn=your_dsn;UID=your_user;PWD=your_password", "your_table_name");
Documentation “4.2.2.2 Database”, “5.2.4 ODBC”, "5.2.4 PostgreSQL".

My question is, Can i do all the configuration the database in a class ?

You can't modify database's structure via our API(create/modify tables, etc.).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 08, 2018 13:09

Hi, Martynas.

How i do to save the value of(name, lastname) in the database?
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 08, 2018 13:22

superaccess wrote:Hi, Martynas.

How i do to save the value of(name, lastname) in the database?

Hello superaccess,

To do that you need to use Biographic data feature, read this post: viewtopic.php?f=10&t=93205&p=103665&hilit=biographic+data&sid=3da04eb7c2923001ad2986fb85995c04#p103665 .
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 08, 2018 13:34

I'm going to check. Thank you very much
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby superaccess » Oct 08, 2018 14:18

Martynas,

when I run the program I get error in
Code: Select all
client.createTemplate(subject)

Code: Select all
client.performTask(task)


any suggestions??

Thank you for your help
Attachments
testEnroll.txt
In this class, i'm trying do enroll
(14.87 KiB) Downloaded 10 times
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 08, 2018 14:23

superaccess wrote:Martynas,

when I run the program I get error in
Code: Select all
client.createTemplate(subject)

Code: Select all
client.performTask(task)


any suggestions??

Thank you for your help

Yes, send me the error.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 08, 2018 14:35

It's a
Code: Select all
java.lang.NullPointerException


Code: Select all
java.lang.NullPointerException
   at com.neurotec.samples.EnrollFromCamera.enroll(EnrollFromCamera.java:160)
   at com.neurotec.samples.EnrollFromCamera.actionPerformed(EnrollFromCamera.java:404)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.Component.processMouseEvent(Component.java:6539)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6304)
   at java.awt.Container.processEvent(Container.java:2239)
   at java.awt.Component.dispatchEventImpl(Component.java:4889)
   at java.awt.Container.dispatchEventImpl(Container.java:2297)
   at java.awt.Component.dispatchEvent(Component.java:4711)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
   at java.awt.Container.dispatchEventImpl(Container.java:2283)
   at java.awt.Window.dispatchEventImpl(Window.java:2746)
   at java.awt.Component.dispatchEvent(Component.java:4711)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
   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:74)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
   at java.awt.EventQueue$4.run(EventQueue.java:733)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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)
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 09, 2018 08:30

superaccess wrote:It's a
Code: Select all
java.lang.NullPointerException


Code: Select all
java.lang.NullPointerException
   at com.neurotec.samples.EnrollFromCamera.enroll(EnrollFromCamera.java:160)
   at com.neurotec.samples.EnrollFromCamera.actionPerformed(EnrollFromCamera.java:404)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.Component.processMouseEvent(Component.java:6539)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6304)
   at java.awt.Container.processEvent(Container.java:2239)
   at java.awt.Component.dispatchEventImpl(Component.java:4889)
   at java.awt.Container.dispatchEventImpl(Container.java:2297)
   at java.awt.Component.dispatchEvent(Component.java:4711)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
   at java.awt.Container.dispatchEventImpl(Container.java:2283)
   at java.awt.Window.dispatchEventImpl(Window.java:2746)
   at java.awt.Component.dispatchEvent(Component.java:4711)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
   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:74)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
   at java.awt.EventQueue$4.run(EventQueue.java:733)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
   at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   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)

Hello superaccess,

The error is self-explanatory, you are using NULL object.

P.S. Your code file is outdated according to your exception stack trace - there is no "enroll" method in 160th line.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 09, 2018 23:14

I can solve that problem.

Now, i want to show id, firstName, lastName, Score in a table. At the moment this code runs very well.

Code: Select all
 for (NMatchingResult matchingResult : subject.getMatchingResults()) {
                        System.out.format("Matched with ID: '%s' with score %d\n", matchingResult.getId(), matchingResult.getScore());
                        appendIdentifyResult(matchingResult.getId(), matchingResult.getScore());                       
                }


How i can call the value of the first and lastName?

Thank you
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 10, 2018 10:30

superaccess wrote:I can solve that problem.

Now, i want to show id, firstName, lastName, Score in a table. At the moment this code runs very well.

Code: Select all
 for (NMatchingResult matchingResult : subject.getMatchingResults()) {
                        System.out.format("Matched with ID: '%s' with score %d\n", matchingResult.getId(), matchingResult.getScore());
                        appendIdentifyResult(matchingResult.getId(), matchingResult.getScore());                       
                }


How i can call the value of the first and lastName?

Thank you

Hello,

First you have to get subject from database using "nBiometricClient.Get(subject)" method, after this successful call, subject object will contain all information retrieved from database by subject's ID. Now you can get those biographic properties.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Java general questions

Postby superaccess » Oct 10, 2018 13:46

Hello, Martynas

I have to use
Code: Select all
client.get(subject)
before the foreach or inside?


When I enroll a person, The program save in database and the photo on the desk but when I enroll other person, the photograph of the previous one is erased ...
Code: Select all
if (subject != null) {                   
         fc.setSelectedFile(new File(formPanel.txtCedula.getText() + ".png"));                                
                        subject.getFaces().get(0).getImage().save("/home/superaccess/Escritorio/" + formPanel.txtCedula.getText() + ".png");                                               
         
      }
Attachments
images.png
(11.76 KiB) Not downloaded yet
superaccess
 
Posts: 11
Joined: Sep 24, 2018 13:31

Re: Java general questions

Postby MartynasV » Oct 10, 2018 14:02

superaccess wrote:I have to use
Code: Select all
client.get(subject)
before the foreach or inside?

As you get id "matchingResult.getId()" of subject and you want to retrieve name, you have to create NSubject, set id and then GET that subject. After this you will be able to retrieve biographic data from that subject object.

superaccess wrote:When I enroll a person, The program save in database and the photo on the desk but when I enroll other person, the photograph of the previous one is erased ...
Code: Select all
if (subject != null) {                   
         fc.setSelectedFile(new File(formPanel.txtCedula.getText() + ".png"));                                
                        subject.getFaces().get(0).getImage().save("/home/superaccess/Escritorio/" + formPanel.txtCedula.getText() + ".png");                                               
         
      }

We don't erase files, please recheck your code or maybe some other program is doing that.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 390
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Previous

Return to Public

Who is online

Users browsing this forum: No registered users and 1 guest