users@glassfish.java.net

Re: Couldn't run Application Client on GFv3.0

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Apr 2010 00:27:16 PDT

Hi Tim,

I have been able to reproduced the same error on another PC (removed JDK1.6.0_17, NB6.7, GF2.1 & installed JDK1.6.0_19, bundled NB6.8 - replaced GF3.0 with nightly downloaded GF3.1) with the same OS configuration by creating a simple Hello EAR with the following detail:

HelloRemote.java
@Remote
public interface HelloRemote {
    void Greeting();
}

Hello.java
@Stateless
public class Hello implements HelloRemote {

    public void Greeting() {

        System.out.println("Hello World!");
    }
}

Main.java (application client)
public class Main {

    @EJB
    private static HelloRemote hellobean;

    public static void main(String[] args) {

        hellobean.Greeting();
    }
}

GF 3.1 server log

WARNING: Cannot load client.Main reason : client.Main
java.lang.ClassNotFoundException: enterpriseapplicationnb68gf31.Main

SEVERE: ACDEPL105: Error starting the adapter to serve static system-level content

Runtime error output from Netbeans

java.lang.NullPointerException
        at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)
        at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)
        at org.glassfish.appclient.client.acc.ACCLogger.<init>(ACCLogger.java:80)
        at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)
        at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)
        at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Java Result: 1

More detail on Java build specifics

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Jack>java -version
java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)

Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_19; Java HotSpot(TM) Client VM 16.2-b04
System: Windows XP version 5.1 running on x86; Cp1252; en_AU (nb)

Thanks,

Jack
[Message sent by forum member 'htran_888']

http://forums.java.net/jive/thread.jspa?messageID=395842