A javax.ws.rs.ext.MessageBodyReader implementation was not found for class org.eclipse.lyo.oslc4j.co [message #1768843] |
Mon, 24 July 2017 10:08 |
Rajkumar K Messages: 26 Registered: May 2015 |
Junior Member |
|
|
Hello,
I have followed the wiki page {https://wiki.eclipse.org/Lyo/BuildClient} and setup the
Eclipse Lyo project in my workspace. I have run the Maven clean install.
I have modified the RRCFormSample.java for my requirement and able to run in the
Eclipse environment successfully with you any problem.
Now I want to make the sources to run in command line. I have created the
runnable Jar (org.eclipse.lyo.client.java.sample) by adding the following
in pom.xml of org.eclipse.lyo.client.java.sample.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifest>
<mainClass>org.eclipse.lyo.client.oslc.samples.RRCFormSample</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}\lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>org.eclipse.lyo.client.oslc.samples.RRCFormSample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
The required libraries are copied and unpacked as class files. Please have a look on
the attachment (lib.zip, oslc-java-samples-2.1.2-jar-with-dependencies.jar).
Later when I run in command line mode (Batch script) get the
following Exception
A javax.ws.rs.ext.MessageBodyReader implementation was not found for class org.eclipse.lyo.oslc4j.core.model.ServiceProviderCatalog type
and text/html; charset=UTF-8 media type. Verify that all entity providers are correctly registered. Add a custom javax.ws.rs.ext.MessageBodyRea
der provider to handle the type and media type if a JAX-RS entity provider does not currently exist.
java.lang.RuntimeException: A javax.ws.rs.ext.MessageBodyReader implementation was not found for class org.eclipse.lyo.oslc4j.core.model.ServiceP
roviderCatalog type and text/html; charset=UTF-8 media type. Verify that all entity providers are correctly registered. Add a custom javax.ws.r
s.ext.MessageBodyReader provider to handle the type and media type if a JAX-RS entity provider does not currently exist.
at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:122)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:65)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:52)
at org.eclipse.lyo.client.oslc.OslcClient.lookupServiceProviderUrl(OslcClient.java:470)
at org.eclipse.lyo.client.oslc.samples.RRCFormSample.main(RRCFormSample.java:124)
#1 Is this Bug in Ecliplse Lyo 2.1.2 ?
#2) Do we have somewhere list of jars required for particular Eclipse Lyo version to run in command line ?
For example where I can download list of Jars for
Eclipse Lyo 2.1.0 release or Eclipse Lyo 2.2.0 release ?
#3 Did I miss some libraries to include to run org.eclipse.lyo.client.oslc.samples.RRCFormSample.java ?
Best Regards,
Rajkumar
[Updated on: Mon, 24 July 2017 11:05] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03041 seconds