Griaule Biometrics

Home » Forums » FINGERPRINT SDK » Java Specifc » Unknown error in Function fingerprintSDK.verify(template, referenceTemplate)
19 replies [Last post]
JUANCA
Offline
Joined: 2010-10-21
Rate this post:
0
No votes yet
Unknown error in Function fingerprintSDK.verify(template, referenceTemplate)

Hi everybody,

I'm trying fingerprint SDK Java 2009 in my PC Windows XP, but the function that compares the fingerprint does not work 

 boolean matched = fingerprintSDK.verify(template, referenceTemplate);

send me the following error message Unknown error

In template  I have fingerprint of the screen, and the referenceTemplate have the fingerprint I got from the database

de code is:

        try {
        DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
        conexion2 = "jdbc:oracle:thin:user122/passwd122@BASDEV:1521:DGEN";
        conexion = DriverManager.getConnection(conexion2);
        }catch(SQLException errorConexion){System.out.println("ERROv:"+errorConexion);} 
       
        try { transacciones = conexion.createStatement();           
             String sqlSecu = "SELECT FINGER AS template FROM FOX_KANBAN_FINGER WHERE NUM_EMPLOYEE = '"+numEmp+"'";
             rsSecu = transacciones.executeQuery(sqlSecu);
             if (rsSecu.next()) {
           
            //Reads the template data from the database.
             byte templateBuffer[] = rsSecu.getBytes(1);
             Template referenceTemplate = new Template(templateBuffer);

            boolean matched = fingerprintSDK.verify(template,referenceTemplate);   

the previous line is the problem, anyone kown if this function works? 
because this function is the most important and decide the buy
.
m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

Did you try to use our method getError() or getMessage() to see if the error is known? If you want to take a look at this, it's located here:
http://www.griaulebiometrics.com/javadoc/GrFingerJava/com/griaule/grfingerjava/GrFingerJavaException.html
This line appears to be correct, did you check passing the template from database or if the template is being correctly stored before it's use?

If you have more doubts, don't hesitate to get in contact.

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

JUANCA
Offline
Joined: 2010-10-21
Rate this post:
0
No votes yet

hi,

yes, I used your method getMessage(), but the message is   Unknown error

the code is:    

     }   catch (SQLException e) {
                  ui.writeLog("Error accessing database.");
          } catch (GrFingerJavaException e) {
                      ui.writeLog(e.getMessage());
            }

 }

The template stored in my Oracle DataBase is the type field VARCHAR2(2000Byte), BFILE, BLOB and / or RAW(2000) but not work anything.  Any suggestions?

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

Have in mind that the template read for matching should be a Byte array, if it's not, you will have to use the Extract method to get the template from the image and then make de comparison.
The fingerprint you put in the fingerprint reader, to check with the database one, also needs to be extracted. Before the comparison.
Are you doing that correctly?

Just to check if you are using the right method, "verify" or "identify"... Are you doing a 1:1 match, allright? If you're doing a 1:N match, you should use "identify" instead of "verify".

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

JUANCA
Offline
Joined: 2010-10-21
Rate this post:
0
No votes yet

It's now working , the template was correctly stored in Oracle DB, the type is raw (2000).

finished testing the trial version and works well, now need to buy the license.

Thanks

anil
Offline
Joined: 2011-05-02
Rate this post:
0
No votes yet

Hello..

 

i get the following error in my c#.net web application project when i verify the finger print template with the database stored template.

GR_ERROR_PARAMETERS

on below statement

 return (int)axGrFingerXCtrl1.Verify(ref _tpt._tpt, ref tptRef._tpt, ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);

please reply me with any solutions...

 

Thanks,

Anil Brahmaniya

JB
Offline
Joined: 2010-09-15
Rate this post:
0
No votes yet

Dear customer,

Here is the logic, if you have more questions let us know.

 

// Check current fingerprint against another one in our database

public int Verify(int id, ref int score) {

TTemplate tptRef;

 

// Checking if template is valid.

if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;

 

// Getting template with the supplied ID from database.

tptRef = _DB.getTemplate(id);

 

// Checking if ID was found.

if ((tptRef._tpt==null) || (tptRef._size == 0))

{

return ERR_INVALID_ID;

}

 

// Comparing templates.

return (int) _grfingerx.Verify(ref _tpt._tpt,ref tptRef._tpt,

ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);

}

 

Jan Beeck

Griaule Support Team

anil
Offline
Joined: 2011-05-02
Rate this post:
0
No votes yet

hello...

yes i written above all code..

but i get return -8 ( GR_ERROR_PARAMETER) in below statement

return (int) _grfingerx.Verify(ref _tpt._tpt,ref tptRef._tpt, ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);

 

Thanks,

Anil

JB
Offline
Joined: 2010-09-15
Rate this post:
0
No votes yet

Dear customer,

Make sure that all the variables are initialized (your template must not be NULL) and if the class is defined as this:

 

// the template class

public class TTemplate

{

// Template data.

public System.Array _tpt;

// Template size

public int _size;

 

public TTemplate(){

// Create a byte buffer for the template

  _tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];

  _size = 0;

}

}

 

Jan Beeck

Griaule Support Team

Lalit
Offline
Joined: 2010-12-29
Rate this post:
0
No votes yet

Hi, Can I know where is the initialization is happning of _grfingerx object. in UI Or DA. i want to initialization on bot UI and DA.

Thanks

anil
Offline
Joined: 2011-05-02
Rate this post:
0
No votes yet

hi,

i develop c#.net web application using finger print sdk ActiveX object.

i get error in following statment..

axGrFingerXCtrl1.CapRawImageToHandle(ref _raw.img, _raw.width, _raw.height, hdc, ref handler);

ERROR :

{System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
   at GrFingerXLib.GrFingerXCtrlClass.CapRawImageToHandle(Object& rawImage, Int32 width, Int32 height, Int32 hdc, IPictureDisp& handler)

 

 

please anybody help me..

Thanks,

anil

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

I took a look at this error and it appears to be an web requisition error.
It's possible you're passing an incorrect parameter on this function.

Please, check it the values passed and the variables types are all correct.

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

Lalit
Offline
Joined: 2010-12-29
Rate this post:
0
No votes yet

Hi

I am geting problem with initialization of FingerPrintCore class object the syntex is in below line.when i run  this line in a windows application it works fine but when i run this line an independent Class in C#.net it's showing the error "Initialization Failed (Error-1)".  I am using SDK2009 and i am using the refrence of GriauleFingrePrintLibrary.dll in my application. The purpuse is using in a indepandent class library is that i want to identefy the tamplate on server in my Dataaccess layer.

private FingerPrintCode finger = new FingerPrintCore();

finger.initialize();

 

Thanks.

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

You're probably having trouble on initialize the SDK.
You have to call Initialize() method and after that, CapInitialize(), this way you enable the use of the SDK and the readers.

Please try to post your questions just in one topic, to avoid repeated content.

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

Lalit
Offline
Joined: 2010-12-29
Rate this post:
0
No votes yet

Hi I am geting the error in the Initialize() function itself. But the same line is giving me error. one more thing is that i want to know that should i go with dll or with activex control. one more thing will this class FingerPrintCore allow me for multipul instances or not. becouze when i am testing that both my DA and UI are on the same machine.

private FingerPrintCore finger = new FingerPrintCore();

finger.Initialize();// error in this line ( "Initialization Failed (Error-1)". )
finger.CapInitialize()

Thanks
Umesh

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

Do you have a license installed in your computer? Even if it's a trial license?
It's possible it's not initializing because a missing license.
It's also possible that you're passing a callback in a wrong way, if you can please check this.

You can use either DLL or ActiveX, you can decide what's better for you and your application.

About the FingerprintCore, you shouldn't create more instances of it, instead, if you want to separate the processing of your application you have to create new contexts using the method CreateContext.

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

umesh
Offline
Joined: 2011-05-31
Rate this post:
0
No votes yet

HI

I m Umesh in place of lalit i had alrady installed the trial license on my computer.

one more thing can i create multipul instance of FingerPrintCore class in single computer.

Thanks

Umesh 

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

It's possible to do that, but it's not recommended.
The best solution is to create multiple contexts, instead of FingerPrintCores.

Maybe the error you're getting is because of that.
Please try to use just one instance of FingerPrintCores.

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team

umesh
Offline
Joined: 2011-05-31
Rate this post:
0
No votes yet

Thanks for reply.

Can u please send me any link for C# .net example where i can get the best solution that create multiple contexts.

 

Thanks

Umesh Kumar   

m.svol
Offline
Joined: 2010-09-02
Rate this post:
0
No votes yet

Dear customer,

You can take a look at the samples on this page: http://www.griaulebiometrics.com/page/en-us/downloads
Unfortunatelly we don't have samples demonstrating the use of multiple contexts. The samples are just for the users to have an idea on how the application works and help then start with their own.

Best regards,

 

--
Matheus Smythe Svolenski
Griaule Biometrics Support Team