PredixDev / predix-websocket-client

Other
7 stars 5 forks source link

java.lang.RuntimeException: ......... to endpoint=null #1

Closed alishah730 closed 7 years ago

alishah730 commented 7 years ago

When try run test on it I'm getting the below error. Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.254 sec <<< FAILURE! - in com.ge.predix.solsvc.websocket.client.WebSocketClientIT postDataTestSlightLoad(com.ge.predix.solsvc.websocket.client.WebSocketClientIT) Time elapsed: 0.007 sec <<< ERROR! java.lang.RuntimeException: unable to post: [{"messageId": "1453338376210","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376211","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376212","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376213","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376214","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}] to endpoint=null at com.ge.predix.solsvc.websocket.client.WebSocketClientImpl.postTextArrayWSData(WebSocketClientImpl.java:195) at com.ge.predix.solsvc.websocket.client.WebSocketClientIT.postDataTestSlightLoad(WebSocketClientIT.java:179)

postDataTest(com.ge.predix.solsvc.websocket.client.WebSocketClientIT) Time elapsed: 0 sec <<< ERROR! java.lang.RuntimeException: unable to post: [{"messageId": "1453338376210","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376211","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376212","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376213","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}, {"messageId": "1453338376214","body": [{"name": "Cell_02","datapoints": [[1453338376223,10,3],[1453338376223,10,1]],"attributes": {"host": "server2","customer": "Acme2"}}]}] to endpoint=null at com.ge.predix.solsvc.websocket.client.WebSocketClientImpl.postTextArrayWSData(WebSocketClientImpl.java:195) at com.ge.predix.solsvc.websocket.client.WebSocketClientIT.postDataTest(WebSocketClientIT.java:134)

turnerth commented 7 years ago

most stack traces have a "Caused By", seems like you didn't post that part.

I notice it says to "endpoint = null".

You must have not configured it correctly. If you go to line 195 of the file above. it says

            throw new UnsupportedOperationException("WebSocket Pool has not been initialized. Call init method");