views:

537

answers:

2

I am currently running a simple EJB application using a stateless Session Bean. I am working on NetBeans 6.8 with Personal Glassfish 3.0 and I have installed on my system both the Java EE and the Java SE. I don't know whether it is relevent but I am running Windows7 64-bit version. The Session Bean I implemented has just one method sayHello(); which just prints hello on the screen. When I try to run the application I'm getting the following error:

pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
MyEnterprise-app-client.init:
MyEnterprise-ejb.init:
MyEnterprise-ejb.deps-jar:
MyEnterprise-ejb.compile:
MyEnterprise-ejb.library-inclusion-in-manifest:
MyEnterprise-ejb.dist-ear:
MyEnterprise-app-client.deps-jar:
MyEnterprise-app-client.compile:
MyEnterprise-app-client.library-inclusion-in-manifest:
MyEnterprise-app-client.dist-ear:
MyEnterprise-ejb.init:
MyEnterprise-ejb.deps-jar:
MyEnterprise-ejb.compile:
MyEnterprise-ejb.library-inclusion-in-manifest:
MyEnterprise-ejb.dist-ear:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
post-dist:
dist-directory-deploy:
pre-run-deploy:
Starting Personal GlassFish v3 Domain
Personal GlassFish v3 Domain is running.
Undeploying ...
Initializing...
Initial deploying MyEnterprise to C:\Users\Naqsam\Documents\NetBeansProjects\MyEnterprise\dist\gfdeploy\MyEnterprise
Completed initial distribution of MyEnterprise
post-run-deploy:
run-deploy:
run-display-browser:
run-ac:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
MyEnterprise-app-client.init:
MyEnterprise-ejb.init:
MyEnterprise-ejb.deps-jar:
MyEnterprise-ejb.compile:
MyEnterprise-ejb.library-inclusion-in-manifest:
MyEnterprise-ejb.dist-ear:
MyEnterprise-app-client.deps-jar:
MyEnterprise-app-client.compile:
MyEnterprise-app-client.library-inclusion-in-manifest:
MyEnterprise-app-client.dist-ear:
MyEnterprise-ejb.init:
MyEnterprise-ejb.deps-jar:
MyEnterprise-ejb.compile:
MyEnterprise-ejb.library-inclusion-in-manifest:
MyEnterprise-ejb.dist-ear:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
post-dist:
dist-directory-deploy:
pre-run-deploy:
Undeploying ...
Initial deploying MyEnterprise to C:\Users\Naqsam\Documents\NetBeansProjects\MyEnterprise\dist\gfdeploy\MyEnterprise
Completed initial distribution of MyEnterprise
post-run-deploy:
run-deploy:
Warning: Could not find file C:\Users\Naqsam\.netbeans\6.8\GlassFish_v3\generated\xml\MyEnterprise\MyEnterpriseClient.jar to copy.
Copying 1 file to C:\Users\Naqsam\Documents\NetBeansProjects\MyEnterprise\dist
Copying 4 files to C:\Users\Naqsam\Documents\NetBeansProjects\MyEnterprise\dist\MyEnterpriseClient
Copying 1 file to C:\Users\Naqsam\Documents\NetBeansProjects\MyEnterprise\dist\MyEnterpriseClient
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
run-MyEnterprise-app-client:
run:
BUILD SUCCESSFUL (total time: 1 minute 59 seconds)

The server also shows this error message:

http://pastebin.com/NNu1eGA1

What do you think is the problem? This is still my first EJB application so I'm new to this API.

+1  A: 

Remove all EJBs and restart Glassfish server. See if you get any error. If you get error without EJB, then something is wrong with your Glassfish installation.

If the Glassfish starts fine without EJBs, then pls post your EJB code. There could be some issue with the EJB code.

navr
I tried restarting Glassfish multiple times, however the outcome never changed, the same exceptions as shown above were thrown. Then I'll try reinstalling Glassfish, and see if it works.
Spi1988
A: 

The user Pascal Thivent was kind enough to delete the post which contained the answer for this problem for some strange and odd reason. So I will have to repost the solutions.

So basically the solutions are:

1: Glassfish was throwing a lot of warnings because it was installed in a directory whose path name had a space "Program Files". So to solve this problem, just install it in C:/

2: As regards the NullPointerException which was being thrown (see the first post and scroll a bit down) there seems an issue see this link https://glassfish.dev.java.net/issues/show_bug.cgi?id=11494 with glassfish and java6u18. So to solve this problem either wait for java to fix this bug in future updates, or else downgrade to java6u17 or lower.

Hope this might be helpful.

Spi1988
Yes, I deleted **my** answer (may I?) because you didn't seem to value it and because you already have a very nice answer that explains clearly and precisely what the problem is (you accepted it, didn't you?), sigh. So why bother?
Pascal Thivent
I sincerely cannot understand why you got so upset about this question. I just asked a question and both you and navr told me to reinstall glassfish (thx). Navr posted before you therefore i choose his answer. The only thing which I find unfair in all this is that I had to write the solutions to the problem twice thus wasting time, (since first I wrote the solutions as comments to your answer) because you deleted your answer (you have every right to do so, however it was unfair on me).
Spi1988