Skip to content
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

DOM2DTMExt nextNode fails when running in J9 #1759

Closed
Taywee opened this issue May 14, 2018 · 2 comments
Closed

DOM2DTMExt nextNode fails when running in J9 #1759

Taywee opened this issue May 14, 2018 · 2 comments
Milestone

Comments

@Taywee
Copy link
Contributor

Taywee commented May 14, 2018

Running this simple script in IBM J9 on AIX:

require 'nokogiri'
Nokogiri::XML.fragment('<root/>')

gives the following error:

    java.lang.IllegalAccessError: Class org/apache/xml/dtm/ref/dom2dtm/DOM2DTMExt illegally accessing "package private" member of class org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode
                   nextNode at org/apache/xml/dtm/ref/dom2dtm/DOM2DTMExt.java:564
                   _firstch at org/apache/xml/dtm/ref/DTMDefaultBase:-1

It seems like J9 is having issues actually seeing these classes as being in the same package. Instead of this sort of package hack, I think it might make more sense to actually inherit DOM2DTM from DOM2DTMExt and only override and replace methods as necessary than to replicate the class and patch methods. I'm not sure if this is a possibility, but I'll be doing some experimentation and making a pull request if I crack it.

Version information

$ ./jruby/bin/nokogiri -v
# Nokogiri (1.8.2)
    ---
    warnings: []
    nokogiri: 1.8.2
    ruby:
      version: 2.3.3
      platform: java
      description: jruby 9.1.17.0-SNAPSHOT (2.3.3) 2018-05-11 d8b1ff9 IBM J9 VM 2.6 on
        pap6470sr10fp10-20170726_05 (SR10 FP10) +jit [aix-ppc64]
      engine: jruby
      jruby: 9.1.17.0-SNAPSHOT
    xerces: XML4J 4.5.28
    nekohtml: NekoHTML 1.9.21
@flavorjones
Copy link
Member

Thank you for reporting, and for submitting a PR addressing this. Looking at the PR.

@flavorjones
Copy link
Member

Your PR commits were merged! This will be fixed in the next release, which should happen in the next few days. Watch https://github.com/sparklemotion/nokogiri/milestone/16 to gauge progress.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants