Are you able to run the example using the build.xml outside of NetBeans? This error typically happens when the appserv-rt.jar is not in the classpath. Double-check that your configuration for running the client within NetBeans includes all the same .jars that are included in the build.xml "runjavaclient" target.
<target name="runjavaclient"
description="execute Standalone java client">
<java fork="on"
failonerror="true"
classpath="${glassfish.home}/lib/javaee.jar:${glassfish.home}/lib/ap
pserv-rt.jar:${build}/${javaclient}"
classname="ejb30.${testname}JavaClient">
</java>
</target>
[Message sent by forum member 'ksak' (ksak)]
http://forums.java.net/jive/thread.jspa?messageID=202484