Question

if you get an error similar to this although your credentials are correct or have even worked before in this environment, it may be due to an HTTP proxy misconfiguration (see answer below)

java.lang.IllegalArgumentException: Username may not be null
    at org.apache.http.util.Args.notNull(Args.java:48)
    at org.apache.http.auth.UsernamePasswordCredentials.<init>(UsernamePasswordCredentials.java:78)
    at com.jaspersoft.studio.server.utils.HttpUtils.getCredentials(HttpUtils.java:107)
    at com.jaspersoft.studio.server.utils.HttpUtils.setupProxy(HttpUtils.java:45)
    at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.connect(RestV2ConnectionJersey.java:91)
    at com.jaspersoft.studio.server.protocol.ProxyConnection.connect(ProxyConnection.java:61)
    at com.jaspersoft.studio.server.WSClientHelper.checkConnection(WSClientHelper.java:85)
    at com.jaspersoft.studio.server.wizard.ServerProfileWizard.connect(ServerProfileWizard.java:101)
    at com.jaspersoft.studio.server.wizard.ServerProfileWizard.access$1(ServerProfileWizard.java:97)
    at com.jaspersoft.studio.server.wizard.ServerProfileWizard$2.run(ServerProfileWizard.java:78)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Was it helpful?

Solution

Check your Eclipse->Window->Preferences->General->Network Connections settings. If your Jasper server is not behind an HTTP proxy it must be included and selected (yellow) in the Proxy bypass section (or no proxy may be necessary at all - but this seems more unlikely because other proxied network services would not be available then within Eclipse). Otherwise it should not be included therein.

If you should get another error org.apache.http.client.HttpResponseException: Not Found later on it could be an unrelated error due to a server<->studio version mismatch, e.g. described here:

https://community.jaspersoft.com/questions/823765/jaspersoft-studio-551-unable-connect-jasperreports-server-450

(I know this is not directly related to the question, but it may help after such an update scenario (which may be a big waste of time) ...)

Instead of downgrading Jasper Studio you can try to change the URL and Jasper version in the server connection. Try to remove services/repository/ from your URL, which worked for me :-) (...as mentioned here: http://community.jaspersoft.com/jaspersoft-studio/issues/3497 )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top