aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Error message when running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Error message when running "Professional SCWCD" example" Watch "Error message when running "Professional SCWCD" example" New topic
Author

Error message when running "Professional SCWCD" example

Andy Wong
Greenhorn

Joined: May 28, 2001
Posts: 20
Hi,
I downloaded the "Professional SCWCD" casestudy sample code and try to install it on Forte for Java Community Edition. When I tried to start the application, I got the following error:
2003-02-08 17:17:10 WebappLoader[]: Deploying class repositories to work directory C:\ide-awong\tomcat401_base\work\localhost\_
2003-02-08 17:17:10 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-02-08 17:17:10 StandardManager[]: Seeding of random number generator has been completed
2003-02-08 17:17:11 ContextConfig[]: Added certificates -> request attribute Valve
2003-02-08 17:17:11 ContextConfig[]: No Realm has been configured to authenticate against
2003-02-08 17:17:11 ContextConfig[]: Marking this application unavailable due to previous error(s)
2003-02-08 17:17:11 StandardContext[]: Error initializing naming context for context
2003-02-08 17:17:11 StandardContext[]: Context startup failed due to previous errors
2003-02-08 17:17:11 StandardContext[]: Error initializing naming context for context
Why it is complaining there is "No Realm has been configured to authenticate against"? Here is the content of the web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>controller</servlet-name>
<servlet-class>com.wrox.scwcd.chapter14.ControllerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>controller</servlet-name>
<url-pattern>/controller</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/forumTaglib</taglib-uri>
<taglib-location>/WEB-INF/scwcd.tld</taglib-location>
</taglib>
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureResource</web-resource-name>
<url-pattern>/controller/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>owner</role-name>
<role-name>user</role-name>
<role-name>moderator</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Secure Realm</realm-name>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error.html</form-error-page>
</form-login-config>
</login-config>
</web-app>
Enrico Mannarino
Ranch Hand

Joined: Dec 14, 2001
Posts: 133
Hi,
check your config file: CATALINA_HOME/conf/tomcat-users.xml
You must define the users and roles in this file before accessing this servlet!
/Enrico
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error message when running "Professional SCWCD" example
 
Similar Threads
Is auth-constraint related to security-role?
404 - the requested resource is not availabe...
tomcat formAutheticator problem
HTTP 403 for authenticated users - FIXED
Struts war deploy problem