jakartaee-javascript icon indicating copy to clipboard operation
jakartaee-javascript copied to clipboard

To do interface that utilizes REST doesn't work

Open padmanabann opened this issue 11 years ago • 3 comments

Tried to deploy the code in Netbeans 8.0.1 IDE with Glassfish 4.0. The Websocket sample worked fine. However the TO DO didn't work. Looks like an issue with the REST interface ( tried to invoke the separately in the browser). Below is the stack trace error:

HTTP Status 500 - Internal Server Error

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: A MultiException has 3 exceptions. They are:

  1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=ToDoService,parent=ToDoResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,84300295)
  2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.javaee.javascript.backend.todo.ToDoResource errors were found
  3. java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.javaee.javascript.backend.todo.ToDoResource

padmanabann avatar Oct 12 '14 08:10 padmanabann

This is likely a bug that was in GF 4.0 that has already been fixed. Can you try with 4.1 and let me know what happens? If so, I'll update the instructions to use GF 4.1 and not GF 4.0.

m-reza-rahman avatar Nov 17 '14 09:11 m-reza-rahman

Sorry for the delayed response. I tried with Glass Fish 4.1 and it looks the server side (CDI injection) error is gone. There is no error in Glassfish console. But "To DO" feature still doesn't work and it gives the following error in the chrome console output (I used the credentials reza/secret1)

https://localhost:8181/javaee-javascript/resources/todo/reza Failed to load resource: net::ERR_CONNECTION_REFUSED https://localhost:48566/javaee-javascript/todo.jsp Failed to load resource: net::ERR_CACHE_MISS

padmanabann avatar Dec 24 '14 01:12 padmanabann

I see. It looks like the issue is that the application is expecting GF to run on port 8181 but it is actually running on port 48566. I would either change the port or change the code.

m-reza-rahman avatar Jan 27 '15 02:01 m-reza-rahman