-
-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadError when deploying to JRuby/Torquebox on Windows #1114
Comments
I'm seeing this on Redhat Linux as well. Seems to be related to version 1.6.2.1. I downgraded to 1.6.1 and the problem went away. |
same here
|
Might be related to 46fcdf9 |
thanks @skarger downgrading did the work
|
Hi @rodowl, the relation to 46fcdf9 is questionable, since that's only in 1.6.3.rc3 and not 1.6.2.1 as originally reported. I'm unable to reproduce. Can anyone provide more information on their system, and perhaps provide a script that reproduces this issue? |
I think the problem comes from XPath performance improvement introduced by the commit, 2e2b204 . |
I hit this problem as well, when upgrading from 1.6.1 to 1.6.2.1. The problem doesn't happen locally on my mac but it does happen on our CI server which is running linux of some kind.
|
Any plans to fix this? I have the same problem in a Centos 5.5, JRuby 1.7.4 and Torquebox 2.3.2. |
@jvshahid can you take a look please? |
@flavorjones I looked at this a bit since nokogiri project on my IDE doesn't work for the same reason. The class loading trouble can be fixed if we include Xalan's jar archives. But, including Xalan's archive fails some tests. So, now I'm looking at those failing tests thinking what the best way. |
Should we revert that commit until we figure out a way to fix it ? |
I think that, given the groundswell of unhappiness before introducing the XPath context caching, we'd simply make it unusable by everybody if we revert that commit. I'd prefer to keep it as-is until we figure out how to fix it, since affected users can still downgrade if necessary. @skarger can you please provide instructions on how to reproduce on Linux? Fair warning: I have no idea how Torquebox works. |
You shouldn't need torquebox to reproduce this bug as I don't use torquebox and hit it. |
I looked up your earlier comment and found the below. "linux of some kind" doesn't give us any information on how to reproduce this bug locally. I run linux on my dev machine and I don't hit this bug. Unless someone can give us an exact distro/version + java version being used to reproduce this bug there's very little we can do.
|
Looks like our CI system runs CentOS 6.5 with IBM JDK 7. I'm guessing IBM JDK is the issue in my case. |
I've got the same error while running a scheduled job. When I run my ruby method by hand it works fine. I downgraded to 1.6.1 and runned the scheduled job again and it worked as plained Operational System: Ubuntu 14.04 (amd64)
|
I'm getting this issue. I'm just going to dump every version of everything I can think of and home something is helpful. Let me know if I can give more information that is helpful. Mac OS X 10.9.4
And here is my full log
|
This appeared to solve it for me, implying that the latest version of Nokogiri is not compatible with Torquebox.
|
I think there is something else at work here. I have two Torquebox applications, both being deployed to the same Torquebox instance. Both have the following in
One of these applications works correctly. The other one has the error. I'll do more debugging this afternoon. |
If you are using Nokogiri only as a dependency for the gems used to test your application (Capybara for example), you can work around this problem by restricting those gems to the test environment in your
|
We're experiencing the same problem both on Windows and on Mac OS X on version 1.6.2 and 1.6.3.1
Torquebox 3.0.2 |
Same problem here with Nokogiri, no Torquebox involved. CentOS 6. So I think it's a nokogiri bug. |
From what I can gather, Nokogiri is depending on some internal JDK classes that it shouldn't. Particularly, ones in the com.sun.org.apache.xpath.internal and com.sun.org.apache.xml.internal packages. This fails on IBM JVMs because it appears the IBM JVMs don't contain those classes. It appears these are classes meant for internal-use-only in Oracle and OpenJDK variants. This fails on TorqueBox because by default the underlying JBoss application server uses something called JBoss Modules to provide class isolation and limit what classes are and aren't visible from the system JDK to user code. It appears these internal classes aren't visible by default, but that can be worked around. I'm working around this in TorqueBox 4 right now, and then will figure out a workaround for TorqueBox 3. Sadly, I don't think there's any workaround possible for IBM JDK users except to stay on an older Nokogiri. The right fix is to remove Nokogiri's dependency on these internal classes and modify it to either depend on an external library or rewrite the code to use a different standard API. |
@bbrowning Thanks for the additional information and research. We'll look into it. |
Any news on that? |
@fpauser Unfortunately, to my knowledge, nobody on nokogiri-core has reproduced this issue. Though we don't need to reproduce it to follow @bbrowning's advice to remove the dependency on the internal classes, it's hard to know we're doing the right thing if we can't reproduce it. Can anyone provide instructions on how to build an environment on which I can reproduce? Or, for extra hugs, provide a docker image? If we can get unblocked on repro we'll fix it. |
I think you can reproduce it by using the IBM JDK: http://www.ibm.com/developerworks/java/jdk/ instead of the Oracle JDK but you'd have to be using linux. |
Or Windows. IBM JDK doesn't support mac environment though. |
Hit the same issue. Fresh server, no leftover rubies, gems of custom java libs. Running torquebox with app deployed gives loooong stacktrace with "org.jruby.exceptions.RaiseException: (LoadError) load error: nokogiri/nokogiri -- java.lang.NoClassDefFoundError: com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider" Full torquebox error: https://gist.github.com/altmind/e4452843a16c58ad6d06 Fixing nokogiri to 1.6.1 alleviates the problem |
Any updates on this issue? |
I'll discuss with @flavorjones and hopefully we can get something out the doors soon. Sorry for the inconvenience everyone. I'm afraid, this could mean reverting back a few commits that would cause performance degradation. |
I just merged in #1212. Can someone verify that master work and that the problem is fixed. |
Trying to test it. |
@ianderse You must use this procedure: git clone https://github.com/sparklemotion/nokogiri
cd nokogiri
bundle
rake gem
gem inst pkg/nokogiri-1.6.7.rc4-java.gem |
@larskanis @jvshahid using nokogiri-1.6.7.rc4 I get the following error: |
@ianderse can you describe the full environment where you got this error, e.g. output of |
@jvshahid I can provide basic information right now, I can work on getting more later. Mac OS X 10.10.5 I can confirm that I do not get this error when using Nokogiri 1.6.6.4. The full backtrace: saml_message.rb:4 is require 'nokogiri' |
I was able to reproduce the error. Thanks @ianderse |
The new jars were missing from the gem, master should be fixed now. |
@jvshahid when I build the gem I get the following error: rake gem |
@ianderse try to run |
@jvshahid that successfully allowed me to build the gem on my local environment, in one of my cloud environments I get the following error when trying to build the gem:
12 problems (2 errors, 10 warnings)rake aborted! Environment: I will try building it locally and testing it that way, but thought you should know about this error as well. |
@jvshahid based on my initial tests, I can confirm that after your recent fix I am able to deploy and no longer seeing the original issues in this thread. Thanks for the hard work! Environment: |
Great. Should I be concerned about the 2 errors you reported earlier ? |
I'm not sure to be honest, I think as long as people are ok with not being able to build the gem themselves in some environments, it's not a big deal. It's also possible that issue was present in previous versions as well as this was the first time I tried building it in that environment. |
I'm downloading the jdk 7u60 from oracle and will try to build the gem using it instead of openjdk. I checked the java docs and everything seems right, not sure why you are seeing this error. Could it be multiple jdk versions on your server ? Do you mind opening a new issue with the error you got and the details you posted in the previous comment. That way we can keep track of it and I can ping you if I need more details later. I'll go ahead and close this issue since you think master resolved the issue. |
Ruby: JRuby 1.7.11
Rails: 4.0.5
Nokogiri: 1.6.2.1
OS: Windows 2008 Server (64bit)
Torquebox: 1.3.1
Java: 1.7.0_40-b43
Starting the rails-app gives me:
Older versions of Nokogiri (tried it with 1.5.11) work.
The text was updated successfully, but these errors were encountered: