Forum: JRuby Jruby/Hibernate/JPA

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E9bca337f6cb53b65169bc50a92b8844?d=identicon&s=25 Crall, Dennis P (Guest)
on 2008-12-31 05:24
(Received via mailing list)
Hi,

I work on a large Java web project that uses Hibernate/JPA for the data
layer. We use the JPA and Hibernate annotations extensively. I'd love to
use
jirb to provide a Rails-like console to our business objects. Is anyone
doing something similar?

I've made some progress, but Hibernate is throwing a
NoClassDefFoundError
exception for commons logging's LogFactory. LogFactory is imported and
available in jirb. I guess I'm looking for an indication that this is
doable
before I spend too much more time on it.

Thank you and thanks for all the hard work on Jruby.

Denny


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

    http://xircles.codehaus.org/manage_email
526d60de6472502bb570a9df2842b33b?d=identicon&s=25 Nick Sieger (Guest)
on 2008-12-31 06:01
(Received via mailing list)
On Tue, Dec 30, 2008 at 10:24 PM, Crall, Dennis P
<dennis-crall@uiowa.edu> wrote:
> available in jirb. I guess I'm looking for an indication that this is doable
> before I spend too much more time on it.

There shouldn't be anything particular you need to do. Does Hibernate
have some unusual classpath structuring expectations?

You should be able to just put the whole lot of jars in your
$CLASSPATH environment variable, start up jirb, and start loading up
classes and objects. Do you have any specific examples you can share
that exhibit the problem?

/Nick

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

    http://xircles.codehaus.org/manage_email
B2625ae7fa60dce7697771ca1ef57444?d=identicon&s=25 Paweł Wielgus (Guest)
on 2008-12-31 08:57
(Received via mailing list)
Hi Denny,
i also have console for my bussines objects but i use simple text
field for script and jsr223 to run the script. If You are interested
in details i can send You the code.
Still as Nick said You should be able to do it with jirb.

Best greetings,
Pawe³ Wielgus.

2008/12/31 Nick Sieger <nicksieger@gmail.com>:
E9bca337f6cb53b65169bc50a92b8844?d=identicon&s=25 Crall, Dennis P (Guest)
on 2008-12-31 17:57
(Received via mailing list)
Weird. I'm not exactly sure what I changed, but I have it working now.
Thanks for the information.

Also, since you mentioned $CLASSPATH, originally I was trying to add my
.class files to the classpath. I was doing something like this:

export CLASSPATH="/project/path/classes/packageroot"

I couldn't get that to work. Is it possible to import .class files? Or
do you need a jar?

Thanks again,

Denny


On 12/30/08 11:01 PM, "Nick Sieger" <nicksieger@gmail.com> wrote:

On Tue, Dec 30, 2008 at 10:24 PM, Crall, Dennis P
<dennis-crall@uiowa.edu> wrote:
> available in jirb. I guess I'm looking for an indication that this is doable
> before I spend too much more time on it.

There shouldn't be anything particular you need to do. Does Hibernate
have some unusual classpath structuring expectations?

You should be able to just put the whole lot of jars in your
$CLASSPATH environment variable, start up jirb, and start loading up
classes and objects. Do you have any specific examples you can share
that exhibit the problem?

/Nick

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

    http://xircles.codehaus.org/manage_email
526d60de6472502bb570a9df2842b33b?d=identicon&s=25 Nick Sieger (Guest)
on 2008-12-31 18:17
(Received via mailing list)
On Wed, Dec 31, 2008 at 10:55 AM, Crall, Dennis P
<dennis-crall@uiowa.edu> wrote:
> I couldn't get that to work. Is it possible to import .class files? Or do
> you need a jar?
>

Directory entries on CLASSPATH should not include any package prefix.
This is a standard Java convention.

/Nick

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

    http://xircles.codehaus.org/manage_email
2e793cdf2d72aecd526a081ae2f1865b?d=identicon&s=25 Johnny P (Guest)
on 2009-01-06 07:31
(Received via mailing list)
Hi Denny,

Once I got the classpath issues behind me I had no problems using
hibernate, etc from JRuby.  So, this is the stanza I use to start my
scripts if it helps.

#!/usr/bin/env jruby

require 'java'

["#{File.dirname __FILE__}/../build/", "#{File.dirname
__FILE__}/../lib/"].concat(Dir["#{File.dirname
__FILE__}/../lib/*.jar"]).each { |jar| $CLASSPATH << jar }



On Wed, Dec 31, 2008 at 9:17 AM, Nick Sieger <nicksieger@gmail.com>
wrote:
>> export CLASSPATH="/project/path/classes/packageroot"
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

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

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.