How to debug eclipselink moxy Json issue with jersey? - jersey-2.0

i'm using eclipselink moxy inside jersey but i'm totally clueless how to enable any useful output from moxy besides:
SEVERE: MessageBodyWriter not found for media type=application/json, type=class ...
Is there anything i'm missing? Should jersey logging contain more clues?
Tx

I hope someone can use this information:
I debugged through it and found a very good Breakpoint:
In org.eclipse.persistence.jaxb.JAXBContext.java:1103 is a catch block which contains the necessary Information needed to understand exactly what is wrong.
I do not understand at all why my Eclipse Exception Breakpoint didn't hit it but yeah...
I will find out why this useful message is removed when the exception bubbles up.
I'm using Jersey 2.41 with eclipse moxy 2.6

Related

org.xml.sax.SAXException: Invalid element in [...]

I'm dealing with this issue:
I generated the service stubs using Axis 1.4, with 1.4-redhat-1 as lib to the project.
I read a lot about this error and people said the issue was from the axis stubs generation itself, and the only solution was to regenerate stubs and recompile the projects that consumes them. The thing is: I made a test class in the and called the operation on eclipse using the "old" class without the new element and it works!
After that I copy/paste the test class to the main project that consumes the stubs, and it also worked.
But when I deploy the artifact to jBoss AS 5.1, I got the same "Invalid element" exception, so I'm guessing there's something "wrong" with the jBoss configs.
Does anyone have a tip where to start searching for the fix ? Thanks in advance.

iReport "org/primefaces/model/UploadedFile" error in hibernate connection testing

I'm trying to make a hibernate connection to create some reports, but every time I press Test it appears an error window that says org/primefaces/model/UploadedFile, only that.
My classpath already has a jar of my project and the only place where I have the library from the error is inside an entity on the project.
If switch to another's project jar the connection is successful.
I'm using iReport 5.0.4 and Spring 2.9.1.
I'll appreciate any idea of what could be wrong, thanks in advance.
I couldn't figure out what was the problem, so I commented all references to the library and generated the jar that way.
I did it only because there's no related data to the things I commented.

Configuring NetBeans 7.3 JPQL editor?

I have a RESTful service that builds and runs fine. However, when I try to use the JPQL editor, it gives the error:
java.lang.Exception: You need to add your persistence provider library either to project classpath or registed as Ant Library within Netbeans
You need to register database connection on Services tab
I'm using EclipseLink 2.4.1 as my persistence library, and I already have a library added in the Ant manager as "EclipseLink 2.4." When that failed, I made a library called "EclipseLink (JPA 2.0)(default)" to match the persistence.xml GUI name for it. I even tried creating a library named "org.eclipse.persistence.jpa.PersistenceProvider. All failed and now I'm stumped.
I have a connection the SQL Server database I'm using and it works fine.
I really am unsure of what I need to do to get this working. The editor seems like it would be a great boon, but there doesn't seem to be much documentation on it, nor questions with problems similar to mine. If anybody can help, that would be great.

Including DB2JCC4 in Tomcat 7

I have just upgraded to Tomcat v7. I am trying to include a jar in the lib that my java classes need. It is DB2JCC4.JAR. I use this to access DB2 on an IBM mainframe.
This used to work fine in Tomcat6.
When I include the jar, then I get errors such as:
Deploying web application directory C:\tomcat7\webapps\dbs
org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
.....
caused by: org.apache.tomcat.util.bcel.classfile.ClassFormatException: null is
not a Java .class file....
I have tried putting URIEncoding in the Server.XML but that does not help.
When I take out the DB2JCC4 jar file, I do not get startup errors. Of course, then I cannot access DB2! I appreciate any suggestions.
Try changing $TOMCAT_HOME/conf/catalina.properties and add DB2JCC4.jar to tomcat.util.scan.DefaultJarScanner.jarsToSkip property value. It is used to turn off classpath scanning (which is used across JavaEE 6 specs implementations).
If you were wondering why the issue is happening in the first place and not just a workaround you can find the answer here. IBM has acknowledged the issue and has provided options for fixing it. Essentially a few of the class files are corrupt.

Grails - Development advice - Where do I find Plugin APIs / Troubleshoot errors / Make life easy for myself

Hello fellow Grails Developers!
I was wondering if you could help me with what must be a very common issue. I have come from a world of Java and eclipse where JavaDocs and APIs are at your fingertips. Grails has some great features and plugins but I find their inner workings completely undescoverable and that makes me sad.
Take for example the excellent authentication plugin, I set this up using the brief but accurate doc. Now I'm in eclipse with STS and I'm staring at a method;
applicationContext.authenticationService.filterRequest(
request, response, "${request.contextPath}/authentication/index" )
Which is throwing an exception;
2010-05-01 01:17:07,292 [http-8080-1] ERROR [/grailsapp].[default] - Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)
at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:118)
at org.codehaus.groovy.grails.web.sitemesh.GrailsPageResponseWrapper.sendError(GrailsPageResponseWrapper.java:91)
And I have no idea where to start. I would love to have eclipse link to the source but there must be other manageable alternatives too as I know some people use TextMate or vim for development, they can't all have discovered the APIs for the plugins through trial and error!?! Is there any way of making the core Grails API more accessible / searchable? Autocomplete also doesn't seem to work for me in eclipse so if anyone has this working that would be ideal (It's an extension of the same question really).
What's your approach? (Please don't say intelliJ, I can't afford it) I'm sure it's obvious and I'm just missing it, please put me out of my misery!
Thanks in advance,
Gav
You can find the source code for all the plugins you're using under
<home dir>/.grails/<grails version>/projects/<project name>/plugins
To navigate or debug into the plugin sources within eclipse, add the source folders under the dir above to the project's source path.