I'm continuing my investigation and I noted that some samples, in Arcgis sdk samples application, works and other partially works.
For instance "Local Server" and "Console App" samples works without problems.
The Sample "Portal" in "Web Maps" section, partially works; the two lists are filled dynamically from the web, but when I push the "Display selected WebMap" button an error dialog appears with WebMap cannot initialize JMap message and java console shows this exception:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.esri.map.JMap.setBounds(Unknown Source)
at java.awt.BorderLayout.layoutContainer(Unknown Source)
....
....
After this I create an eclipse project with the source code of Portal sample. When I start it the lists are empty because an
exception is generted:
Failed to fetch portal.Error while generating a token
com.esri.core.io.EsriSecurityException: Error while generating a token
at com.esri.core.internal.io.handler.c.a(Unknown Source)
at com.esri.core.internal.io.handler.c.b(Unknown Source)
at com.esri.core.internal.io.handler.l.a(Unknown Source)
at com.esri.core.internal.io.handler.l.a(Unknown Source)
at com.esri.core.internal.tasks.a.s.a(Unknown Source)
at com.esri.core.portal.Portal.fetchPortalInfo(Unknown Source)
at com.esri.client.samples.webmap.FeaturedGroupListApp$FetchPortalThread.run(FeaturedGroupListApp.java:88)
Caused by: java.net.UnknownHostException: arcgis.com
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 sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at com.esri.core.internal.io.handler.j.connectSocket(Unknown Source)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:731)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:709)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:700)
at com.esri.core.internal.io.handler.c.a(Unknown Source)
... 6 more
For your information, arcgis.com is accessible by a browser from my computer and the user and pws used in the sample works.
It seems has problems with connection,but I don't understand what. (the proxy is correctly configure)
thanks