users@glassfish.java.net

Re: issues on starting the glassfish server

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Wed, 06 Apr 2011 14:08:23 -0700

OG7,

This error typically occurs because NetBeans installation installs
GlassFish in "Program Files" directory (with admin privileges) and then
NetBeans is started as a normal user. So NetBeans does not have
permissions to create log files in the default location
(domains/domain1/logs/server.log) and OSGi cache files as it requires
admin privileges.

You can solve it two ways:

- Start NetBeans using Admin privileges by right-clicking on NetBeans
icon and say "Run as administrator"
- Install GlassFish in a non-admin directory

HTH,
-Arun

On 4/5/11 12:45 PM, forums_at_java.net wrote:
> yes Im sorry, when I first wrote this message my explorer crashed, and I
> didnt see it posted it... I'll write only at this message from now on. I
> cant
> tell whats wrong over there, its just an application location, and this
> application does exist... Heres another thougt: if I try to start the
> glassfish from the netbeans IDE instead as a stand alone (i.e asadmin) i
> get
> this output for errors: Warning: Cannot open log file: C:\Program Files
> (x86)\glassfish-v3-prelude\glassfish\domains\domain1/logs/jvm.log Warning:
> Forcing option -XX:LogFile=C:\Users\oran\AppData\Local\Temp\\hs_pid2156.log
> INFO: Launching GlassFish on Apache Felix OSGi platform Welcome to Felix.
> ================= INFO: Cannot create record of lastModified file Error
> creating bundle cache: java.lang.RuntimeException: Unable to create profile
> directory. at
> org.apache.felix.framework.cache.BundleCache.initialize(BundleCache.java:353)
>
> at org.apache.felix.framework.cache.BundleCache.(BundleCache.java:95) at
> org.apache.felix.framework.Felix.(Felix.java:248) at
> org.apache.felix.framework.Felix.(Felix.java:125) at
> org.apache.felix.main.Main.main(Main.java:235) 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
> com.sun.enterprise.glassfish.bootstrap.ASMainFelix$1.run(ASMainFelix.java:101)
>
> at java.lang.Thread.run(Thread.java:619) ERROR:
> org.apache.felix.framework.cache.BundleCache: Unable to create directory:
> C:\Program Files
> (x86)\glassfish-v3-prelude\glassfish\domains\domain1\.felix\gf
>
> --
>
> [Message sent by forum member 'OG7']
>
> View Post: http://forums.java.net/node/788285
>
>

-- 
Blog: http://blogs.sun.com/arungupta
Twitter: http://twitter.com/arungupta