Java annotated classes in JRuby

I’ve searched quite a bit for an answer to this, which usually tells me
I’m asking a stupid question. With that being said, here goes:

I am piloting a project using JRuby/Cucumber to test a Spring/Hibernate
application. The existing application makes heavy use of annotation
configuration. While I can load up Spring/Hibernate environments in
JRuby with explicit resource mappings & bean definitions, it is not
working with an annotation-based configuration. All the annotation
processing is done by the imported spring classes, so I don’t see why it
wouldn’t work?

Most of the conversation I see revolves around annotating JRuby classes,
but not problems with annotated java classes being included in JRuby.
Fundamentally, I don’t understand why this doesn’t work. I’ll spare the
code here, as I’m not sure it’s relevant; I’m more interested in
understanding if/why I’m barking up the wrong tree.

Thanks in advance.

CONFIDENTIALITY NOTICE and DISCLAIMER
This message and any attachment are confidential and may be
privileged or otherwise protected from disclosure and solely for
the use of the person(s) or entity to whom it is intended. If you
have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this
message and any attachment from your system. If you are not the
intended recipient, be advised that any use of this message is
prohibited and may be unlawful, and you must not copy this
message or attachment or disclose the contents to any other person.

On Wed, May 18, 2011 at 10:57 PM, Matt S. [email protected]
wrote:

I’ve searched quite a bit for an answer to this, which usually tells me I’m
asking a stupid question. With that being said, here goes:

I am piloting a project using JRuby/Cucumber to test a Spring/Hibernate
application. The existing application makes heavy use of annotation
configuration. While I can load up Spring/Hibernate environments in JRuby
with explicit resource mappings & bean definitions, it is not working with
an annotation-based configuration. All the annotation processing is done by
the imported spring classes, so I don’t see why it wouldn’t work?

Wild guess: classloader issues?

Most of the conversation I see revolves around annotating JRuby classes, but
not problems with annotated java classes being included in JRuby.
Fundamentally, I don’t understand why this doesn’t work. I’ll spare the
code here, as I’m not sure it’s relevant; I’m more interested in
understanding if/why I’m barking up the wrong tree.

I haven’t worked with Spring but for those who did it might be useful
if you explain what “does not work” exactly means. Do you have a log
file with errors? Or what is it exactly that does not work?

Cheers

robert


remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs