Skip to main content

Enterprise application client using netbeans and glassfish server hangs

No replies
amishera2011
Offline
Joined: 2014-01-25
Points: 0

Hello,

I have followed this application client tutorial from:

https://netbeans.org/kb/docs/javaee/entappclient.html

However when I run the EntAppClient it hangs. The offending fragment of ant file is :

<java dir="${basedir}" fork="true" jar="${client.jar}">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="@{serverparams}"/>
<jvmarg line="${run.jvmargs.param}"/>
<arg line="@{args}"/>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<env key="APPCPATH" path="${javac.classpath}"/>
<sysproperty key="java.system.class.loader" value="org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader"/>
<customize/>
</java>
The output from command line for this:

-run:
[echo] C:\Users\mazumdam\Documents\NetBeansProjects\EntAppClient
[java] Executing 'C:\Program Files\Java\jdk1.7.0_45\jre\bin\java.exe' with
arguments:
[java] '-Xbootclasspath/p:C:\Program Files\NetBeans 7.4\enterprise\modules\
ext\javaee6-endorsed\javax.annotation.jar;C:\Program Files\NetBeans 7.4\enterpri
se\modules\ext\javaee6-endorsed\jaxb-api-osgi.jar;C:\Program Files\NetBeans 7.4\
enterprise\modules\ext\javaee6-endorsed\webservices-api-osgi.jar'
[java] '-Djava.endorsed.dirs=C:\glassfish4\glassfish\lib\endorsed;C:\glassf
ish4\glassfish\modules\endorsed'
[java] '-javaagent:C:\glassfish4\glassfish\lib\gf-client.jar=mode=acscript,
arg=-configxml,arg=C:\glassfish4\glassfish\domains\domain1\config\glassfish-acc.
xml,client=jar=dist/EntAppClientClient.jar'
[java] '-Djava.system.class.loader=org.glassfish.appclient.client.acc.agent
.ACCAgentClassLoader'
[java] '-jar'
[java] 'C:\Users\mazumdam\Documents\NetBeansProjects\EntAppClient\dist\EntA
ppClientClient.jar'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] Setting environment variable: APPCPATH=C:\Users\mazumdam\Documents\N
etBeansProjects\EJBRemoteInterface\dist\EJBRemoteInterface.jar
The code that the java task is running is this:

public class Main {
@EJB
private static MySessionRemote mySession;

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// System.err.println("result = " + mySession.getResult());
}

}
It doesn't offer any clue why it is hanging.

If I remove the @Ejb tag then program executes fine.

How can I debug this?

Thanks