The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

garyaiki (1) [Avatar] Offline
#1
First of all the book is exceptionally good, it clarifies so much. Chapter15 webservice is the first example that hasn't worked (I downloaded code in March and added the License file) I use OS X 10.6.7 with Java 1.6.0_24 and Ant 1.8.2 Here's my abbreviated ant log

spr-108a-001:webservice gs$ ant
Buildfile: /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/webservice/build.xml

gwt.app:
[echo] /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/../build.xml
dist:
[echo] /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/../build.xml
stockprovider:
[echo] /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/../build.xml
compile:
local.dist:
[bnd] # org.foo.stockprovider (gwtapp.stockprovider-1.0.jar) 3 (not modified)
gwtc:
[java] Compiling module com.google.gwt.sample.stockwatcher.StockWatcher
[java] Compiling 6 permutations
[java] Permutation compile succeeded
[java] Linking into war
[java] Link succeeded
[java] Compilation succeeded -- 23.778s
build:
war:
[zip] Building zip: /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/bundles/StockWatcher.war

osgi:
[bnd] Warnings
[bnd] None of Export-Package, Private-Package, -testpackages, or -exportcontents is set, therefore no packages will be included
[bnd] The Bundle-Classpath does not contain the actual bundle JAR (as specified with '.' in the Bundle-Classpath) but the JAR does contain classes. Is this intentional?
[bnd] Errors
[bnd] The default package '.' is not permitted by the Import-Package syntax.
[bnd] This can be caused by compile errors in Eclipse because Eclipse creates
[bnd] valid class files regardless of compile errors.
[bnd] The following package(s) import from the default package [com.google.gwt.sample.stockwatcher.client, com.google.gwt.sample.stockwatcher.server]
[bnd] /Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/StockWatcher/build.properties: bnd failed
[bnd] at aQute.bnd.ant.BndTask.executeBackwardCompatible(BndTask.java:125)

BUILD FAILED
/Users/gs/3rdParty/osgi/osgi-in-action/common.xml:91: The following error occurred while executing this line:
/Users/gs/3rdParty/osgi/osgi-in-action/build.xml:9: The following error occurred while executing this line:
/Users/gs/3rdParty/osgi/osgi-in-action/chapter15/webservice/build.xml:11: The following error occurred while executing this line:
/Users/gs/3rdParty/osgi/osgi-in-action/common.xml:91: The following error occurred while executing this line:
/Users/gs/3rdParty/osgi/osgi-in-action/build.xml:9: The following error occurred while executing this line:
/Users/gs/3rdParty/osgi/osgi-in-action/chapter15/gwtapp/StockWatcher/build.xml:106: Failed to build jar file:

Total time: 28 seconds
stuart.mcculloch (29) [Avatar] Offline
#2
Re: Ch15 webservice build fails OS X
This is odd, because I'm also using OS X 10.6.7 with Java 1.6.0_24 and Ant 1.8.2 and I get no error building the chapter15 examples from the command-line.

Do you have (or previously had) the examples loaded into Eclipse? The error message is one that typically appears when Eclipse has left some incomplete class files in the project directory so it might be worthwhile doing a clean and repeating the build (maybe even check for extra files compared to the original zip in case they're somewhere other than the build directory).