SapMachine icon indicating copy to clipboard operation
SapMachine copied to clipboard

javax.xml.transform StreamResult and StreamSource cannot be resolved

Open marioskaff opened this issue 5 years ago • 3 comments

I got the following error when compiling my code :

Error:(10, 8) java: The import javax.xml.transform.stream.StreamResult cannot be resolved Error:(11, 8) java: The import javax.xml.transform.stream.StreamSource cannot be resolved

It worked just fine on jdk1.8 I am currently using SapMachine 11.0.8

Could you please help me?

marioskaff avatar Oct 15 '20 15:10 marioskaff

Hi @marioskaff

from your description I can't see what could go wrong. javax.xml.transform.stream.StreamResult and javax.xml.transform.stream.StreamSource are still part of the JDK, they now belong to module java.xml.

Are you maybe compiling against a jlink'ed image that doesn't contain java.xml? Other than that, I fear I'd need more logs and some further description of your build environment.

Best regards Christoph

RealCLanger avatar Oct 16 '20 04:10 RealCLanger

Hi @RealCLanger,

I am running SAP Commerce 2005 and using Intellij IDEA.

When I compile via ant in my command line, it works just fine.

When I try to compile (via JRebel) in Intellij I get the following errors: Error:java: Compilation failed: internal java compiler error Error:(10, 8) java: The import javax.xml.transform.stream.StreamResult cannot be resolved Error:(11, 8) java: The import javax.xml.transform.stream.StreamSource cannot be resolved Even though when I inspect the source, I am able to see that the classes javax.xml.transform.stream.StreamResult and javax.xml.transform.stream.StreamSource do exist in the JDK, which kind of confuses me.

So here's a scenario to explain more clearly: 1- compile via ant and run server -> it works fine, the code executes successfully when I do the test on my frontend 2- compile in intellij (jRebel) -> gives errors 3- start having errors when I do the test on my frontend (after compiling via intellij)

My dev process requires often builds via intellij (jRebel) so I don't have to stop the server, compile, and re-run the server on every code modification. So it is really important that the build passes successfully on intellij.

Any suggestions?

intellij_jdk_11

marioskaff avatar Oct 16 '20 08:10 marioskaff

Hi,

unfortunately I neither have lots of IntelliJ experience nor do I have knowledge about SAP Commerce 2005.

Can you reproduce your issue with a plain Java project (with SapMachine/OpenJDK 11)? Or is it bound to SAP Commerce? In the latter case I'd recommend to open a ticket with SAP support regarding SAP Commerce.

Or does your IntelliJ project involve only your custom coding? Then I guess you need to try to solve it on your own, maybe together with IntelliJ folks...

Best regards Christoph

RealCLanger avatar Oct 19 '20 09:10 RealCLanger

Closing due to inactivity.

RealCLanger avatar Sep 16 '22 12:09 RealCLanger