Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Failed to generate Raml with jaxrs-to-raml #352

Open
QiangGuo-TradeDoubler opened this issue May 21, 2018 · 4 comments
Open

Failed to generate Raml with jaxrs-to-raml #352

QiangGuo-TradeDoubler opened this issue May 21, 2018 · 4 comments
Projects

Comments

@QiangGuo-TradeDoubler
Copy link

Hi,

I got problem to generate Raml file from java resources using jaxrs-to-raml. But it failed with class not found exception. The “missing” class is actually in one of the dependencies defined in build.gradle. Appreciate any comments or suggestion.
Exception looks like this:
Caused by: java.lang.NoClassDefFoundError: ******(have to star the actual class name because it's containing client name) at org.glassfish.jersey.server.model.IntrospectionModeller$2.run(IntrospectionModeller.java:253) at org.glassfish.jersey.server.model.IntrospectionModeller.getAllDeclaredMethods(IntrospectionModeller.java:247) at org.glassfish.jersey.server.model.IntrospectionModeller.checkForNonPublicMethodIssues(IntrospectionModeller.java:172) at org.glassfish.jersey.server.model.IntrospectionModeller.doCreateResourceBuilder(IntrospectionModeller.java:119) at org.glassfish.jersey.server.model.IntrospectionModeller.access$000(IntrospectionModeller.java:80) at org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:112) at org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:109) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255) at org.glassfish.jersey.server.model.IntrospectionModeller.createResourceBuilder(IntrospectionModeller.java:109) at org.glassfish.jersey.server.model.Resource.from(Resource.java:797) at org.glassfish.jersey.server.model.Resource.from(Resource.java:784) at org.raml.jaxrs.parser.analyzers.JerseyBridgeImpl$1.apply(JerseyBridgeImpl.java:36) at org.raml.jaxrs.parser.analyzers.JerseyBridgeImpl$1.apply(JerseyBridgeImpl.java:31) at com.google.common.collect.Iterators$8.transform(Iterators.java:817) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:674) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:249) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:209) at com.google.common.collect.FluentIterable.toList(FluentIterable.java:484) at org.raml.jaxrs.parser.analyzers.JerseyBridgeImpl.runtimeResourcesFrom(JerseyBridgeImpl.java:43) at org.raml.jaxrs.parser.analyzers.JerseyAnalyzer.analyze(JerseyAnalyzer.java:81) at org.raml.jaxrs.parser.JerseyJaxRsParser.parse(JerseyJaxRsParser.java:68) at org.raml.jaxrs.raml.core.OneStopShop.parseJaxRsAndOutputRaml(OneStopShop.java:76) at org.raml.jaxrs.raml.core.OneStopShop$parseJaxRsAndOutputRaml$0.call(Unknown Source) at org.raml.jaxrs.plugin.RamlGeneratorTask.generate(RamlGeneratorTask.groovy:108) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:788) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:755) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95) ... 104 more

@jstoiko
Copy link
Contributor

jstoiko commented Jun 12, 2018

@jpbelang: do you know what could be causing this?
@QiangGuo-TradeDoubler: can you share your project config: POM or .gradle file?

@kevinduffey
Copy link

Not sure if this will help but a 3.0.2 was released this past weekend.. can you try using 3.0.2 and see if it solves the problem. Not a great answer, but just know it was released and maybe there was a fix for this.

@jpbelang
Copy link
Contributor

It's hard to say: the example project seems to work, but it uses a local project. My understanding of gradle tells me that the the jar in the project should be findable. Are you sure the plugin sees the classes ?

@jpbelang jpbelang added this to To do in 3.0.3 Jun 23, 2018
@girishsharma-tradedoubler

Problem is same with 3.0.2. If you want to generate raml in one module of the project and if the resource is dependent on java file of other module then it fails to generate the raml.

@jpbelang jpbelang added this to To do in 3.0.4 via automation Sep 16, 2018
@jpbelang jpbelang removed this from To do in 3.0.3 Sep 16, 2018
@jpbelang jpbelang moved this from To do to In progress in 3.0.4 Sep 16, 2018
@jpbelang jpbelang removed this from In progress in 3.0.4 Oct 14, 2018
@jpbelang jpbelang added this to To do in 3.0.5 via automation Oct 14, 2018
@jpbelang jpbelang added this to To do in 3.0.8 via automation Mar 21, 2019
@jpbelang jpbelang removed this from To do in 3.0.5 Mar 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
3.0.8
  
To do
Development

No branches or pull requests

5 participants