Manuel de la Peña Hace 7 años Really cool!! Por favor identifíquese para votar. Contestar como... Cancelar
Sampsa Sohlman Hace 7 años This is usefull Por favor identifíquese para votar. Contestar como... Cancelar
samuel tian Hace 7 años Hi CRISTINA,I've compiled your code and deployed to the new Liferay 7.0.2 GA3 server for a test running.I'm having no error deploying the portlet which with the EchoWebSocketEndpoint class. However, I cannot get my client connected to the endpoint no matter what sort of addresses I use.Tried for: var logSocket = new WebSocket("ws://localhost:8080/o/w4u-test-1.0-SNAPSHOT(this is the name of my project war)/echo");orvar logSocket = new WebSocket("ws://localhost:8080/w4u-test-1.0-SNAPSHOT(this is the name of my project war)/echo");still getting the 404 error.And I'm getting:21:59:51,260 WARN [http-apr-8080-exec-5][code_jsp:181] {code="404", msg="ProxyServlet: /o/w4u-test-1.0-SNAPSHOT/echo", uri=/o/w4u-test-1.0-SNAPSHOT/echo}from the server console.Any help will be appreciated. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez samuel tian Hace 7 años Hi Samuel, If you want to use this feature in 7.0.2 GA3, you should add this property to your portal-ext.properties file: module.framework.system.packages.extra=\ com.ibm.crypto.provider,\ com.ibm.db2.jcc,\ com.microsoft.sqlserver.jdbc,\ com.mysql.jdbc,\ com.p6spy.engine.spy,\ com.sun.security.auth.module,\ com.sybase.jdbc4.jdbc,\ oracle.jdbc,\ org.postgresql,\ org.apache.naming.java,\ org.hsqldb.jdbc,\ org.mariadb.jdbc,\ sun.misc,\ sun.net.util,\ sun.security.provider,\ javax.websocket;version="1.1.0",\ javax.websocket.server;version="1.1.0"You can found a full example with 7.0.0.GA3 in https://github.com/cgoncas/liferay-websocket-echo Thanks!! Por favor identifíquese para votar. Contestar como... Cancelar samuel tian Cristina Gonzalez Hace 7 años Thank you very much for your prompt reply, Cristina.By following the example you've posted, we can now get it to work.One thing worth mentioning is that since now the endpoint is defined under OSGi root instead of the context of each portlet. Every time the project deployed to the server, it will not get unregistered and registered again with the portlet context itself. So every time we deploy the project we're getting a "Multiple Endpoints may not be deployed to the same path" exception. I saw there was a judgement in your code already:https://github.com/cgoncas/liferay-portal/blob/WEBSOCKET_LIFERAY_SUPPORT/modules/apps/foundation/websocket/websocket-whiteboard/src/main/java/com/liferay/websocket/whiteboard/internal/WebSocketEndpointTracker.java#L79. But I've no idea why is this not working properly under the tomcat bundle we're using.Except for the exception above, the end point worked well as before. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez samuel tian Hace 7 años Thanks a lot for the feedback, Samuel. We will try to fix this issue as soon as possible. If you want to track it, just watch the issue https://issues.liferay.com/browse/LPS-69232 Por favor identifíquese para votar. Contestar como... Cancelar Aldo De Vleeschauwer Cristina Gonzalez Hace 7 años I checked the issue and it is marked as resolved but we still get the error. The bundle that we installed is "com.liferay.websocket.whiteboard-1.0.1.jar" and this corresponds with the latest version of the code I found on GitHub ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha samuel tian Hace 7 años Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Milan Riha Hace 7 años Hi Milan!If you want to use a path diferent to "/o", you should define it in the tomcat configuration, the same as if you want to define a servlet in other path.Thanks! Por favor identifíquese para votar. Contestar como... Cancelar Jaydip Lakhatariya Cristina Gonzalez Hace 6 años Hi,Is there any way to use web socket in liferay 7 without declaring this property in portal-ext file. Actually I am developing plug and play module where user don't need to rely on adding this property and restart the server. Anything can be done so that I just deploy my module and everything gets set ?Regards,Jaydip Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Jaydip Lakhatariya Hace 6 años Hey, No sorry, we need to export those pakages. Regards,Cristina Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto Jaydip Lakhatariya Hace 6 años actually you can, but need to compile the liferay source code on your own/side, i did that while testing a module, and have no config there Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto alejandro soto Hace 6 años i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Por favor identifíquese para votar. Contestar como... Cancelar
Cristina Gonzalez samuel tian Hace 7 años Hi Samuel, If you want to use this feature in 7.0.2 GA3, you should add this property to your portal-ext.properties file: module.framework.system.packages.extra=\ com.ibm.crypto.provider,\ com.ibm.db2.jcc,\ com.microsoft.sqlserver.jdbc,\ com.mysql.jdbc,\ com.p6spy.engine.spy,\ com.sun.security.auth.module,\ com.sybase.jdbc4.jdbc,\ oracle.jdbc,\ org.postgresql,\ org.apache.naming.java,\ org.hsqldb.jdbc,\ org.mariadb.jdbc,\ sun.misc,\ sun.net.util,\ sun.security.provider,\ javax.websocket;version="1.1.0",\ javax.websocket.server;version="1.1.0"You can found a full example with 7.0.0.GA3 in https://github.com/cgoncas/liferay-websocket-echo Thanks!! Por favor identifíquese para votar. Contestar como... Cancelar samuel tian Cristina Gonzalez Hace 7 años Thank you very much for your prompt reply, Cristina.By following the example you've posted, we can now get it to work.One thing worth mentioning is that since now the endpoint is defined under OSGi root instead of the context of each portlet. Every time the project deployed to the server, it will not get unregistered and registered again with the portlet context itself. So every time we deploy the project we're getting a "Multiple Endpoints may not be deployed to the same path" exception. I saw there was a judgement in your code already:https://github.com/cgoncas/liferay-portal/blob/WEBSOCKET_LIFERAY_SUPPORT/modules/apps/foundation/websocket/websocket-whiteboard/src/main/java/com/liferay/websocket/whiteboard/internal/WebSocketEndpointTracker.java#L79. But I've no idea why is this not working properly under the tomcat bundle we're using.Except for the exception above, the end point worked well as before. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez samuel tian Hace 7 años Thanks a lot for the feedback, Samuel. We will try to fix this issue as soon as possible. If you want to track it, just watch the issue https://issues.liferay.com/browse/LPS-69232 Por favor identifíquese para votar. Contestar como... Cancelar Aldo De Vleeschauwer Cristina Gonzalez Hace 7 años I checked the issue and it is marked as resolved but we still get the error. The bundle that we installed is "com.liferay.websocket.whiteboard-1.0.1.jar" and this corresponds with the latest version of the code I found on GitHub ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha samuel tian Hace 7 años Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Milan Riha Hace 7 años Hi Milan!If you want to use a path diferent to "/o", you should define it in the tomcat configuration, the same as if you want to define a servlet in other path.Thanks! Por favor identifíquese para votar. Contestar como... Cancelar Jaydip Lakhatariya Cristina Gonzalez Hace 6 años Hi,Is there any way to use web socket in liferay 7 without declaring this property in portal-ext file. Actually I am developing plug and play module where user don't need to rely on adding this property and restart the server. Anything can be done so that I just deploy my module and everything gets set ?Regards,Jaydip Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Jaydip Lakhatariya Hace 6 años Hey, No sorry, we need to export those pakages. Regards,Cristina Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto Jaydip Lakhatariya Hace 6 años actually you can, but need to compile the liferay source code on your own/side, i did that while testing a module, and have no config there Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto alejandro soto Hace 6 años i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Por favor identifíquese para votar. Contestar como... Cancelar
samuel tian Cristina Gonzalez Hace 7 años Thank you very much for your prompt reply, Cristina.By following the example you've posted, we can now get it to work.One thing worth mentioning is that since now the endpoint is defined under OSGi root instead of the context of each portlet. Every time the project deployed to the server, it will not get unregistered and registered again with the portlet context itself. So every time we deploy the project we're getting a "Multiple Endpoints may not be deployed to the same path" exception. I saw there was a judgement in your code already:https://github.com/cgoncas/liferay-portal/blob/WEBSOCKET_LIFERAY_SUPPORT/modules/apps/foundation/websocket/websocket-whiteboard/src/main/java/com/liferay/websocket/whiteboard/internal/WebSocketEndpointTracker.java#L79. But I've no idea why is this not working properly under the tomcat bundle we're using.Except for the exception above, the end point worked well as before. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez samuel tian Hace 7 años Thanks a lot for the feedback, Samuel. We will try to fix this issue as soon as possible. If you want to track it, just watch the issue https://issues.liferay.com/browse/LPS-69232 Por favor identifíquese para votar. Contestar como... Cancelar Aldo De Vleeschauwer Cristina Gonzalez Hace 7 años I checked the issue and it is marked as resolved but we still get the error. The bundle that we installed is "com.liferay.websocket.whiteboard-1.0.1.jar" and this corresponds with the latest version of the code I found on GitHub ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha samuel tian Hace 7 años Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Milan Riha Hace 7 años Hi Milan!If you want to use a path diferent to "/o", you should define it in the tomcat configuration, the same as if you want to define a servlet in other path.Thanks! Por favor identifíquese para votar. Contestar como... Cancelar
Cristina Gonzalez samuel tian Hace 7 años Thanks a lot for the feedback, Samuel. We will try to fix this issue as soon as possible. If you want to track it, just watch the issue https://issues.liferay.com/browse/LPS-69232 Por favor identifíquese para votar. Contestar como... Cancelar Aldo De Vleeschauwer Cristina Gonzalez Hace 7 años I checked the issue and it is marked as resolved but we still get the error. The bundle that we installed is "com.liferay.websocket.whiteboard-1.0.1.jar" and this corresponds with the latest version of the code I found on GitHub ? Por favor identifíquese para votar. Contestar como... Cancelar
Aldo De Vleeschauwer Cristina Gonzalez Hace 7 años I checked the issue and it is marked as resolved but we still get the error. The bundle that we installed is "com.liferay.websocket.whiteboard-1.0.1.jar" and this corresponds with the latest version of the code I found on GitHub ? Por favor identifíquese para votar. Contestar como... Cancelar
Milan Riha samuel tian Hace 7 años Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Milan Riha Hace 7 años Hi Milan!If you want to use a path diferent to "/o", you should define it in the tomcat configuration, the same as if you want to define a servlet in other path.Thanks! Por favor identifíquese para votar. Contestar como... Cancelar
Cristina Gonzalez Milan Riha Hace 7 años Hi Milan!If you want to use a path diferent to "/o", you should define it in the tomcat configuration, the same as if you want to define a servlet in other path.Thanks! Por favor identifíquese para votar. Contestar como... Cancelar
Jaydip Lakhatariya Cristina Gonzalez Hace 6 años Hi,Is there any way to use web socket in liferay 7 without declaring this property in portal-ext file. Actually I am developing plug and play module where user don't need to rely on adding this property and restart the server. Anything can be done so that I just deploy my module and everything gets set ?Regards,Jaydip Por favor identifíquese para votar. Contestar como... Cancelar Cristina Gonzalez Jaydip Lakhatariya Hace 6 años Hey, No sorry, we need to export those pakages. Regards,Cristina Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto Jaydip Lakhatariya Hace 6 años actually you can, but need to compile the liferay source code on your own/side, i did that while testing a module, and have no config there Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto alejandro soto Hace 6 años i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Por favor identifíquese para votar. Contestar como... Cancelar
Cristina Gonzalez Jaydip Lakhatariya Hace 6 años Hey, No sorry, we need to export those pakages. Regards,Cristina Por favor identifíquese para votar. Contestar como... Cancelar
alejandro soto Jaydip Lakhatariya Hace 6 años actually you can, but need to compile the liferay source code on your own/side, i did that while testing a module, and have no config there Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto alejandro soto Hace 6 años i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Por favor identifíquese para votar. Contestar como... Cancelar
alejandro soto alejandro soto Hace 6 años i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Por favor identifíquese para votar. Contestar como... Cancelar
alejandro soto Hace 7 años Does anybody getting this same error when module is started again ?Unble to register WebSocket endpoint class ... for path /../javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/../] : existing endpoint was class javax.websocket.Endpoint and new endpoint is class javax.websocket.Endpoint at org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:224) at com.liferay.websocket.whiteboard.internal.WebSocketEndpointTracker.addingService(WebSocketEndpointTracker.java:124) at com.liferay.websocket.whiteboard.internal.WebSocketEndpointTracker.addingService(WebSocketEndpointTracker.java:45) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) Por favor identifíquese para votar. Contestar como... Cancelar
Jaydip Lakhatariya Hace 6 años I am too getting the same error as below while deploying into the fresh server. I am using the Liferay whiteboard 1.0.1.javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/o/ka/socket] : existing endpoint was class javax.websocket.Endpoint and new endpoint is class javax.websocket.Endpoint/Can anyone have fix for this ?Regards,Jaydip Por favor identifíquese para votar. Contestar como... Cancelar
Simon Wiesmann Hace 6 años It seems like the issue has resolved in liferay7 GA4. While also getting the "javax.websocket.DeploymentException: Multiple Endpoints" with liferay7 tomcat GA3 I do not get the error with GA4. In both cases the websocket whiteboard v1.0.1 was in use. Por favor identifíquese para votar. Contestar como... Cancelar
alejandro soto Hace 6 años Have anybody tried running this from a real instance (not local) with domain/apache in-front of tomcat ? Seems not working for me, only on localhost environment Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha alejandro soto Hace 6 años Hi,is basically working (not tested thoroughly yet)What I does is setup extra Listen port for websocket communicationExample:Listen 88<VirtualHost *:88> ServerName xyz ProxyPass / ws://localhost:8080/</VirtualHost>and load wstunnel module directiveLoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.soTested in CentOS 7 Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto Milan Riha Hace 6 años Hi Milan, that makes sense thanks so much but now getting 'Upgrade' header is missing, response is not returning proper websocket header, but it's using port 80, did you make any difference using 80 compared to port 88 ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha alejandro soto Hace 6 años Hi Alejandro, the point of this configuration was to separate standard http communication to 80 port and websocket communication to 88 on frontend side. Only this worked for me with apache. But now I found better solution with nginx instead of apache as proxy server. All work togheter on single 80 port. Just set different rules for different paths in nginx config. Por favor identifíquese para votar. Contestar como... Cancelar
Milan Riha alejandro soto Hace 6 años Hi,is basically working (not tested thoroughly yet)What I does is setup extra Listen port for websocket communicationExample:Listen 88<VirtualHost *:88> ServerName xyz ProxyPass / ws://localhost:8080/</VirtualHost>and load wstunnel module directiveLoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.soTested in CentOS 7 Por favor identifíquese para votar. Contestar como... Cancelar alejandro soto Milan Riha Hace 6 años Hi Milan, that makes sense thanks so much but now getting 'Upgrade' header is missing, response is not returning proper websocket header, but it's using port 80, did you make any difference using 80 compared to port 88 ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha alejandro soto Hace 6 años Hi Alejandro, the point of this configuration was to separate standard http communication to 80 port and websocket communication to 88 on frontend side. Only this worked for me with apache. But now I found better solution with nginx instead of apache as proxy server. All work togheter on single 80 port. Just set different rules for different paths in nginx config. Por favor identifíquese para votar. Contestar como... Cancelar
alejandro soto Milan Riha Hace 6 años Hi Milan, that makes sense thanks so much but now getting 'Upgrade' header is missing, response is not returning proper websocket header, but it's using port 80, did you make any difference using 80 compared to port 88 ? Por favor identifíquese para votar. Contestar como... Cancelar Milan Riha alejandro soto Hace 6 años Hi Alejandro, the point of this configuration was to separate standard http communication to 80 port and websocket communication to 88 on frontend side. Only this worked for me with apache. But now I found better solution with nginx instead of apache as proxy server. All work togheter on single 80 port. Just set different rules for different paths in nginx config. Por favor identifíquese para votar. Contestar como... Cancelar
Milan Riha alejandro soto Hace 6 años Hi Alejandro, the point of this configuration was to separate standard http communication to 80 port and websocket communication to 88 on frontend side. Only this worked for me with apache. But now I found better solution with nginx instead of apache as proxy server. All work togheter on single 80 port. Just set different rules for different paths in nginx config. Por favor identifíquese para votar. Contestar como... Cancelar