-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
Null pointer exception with XML builder #1039
Comments
This seems to be a behavior triggered by the xml document that you're trying to parse. Is it possible to paste a minimal xml document that reproduces this behavior ? |
hmm not easily. I'm not providing the XML. The XML is generated by the ViewPoint library as a soap request object, so I don't know what XML is being produced |
So I've done some more digging, it seems that the
In particular, the error is coming from the setting of the default namespace. If i remove that line then the error goes away (except that a new error appears after but I'm hoping that it's related to this) The |
Another update. I've managed to work around this now, as it seemed to primary be issues with the library I was using, however I'm still confused why it stopped working with the update to JRuby. The main issue was due to the library I'm using not having the Where I'm not sure about however, is in the namespace setting. The library I'm using starts building with the following
Previously on mri ruby, this had no issues, but after solving the first problem, this code then had an issue that the header and body tags did not have a namespace prefix. Is this an issue with the Java implementation that the namespace must be explicitly defined, or is this something else? I've currently monkey patched it to the following which seems to now be working
Is this the correct way of doing things or is this still likely to have issues? |
I had a fix for the null pointer exception on the https://github.com/sparklemotion/nokogiri/tree/fix-1039 branch. This fixes the null pointer exception, but I looked at the two docs generated by JRuby and MRI and there are slight differences in the namespaces that I'd like to write tests for and fix before merging this branch. |
Ah great! I'll keep my patch in for now and then hopefully this will fix the issues I was having completely :) |
@pareeohnos Is this still happening for you? Without a test to reproduce your issue, I can't be sure that @jvshahid's fix actually works. |
I've rebased @jvshahid's change onto master and pushed it. Will be in the next version, I hope it fixes your issue! |
Thanks for the update @flavorjones |
I'm trying to create an app that connects with an exchange server using EWS, and using the library ViewPoint for handling this.
Previously I was writing the app in MRI ruby, but we've now switched over to jRuby, and I've now noticed that it has completely broken the exchange interface code. I know the code works, and the ViewPoint library hasn't been updated at any point, but I'm not sure whether the bug lies in their code, or nokogiri, but essentially when I attempt to request data from the server, I receive the following stack trace (sorry about the size)
I'm using jRuby 1.7.10 but I've also tested it on an older version of jRuby (1.7.5) in case it broke between versions, but that is still broken.
My assumption is it's a break within nokogiri as the stack trace does not have any reference to either my code, or the ViewPoint code, but I can't be sure.
The text was updated successfully, but these errors were encountered: