Sorry guys. Its been a while since I posted this video and I don't
remember where I found the code. I'd just google it or pause the video and
just retype it as its not that long.
Converting JSON Web Service Response to Java Data Model Using Jackson in Eclipse Web Project
Converting JSON Web Service Response to Java Data Model Using Jackson in Eclipse Web Project.
REST Web Services 18 - Returning JSON Response
Website: //javabrains.koushik.org/courses/javaee_jaxrs/lessons/Returning-JSON-Response We'll now switch the response format of the APIs from XML to ...
+my name is GYAN Basically you can do everything without Maven and without the pom.xml, it is just a feature to manage in an easy way the library dependencies (among many many other things) but is not required to build your webservices and follow along the course.
Once I added moxy dependency, I am getting these exceptions in server logs.
Servlet [Jersey Web Application] in web application [/messanger] threw
load() exception
java.lang.ClassNotFoundException:
org.glassfish.jersey.message.filtering.EntityFilteringFeature
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at
org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:88)
at
org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:712)
at
org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:642)
at
org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:810)
at
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:392)
at
org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166)
at
org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
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:286)
at
org.glassfish.jersey.server.ApplicationHandler.(ApplicationHandler.java:324)
at org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:336)
at
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
at
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3746)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:292)
at
org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5528)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1377)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1349)
at java.lang.Thread.run(Thread.java:745)
anyone experiencing the same. Please help
Hi
I am getting error to unzip a .jar ; error is something like " [....
/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/messenger/WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar!/]
for TLD files " , after I uncomment JSON dependency code in pom.xml and set
media_type as 'application/json' in my code for resource creation.
Could anyone please help me out there?
Thanks!
+Java Brains Thanks a lot for your reply and such informative and EASY TO LEARN stuff. I am new to web services and just following your tutorials to learn it.Anyway, my MAVEN repository was corrupt (some jars needed for JSON, were corrupt), and by deleting and then re-installing the repository, I was able to solve my problem. Thanks again!