0 Replies Latest reply on Nov 25, 2014 5:56 AM by gouessej

    How to create an enterprise application client with Netbeans 7.4 and JBoss 7?

    gouessej

      Hi

       

      I try to create an enterprise application client with JBoss by following this official tutorial (based on Glassfish): https://netbeans.org/kb/docs/javaee/entappclient.html

      but I get this error message: Error: Unable to access jarfile C:\EntAppClient\${client.jar}

      As far as I know, Netbeans IDE supports JBoss 7 since its version 7.3 RC1 and I use Netbeans 7.4. This feature seemed already broken for a long time according to this thread: http://forums.netbeans.org/topic40270.html

       

      It is expected to work as Netbeans is intended to support other application servers. However, some Glassfish specific properties are hardcoded inside the Ant build scripts and the property client.jar is set if and only if j2ee.clientName isn't set which isn't my case (it's set to EntAppClient.jar).

      When I set client.jar to ${dist.dir}/${j2ee.clientName}, I go a bit further but Netbeans doesn't find the JAR of the remote interface and the Glassfish specific agent class loader org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader.

      I set client.jar to ${dist.dir}/${j2ee.clientName} in -post-init, I put the content of the JAR ${reference.EJBRemoteInterface.jar} into the JAR client.jar and I comment the line about ACCAgentClassLoader in build-impl.xml but it just gives me a NullPointerException in Main because the session hasn't been injected.

       

      How can I make it work?

       

      I'm forced to use Netbeans (otherwise I would obviously use JBoss tools).

       

      Best regards.