Skip to main content

Enabling security in Glassfish breaks the Netbeans and Glassfish doesn't start anymore

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
sanurmi
Offline
Joined: 2013-03-18

I have repeated this now three times, yes stupid me and this is making me crazy! I have a MacBook Pro, no firewall and everything is working fine before enabling security manager.

Netbeans 3.2
Glassfish 3.1.2
Macbook Pro

Phase 1: Create JDBCRealm and save
2: Go to server-config and check Enabled Security manager
3: Choose jdbcRealm for default Realm
4: Press Save-button
5: Restart required--->Restart
6: Nothing happend and log is saying that:
[#|2013-04-09T21:48:47.296+0300|SEVERE|glassfish3.1.2|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=32;_ThreadName=Thread-4;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: PermGen space
|#]
7: Boot machine
8: Start Netbeans
9 Start your app, not working. Server is not starting anymore and log says:

Exception in thread "main" java.security.AccessControlException: access denied (java.lang.RuntimePermission getenv.GlassFish_Platform)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:549)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.System.getenv(System.java:844)
at com.sun.enterprise.glassfish.bootstrap.ASMainHelper.whichPlatform(ASMainHelper.java:105)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:68)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)

10: Netbeans shows the window after 5 minutes like screenshot attached:

Starting GlassFish Server 3.1.2
Could not connect to admin listener for GlassFish Server 3.1.2.
Verify that NetBeans can make outbound connections to localhost:4848
/Users/temp/NetBeansProjects/testService2/nbproject/build-impl.xml:1034: Deployment error: Could not connect to admin listener for GlassFish Server 3.1.2.
Verify that NetBeans can make outbound connections to localhost:4848
See the server log for details.
BUILD FAILED (total time: 2 minutes 1 second)

Could somebody tell me why this is happening and how could I fix that? If I uninstall Netbeans and install it again, I will get the same problem. If I uninstall and clean everything, history data of Netbeans, cache etc and install it again, it will work again, but this takes time and is annoying.

Is this a bug? is there any possibility to start the server and get in to admin console?

Sami

AttachmentSize
Screen_Shot_2013-04-09_at_10.02.15_PM.png32.65 KB
Screen_Shot_2013-04-09_at_9.50.49_PM.png80.16 KB