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

saxon parser #440

Closed
lwedmo opened this Issue Sep 7, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@lwedmo

lwedmo commented Sep 7, 2016

James et al,

I'm curious about HAPI FHIR's use of the saxon parser (saxon-9.1.0.8.jar and saxon9-dom.jar) It seems very lightly used, almost unused. In all of the HAPI FHIR source, grep shows a reference to it's package net.sf.saxon only in org.hl7.fhir.utilities.Utilities in hapi-fhir-structures-dstu2-2.0.jar. net.sf.saxon.TransformerFactoryImpl is the only class referenced. There are 4 saxonTransform methods, which are not directly invoked at all.

My QA group reports that this error message has cropped up coincident with the introduction of the saxon parser into our class path:

16/09/06 15:47:47 Recoverable error on line 1269 of baseEnNoteBody.xsl:
FODC0002: java.io.FileNotFoundException:
/oas/j2ee/dvqa24/applications/iknowmed/iknowmed-reports/stylesheets/hardcopy/ (No such
file or directory)

If I change Utilitites.java, removing the saxonTransform methods to remove the dependency on saxon, will it break anything in FHIR?

    Leonard Edmondson
    McKesson
@euz1e4r

This comment has been minimized.

Show comment
Hide comment
@euz1e4r

euz1e4r Sep 7, 2016

Locally, I hacked Utilities.java removing all references to saxon, rebuilt, dropped saxon from the class path, retested and our FHIR server apparently works fine.

     Len

From: Leonard Edmondson [notifications@github.com]
Sent: Wednesday, September 07, 2016 9:02 AM
To: jamesagnew/hapi-fhir
Subject: [jamesagnew/hapi-fhir] saxon parser (#440)

James et al,

I'm curious about HAPI FHIR's use of the saxon parser (saxon-9.1.0.8.jar and saxon9-dom.jar) It seems very lightly used, almost unused. In all of the HAPI FHIR source, grep shows a reference to it's package net.sf.saxon only in org.hl7.fhir.utilities.Utilities in hapi-fhir-structures-dstu2-2.0.jar. net.sf.saxon.TransformerFactoryImpl is the only class referenced. There are 4 saxonTransform methods, which are not directly invoked at all.

My QA group reports that this error message has cropped up coincident with the introduction of the saxon parser into our class path:

16/09/06 15:47:47 Recoverable error on line 1269 of baseEnNoteBody.xsl:
FODC0002: java.io.FileNotFoundException:
/oas/j2ee/dvqa24/applications/iknowmed/iknowmed-reports/stylesheets/hardcopy/ (No such
file or directory)

If I change Utilitites.java, removing the saxonTransform methods to remove the dependency on saxon, will it break anything in FHIR?

Leonard Edmondson
McKesson


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttp://cp.mcafee.com/d/avndxMwrho7cFKc8Lc6PqaaqbParXW9J55d5VBdNB4SrdCRr5vFiIendILEL2H10sCaEc83JsZwl89ILyH3bz8GZHzMGgpo7f_pReN1wSrdCPpesRG9px6kOrp3BY4tl-CAouoMDGQyXFeksBizvQNxyVISYesdCXCQPrNKVJUSyrh, or mute the threadhttp://cp.mcafee.com/d/k-Kr6x0SyMepjsohuodCQkkQnCkTTQjqaaqbParza9ISrdGSa_iBosKrpvhu5m20Vclgog7qVX0Ggjpv5m6n6hlXn7xkwOMev-PGty31ISrdCOsVHkiP2cFASO7bV2IVeOJIVlxj6Ukr8kJ6h3O-JP9U832MFcoYGnAaza82zsx4lg1rU4wiWgJom36-7BqfyQ6N02iewgI18SM138Kb3pISYesdCXCQPrNKVJUSyrh.

euz1e4r commented Sep 7, 2016

Locally, I hacked Utilities.java removing all references to saxon, rebuilt, dropped saxon from the class path, retested and our FHIR server apparently works fine.

     Len

From: Leonard Edmondson [notifications@github.com]
Sent: Wednesday, September 07, 2016 9:02 AM
To: jamesagnew/hapi-fhir
Subject: [jamesagnew/hapi-fhir] saxon parser (#440)

James et al,

I'm curious about HAPI FHIR's use of the saxon parser (saxon-9.1.0.8.jar and saxon9-dom.jar) It seems very lightly used, almost unused. In all of the HAPI FHIR source, grep shows a reference to it's package net.sf.saxon only in org.hl7.fhir.utilities.Utilities in hapi-fhir-structures-dstu2-2.0.jar. net.sf.saxon.TransformerFactoryImpl is the only class referenced. There are 4 saxonTransform methods, which are not directly invoked at all.

My QA group reports that this error message has cropped up coincident with the introduction of the saxon parser into our class path:

16/09/06 15:47:47 Recoverable error on line 1269 of baseEnNoteBody.xsl:
FODC0002: java.io.FileNotFoundException:
/oas/j2ee/dvqa24/applications/iknowmed/iknowmed-reports/stylesheets/hardcopy/ (No such
file or directory)

If I change Utilitites.java, removing the saxonTransform methods to remove the dependency on saxon, will it break anything in FHIR?

Leonard Edmondson
McKesson


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttp://cp.mcafee.com/d/avndxMwrho7cFKc8Lc6PqaaqbParXW9J55d5VBdNB4SrdCRr5vFiIendILEL2H10sCaEc83JsZwl89ILyH3bz8GZHzMGgpo7f_pReN1wSrdCPpesRG9px6kOrp3BY4tl-CAouoMDGQyXFeksBizvQNxyVISYesdCXCQPrNKVJUSyrh, or mute the threadhttp://cp.mcafee.com/d/k-Kr6x0SyMepjsohuodCQkkQnCkTTQjqaaqbParza9ISrdGSa_iBosKrpvhu5m20Vclgog7qVX0Ggjpv5m6n6hlXn7xkwOMev-PGty31ISrdCOsVHkiP2cFASO7bV2IVeOJIVlxj6Ukr8kJ6h3O-JP9U832MFcoYGnAaza82zsx4lg1rU4wiWgJom36-7BqfyQ6N02iewgI18SM138Kb3pISYesdCXCQPrNKVJUSyrh.

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Sep 8, 2016

Owner

Hmm, this is interesting. I definitely know for a fact that HAPI itself doesn't use Saxon, but I had to add it to get some of the RI classes to compile. It's quite possible it's not needed at all.

If we can drop it from our dependencies I will certainly be very happy. Saxon is such a mess, it always causes weird failures like the one you're noting.

Are you using the FHR profile validator (InstanceValidator) at all? If not, it's definitely 100% safe to drop saxon. If so, I think I need to check with Grahame what we're using it for..

Owner

jamesagnew commented Sep 8, 2016

Hmm, this is interesting. I definitely know for a fact that HAPI itself doesn't use Saxon, but I had to add it to get some of the RI classes to compile. It's quite possible it's not needed at all.

If we can drop it from our dependencies I will certainly be very happy. Saxon is such a mess, it always causes weird failures like the one you're noting.

Are you using the FHR profile validator (InstanceValidator) at all? If not, it's definitely 100% safe to drop saxon. If so, I think I need to check with Grahame what we're using it for..

@lwedmo

This comment has been minimized.

Show comment
Hide comment
@lwedmo

lwedmo Sep 8, 2016

We are not using the profile validator yet. But even in InstanceValidator, I see that the reference to Saxon is commented out.

-------- Original Message --------
From: James Agnew notifications@github.com
Sent: September 7, 2016 6:32:15 PM PDT
To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com
Cc: Leonard Edmondson leo@waegell.org, Author author@noreply.github.com
Subject: Re: [jamesagnew/hapi-fhir] saxon parser (#440)

Hmm, this is interesting. I definitely know for a fact that HAPI itself doesn't use Saxon, but I had to add it to get some of the RI classes to compile. It's quite possible it's not needed at all.

If we can drop it from our dependencies I will certainly be very happy. Saxon is such a mess, it always causes weird failures like the one you're noting.

Are you using the FHR profile validator (InstanceValidator) at all? If not, it's definitely 100% safe to drop saxon. If so, I think I need to check with Grahame what we're using it for..

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#440 (comment)

lwedmo commented Sep 8, 2016

We are not using the profile validator yet. But even in InstanceValidator, I see that the reference to Saxon is commented out.

-------- Original Message --------
From: James Agnew notifications@github.com
Sent: September 7, 2016 6:32:15 PM PDT
To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com
Cc: Leonard Edmondson leo@waegell.org, Author author@noreply.github.com
Subject: Re: [jamesagnew/hapi-fhir] saxon parser (#440)

Hmm, this is interesting. I definitely know for a fact that HAPI itself doesn't use Saxon, but I had to add it to get some of the RI classes to compile. It's quite possible it's not needed at all.

If we can drop it from our dependencies I will certainly be very happy. Saxon is such a mess, it always causes weird failures like the one you're noting.

Are you using the FHR profile validator (InstanceValidator) at all? If not, it's definitely 100% safe to drop saxon. If so, I think I need to check with Grahame what we're using it for..

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#440 (comment)

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Sep 8, 2016

Owner

Yeah, after spending a bunch of time looking at it I would say you are right.

I'm going to check in a fix to remove Saxon. Sweet.

Owner

jamesagnew commented Sep 8, 2016

Yeah, after spending a bunch of time looking at it I would say you are right.

I'm going to check in a fix to remove Saxon. Sweet.

@jamesagnew jamesagnew closed this in d41b412 Sep 8, 2016

@t106uhn

This comment has been minimized.

Show comment
Hide comment
@t106uhn

t106uhn Sep 8, 2016

Hi james I think this fix could have caused a change in the parsing of contained objects (in my case contained Observations within a DiagnosticReport) during on the FHIR server during a create/update. I'm getting the following error:

HTTP 400 Bad Request: Failed to parse request body as XML resource. Error was: DataFormatException at [[row,col {unknown-source}]: [1,1082]]: Invalid JSON content detected, missing required element: 'resourceType'

t106uhn commented Sep 8, 2016

Hi james I think this fix could have caused a change in the parsing of contained objects (in my case contained Observations within a DiagnosticReport) during on the FHIR server during a create/update. I'm getting the following error:

HTTP 400 Bad Request: Failed to parse request body as XML resource. Error was: DataFormatException at [[row,col {unknown-source}]: [1,1082]]: Invalid JSON content detected, missing required element: 'resourceType'

@t106uhn t106uhn reopened this Sep 8, 2016

@t106uhn

This comment has been minimized.

Show comment
Hide comment
@t106uhn

t106uhn Sep 8, 2016

I'm assuming this fix was added to hapi-fhir 2.1-SNAPSHOT

t106uhn commented Sep 8, 2016

I'm assuming this fix was added to hapi-fhir 2.1-SNAPSHOT

@lwedmo

This comment has been minimized.

Show comment
Hide comment
@lwedmo

lwedmo Sep 9, 2016

Not true. The source base I am working with is 2.0, and I did not commit it to git at all.

-------- Original Message --------
From: t106uhn notifications@github.com
Sent: September 8, 2016 4:05:32 PM PDT
To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com
Cc: Leonard Edmondson leo@waegell.org, Author author@noreply.github.com
Subject: Re: [jamesagnew/hapi-fhir] saxon parser (#440)

I'm assuming this fix was added to hapi-fhir 2.1-SNAPSHOT

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#440 (comment)

lwedmo commented Sep 9, 2016

Not true. The source base I am working with is 2.0, and I did not commit it to git at all.

-------- Original Message --------
From: t106uhn notifications@github.com
Sent: September 8, 2016 4:05:32 PM PDT
To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com
Cc: Leonard Edmondson leo@waegell.org, Author author@noreply.github.com
Subject: Re: [jamesagnew/hapi-fhir] saxon parser (#440)

I'm assuming this fix was added to hapi-fhir 2.1-SNAPSHOT

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#440 (comment)

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Sep 9, 2016

Owner

Hi @t106uhn, I haven't actually pushed a new snapshot build with this fix yet, so unless you're building from source I would say it's doubtful that this specific fix caused your regression.

That is a bizarre error message though- "Failed to parse as XML [...] Invalid JSON". I don't get how it would be doing both.

Can you grab the stack trace and the request headers?

Owner

jamesagnew commented Sep 9, 2016

Hi @t106uhn, I haven't actually pushed a new snapshot build with this fix yet, so unless you're building from source I would say it's doubtful that this specific fix caused your regression.

That is a bizarre error message though- "Failed to parse as XML [...] Invalid JSON". I don't get how it would be doing both.

Can you grab the stack trace and the request headers?

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Sep 9, 2016

Owner

Closing this issue per discussion with @t106uhn

Owner

jamesagnew commented Sep 9, 2016

Closing this issue per discussion with @t106uhn

@jamesagnew jamesagnew closed this Sep 9, 2016

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