I am getting this error when I call a java method from inside xquery script. I am using basex 7.8.2
Java constructor initialization (aBlob:new) went fine. Even I can call close method w/o any issue.
but when I call insertImage3 in xquery script, I am getting error
[FORG0006] Unknown method
I compiled the class into jar file and put it into libs folder of basex installation folder. I am using basexgui.bat to open basex gui that will load all jars in libs folder.
Is there anything I could not see here?
I appreciate your help
Stopped at D:/StepToDAR/DARImport.xq, 90/35: [FORG0006] Unknown method: AddBlob.insertImage2(AddBlob, xs:integer, xs:string).
declare namespace aBlob ="com.ferguson.blobmanager.AddBlob";
let $bm := aBlob:new($connUrl,$username,$passwd) let $r1 := aBlob:insertImage2($bm,xs:integer(3333),xs:string("eeeee"))
public class AddBlob { public AddBlob (String connUrl,String username,String passwd) throws SQLException {
} public void insertImage3( String fileName, int id) { System.out.println ("test message here"); } public void close () throws SQLException { connection.commit(); connection.close(); } }
Hi Erol, in the example you call insertImage2 from Xquery but the class declarea an insertImage3 method. Are you sure the issue is not this one? Cheers, Marco.
On 05/28/2014 01:23 AM, Erol Akarsu wrote:
I am getting this error when I call a java method from inside xquery script. I am using basex 7.8.2
Java constructor initialization (aBlob:new) went fine. Even I can call close method w/o any issue.
but when I call insertImage3 in xquery script, I am getting error
[FORG0006] Unknown method
I compiled the class into jar file and put it into libs folder of basex installation folder. I am using basexgui.bat to open basex gui that will load all jars in libs folder.
Is there anything I could not see here?
I appreciate your help
Stopped at D:/StepToDAR/DARImport.xq, 90/35: [FORG0006] Unknown method: AddBlob.insertImage2(AddBlob, xs:integer, xs:string).
declare namespace aBlob ="com.ferguson.blobmanager.AddBlob";
let $bm := aBlob:new($connUrl,$username,$passwd) let $r1 := aBlob:insertImage2($bm,xs:integer(3333),xs:string("eeeee"))
public class AddBlob { public AddBlob (String connUrl,String username,String passwd) throws SQLException {
}
public void insertImage3( String fileName, int id) { System.out.println ("test message here"); } public void close () throws SQLException { connection.commit(); connection.close(); } }
Marco
It is typo error in copying and pasting email I am sure that java class has same method name called in xquery script
Sent from my iPhone
On May 28, 2014, at 2:47 AM, Marco Lettere marco.lettere@dedalus.eu wrote:
Hi Erol, in the example you call insertImage2 from Xquery but the class declarea an insertImage3 method. Are you sure the issue is not this one? Cheers, Marco.
On 05/28/2014 01:23 AM, Erol Akarsu wrote: I am getting this error when I call a java method from inside xquery script. I am using basex 7.8.2
Java constructor initialization (aBlob:new) went fine. Even I can call close method w/o any issue.
but when I call insertImage3 in xquery script, I am getting error
[FORG0006] Unknown method
I compiled the class into jar file and put it into libs folder of basex installation folder. I am using basexgui.bat to open basex gui that will load all jars in libs folder.
Is there anything I could not see here?
I appreciate your help
Stopped at D:/StepToDAR/DARImport.xq, 90/35: [FORG0006] Unknown method: AddBlob.insertImage2(AddBlob, xs:integer, xs:string).
declare namespace aBlob ="com.ferguson.blobmanager.AddBlob";
let $bm := aBlob:new($connUrl,$username,$passwd) let $r1 := aBlob:insertImage2($bm,xs:integer(3333),xs:string("eeeee"))
public class AddBlob { public AddBlob (String connUrl,String username,String passwd) throws SQLException {
} public void insertImage3( String fileName, int id) { System.out.println ("test message here"); } public void close () throws SQLException { connection.commit(); connection.close(); } }
basex-talk@mailman.uni-konstanz.de