omnifaces 2.6.1 cannot be used with java 1.7 #363

Closed
ravihariharan opened this Issue Mar 3, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@ravihariharan

ravihariharan commented Mar 3, 2017

Reference : omnifaces 2.6 cannot be used with java 1.7 #358

Runtime error when migrating from omnifaces-2.5.1.jar to omnifaces-2.6.1.jar on Java 1.7 , apache-tomcat-7.0.75.

SEVERE: java.util.Map.putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.lang.NoSuchMethodError: java.util.Map.putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; at org.omnifaces.cdi.push.SocketFacesListener.register(SocketFacesListener.java:119) at org.omnifaces.cdi.push.Socket.encodeChildren(Socket.java:730) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at org.omnifaces.viewhandler.OmniViewHandler.renderView(OmniViewHandler.java:121) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)

omnifaces-2.6.1.jar SocketFacesListener /** * Register given socket and returns true if it's new. */ static boolean register(FacesContext context, Socket socket) { return getSockets(context).putIfAbsent(socket.getClientId(context), socket.isConnected()) == null; }

image

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Mar 5, 2017

Member

Thank you for the report. I'll have to review the project configuration. Eclipse is set to 1.7 and Maven is set to 1.7 and yet 1.8 code gets compiled.

Member

BalusC commented Mar 5, 2017

Thank you for the report. I'll have to review the project configuration. Eclipse is set to 1.7 and Maven is set to 1.7 and yet 1.8 code gets compiled.

@BalusC BalusC closed this in 99c0ca1 Mar 5, 2017

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Mar 5, 2017

Member

OK, it was Eclipse's fault. Even when using JDK8 runtime with project set to Java 1.7 compliance, it doesn't mark Java 1.8 things as errors somehow. I had to explicitly configure the project to use JDK7 in order to get those compiler errors. There are no other errors than the one reported by you.

The fix is available in 2.6.2-SNAPSHOT. I need to fix other minor things for 2.6.2 and expect the final release somewhere end this week.

Thank you for reporting and sorry for this rather embarrassing issue.

Member

BalusC commented Mar 5, 2017

OK, it was Eclipse's fault. Even when using JDK8 runtime with project set to Java 1.7 compliance, it doesn't mark Java 1.8 things as errors somehow. I had to explicitly configure the project to use JDK7 in order to get those compiler errors. There are no other errors than the one reported by you.

The fix is available in 2.6.2-SNAPSHOT. I need to fix other minor things for 2.6.2 and expect the final release somewhere end this week.

Thank you for reporting and sorry for this rather embarrassing issue.

@ravihariharan

This comment has been minimized.

Show comment
Hide comment
@ravihariharan

ravihariharan Mar 5, 2017

Thanks BalusC. :)

Thanks BalusC. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment