JaxbRepresentation gives error “doesnt contain ObjectFactory.class or jaxb.index”

In my case I was able to resolve this by adding a file called “jaxb.index” in the same package folder as the JAXB annotated class. In that file list the simple, non-qualified names of the annotated classes. For example, my file /MyProject/src/main/java/com/example/services/types/jaxb.index is simply one line (since I have only one JAXB typed class): which … Read more

What is the difference between JSF, Servlet and JSP?

JSP (JavaServer Pages) JSP is a Java view technology running on the server machine which allows you to write template text in client side languages (like HTML, CSS, JavaScript, ect.). JSP supports taglibs, which are backed by pieces of Java code that let you control the page flow or output dynamically. A well-known taglib is JSTL. JSP also supports Expression … Read more

Definition of a Java Container

Referring more generally to the Container pattern (of which an enterprise Java container could be considered a specialization), the book Server Component Patterns by M.Volter, et al. offers the following: [A CONTAINER provides] an execution environment that is responsible for adding the technical concerns to the COMPONENTS…Conceptually, it wraps the COMPONENTS, thus giving clients the … Read more

java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

You have downloaded Jersey 2 (which RI of JAX-RS 2). The tutorial you’re referring to uses Jersey 1. Download Jersey 1.17.1 from (here), should be sufficient for you. Jersey 1 uses com.sun.jersey, and Jersey 2 uses org.glassfish.jersey hence the exception. Also note that also init-param starting with com.sun.jersey won’t be recognized by Jersey 2. Edit Registering Resources and Providers in Jersey 2 contains … Read more

javax.naming.NameNotFoundException

I am getting the error (…) javax.naming.NameNotFoundException: greetJndi not bound This means that nothing is bound to the jndi name greetJndi, very likely because of a deployment problem given the incredibly low quality of this tutorial (check the server logs). I’ll come back on this. Is there any specific directory structure to deploy in JBoss? The internal structure … Read more