[rjb-users] Two-Argument Contructor - Constructor not found

Wes Hays weshays at gmail.com
Wed Dec 12 02:01:45 EST 2007

I have tried passing the two parameters to a two-argument constructor but it keeps failing.  I googled for the answer for 6 hours now but have not gotten any closer.  Can any see what I am doing wrong on the last line right before the error?

require 'rjb' # Version 1.0.11
Rjb::load(RAILS_ROOT + '/java/lib/iText-2.0.7.jar')

@byteArrayOutputStream = Rjb::import('java.io.ByteArrayOutputStream')
@acroFields = Rjb::import('com.lowagie.text.pdf.AcroFields')
@pdfReader  = Rjb::import('com.lowagie.text.pdf.PdfReader')
@pdfStamper = Rjb::import('com.lowagie.text.pdf.PdfStamper')      
@pdfFormField = Rjb::import('com.lowagie.text.pdf.PdfFormField')

@baos    = @byteArrayOutputStream.new
@reader  = @pdfReader.new_with_sig('Ljava.lang.String;', RAILS_ROOT + '/java/data/regform.pdf')
@stamper = @pdfStamper.new_with_sig("Lcom.lowagie.text.pdf.PdfReader;Ljava.io.ByteArrayOutputStream;", @reader, @baos)

RuntimeError: Constructor not found
        from (irb):12:in `new_with_sig'
        from (irb):12


More information about the rjb-users mailing list