Question

I'm trying out things in Java EE 7 and I have build an example application which can be found here https://github.com/kenparker/moviplex7.git.

During the process I have learned how hard is to get things working mainly because of problems with the GlassFish 4 installation.

The current error log is the following:

WARNING:   JSF1063: WARNUNG! Der nicht serialisierbare Attributswert wird in HttpSession festgelegt (Schlüssel: 7b6d8a31fe1f98a383c3673cc569:0_flowStack, Wertklasse: com.sun.faces.flow.FlowHandlerImpl$FlowDeque).
FATAL:   JSF1073: javax.el.ELException erfasst während Verarbeitung von RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=/client/movies.xhtml @17,78 items="#{movieClientBean.movies}": javax.ws.rs.ProcessingException: java.net.MalformedURLException: Stream handler unavailable due to: For input string: "0:0:0:0:0:0:1:8080"
FATAL:   /client/movies.xhtml @17,78 items="#{movieClientBean.movies}": javax.ws.rs.ProcessingException: java.net.MalformedURLException: Stream handler unavailable due to: For input string: "0:0:0:0:0:0:1:8080"
javax.el.ELException: /client/movies.xhtml @17,78 items="#{movieClientBean.movies}": javax.ws.rs.ProcessingException: java.net.MalformedURLException: Stream handler unavailable due to: For input string: "0:0:0:0:0:0:1:8080"
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
    at com.sun.faces.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:161)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:190)

Strange enough I do not have that problem running the same application on my Mac Book so there must be some differences between the GlassFish 4 installation on my Desktop and the ones on my Mac Book.

Both seems to be at "GlassFish Server Open Source Edition 4.0 (build 89)"

The "Update Tool" does not show open updates.

How do I find out where are the differences between the two Installations ?

Also I searched the web and came across this link. https://java.net/jira/browse/JAVASERVERFACES-3084?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel

I didn't really understand what is the solution consisting of.

Any Ideas how I can proceed to solve the problem ?

Was it helpful?

Solution

The problem is not really related to GlassFish.

Stream handler unavailable due to: For input string: "0:0:0:0:0:0:1:8080"

This part of the error message shows that something is trying to work with an IPv6 address. I guess the class javax.ws.rs.client.ClientBuilder can't handle that correctly.

If you have enabled dual-stack network (IPv4 and IPv6) on your desktop computer, it seems that httpServletRequest.getLocalName() returns the IPv6 address first (0:0:0:0:0:0:1).

There may a solution how to change that behaviour in your OS but there is also an alternative way of getting the IP:

httpServletRequest.getServerName()

or

FacesContext.getCurrentInstance().getExternalContext().getRequestServerName()

Use it instead of httpServletRequest.getLocalName() in the init() method of MovieClientBean. It should return the address in IPv4 format and make it work.

See also:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top