Can we create tracking jira for this? Amruth, did you find any cause and solution for this?
On Mon, Sep 14, 2015 at 11:21 AM, Amruth Sampath <[email protected]> wrote: > I am creating a JIRA issue to track this. > > On Tue, Sep 1, 2015 at 12:17 PM, Amruth Sampath <[email protected]> > wrote: > > > Hi Raju, Tried that, still getting the same error. > > > > I think the context provided by LensJAXBContextResolver is not > > respected by MOXyJsonProvider. > > > > MOXyJsonProvider creates its own context with just LensAPIResult. The > > Type class seem to get missed in the context leading to an exception - > > "the class or any of its super class is not known to the context". > > > > On Tue, Sep 1, 2015 at 11:55 AM, Raju Bairishetti > > <[email protected]> wrote: > > > @Amruth, Can you try by adding this dependency in lens-api? > > > > > > <dependency> > > > > > > <groupId>org.glassfish.jersey.media</groupId> > > > > > > <artifactId>jersey-media-moxy</artifactId> > > > > > > <version>${jersey.version}</version> > > > > > > </dependency> > > > > > > On Tue, Sep 1, 2015 at 11:52 AM, amareshwarisr . < > [email protected]> > > > wrote: > > > > > >> Not aware of issue, please go ahead and create jira. > > >> > > >> On Tue, Sep 1, 2015 at 11:43 AM, Amruth Sampath < > [email protected]> > > >> wrote: > > >> > > >> > I am facing issue while trying to get LensAPIResult as a json (works > > >> > fine as XML). > > >> > > > >> > When the accept headers are set to "application/json" in the client, > > >> > all the APIs that expose LensAPIResult fail with an internal server > > >> > error that says > > >> > > > >> > javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error > > >> > at > > >> > > > >> > > > org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:810) > > >> > ~[org.eclipse.persistence.moxy-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:243) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:230) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.filter.LoggingFilter.aroundWriteTo(LoggingFilter.java:268) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:103) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:88) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1139) > > >> > ~[jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:562) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:357) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:347) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at > > >> > org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:258) > > >> > ~[jersey-server-2.3.1.jar:na] > > >> > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at org.glassfish.jersey.internal.Errors.process(Errors.java:315) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at org.glassfish.jersey.internal.Errors.process(Errors.java:297) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at org.glassfish.jersey.internal.Errors.process(Errors.java:267) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) > > >> > [jersey-common-2.3.1.jar:na] > > >> > at > > >> > > > org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) > > >> > [jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983) > > >> > [jersey-server-2.3.1.jar:na] > > >> > at > > >> > > > >> > > > org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330) > > >> > [jersey-container-grizzly2-http-2.3.1.jar:na] > > >> > at > > >> > > > org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:212) > > >> > [grizzly-http-server-2.3.6.jar:2.3.6] > > >> > at > > >> > > > >> > > > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) > > >> > [grizzly-framework-2.3.6.jar:2.3.6] > > >> > at > > >> > > > >> > > > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) > > >> > [grizzly-framework-2.3.6.jar:2.3.6] > > >> > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25] > > >> > Caused by: javax.xml.bind.MarshalException: null > > >> > at > > >> > > > >> > > > org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:403) > > >> > ~[org.eclipse.persistence.moxy-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:808) > > >> > ~[org.eclipse.persistence.moxy-2.5.0.jar:na] > > >> > ... 27 common frames omitted > > >> > Caused by: org.eclipse.persistence.exceptions.XMLMarshalException: > > >> > Exception Description: An error occurred marshalling the object > > >> > Internal Exception: Exception [EclipseLink-25007] (Eclipse > Persistence > > >> > Services - 2.5.0.v20130507-3faac2b): > > >> > org.eclipse.persistence.exceptions.XMLMarshalException > > >> > Exception Description: A descriptor for class > > >> > org.apache.lens.api.result.LensAPIResult was not found in the > project. > > >> > For JAXB, if the JAXBContext was bootstrapped using > TypeMappingInfo[] > > >> > you must call a marshal method that accepts TypeMappingInfo as an > > >> > input parameter. > > >> > at > > >> > > > >> > > > org.eclipse.persistence.exceptions.XMLMarshalException.marshalException(XMLMarshalException.java:97) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:911) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:848) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:401) > > >> > ~[org.eclipse.persistence.moxy-2.5.0.jar:na] > > >> > ... 28 common frames omitted > > >> > Caused by: org.eclipse.persistence.exceptions.XMLMarshalException: > > >> > Exception Description: A descriptor for class > > >> > org.apache.lens.api.result.LensAPIResult was not found in the > project. > > >> > For JAXB, if the JAXBContext was bootstrapped using > TypeMappingInfo[] > > >> > you must call a marshal method that accepts TypeMappingInfo as an > > >> > input parameter. > > >> > at > > >> > > > >> > > > org.eclipse.persistence.exceptions.XMLMarshalException.descriptorNotFoundInProject(XMLMarshalException.java:139) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.internal.oxm.Context$ContextState.getSession(Context.java:143) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.oxm.XMLContext$XMLContextState.getSession(XMLContext.java:787) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.oxm.XMLContext$XMLContextState.getSession(XMLContext.java:1) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > org.eclipse.persistence.internal.oxm.Context.getSession(Context.java:451) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > org.eclipse.persistence.oxm.XMLContext.getSession(XMLContext.java:356) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > org.eclipse.persistence.oxm.XMLContext.getSession(XMLContext.java:1) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:1119) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > at > > >> > > > >> > > > org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:869) > > >> > ~[org.eclipse.persistence.core-2.5.0.jar:na] > > >> > ... 30 common frames omitted > > >> > > > >> > Is there an open issue referring this? > > >> > > > >> > Thanks, > > >> > -- > > >> > Amruth S > > >> > (09486075517) > > >> > > > >> > -- > > >> > > > >> > > > >> > > > >> > > > >> > > > ------------------------------------------------------------------------------------------------------------------------------------------ > > >> > > > >> > This email and any files transmitted with it are confidential and > > >> intended > > >> > solely for the use of the individual or entity to whom they are > > >> addressed. > > >> > If you have received this email in error please notify the system > > >> manager. > > >> > This message contains confidential information and is intended only > > for > > >> the > > >> > individual named. If you are not the named addressee you should not > > >> > disseminate, distribute or copy this e-mail. Please notify the > sender > > >> > immediately by e-mail if you have received this e-mail by mistake > and > > >> > delete this e-mail from your system. If you are not the intended > > >> recipient > > >> > you are notified that disclosing, copying, distributing or taking > any > > >> > action in reliance on the contents of this information is strictly > > >> > prohibited. Although Flipkart has taken reasonable precautions to > > ensure > > >> no > > >> > viruses are present in this email, the company cannot accept > > >> responsibility > > >> > for any loss or damage arising from the use of this email or > > attachments > > >> > > > >> > > > > > > > > > > > > -- > > > Thanks & Regards, > > > Raju Bairishetti, > > > 8197553455, > > > > > > -- > > > _____________________________________________________________ > > > The information contained in this communication is intended solely for > > the > > > use of the individual or entity to whom it is addressed and others > > > authorized to receive it. It may contain confidential or legally > > privileged > > > information. If you are not the intended recipient you are hereby > > notified > > > that any disclosure, copying, distribution or taking any action in > > reliance > > > on the contents of this information is strictly prohibited and may be > > > unlawful. If you have received this communication in error, please > notify > > > us immediately by responding to this email and then delete it from your > > > system. The firm is neither liable for the proper and complete > > transmission > > > of the information contained in this communication nor for any delay in > > its > > > receipt. > > > > > > > > -- > > Amruth S > > (09486075517) > > > > > > -- > Amruth S > (09486075517) > > -- > > > > ------------------------------------------------------------------------------------------------------------------------------------------ > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > This message contains confidential information and is intended only for the > individual named. If you are not the named addressee you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately by e-mail if you have received this e-mail by mistake and > delete this e-mail from your system. If you are not the intended recipient > you are notified that disclosing, copying, distributing or taking any > action in reliance on the contents of this information is strictly > prohibited. Although Flipkart has taken reasonable precautions to ensure no > viruses are present in this email, the company cannot accept responsibility > for any loss or damage arising from the use of this email or attachments >
