Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To do interface that utilizes REST doesn't work #1

Open
padmanabann opened this issue Oct 12, 2014 · 3 comments
Open

To do interface that utilizes REST doesn't work #1

padmanabann opened this issue Oct 12, 2014 · 3 comments

Comments

@padmanabann
Copy link

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
@m-reza-rahman
Copy link
Owner

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.

@padmanabann
Copy link
Author

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

@m-reza-rahman
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants