Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAVA EE 7 First cup tutorial, can't install Glassfish 4 update center

Well I was trying to follow the first cup tutorial, but I'm stuck with a Glassfish error.

I'm supposed to this:

1.2.4 Getting the Latest Updates to the Tutorial

Check for any updates to this tutorial by using the Update Center included with the Java EE 7 SDK.

1.2.4.1 Update the Tutorial Through the Update Center Open the Update Center and check for any updates to the tutorial.

In NetBeans IDE, select the Services tab and expand the Servers node. Right-click the GlassFish Server instance and select View Update Center to display the Update Tool. In the tree, select Available Updates to display a list of updated packages. Look for updates to the First Cup for Java EE 7 (javaee-firstcup-tutorial) package. If there is an updated version of First Cup, select First Cup 7.0 for Java EE 7 (javaee-firstcup-tutorial) and click Install.

The thing is, when I try to open the Update Center, this is what I get:

The software needed for this command (updatetool) is not installed.

If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.
Exception in thread "main" java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:196)
    at java.net.SocketInputStream.read(SocketInputStream.java:122)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:658)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at com.sun.pkg.client.Image.checkRepositoryConnection(Image.java:1225)
    at com.sun.pkg.client.Catalog.refresh(Catalog.java:132)
    at com.sun.pkg.client.Image.refreshCatalogs(Image.java:1627)
    at com.sun.pkg.client.Client.main(Client.java:109)

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2

Once installation is complete you may re-run this command.

Would you like to install Update Tool now (y/n): 

C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-client.jar" refresh 

C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-bootstrap.jar" "C:\Users\Fabio\AppData\Local\Temp\pkg-bootstrap11073.props" 
Proxy: Using system proxy settings.
Input/output error: Connection reset

Could not download application packages. This could be because:
  - a proxy server is needed to access the internet. Please ensure that
    the system proxy server settings in your Internet Options control panel
    (under Connections:LAN Settings) are correct, or set the HTTP_PROXY
    environment variable to the full URL of the proxy server.
  - the package server or network connection is slow.
    If you are getting time out errors you can try setting the
    PKG_CLIENT_CONNECT_TIMEOUT and PKG_CLIENT_READ_TIMEOUT
    environment variables and try again. For example to increase
    the timeouts to 300 seconds set them to 300
  - the package server is down or otherwise inaccessible or it is
    generating invalid data. Please contact the provider of the package
    server.
like image 363
Fabio Antunes Avatar asked Oct 21 '13 01:10

Fabio Antunes


1 Answers

This may be a problem with the slow GlassFish update server. Here are some steps you can try:

You should retry first to see if the error occurs again. You can start a cmd, navigate to the \glassfish\bin directory and run updatetool.bat so you can see the output which is printed after the one you posted.

If you are behind a proxy you should make sure it is setup correctly in the system settings.

You can also try to install the updates through the GlassFish admin console. Start your GlassFish instance and navigate to http:\\localhost:4848. On the bottom of the left menu click on Updatetool. There you can choose and install the desired updates.

Another option is to change the timeouts of the pkg tool. To set the timeout to 300 seconds do the following in a cmd (on Windows):

set PKG_CLIENT_CONNECT_TIMEOUT=300
set PKG_CLIENT_READ_TIMEOUT=300

Your last (ok, there may be other ones) option is to just skip the update process and do the tutorial with the current version. It should work anyway and I can see in my GlassFish update center that there is only an update for the tutorial documentation at the moment.

like image 51
unwichtich Avatar answered Oct 12 '22 08:10

unwichtich