Manuel de la Peña Vor 7 Jahren Really cool!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Sampsa Sohlman Vor 7 Jahren This is usefull Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
samuel tian Vor 7 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez samuel tian Vor 7 Jahren 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!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen samuel tian Cristina Gonzalez Vor 7 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez samuel tian Vor 7 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aldo De Vleeschauwer Cristina Gonzalez Vor 7 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha samuel tian Vor 7 Jahren Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Milan Riha Vor 7 Jahren 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! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jaydip Lakhatariya Cristina Gonzalez Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Jaydip Lakhatariya Vor 6 Jahren Hey, No sorry, we need to export those pakages. Regards,Cristina Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto Jaydip Lakhatariya Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto alejandro soto Vor 6 Jahren i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Cristina Gonzalez samuel tian Vor 7 Jahren 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!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen samuel tian Cristina Gonzalez Vor 7 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez samuel tian Vor 7 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aldo De Vleeschauwer Cristina Gonzalez Vor 7 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha samuel tian Vor 7 Jahren Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Milan Riha Vor 7 Jahren 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! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jaydip Lakhatariya Cristina Gonzalez Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Jaydip Lakhatariya Vor 6 Jahren Hey, No sorry, we need to export those pakages. Regards,Cristina Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto Jaydip Lakhatariya Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto alejandro soto Vor 6 Jahren i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
samuel tian Cristina Gonzalez Vor 7 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez samuel tian Vor 7 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aldo De Vleeschauwer Cristina Gonzalez Vor 7 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha samuel tian Vor 7 Jahren Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Milan Riha Vor 7 Jahren 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! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Cristina Gonzalez samuel tian Vor 7 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aldo De Vleeschauwer Cristina Gonzalez Vor 7 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Aldo De Vleeschauwer Cristina Gonzalez Vor 7 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Milan Riha samuel tian Vor 7 Jahren Hi, I got this error when I forget leading /o/.. in org.osgi.http.websocket.endpoint.path property of endpoint component class. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Milan Riha Vor 7 Jahren 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! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Cristina Gonzalez Milan Riha Vor 7 Jahren 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! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jaydip Lakhatariya Cristina Gonzalez Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Cristina Gonzalez Jaydip Lakhatariya Vor 6 Jahren Hey, No sorry, we need to export those pakages. Regards,Cristina Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto Jaydip Lakhatariya Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto alejandro soto Vor 6 Jahren i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Cristina Gonzalez Jaydip Lakhatariya Vor 6 Jahren Hey, No sorry, we need to export those pakages. Regards,Cristina Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alejandro soto Jaydip Lakhatariya Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto alejandro soto Vor 6 Jahren i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alejandro soto alejandro soto Vor 6 Jahren i meant the entire liferay portal code, so that will generate a bundle, with tomcat and so on Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alejandro soto Vor 7 Jahren 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) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jaydip Lakhatariya Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Simon Wiesmann Vor 6 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alejandro soto Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha alejandro soto Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto Milan Riha Vor 6 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha alejandro soto Vor 6 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Milan Riha alejandro soto Vor 6 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alejandro soto Milan Riha Vor 6 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha alejandro soto Vor 6 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alejandro soto Milan Riha Vor 6 Jahren 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 ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Milan Riha alejandro soto Vor 6 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Milan Riha alejandro soto Vor 6 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen