enunciate icon indicating copy to clipboard operation
enunciate copied to clipboard

Enunciate 2.17.0 is not working with JDK17

Open ravigraj opened this issue 11 months ago • 5 comments

[enunciate] [main] INFO org.reflections.Reflections - Reflections took 1605 ms to scan 188 urls, producing 147 keys and 147 values 1> INFO: Enabled modules: [docs, idl, jaxb, jaxrs, jaxws, spring-web] 1> INFO: No documentation generated: there are no data types, services, or resources to document. 1> INFO: Unknown artifact 'docs'. Artifact will not be exported.

I am using Enunciate (2.17.0) and JDK17 to build using ANT (2.1.3) and facing above error

ravigraj avatar Mar 21 '24 15:03 ravigraj

It's scanning your sources and not finding any types or services or endpoints. What does your Java source API look like?

stoicflame avatar Mar 21 '24 16:03 stoicflame

Sorry I am not a position to share that, Can you please give an example How it should be for SOAP API.? It would be very helpful.

ravigraj avatar Mar 24 '24 13:03 ravigraj

I encountered the same message when using the current enunciate version with Java/Jakarta EE 8 code (i.e. code still using javax.* packages instead of jakarta.* packages), so that is one thing to check.

ric2016 avatar Mar 24 '24 14:03 ric2016

You're welcome to look at the enunciate-sample app. The PersonService.java is a SOAP endpoint. If you can send me a patch for the sample app that demonstrates the problem you're seeing, I'm happy to debug it.

stoicflame avatar Mar 24 '24 16:03 stoicflame

resolved by upgrading "org,apache.cfx" from 3.5.2 ---> 4.0.4, some java classes asked to import jakarata.* instead of javax.* which resolved the Unknown artifact 'docs'. Artifact will not be exported, and generated the docs.

But I am unable to run Junit test after that these are in my pom.xml " <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> 5.7.2 <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> 5.8.2 pom test "

please help me with this

ravigraj avatar Apr 02 '24 04:04 ravigraj

I get a similar error message when migrating from enunciate 2.14 with JDK11 to enunciate JDK17 with enunciate 2.17.

Adding this in configuration has solved it:

    <api-classes>
        <include pattern="com.maboite.api.**"/>
    </api-classes>

Seems that there is no default include and when there is nothing include, maybe the message is not the proper one.

So me documentation is generated, but i don't get the resources generated. ( I get only JSon syntax, instead of Resources, Json and XML ). So I suppose it do not detect the resources... and I don't know how to re enable XML syntax.

Comment update: Our project still use tomcat 9 and javax.ws.rs ( and not jakarta.ws.rs since enunciate 2.16 ) So last compatible enunciate version for us is 2.15. Maybe enunciate jaxrs module can detect there is a suspicious annotation to help.

and ravigraj, you may have the same issue if you are still usng javax annotation, the highest version of enunciate you can use is 2.15.

NicolasMassipFP avatar May 16 '24 14:05 NicolasMassipFP