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.

ggarriga (3) [Avatar] Offline
#1
In the tuscany SCA book, page 278 of 436, there is an paragraph telling:

"java org.apache.tuscany.sdo.generate.XSD2JavaGenerator –targetDirectory
target/sdo-source –javaPackage payment.creditcard –prefix CreditCardPayment
–noNotification –noContainment –noUnsettable src/main/resources/wsdl/
CreditCardPayment.wsdl"

When I execute this command from the console, I got this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tuscany/sd
o/generate/XSD2JavaGenerator
Caused by: java.lang.ClassNotFoundException: org.apache.tuscany.sdo.generate.XSD
2JavaGenerator
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.apache.tuscany.sdo.generate.XSD2JavaGenerator
. Program will exit.

Where is the XSD2JavaGenerator class?

I tried to download the tuscany SDO from

https://cwiki.apache.org/confluence/display/TUSCANY/SDO+Java+Download

but there aren´t any file on the server so I can´t download.

How can I solve this problem so the XSD2JavaGenerator can be found?
simon.nash (37) [Avatar] Offline
#2
Re: SDO
You need to add lib/tuscany-sca-manifest.jar from the Tuscany SCA Java 1.6 binary distribution to your classpath. I'll pass this comment on so that we can address it in the final text of the book.