[Security & JAAS/JBoss] - Re: NullPointerException @ DatabaseServerLoginModule.java:14
by jahebe
It's used in securing a web-app.
The web.xml config is shown below - it seems to be correct, as the login-module is invoked with the proper input (username/password/dsJndiName).
I'm starting to think it's some environmental or contextual setting that
affects the server.
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>*</web-resource-name>
| <url-pattern>/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>DELETE</http-method>
| <http-method>POST</http-method>
| <http-method>PUT</http-method>
| </web-resource-collection>
| <auth-constraint>
| <role-name>administrator</role-name>
| <role-name>manager</role-name>
| <role-name>user</role-name>
| </auth-constraint>
| </security-constraint>
|
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>fluxmonClocker</realm-name>
| </login-config>
|
For reference, the startup log:
| 19:14:55,637 INFO [Server] Starting JBoss (MX MicroKernel)...
| 19:14:55,638 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
| 19:14:55,641 INFO [Server] Home Dir: /home/jhb/jboss-4.2.2.GA
| 19:14:55,641 INFO [Server] Home URL: file:/home/jhb/jboss-4.2.2.GA/
| 19:14:55,642 INFO [Server] Patch URL: null
| 19:14:55,642 INFO [Server] Server Name: default
| 19:14:55,642 INFO [Server] Server Home Dir: /home/jhb/jboss-4.2.2.GA/server/default
| 19:14:55,643 INFO [Server] Server Home URL: file:/home/jhb/jboss-4.2.2.GA/server/default/
| 19:14:55,643 INFO [Server] Server Log Dir: /home/jhb/jboss-4.2.2.GA/server/default/log
| 19:14:55,643 INFO [Server] Server Temp Dir: /home/jhb/jboss-4.2.2.GA/server/default/tmp
| 19:14:55,643 INFO [Server] Root Deployment Filename: jboss-service.xml
| 19:14:56,566 INFO [ServerInfo] Java version: 1.6.0_02,Sun Microsystems Inc.
| 19:14:56,567 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.6.0_02-b05,Sun Microsystems Inc.
| 19:14:56,567 INFO [ServerInfo] OS-System: Linux 2.6.22-14-generic,i386
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122322#4122322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122322
18 years, 6 months
[JBoss Seam] - Re: Exceptions ending conversations
by alessandrolt
The error remains, even with JavaBeans, @ApplicationContext, RuntimeException or Exceptions.
Have reproduce this Error in the example "Booking".
Please follow these steps:
1) Change the method bookHotel() of HotelBookingAction.
|
| public void bookHotel() throws Exception
| {
| /* booking = new Booking(hotel, user);
| Calendar calendar = Calendar.getInstance();
| booking.setCheckinDate( calendar.getTime() );
| calendar.add(Calendar.DAY_OF_MONTH, 1);
| booking.setCheckoutDate( calendar.getTime() ); */
|
| throw new Exception("Test Error Handler");
| }
|
|
2) Change the HotelBooking interface:
| public void bookHotel() throws Exception;
|
3)Insert in pages.xml:
| <exception class="java.lang.Exception">
| <redirect view-id="/main.xhtml">
| <message severity="error">Test Handle Error Message</message>
| </redirect>
| </exception>
|
Now, start seam-booking and choose a hotel. Click in "Book Hotel" button.
The exception will redirect to main.xhtml. In the Firefox and IE7 (from w. Vista), the result is not the same (In IE7 does not appear whenever the error message).
Select some hotels, click "Book Hotel" and switch workspaces.
See. The workpaces exists but the hotels not ("The conversation ended, timed out or was processing another request"). But it is not timed out.
I think actually there is a Bug in dealing with the exceptions Seam.
It is very important exception handler of Seam without finish the conversation.
Can anyone confirm this?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122315#4122315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122315
18 years, 6 months