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

GraalVM Native Image support #1329

Open
naihil opened this issue Feb 1, 2023 · 3 comments
Open

GraalVM Native Image support #1329

naihil opened this issue Feb 1, 2023 · 3 comments
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@naihil
Copy link

naihil commented Feb 1, 2023

This is not a bug report, only my experiments to build spring-ws in native image.
I have a simple project that uses WebServiceTemplate to send/receive SOAP messages.
It compiles fine but there were several runtime exceptions.
To resolve them I need following files in META-INF/native-image:

  1. reflect-config.json:
[
  {
    "name" : "com.sun.org.apache.xpath.internal.functions.FuncNormalizeSpace",
    "allDeclaredConstructors": true
  },
  {
    "name" : "org.springframework.ws.soap.saaj.SaajSoapMessageFactory",
    "allDeclaredConstructors": true
  },
  {
    "name" : "org.springframework.ws.transport.http.HttpUrlConnectionMessageSender",
    "allDeclaredConstructors": true
  },
  {
    "name" : "org.springframework.ws.soap.client.core.SoapFaultMessageResolver",
    "allDeclaredConstructors": true
  },
  {
    "name" : "org.springframework.ws.soap.server.endpoint.adapter.method.SoapMethodArgumentResolver",
    "allDeclaredConstructors": true
  },
  {
    "name" : "org.springframework.ws.soap.server.endpoint.adapter.method.SoapHeaderElementMethodArgumentResolver",
    "allDeclaredConstructors": true
  }
]

  1. resource-config.json:
{
  "resources": {
    "includes": [
      {
        "pattern": "\\Qorg\/springframework\/ws\/transport\/http\/MessageDispatcherServlet.properties\\E"
      },
      {
        "pattern": "\\Qorg\/springframework\/ws\/client\/core\/WebServiceTemplate.properties\\E"
      },
      {
        "pattern": "\\Qorg\/springframework\/ws\/server\/MessageDispatcher.properties\\E"
      },
      {
        "pattern": "\\Qorg\/springframework\/ws\/soap\/server\/SoapMessageDispatcher.properties\\E"
      }
    ]
  }
}

Maybe this helps someone to submit official support to spring-ws.

@ksilz
Copy link

ksilz commented Feb 15, 2023

@naihil Thank you! Worked like a charm for me!

How do find out this stuff?

@NicklasWallgren
Copy link

NicklasWallgren commented Jan 7, 2024

@naihil Thank you! Worked like a charm for me!

How do find out this stuff?

@ksilz
You can find parts of it using the native-image-agent.

@naihil Thanks!

@plebcity
Copy link

plebcity commented May 24, 2024

This is one of the reasons why we stopped using native image. There are too many libraries even from Spring themselves that don't support it fully yet which means it requires a lot of maintenance work for us.

@snicoll snicoll added the status: waiting-for-triage An issue we've not yet triaged label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

5 participants