[jruby-user] cannot link Java class

27 views
Skip to first unread message

Samantha K.

unread,
Jun 10, 2013, 11:51:13 AM6/10/13
to us...@jruby.codehaus.org
include Java

require '/Users/sk/Downloads/Record.jar'
java_import 'net.patient.rest.PatientREST'


JRuby Code:
class PatientRecordController < ApplicationController

def index
PatientREST.getREST()
end

end



When i run this JRuby on Rails code I get a routing error:

cannot link Java class net.patient.rest.v2.PatientREST, probable missing
dependency: org/jboss/resteasy/spi/ApplicationException


meanwhile in my java code that i am trying to include I

"import org.jboss.resteasy.spi.ApplicationException;"

--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Charles Oliver Nutter

unread,
Jun 10, 2013, 12:30:23 PM6/10/13
to jruby-user
I'm guessing there's another jar needed for that class. Make sure
you've got all appropriate dependency jars getting required as well.

- Charlie

Thomas E Enebo

unread,
Jun 10, 2013, 5:47:26 PM6/10/13
to us...@jruby.codehaus.org
I will also add that when we java_import 'some_class' using the string format we actually get the proper error of which class is missing (in this case ApplicationException).  When we use constant format it is an error without specifying ApplicationException.  I think we should try and make these errors consistent message-wise.

-Tom

--
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom....@gmail.com

Charles Oliver Nutter

unread,
Jun 11, 2013, 12:38:54 PM6/11/13
to jruby-user
Filed https://github.com/jruby/jruby/issues/799 for this.

- Charlie

Thomas E Enebo

unread,
Jun 11, 2013, 6:24:55 PM6/11/13
to us...@jruby.codehaus.org
heh...nice!  Perhaps I should have did that instead of drive-by comment :)

-Tom
Reply all
Reply to author
Forward
0 new messages