Netbeans/Glassfisch form authentication configuration problem

View: New views
4 Messages — Rating Filter:   Alert me  

Netbeans/Glassfisch form authentication configuration problem

by blubb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi folks,

I encountered some problems setting up form authentication in netbeans (I'm using netbeans 6.1, glassfish v2 and java ee 5). I took the following steps:

- I used the Java DB to set up a database (derby pool), containing the user and passwords (as described also here)
- In the Java Application Server Admin Console I defined a realm using the above jdbc ressource (just the preconfigured sample database)
- In my project I entered the following lines in the web.xml

       <security-constraint>
        <web-resource-collection>
            <web-resource-name>Secure Pages</web-resource-name>
            <url-pattern>/restricted/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>USERS</role-name>
        </auth-constraint>
    </security-constraint>  
   
   
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>authentification</realm-name>
        <form-login-config>
            <form-login-page>/index.html</form-login-page>
            <form-error-page>/error.html</form-error-page>
        </form-login-config>
    </login-config>

defining the realm, error page and so on. The security constraint works (redirection to login page, which is in my case the index.html, when the access to the restricted area is tried) but I cant log in (the error page is always shown).

Could someone help me with this problem? Thanks in advance!

RE: Netbeans/Glassfisch form authentication configuration problem

by Gavin Ross(i) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you set the jdbc realm as the default realm to use in glassfish. If not
glassfish will be authenticating against the file realm (normally set as
default). If you go to the security section of glassfish configuration (not
the realms page) you will see the settings for selecting the default realm.

-----Original Message-----
From: blubb [mailto:ale999@...]
Sent: 08 May 2008 08:43 AM
To: nbj2ee@...
Subject: [nbj2ee] Netbeans/Glassfisch form authentication configuration
problem



Hi folks,

I encountered some problems setting up form authentication in netbeans (I'm
using netbeans 6.1, glassfish v2 and java ee 5). I took the following steps:

- I used the Java DB to set up a database (derby pool), containing the user
and passwords (as described also
http://developinjava.com/readarticle.php?article_id=6 here )
- In the Java Application Server Admin Console I defined a realm using the
above jdbc ressource (just the preconfigured sample database)
- In my project I entered the following lines in the web.xml

       <security-constraint>
        <web-resource-collection>
            <web-resource-name>Secure Pages</web-resource-name>
            <url-pattern>/restricted/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>USERS</role-name>
        </auth-constraint>
    </security-constraint>  
   
   
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>authentification</realm-name>
        <form-login-config>
            <form-login-page>/index.html</form-login-page>
            <form-error-page>/error.html</form-error-page>
        </form-login-config>
    </login-config>

defining the realm, error page and so on. The security constraint works
(redirection to login page, which is in my case the index.html, when the
access to the restricted area is tried) but I cant log in (the error page is
always shown).

Could someone help me with this problem? Thanks in advance!
--
View this message in context:
http://www.nabble.com/Netbeans-Glassfisch-form-authentication-configuration-
problem-tp17120975p17120975.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.


--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.9/1418 - Release Date: 2008/05/06
05:17 PM



RE: Netbeans/Glassfisch form authentication configuration problem

by blubb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, it works now. I had in addition to set a group role in sun-web.xml (otherwise it was shown this error: "No Principals mapped to Role [...]")

Cheers

Gavin Ross(i) wrote:
Have you set the jdbc realm as the default realm to use in glassfish. If not
glassfish will be authenticating against the file realm (normally set as
default). If you go to the security section of glassfish configuration (not
the realms page) you will see the settings for selecting the default realm.

-----Original Message-----
From: blubb [mailto:ale999@dnet.it]
Sent: 08 May 2008 08:43 AM
To: nbj2ee@netbeans.org
Subject: [nbj2ee] Netbeans/Glassfisch form authentication configuration
problem



Hi folks,

I encountered some problems setting up form authentication in netbeans (I'm
using netbeans 6.1, glassfish v2 and java ee 5). I took the following steps:

- I used the Java DB to set up a database (derby pool), containing the user
and passwords (as described also
http://developinjava.com/readarticle.php?article_id=6 here )
- In the Java Application Server Admin Console I defined a realm using the
above jdbc ressource (just the preconfigured sample database)
- In my project I entered the following lines in the web.xml

       <security-constraint>
        <web-resource-collection>
            <web-resource-name>Secure Pages</web-resource-name>
            <url-pattern>/restricted/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>USERS</role-name>
        </auth-constraint>
    </security-constraint>  
   
   
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>authentification</realm-name>
        <form-login-config>
            <form-login-page>/index.html</form-login-page>
            <form-error-page>/error.html</form-error-page>
        </form-login-config>
    </login-config>

defining the realm, error page and so on. The security constraint works
(redirection to login page, which is in my case the index.html, when the
access to the restricted area is tried) but I cant log in (the error page is
always shown).

Could someone help me with this problem? Thanks in advance!
--
View this message in context:
http://www.nabble.com/Netbeans-Glassfisch-form-authentication-configuration-
problem-tp17120975p17120975.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.


--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.9/1418 - Release Date: 2008/05/06
05:17 PM


NetBeans 6.1 hangs while starting up

by ADeshpande :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have a JSF project, and a few plain Java projects in my workspace. On startup, the IDE window comes up, and NetBeans initiates a scan of the jars. The IDE doesn't respond to button clicks. Eventually the VM size of the IDE process stops changing in Windows Task Manager. The IDE window is grey at this point. The IDE log contains one exception (excerpt below), followed by a few warnings and info messages. The last message is

INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 2,147,483,647

I deleted the .netbeans\6.1\var\cache folder after killing NetBeans, and retried, with the same results. Has anybody experienced these symptoms? Thanks.

Exception excerpt:
================
INFO [org.netbeans.core.windows.persistence]: [PersistenceManager.getTopComponentForID] Problem when deserializing TopComponent for tcID:'MultiView-PageFlow#007CXML#007C'. Reason: java.lang.NoSuchMethodException: org.netbeans.modules.web.jsf.JSFConfigMultiviewDescriptor$JSFConfigMultiviewElement.<init>()

msg
msg
msg
Caused: java.lang.NoSuchMethodException: org.netbeans.modules.web.jsf.JSFConfigMultiviewDescriptor$JSFConfigMultiviewElement.<init>()
        at java.lang.Class.getConstructor0(Class.java:2678)
        at java.lang.Class.getDeclaredConstructor(Class.java:1953)
        at org.openide.windows.TopComponent$Replacer.readObject(TopComponent.java:1433)
Caused: java.io.IOException
        at org.openide.windows.TopComponent$Replacer.readObject(TopComponent.java:1489)


******
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents
Contain private, privileged and confidential information belonging
to the sender.  The information therein is solely for the use of the
addressee.  If your receipt of this transmission has occurred as the
result of an error, please immediately notify us so we can arrange
for the return of the documents.  In such circumstances, you are
advised that you may not disclose, copy, distribute or take any other
action in reliance on the information transmitted.