New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception #895

Open
yangyunzhang opened this Issue Dec 25, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@yangyunzhang
Copy link

yangyunzhang commented Dec 25, 2018

public static void main(String[] args) {
try {
JsonBimServerClientFactory clientFactory = new JsonBimServerClientFactory("http://localhost:8080");
BimServerClient client = clientFactory.create(new UsernamePasswordAuthenticationInfo("admin@bimserver.org", "admin"));
client.getServiceInterface().addProject("Test Project", "ifc2x3tc1");
} catch (BimServerClientException | ServiceException | ChannelConnectionException e) {
e.printStackTrace();
} catch (PublicInterfaceNotFoundException e) {
e.printStackTrace();
}
}

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.bimserver.shared.reflector.ReflectorException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at org.bimserver.shared.json.JsonSocketReflector.call(JsonSocketReflector.java:95)
at org.bimserver.shared.json.JsonReflector.callMethod(JsonReflector.java:58)
at org.bimserver.generated.AuthInterfaceImpl1.login(AuthInterfaceImpl1.java)
at org.bimserver.client.BimServerClient.authenticate(BimServerClient.java:130)
at org.bimserver.client.BimServerClient.connect(BimServerClient.java:122)
at org.bimserver.client.BimServerClient.setAuthentication(BimServerClient.java:115)
at org.bimserver.client.json.JsonBimServerClientFactory.create(JsonBimServerClientFactory.java:68)
at bimserverclientdemo.Main.main(Main.java:15)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.bimserver.shared.json.JsonSocketReflector.call(JsonSocketReflector.java:72)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
... 17 more

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