4

Summary: The pkg-bootstrap.jar and related files are missing from the latest GlassFish 4.1.2 and this prevents the updatetool from running. What is the proper way to install and run updatetool on Windows 10?

Detail: I was working with the Java EE 7 tutorial and downloaded the Java EE 7 SDK Update 3 (not Web Profile) which is based on GlassFish Open Source Edition 4.1.2. I ran into a problem running the updatetool on Windows 10. When run, it gives the option to install itself but the installation fails. It looks like the update tool uses the pkg tool, and that uses a pkg-bootstrap to install itself the first time. However, this is no longer included in GlassFish 4.1.2. When the updatetool is run, it produces the following errors:

C:\glassfish4\bin>updatetool

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.

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): y


C:\glassfish4>"C:\Program Files\Java\jdk1.8.0_121\bin\java" -Dimage.path="C:\glassfish4\bin\\.." -jar "C:\glassfish4\bin\\..\pkg/lib/pkg-client.jar" refresh    
Error: Unable to access jarfile C:\glassfish4\bin\\..\pkg/lib/pkg-client.jar

C:\glassfish4>"C:\Program Files\Java\jdk1.8.0_121\bin\java" -Dimage.path="C:\glassfish4\bin\\.." -jar "C:\glassfish4\bin\\..\pkg/lib/pkg-bootstrap.jar" "C:\Users\[userid]\AppData\Local\Temp\pkg-bootstrap21687.props"    
Error: Unable to access jarfile C:\glassfish4\bin\\..\pkg/lib/pkg-bootstrap.jar

C:\glassfish4\bin\pkg does not exist in either the latest Java EE 7 SDK Update 3 or the latest GlassFish 4.1.2. Some research on the nightly builds shows that the directory trees glassfish4/.org.opensolaris,pkg and glassfish4/pkg were removed between builds glassfish-4.1.2-b03-02_25_2017 and glassfish-4.1.2-b03-03_07_2017. I can't find anything that explains why they were removed or an alternate way to install the updatetool. My work around was to copy the two trees from glassfish-4.1.2-b03-02_25_2017 into c:\glassfish4 (from the Java EE 7 SDK Update 3) and that seems to work. But, I figure that if this was removed, there was a good reason for it, and I shouldn't be hacking it.

If there was a separate installation step for the package tool, I missed it. What is the proper way to get the updatetool to run on GlassFish 4.1.2?

I have jdk1.8.0_121 and jre1.8.0_121.

Thanks for your help.

DevDevDev
  • 41
  • 1
  • 3
  • I'm having the same issue. Did you ever find a solution? – MakkyNZ Jun 05 '17 at 02:58
  • No, I'm living with my work around just fine so far. java.net was in the process of being shut down when I had my issue, but now I see you could try posting to https://javaee.groups.io/g/glassfish (I didn't want to post in multiple locations.) – DevDevDev Jun 07 '17 at 00:41

5 Answers5

5

I had the same problem as DevDevDev.

I went to the link in his post:

http://download.oracle.com/glassfish/4.1.2/nightly/index.html

Downloaded the archive:

glassfish-4.1.2-b03-02_25_2017

http://download.oracle.com/glassfish/4.1.2/nightly/glassfish-4.1.2-b03-02_25_2017.zip

Extracted the missing folders into my glassfish directory:

/glassfish4/pkg

/glassfish4/.org.opensolaris,pkg

As DevDevDev I have questions about why it was removed but it works for me...for now.... Hope it helps someone else. Thank you DevDevDev I would not have solved this without your post!

PlickPlick
  • 197
  • 15
0

I was working with Java SE. Then I needed to work with JAX-WS, so I went into the same website as you.

Basically, it says that you have to:

  1. Download the package (a compressed file with a folder called glassfish4)
  2. Unzip the downloaded file (does not specify where)
  3. voilá

It did not work for me, so I kept searching and I found this: https://forums.netbeans.org/post-91328.html

You just need to download this update from netbeans plugin Manager:

"Java EE Base"

Good luck!

  • 1
    Was your error specifically with the updatetool in glassfish4/bin? I do have NetBeans 8.2 installed and the "Java EE Base" plugin 1.31.1 installed. I was able to build and deploy Java EE applications with NetBeans. But I still couldn't run the updatetool. – DevDevDev May 31 '17 at 14:53
  • Same problem as DevDevDev already had the updates installed but still missing the files. DevDevDevs solution solved the answer for me I clearified it a little bit in my answer below. But the solution and credit should go to DevDevDev. – PlickPlick Dec 06 '17 at 09:45
0

I got the same problem too. It seems that glassfish 4.1 did not integrate the Update Tool, so as doc of oracle suggests, we'd better install SDK 6(glassfish 3). Here is Java EE 6 SDK Update 3, note that the version provided here is with JDK 7. If you already installed JDK in your windows 10, you may ignore it.

When you finish downloading the .exe file, you should not install SDK by double-click the .exe file. Instead, you should run below command:

java_ee_sdk-6u3-jdk7-windows-x64.exe -j [JRE-Home]

note, command here is the name of your .exe file and it needs console arg of JRE Home, mine command is as below:

java_ee_sdk-6u3-jdk7-windows-x64.exe -j D:\JDK\jre

Owen Lee
  • 21
  • 2
  • 1
    To clarify, you are saying to just use older SDK before the problem was introduced? That may be an alternative for some, but not me. – DevDevDev Jul 30 '17 at 19:30
0

It seems that unzipping the file using Windows explorer's zip support doesn't work properly. If you instead do as described in the README and run:

jar xvf glassfish-4.1.zip

The archive is extracted properly and all the needed pkg files are there.

Svend Hansen
  • 3,277
  • 3
  • 31
  • 50
  • I did this and exactly the same files were missing, so it seems the Windows explorer's zip support did work properly. The archive was extracted and all the needed pkg files were not there. Then I tried Patrik's workaround and all was well. – Ger Sep 10 '17 at 17:30
0

What files do you need? I had the save problem I was looking for the files of tutorial. Finally I found them here: ..../glassfish4/docs/javaee-tutorial/

Egor
  • 2,122
  • 2
  • 21
  • 23