KevinCorcoran has quit [Remote host closed the connection]
skade has joined #jruby
skade has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
lance|afk is now known as lanceball
rcvalle has quit [Quit: rcvalle]
e_dub has quit [Quit: Leaving]
vikaton has joined #jruby
baroquebobcat has quit [Quit: baroquebobcat]
mje113__ has quit [Quit: Connection closed for inactivity]
e_dub has joined #jruby
camlow325 has quit [Ping timeout: 258 seconds]
blaines has quit [Ping timeout: 246 seconds]
KevinCorcoran has joined #jruby
KevinCorcoran has quit [Ping timeout: 265 seconds]
AnoHito has quit [Ping timeout: 252 seconds]
skade has joined #jruby
AnoHito has joined #jruby
skade has quit [Ping timeout: 272 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum opened issue #2942: [Truffle] Bad frame descriptor args in module_exec http://git.io/vU594
JRubyGithub has left #jruby [#jruby]
colinsurprenant has joined #jruby
ryez has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vU5Q7
<JRubyGithub>
jruby/master 617ce76 Kevin Menard: [Truffle] Allow nil.extend to work.
JRubyGithub has left #jruby [#jruby]
vikaton has quit []
Aethenelle has joined #jruby
colinsurprenant has quit [Quit: colinsurprenant]
<darrickw>
Hi all, I'm running into an odd problem maybe someone here may have an insight on...
<darrickw>
I'm using warbler to run an app that has some jar dependencies and also a jar extension in one of my libraries.
<darrickw>
Under rspec or irb, the app boots fine. Previously it also worked fine under torquebox 3, but I'm trying to move to warbler and simplify my deployment
<darrickw>
When jetty boots from my war file, it comes up with this exception:
digitalextremist has quit [Ping timeout: 272 seconds]
<darrickw>
(NameError) cannot initialize Java class (my class name)
<darrickw>
I have previously experienced this when I tried to run "rackup config.ru" because I hadn't given the app additional permgen space, but I am booting the app with lots...
dinfuehr has quit [Remote host closed the connection]
yosafbridge has joined #jruby
dinfuehr has joined #jruby
shellac has joined #jruby
<cprice404>
kares: sorry, missed your message a minute ago. wondering if anyone knows anything about performance impact of the 'jruby.reify.classes' system property
elia has quit [Ping timeout: 258 seconds]
dinfuehr has quit [Remote host closed the connection]
elia has joined #jruby
dinfuehr has joined #jruby
<kares>
cprice404: used it - have not noticed any impact
<cprice404>
kares: interesting; curious if there's a compelling reason it's not on by default then
<kares>
... but if you're to generate zillion of RubyClass-es at runtime then there might be some (perm-gen filling up)
<kares>
cprice404: probably cause it's only useful for debugging
<kares>
(profiling etc.)
dinfuehr has quit [Ping timeout: 256 seconds]
<cprice404>
kares: yeah, it's sooooo useful for debugging though, that i'm tempted to turn it on by default for our apps unless there is some perf impact. haven't seen any permgen issues with runs that had it, so far, but haven't done "normal" perf benchmarking.
<cprice404>
was thinking of trying to set up a few perf tests for our stuff today but curious if anyone already knew the answer, to save me the hassle :)
<kares>
cprice404: certainly won't hurt to have :)
<kares>
if you look at the source it's some byte-code generation as the RubyClass/Module is added on the system
elia has quit [Read error: Connection reset by peer]
<kares>
so it will largely depend on those being created at runtime (for most apps they're usually created during boot time)
elia has joined #jruby
<cprice404>
kares: ok, makes sense. our code probably does do some horrible things like that at runtime... but I haven't seen any permgen issues so far.
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
[jruby] yousuketto opened issue #2945: Module#const_get may return incomplete class http://git.io/vUFaG
<kares>
cprice404: did I mention a 'zillion' classes generated at runtime :) ... I meant a lot in terms of 10-100 thousands magnitude at least
<cprice404>
kares: so maybe higher permgen requirements than with the feature turned off? But should be a reasonably fixed amount as long as the app code isn't doing a lot of class creation at runtime?
<kares>
cprice404: just do not worry about it until you see it
<cprice404>
words to live by
<cprice404>
:)
<kares>
even if the app creates a loto of classes it depends whether they are hold strongly or can be GCd
<cprice404>
ah, that might explain it then
<kares>
be aware that GC does not clean-up perm-gen unless it has to
<cprice404>
right, thx
<cprice404>
wish we could move to java8 right now :)
AnoHito has quit [Read error: Connection reset by peer]
AnoHito has joined #jruby
mike_c_11 has quit [Read error: Connection reset by peer]
elia has quit [Read error: Connection reset by peer]
<bjfish2>
nirvdrum chrisseaton i’d like to add FD_CLOEXEC to RubiniusConfiguration rbx.platform.fcntl.FD_CLOEXEC , should I just set this to 1? it looks like it’s set to 1 everwhere, one file notes “FD_CLOEXEC is mysterious”
<nirvdrum>
It's currently missing from jnr-constants.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 2 new commits to master: http://git.io/vUbMM
<JRubyGithub>
jruby/master 9de1ec5 Benoit Daloze: [Truffle] Add a backtrace_filter for MSpec....
<JRubyGithub>
jruby/master 7751d72 Benoit Daloze: [Truffle] Fix return type of asRubyStringArray.
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
I'd like to get it in there, but doing so was going to require messing with the generator again so the "fake" values are correct, or regenerating the fnctl constants file for every platform, which I can't do.
<nirvdrum>
bjfish2: I don't suppose you know why Rubinius doesn't have it already?
<bjfish2>
nirvdrum should I set it to 1 in RubiniusConfiguration and add a TODO mentioning JNR-Contstants?
<bjfish2>
nirvdrum i didn’t check where Rubinius sets it
<nirvdrum>
bjfish2: Yeah, just add it and set it to 1 for now, with a comment to remove when jnr-constants is updated.
shellac has quit [Ping timeout: 245 seconds]
havenwood has quit [Ping timeout: 252 seconds]
<bjfish2>
nirvdrum stdlib ffi mentions FD_CLOEXEC a lot so maybe Rubinius gets it from there
<nirvdrum>
Sorry, I thought this was one of the files from Rubinius that had hard-coded values. My bad.
<nirvdrum>
I mean, arguably it's not broken for what it's intended for.
<nirvdrum>
But if that's being picked up by any of the ppcle64 people, they're going to have a miserable time debugging that.
<enebo>
nirvdrum: personally I think fake values are a mistake in general
<nirvdrum>
I'm leaning that way.
<enebo>
nirvdrum: perhaps some unixy constants are so consistent they will work but I am no longer qualified to know those
aemengo__ has joined #jruby
<nirvdrum>
But removing them means the various platforms need to be shored up.
<enebo>
nirvdrum: but I think fake are also used by constants when native will not load?
<enebo>
nirvdrum: which arguably may be wrong as with native, but we cannot have non-native not run at all
<nirvdrum>
Yeah, they're the fallback. So you'd have to have them available as native for each supported platform.
<enebo>
nirvdrum: but if native loads we should not be using them. If we don’t have them defined we should just fail to load native
<nirvdrum>
jnr-constants is divorced from the concept of native entirely, however. It looks for os.arch-specific, then os-specific, then fake.
<enebo>
nirvdrum: yeah so that is probably how we got to this point
<nirvdrum>
So you can and will end up using fake values with native calls.
<nirvdrum>
I fixed the Fcntl fake values because it was messing up native calls in Windows.
<enebo>
nirvdrum: but if native loads and we have no constants for that platform I sort of feel like we should be raising
<nirvdrum>
But, like I said, for ppcle64, I don't see any native constants at all.
<nirvdrum>
I think I agree.
<enebo>
nirvdrum: yeah so support was added but no one bothered to update this package probably because no one remembered
<enebo>
nirvdrum: a hard error would have forced that point
<nirvdrum>
Or the fake values really need to be more accurate. E.g., if all known platforms start at 0, starting at 1 shouldn't be what fake does. But then you're overloading fake.
<enebo>
nirvdrum: it might be a testament to how well fake ones do common things?
<nirvdrum>
I think you can get things that don't raise, but don't quite work, and not realize it.
<enebo>
nirvdrum: yeah definitely
<enebo>
nirvdrum: I would be really worried about fcntl in particular :)
<nirvdrum>
I don't think the Windows calls were failing, but they weren't setting the permissions on the file correctly.
<enebo>
nirvdrum: who knows what you are doing to that fd
<nirvdrum>
I was specifically writing a test for that, so I noticed it was weird.
<nirvdrum>
enebo: On a related note, have you seen chrisseaton's report about native not loading on MacOS X?
<nirvdrum>
It's been confirmed with a few Mac users. But, I don't have a Mac so I couldn't really fix it.
<nirvdrum>
I think because JRuby has decent fallbacks, it's been broken and you guys just didn't notice.
<nirvdrum>
For some reason, the .dylib vs .jnilib lookup fallover isn't working.
<enebo>
but we still eventually load it or just happen to load it perhaps because we still have a file in the right place?
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] splattael opened issue #2946: respond_to_missing? does not convert method to symbol http://git.io/vUNnQ
<enebo>
jruby -Xnative.verbose=true -e 1
<enebo>
Successfully loaded native POSIX impl.
<nirvdrum>
Try a clean checkout?
<nirvdrum>
The native libs aren't version-controlled.
<nirvdrum>
They're unpacked and I have no idea what mvn clean does for that.
<enebo>
nirvdrum: yeah perhaps it is working because my dev dir is pretty old
<enebo>
I will re-clone and see
<nirvdrum>
What does your lib/jni/Darwin/ have in it?
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 2 new commits to master: http://git.io/vUNc0
<JRubyGithub>
jruby/master 22e2ed7 Thomas E. Enebo: push IRScope to base class for block bodies (will make it easier to convert blocks in define_method to full methods later)
<JRubyGithub>
jruby/master a1e06a2 Thomas E. Enebo: Combine full build and JIT executor code. This will help prevent changes over time of having two...
JRubyGithub has left #jruby [#jruby]
<enebo>
nirvdrum: 296 libjffi-1.2.jnilib
<enebo>
OHHHHH
<enebo>
nirvdrum: I am still on Mavericks and not Yosemite
<enebo>
nirvdrum: perhaps this has something to do with OS update
<nirvdrum>
chrisseaton: What are you running?
arturaz has quit [Ping timeout: 250 seconds]
<nirvdrum>
I thought it might be a change in libc, but the native part seems to work if the file is simply renamed.
<nirvdrum>
I think instead of returning null, it's raising an exception when trying to load the non-existent file.
<chrisseaton>
nirvdrum: 10.10.3
<enebo>
10.9.5
<nirvdrum>
enebo: Is there any need for this search strategy in StubLoader anyway? JFFI native only ships with the .jnilib variant.
<enebo>
nirvdrum: yeah I don’t know. I have never did anything with jffi other than compile the windows bits
<nirvdrum>
Is there a manager I can talk to?
<enebo>
nirvdrum: but this must have been working for headius at some point. he is on Mavericks and was fixing native bugs
<nirvdrum>
Hmm... and he's traveling, right?
<enebo>
nirvdrum: So either he has the right extra magic file somewhere and luckily picked it up
<nirvdrum>
No rush. But if it loading is problematic on Yosemite, it'd be good to get resolved before RC1.
<enebo>
nirvdrum: yeah I am not sure he is around today
<enebo>
nirvdrum: It may be time for me to eat a tosemite sandwich
<enebo>
err yosemite
<chrisseaton>
It stopped working the other day and I'm not sure what changed
<chrisseaton>
Me, bjfish and ptr-chalupa it just stopped working at some point
<nirvdrum>
chrisseaton: It could just be that you started making a call that didn't have a Java implementation.
<enebo>
chrisseaton: can you try -pre2? Is that working?
<nirvdrum>
If the other calls did have fallbacks, it's unlikely you would have noticed if it were broken.
<chrisseaton>
ah maybe - I'll try pre2
<enebo>
nirvdrum: well perhaps but if you are fixing issues with native you would realize native was not loading
<enebo>
someone did just release an artifact on sonatype in the last day but this started before that right?
<nirvdrum>
I've been working on jnr-posix, but I'm on Linux.
<enebo>
oh that was ruby-maven-libs
mitchellhenke has joined #jruby
<enebo>
jffi 1.2.9 was put out on may 04 and I see 1.3.0-SNAPSHOT was out in late april
<enebo>
we appear to be using 1.2.9 in pom
<enebo>
I guess I will update to yosemite
dinfuehr_ has joined #jruby
<enebo>
I have put it off for a long time
<enebo>
I need to nuke my homebrew install as well unless I want it to last 72 hours
mjelen has quit [Ping timeout: 264 seconds]
mkristian has joined #jruby
mjelen has joined #jruby
<nirvdrum>
Heh.
<nirvdrum>
Well, if we can get to the bottom of the search strategy, this might be a cheap fix.
<chrisseaton>
can't even build pre2 as it has a snapshot dependency that's gone 'Could not resolve dependencies for project org.jruby:jruby-core:jar:9.0.0.0.pre2: Could not find artifact com.github.jnr:jnr-ffi:jar:2.0.3-SNAPSHOT'
<nirvdrum>
chrisseaton: Sucky. But you should be able to download the release tarball.
<enebo>
I search for SNAPSHOT in our codebase before releasing
<chrisseaton>
I do net the native version in pre2
<chrisseaton>
And the only lib is the .jnilib
<chrisseaton>
I do *get* the native version, I mean
<enebo>
chrisseaton: ah so perhaps snapshot of jnr-posix is loading snapshot version of jffi which is older than released version of jffi
<enebo>
chrisseaton: I noticed that jffi 1.3.0-SNAPSHOT is older than 1.2.9 release
<enebo>
by almost two weeks
<nirvdrum>
I don't see the snapshot mentioned anywhere. But I could be missing something.
<nirvdrum>
chrisseaton: Just to be clear, you're seeing the message that native loaded. Or you're just not seeing an exception?
colinsurprenant has joined #jruby
<chrisseaton>
In the pre2 tarball I see 'Successfully loaded native POSIX impl.'
<nirvdrum>
Funky.
<mkristian>
nirvdrum, if you check out 9.0.0.0.pre2 you find a SNAPSHOT in core/pom.rb but not in core/pom.xml
<chrisseaton>
But that's from how JRuby proper loads it - that's why I wanted to build the source code to modify Truffle to specifically request the native version, as it does at the moment, which is where it fails
colinsurprenant has quit [Client Quit]
<enebo>
ok so I am confused jnr-posix snapshot still points at a released version of jnr-ffi which points at 1.2.9 of jffi
<nirvdrum>
mkristian: So is this just the new maven stuff messing up?
<nirvdrum>
chrisseaton: ^ Sounds like you might be able to build by changing pom.rb.
<enebo>
so unless there is another transitive dep replacing 1.2.9 with 1.3-SNAPSHOT I don’t get this error
<mkristian>
nirvdrum, looks like though you need the .mvn/extensions.xml to tell maven to use pom.rb instead of pom.xml.
<nirvdrum>
mkristian: Would that mvnw wrapper affect things?
<mkristian>
but should add an "enforcer" which fails the moment the pom is release and depends on snapshots - should be possible
<nirvdrum>
Well, these are tagged releases. They should ideally build the same way they used to.
<mkristian>
mvnw is just proper maven which gets downloaded on the first time used. but if you use mvnw then you have probably .mvn/extensions.xml as well
<mkristian>
since the config for mvnw is in .mvn/wrapper or so
<mkristian>
any build changes need to be done in those pom.rb files - otherwise travis will NOT pick them up :)
<nirvdrum>
Okay, so with the newer maven, you can either build older JRuby releases, but not current ones, vice versa, depending on the presence of this file?
<chrisseaton>
that works in pre2, doesn't work as per the issue on master
<chrisseaton>
we use getNativePOSIX as we can't use the fallback
<enebo>
chrisseaton: so non-snapshot 2.0.3 works for pre2
<chrisseaton>
yeah
<enebo>
chrisseaton: something had to change dep-wise between then and now (excluding the -SNAPSHOT snafu)
<enebo>
chrisseaton: obviously jnr-posix has been churning but I don’t see how that by itself changes anything unless other snapshots are also in play
donV has joined #jruby
<mkristian>
nirvdrum, the problem is only when the those files are not in sync. .mvn directory is part of git - so it should not be there on older checkout.
<nirvdrum>
Gotcha.
<nirvdrum>
Thanks for clarifying.
<mkristian>
enebo, it looks like the tag is kind of wrong since on maven central the pom.xml for 9.0.0.0.pre2 has not snapshots !
<enebo>
mkristian: yeah someone had pushed I think a travis commit while I was releasing
<enebo>
err trfulle commit
<enebo>
mkristian: so the actual tagging end up on wrong commit and I did not want to deal with it. We have so many release issues due to maven that I always wait until last moment ot tag
<JRubyGithub>
[jruby] nirvdrum opened issue #2947: [Truffle] Issue with zsuper calls and option arguments http://git.io/vUN9z
kfpratt has joined #jruby
camlow325 has quit [Remote host closed the connection]
camlow325 has joined #jruby
<nirvdrum>
Why does GitHub have an "Edit" button for an issue title, but a pen icon to edit an issue body? I don't think I've ever intentionally clicked on the right one first.
tcrawley is now known as tcrawley-away
KevinCorcoran has joined #jruby
camlow325 has quit [Remote host closed the connection]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
donV has quit [Quit: donV]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
camlow325 has joined #jruby
KevinCorcoran has quit [Ping timeout: 272 seconds]
deobalds has quit [Quit: Computer has gone to sleep.]
dinfuehr_ has joined #jruby
camlow325 has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rcvalle has joined #jruby
camlow325 has joined #jruby
dinfuehr_ has quit [Ping timeout: 256 seconds]
camlow325 has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vUAUg
<JRubyGithub>
jruby/master 13870c7 Kevin Menard: [Truffle] Untagged some passing Module specs.
JRubyGithub has left #jruby [#jruby]
camlow325 has joined #jruby
x1337807x has joined #jruby
camlow325 has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian opened issue #2948: various issues launching script from runnable jar http://git.io/vUAIO
<aemengo__>
Help, I was wondering how can specify a specific ruby build version when compiling their own jruby. For instance, jruby with either ruby 2.0.0 or ruby 1.9.3
bbrowning is now known as bbrowning_away
<nirvdrum>
aemengo__: Are you looking to compile a default mode? Otherwise, JRuby compiles with all of them and you just pick the version you want at start-up.
CustosLimen has quit [Ping timeout: 258 seconds]
<nirvdrum>
In JRuby 1.7, the default is 1.9.3 mode. But you can run in 2.0 mode with the --2.0 flag.
<mkristian>
aemengo__, when you build jruby with mvn you can add -Djruby.default.ruby.version=2.0
<mkristian>
so the distribution artifact will have another default
<mkristian>
with jruby-9k there is nothing like this since there is only ruby 2.2
dinfuehr_ has joined #jruby
mkristian_ has joined #jruby
mkristian_ has joined #jruby
dinfuehr_ has quit [Ping timeout: 252 seconds]
KevinCor_ has quit [Remote host closed the connection]
dinfuehr has quit [Quit: dinfuehr]
KevinCorcoran has joined #jruby
mkristian has quit [Read error: Connection reset by peer]
tcrawley-away is now known as tcrawley
elia has quit [Quit: Computer has gone to sleep.]
skade has quit [Remote host closed the connection]
skade has joined #jruby
camlow325 has joined #jruby
skade has quit [Client Quit]
camlow32_ has joined #jruby
enebo has quit [Quit: enebo]
<chrisseaton>
has anyone here got experience mapping native types to JFFI (or JNR - not sure what layer does that)?
camlow325 has quit [Ping timeout: 255 seconds]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
rsim has quit [Quit: Leaving.]
shellac has joined #jruby
bbrowning_away is now known as bbrowning
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 1 new commit to master: http://git.io/vUA9c
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/master df5438f Benoit Daloze: [Truffle] "Fix" regression on psd-compose-linear-dodge....
<mjc_>
I wish indy worked better with big apps, it does great things for some of my tiny ones
<chrisseaton>
mjc_: what goes wrong? just not as fast as you'd like?
<mjc_>
much slower than no-indy and it doesn't seem like any amount of warmup we're willing to pay makes it as fast as warmed up no-indy
oko has left #jruby ["peace ! i'm out !!"]
KevinCorcoran has quit [Remote host closed the connection]
camlow32_ has quit [Remote host closed the connection]
<mjc_>
though I will admit to not having tried it on 9k in a while
<mjc_>
funny because if we take our hot path and make it a separate benchmark it's a dramatic speedup
<chrisseaton>
What do you do to turn your hot path into a benchmark? Is it a copy paste or do you have to mock lots of things out?
<mjc_>
pull in only activerecord and a couple non-rails gem
<mjc_>
it seems like all the rails overhead and indy don't get along
<chrisseaton>
mjc_: well I'm sure headius would love the test case
skade has joined #jruby
<mjc_>
I wish I could give it :(
<chrisseaton>
Oh yeah of course
<mjc_>
I have given several others when I could, though
<mjc_>
IIRC on 1.7 blank rails apps exhibit the same problem with indy
<mjc_>
I should probably retest instead of saying that though
camlow325 has joined #jruby
camlow325 has quit [Remote host closed the connection]
KevinCorcoran has joined #jruby
baroquebobcat has joined #jruby
mister_solo has quit [Ping timeout: 246 seconds]
chamila has joined #jruby
camlow325 has joined #jruby
rsim has joined #jruby
<bbrowning>
mjc_: in some of my testing, it took tens of thousands of requests to fully warm up just one request path in a smallish rails app
<bbrowning>
and that needed to be done for each non-overlapping request path
<bbrowning>
this was w/ 1.7's indy
<bbrowning>
the speedup was there, but the warm up period was far longer
pietr0 has joined #jruby
<darrickw>
Hi all, I came online last night to ask this but apparently missed everyone :) Anyway, I've continued to try and I'm having trouble booting my app when it's packaged with warbler even though it works fine in other contexts
<bbrowning>
ahh looking over my notes it's actually not a longer warmup - it's just a lot slower than non-indy before warm up
<mjc_>
bbrowning: our big apps need hundreds of thousands, super weird
<darrickw>
My app has several java dependencies and also a gem with a java extension.
<bbrowning>
mjc_: I'm not surprised - pretty much a minimal rails 4 app took 25k requests to fully warm up just one part of it
<darrickw>
under warbler, I get a "cannot initialize Java class ..." error at some point
<darrickw>
I was able to reproduced this problem with plain jruby if my permgen was set too small
<darrickw>
So I'm thinking that may be a problem, but when I boot the war, I do give it plenty...
<mjc_>
darrickw: this is probably hard to diagnose without a traceback
<darrickw>
I can probably give you anything you need...
<mjc_>
though I am probably not very good at diagnosing this exact issue, other people probably are
<darrickw>
the project is proprietary though...
<mjc_>
yeah, that's always the hard part, heh
<mjc_>
what java version?
<darrickw>
Here's what I've verified:
<darrickw>
1.7
<mjc_>
ok
<darrickw>
jruby 1.7.20
<darrickw>
latest warbler
<mjc_>
is it a nameerror?
<aemengo__>
nirvdrum: sorry for missing the earlier message. Yes, that's exactly what I want. how do I specify 2.0 mode when compiling with the `mvm` comand
<darrickw>
yes, it's a NameError
<darrickw>
I've verified that it is in fact loading the jars it depends on
<nirvdrum>
aemengo__: mkristian_ answered shortly after I did. Scroll up a bit.
<darrickw>
and when I require the jar that the failing class is in, require returns true.
<aemengo__>
nirvdrum: oh yes, he did. Thank you. Let me try it.
<darrickw>
and again, the identical program does work outside of warbler
<mjc_>
darrickw: can you hook it up to visualvm and see if anything looks odd?
<darrickw>
I have done that, and if anything I was surprised how little permgen was used
<darrickw>
one suspicion I have is that my app is running inside some container and that is not using the overarching jvm setup
<darrickw>
I've tried both of warbler's webservers
<mkristian_>
darrickw, how did you verify that the jars got loaded ? are those loaded with require into the JRubyClassloader ? how many runtimes do you use with webapp - one or more ?
<darrickw>
number of runtimes is default
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 1 new commit to master: http://git.io/vUx3O
<JRubyGithub>
jruby/master 87ef166 Benoit Daloze: [Truffle] Fix at_exit hooks to allow concurrent and nested interactions.
JRubyGithub has left #jruby [#jruby]
camlow325 has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
<darrickw>
I verified by simply doing `p com.tinkerpop.blueprints.Graph`
<darrickw>
it would raise an exception if the class were not present
baroquebobcat has quit [Quit: baroquebobcat]
<darrickw>
I can alternatively use lock_jar to resolve, download and load classes, or require all jars that I've pre-resolved. Both work outside of warbler, and both fail inside
baroquebobcat has joined #jruby
djbkd has joined #jruby
baroquebobcat has quit [Client Quit]
shellac has quit [Quit: Computer has gone to sleep.]
<mjc_>
darrickw: is the class that is not getting loaded a proprietary one?
<darrickw>
yeah
<mjc_>
drat
<mkristian_>
darrickw, did you look at the output of debug log of loadService ? using the system property jruby.debug.loadService=true - this might give some clues what is different. loading can be quite different between warbler and not-warbler
<darrickw>
no, I haven't looked at that
<darrickw>
can I set that with something like `java -Djruby.debug.loadService=true -jar api.war` ?
<mkristian_>
yes should do
baroquebobcat has joined #jruby
<mkristian_>
bbl
<darrickw>
mkristian_: tried it and it was very verbose about requires, but they seem to have all resolved, including all jars
<aemengo__>
mkristian: sorry I missed your message, it was exactly what I needed. Thank you.
bbrowning is now known as bbrowning_away
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
blaines has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
<darrickw>
mjc_: progress... I've isolated that clojure.lang.RT, which my class depends on also does not load
havenwood has quit [Ping timeout: 276 seconds]
<darrickw>
that despite I can clearly see that the clojure jar has been loaded
<mkristian_>
darrickw, I have one more thing. on the command line org.jruby.Main does leverage the JRubyClassloader to be TCC (the thread context classloader). this does NOT happen when run inside a webcontainer
<mkristian_>
can it be that some class tries to load other classes via TCC ?
<darrickw>
yeah. It seems to be my clojure dependency that is unhappy
<darrickw>
it's probably doing something like that...?
<darrickw>
I switched from using require to java_require in the jar loading step and it fails earlier... again failing to load clojure.lang.RT
chamila has quit [Quit: Page closed]
skade has joined #jruby
<mkristian_>
darrickw, what you can try is: java.lang.Thread.currentThread.setContextClassLoader( JRuby.runtime.jruby_class_loader)
<mkristian_>
before requiring any jars
<darrickw>
ok, I'll give that a try now...
<darrickw>
takes a few minutes...
<mkristian_>
I am curious .... I will be around
dinfuehr has joined #jruby
<darrickw>
that worked
<darrickw>
:D
<mkristian_>
cool - by the way with 9k it would also fail on the command-line without the TCC hack ;)
<darrickw>
interestingly, I first tried with java_require and that still failed, though there was an effect in that with java_require it failed earlier, but then adding th TCC hack caused it to go back to failing later
<darrickw>
then I switched it back to regular require and that was what worked
<darrickw>
That's also excellent to know because I had run into something similar when testing the stack out with 9k :)
KevinCor_ has joined #jruby
<darrickw>
will the TCC hack cause me any grief down the line that I should be aware of?
KevinCorcoran has quit [Ping timeout: 255 seconds]
<mkristian_>
as long your securityManager allows this and you use only ONE runtime this is OK
sferik has joined #jruby
<darrickw>
one runtime as in only one jruby app running in the webserver?
<mkristian_>
I mean on runtime per servlet container - the default your using with warbler. but it might be even not a problem - just a first thought it could.
<darrickw>
Thanks very much mkristian and mjc for your help! :)
<darrickw>
ok, I'll make a note of that
<mkristian_>
:)
mkristian_ has quit [Ping timeout: 272 seconds]
darrickw has quit [Quit: darrickw]
skade has quit [Quit: Computer has gone to sleep.]
nateberkopec has quit [Read error: Connection reset by peer]
skade has joined #jruby
subbu is now known as subbu|lunch
cremes has quit [Quit: cremes]
bbrowning_away is now known as bbrowning
CustosLimen has joined #jruby
colinsurprenant has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
mkristian_ has joined #jruby
rsim has quit [Quit: Leaving.]
colinsurprenant has joined #jruby
baroquebobcat has quit [Quit: baroquebobcat]
KevinCor_ has quit [Remote host closed the connection]
CustosLimen has quit [Quit: Leaving]
KevinCorcoran has joined #jruby
djbkd has quit [Remote host closed the connection]
<colinsurprenant>
hiya!
<colinsurprenant>
is it possible to return a native Java object from a Java JRuby extension method?
<chrisseaton>
Return it into Ruby code? I think you have to wrap it
<colinsurprenant>
JavaObject.wrap ?
<colinsurprenant>
then on the Ruby side I have to unwrap it?
<chrisseaton>
no on the Ruby side you just use the object, but the runtime needs it to be wrapped
<chrisseaton>
all objects JRuby deals with must be IRubyObject
<colinsurprenant>
right
<colinsurprenant>
so in my ext method I do: return JavaObject.wrap(context.runtime, this.channel);
<chrisseaton>
I believe so - this is not my area of expertise
<colinsurprenant>
but then on the Ruby side, it is not recognized as a Java object, when I try to call a mothod on it is says undefined method .. for #<Java::JavaObject:0x37e4cc68>
<colinsurprenant>
hmm....
<chrisseaton>
are you sure the method is correct?
<colinsurprenant>
ah, maybe a mismatched signature, hold on
<colinsurprenant>
does not seem like it, getting NoMethodError regardless of the method parameters… :/