isudana opened a new pull request, #112: URL: https://github.com/apache/synapse/pull/112
## Summary - Sample Axis2 services (`SimpleStockQuoteService`, `SecureStockQuoteService`, `FastStockQuoteService`, `JAXWSStockQuoteService`, `MTOMSwASampleService`, `LoadbalanceFailoverService`) are compiled at run time via `ant` from `samples/axis2Server/src/<Service>/build.xml`. Those `build.xml` files did not pin a `source`/`target` level, so `javac` defaulted to whatever JDK ran `ant`. On JDK 9+, `javac` compiles string concatenation using `invokedynamic`/`StringConcatFactory` by default, and Axis2's bundled legacy bytecode parameter-name reader can't parse those constant-pool entries, so the service fails to deploy with: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: Error looking for paramter names in bytecode: unexpected bytes in file Fixed by pinning `source="1.8" target="1.8"` on the `javac` task in each sample service's `build.xml`. - `axis2server.sh` unconditionally passed `-Djava.endorsed.dirs=...`, a flag removed in JDK 9+ that prevents the JVM from starting at all. Fixed to only pass it on pre-9 JDKs, mirroring the existing handling already in `synapse.sh`. ## Test plan - [x] `mvn clean install -DskipTests` succeeds on JDK 17 and JDK 21 - [x] Rebuilt `SimpleStockQuoteService.aar` with `ant` and confirmed its bytecode no longer contains `invokedynamic`/`StringConcatFactory` entries - [x] Started `samples/axis2Server/axis2server.sh` on JDK 17: `SimpleStockQuoteService` deploys with no errors, listeners bind on ports 9000/9002 - [x] `GET /services/SimpleStockQuoteService?wsdl` returns HTTP 200 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
