리소스가 있습니다. Enunciate는이 리소스를 문서화하는 데 문제가 있습니다 : "둘 이상의 JAX-RS 엔터티 매개 변수가 허용되지 않습니다 (다른 모든 매개 변수는 JAX-RS 리소스 매개 변수 주석 중 하나로 주석을 추가해야합니다)". 저지 기반 REST API를 조합하여 파일을 업로드 할 수 없음 : 두 개 이상의 JAX-RS 엔티티 매개 변수가 허용되지 않습니다.
@POST
@Path("{appId}/versions/{id}/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response upload(@PathParam("appId") Long appId,
@PathParam("id") Long id,
@FormDataParam("file") InputStream uploadedInputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail)
throws Exception;
나는 비슷한 문제가
http://markmail.org/message/vgvi3cljo3a2f6eh
http://jira.codehaus.org/browse/ENUNCIATE-537 을보고이 버전 1.23 수정되었습니다 발견했다.
최신 버전 1.26.2를 사용하고 있지만이 오류가 계속 표시됩니다.
org.codehaus.enunciate.XmlTransient로 주석을 추가 할 때이 오류를 피할 수 있지만 전체 리소스 (모든 메소드)에 대한 문서가 제거됩니다.
도움이 될 것입니다.
메이븐 오류 스택 :
[WARNING] Validation result has errors.
error: [core] AppResource.upload: No more than one JAX-RS entity parameter is allowed (all other parameters must be annotated with one of the JAX-RS resource parameter annotations).
1 error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.640s
[INFO] Finished at: Tue May 28 14:48:18 IST 2013
[INFO] Final Memory: 20M/50M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.26.2:assemble (default) on project crashreport-ws: Problem assembling the enunciate app. org.codehaus.enunciate.apt.ModelValidationException: There were validation errors -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.26.2:assemble (default) on project crashreport-ws: Problem assembling the enunciate app.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Problem assembling the enunciate app.
at org.codehaus.enunciate.AssembleMojo.execute(AssembleMojo.java:75)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
나는 이것들을보고하고있는 버그가있다 ... 그 codehause가이 버그들을 사소한 것에 넣는 것은 흥미 롭다. 나는 enunciate를 제거하는 것을 고려하고있다. – Pepster