Run JAAS Example with Tomcat 4
Can someone explain me, how i can run the JAAS-Example from SUN with Tomcat.
Please so that i can understand it, step by step.
Thanks for your help and understand !!!
Here you go:
Environment Tomcat 4.1.10
These steps will configure Tomcat Admin app so that it uses
JAASRealm to authenticate.
To keep things simple, I wrote a MyLoginModule that succeeds with username,password pair "jaas","jaas".
Authentication information as well as role "admin" are hardcoded, so you do not have to worry about additional settings.
So compile following files, and put them into e.q. tomcat/server/classes or jar them and put them to some place where
tomcat finds them :
--------my.MyLoginModule.java---------------
package my;
import java.util.Map;
import java.security.Principal;
import javax.security.auth.login.LoginContext;
import javax.security.auth.Subject;
import javax.security.auth.callback.*;
import javax.security.auth.login.*;
import javax.security.auth.spi.LoginModule;
import java.io.IOException;
public class MyLoginModule implements LoginModule {
protected CallbackHandler callbackHandler = null;
protected boolean committed = false;
protected boolean debug = false;
protected Map options = null;
protected Principal principal = null;
protected Map sharedState = null;
protected Subject subject = null;
protected void log(String message) {
System.out.print("MyLoginModule: ");
System.out.println(message);
public boolean abort() throws LoginException {
log("abort");
return (true);
public boolean commit() throws LoginException {
log("commit phase");
// If authentication was not successful, just return false
if (principal == null){
log("no principal commit fails");
return (false);
if (!subject.getPrincipals().contains(principal))
subject.getPrincipals().add(principal);
// add role principals
subject.getPrincipals().add(new MyRolePrincipal("admin"));
committed = true;
log("commit succesful");
return (true);
public void initialize(Subject subject, CallbackHandler callbackHandler,
Map sharedState, Map options) {
// Save configuration values
this.subject = subject;
this.callbackHandler = callbackHandler;
this.sharedState = sharedState;
this.options = options;
public boolean login() throws LoginException {
log("login phase");
// Set up our CallbackHandler requests
if (callbackHandler == null)
throw new LoginException("No CallbackHandler specified");
Callback callbacks[] = new Callback[2];
callbacks[0] = new NameCallback("Username: ");
callbacks[1] = new PasswordCallback("Password: ", false);
// Interact with the user to retrieve the username and password
String username = null;
String password = null;
try {
callbackHandler.handle(callbacks);
username = ((NameCallback) callbacks[0]).getName();
password =
new String(((PasswordCallback) callbacks[1]).getPassword());
} catch (IOException e) {
throw new LoginException(e.toString());
} catch (UnsupportedCallbackException e) {
throw new LoginException(e.toString());
if (!authenticate(username,password))
return false;
principal = new MyPrincipal(username);
return true;
public boolean logout() throws LoginException {
subject.getPrincipals().remove(principal);
committed = false;
principal = null;
return (true);
boolean authenticate(String s,String p){
return (s.compareTo("jaas") == 0) && (p.compareTo("jaas") == 0);
static public void main(String args[]) throws Exception{
LoginContext ctx = new LoginContext("TomCatAdminApplication");
ctx.login();
---------my/MyPrincipal.java-------------------
package my;
public class MyPrincipal implements java.security.Principal {
String m_Name = new String("");
public MyPrincipal(String name) {
m_Name = name;
public boolean equals(Object another) {
try {
MyPrincipal pm = (MyPrincipal)another;
return pm.m_Name.equalsIgnoreCase(m_Name);
} catch(Exception e){
return false;
public String getName() {
return m_Name;
public int hashCode() {
return m_Name.hashCode();
public String toString() {
return m_Name;
------my/MyRolePrincipal.java-------------
package my;
public class MyRolePrincipal extends MyPrincipal {
/** Creates a new instance of MyRolePrincipal */
public MyRolePrincipal(String s) {
super(s);
1. Configure Tomcat Administration Application in server.xml
<Context ..Tomcat Administration..>
<Realm className="org.apache.catalina.realm.JAASRealm" debug="3" appName="TomCatAdminApplication" userClassNames="my.MyPrincipal" roleClassNames="my.MyRolePrincipal">
</Realm>
</Context>
2. Configure the location of your JAAS configuration file in jre/lib/security/java.security
like this:
login.config.url.3=file:///d:/tomcats/tomcat410/auth.conf
3. Configure JAAS - sequence for "TomCatAdminApplication" in file:///d:/tomcats/tomcat410/auth.conf
like this:
TomCatAdminApplication {
my.MyLoginModule required;
4. Thats it. Restart Tomcat, and go to admin-app with "jaas","jaas" ....debug and enjoy. After you
got this working it is time to configure some more challenging login sequences....
Kullervo
Similar Messages
-
Can someone explain, how i can include the JAAS-Example in Tomcat 4. I am a newbie, therefore step
by step, please !! Everyone speaks about JAAS in the
web-enviroment, but nobody implements any example !!!
Please !!!
Thanks for your help and reply !!!Please help me ?????
-
Problem running your example with TCL in TestStand 2.0
I`m having problems trying to run your example: "Calling TCL Scripts from TestStand 1.0.x". I use TestStand 2.0. In fact, I don`t see any response when running first step in a sequence. Could it be issues related to the TestStand version.
The example should work in TestStand 2.0.x, since other users have reported that they have successfully done so and nothing has changed in TestStand 2.0.x that would affect its execution.
In order to get the example to work you will need to have the TCL interpreter installed correctly so that the dll being used in the example can invoke it. If you can programmatically control the interpreter with any other code module as this dll does then this example should work as well. However, if you cannot do this in any way on your system then it is safe to say that nothing will work including the example. Verify that the TCL interpreter will work in this fashion per the vendor's instructions and then try the example again. If you are receiving errors from TestStand
when executing the sequence let us know about those and we may be able to help you more directly.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask -
How can I run a servlet with tomcat
I'm a new learner in servlet,I recently write a servlet program,when I compile it,the compiler throws the error
"package javax.servlet.http does not exist",I have put the servlet.jar(which exist in d:\tomcat\bin directory) file into the classpath directory;my servlet source files are in D:\tomcat\webapps\mywork\web-inf\classes\com\stardeveloper\servlets;
"com.stardeveloper.servlets" is the package for my servlet source files,so I have write the sentence "package com.stardeveloper.servlets;" in my servlet source file.
I don't know how to resolve this problem.can you give me a help?servlet.jar doesn't exist in the folder you mentioned, but rather, in C:\tomcat40\common\lib, so this should be included in your classpath, the other thing you should care about is how you compiled your servlets, so that the package statement match the hirarchy of the file.
regards -
Hello guys
i am reading the good tutorials about of Technical Articles and Tips of j2me
i have a problem ,well i am in linux with j2me toolkit 2.2 and use the jvm or jdk 1.5 update 1
and trying to run the example with servlets to send an email
http://developers.sun.com/techtopics/mobility/midp/articles/socketRMI/
well this example consist in 3 java files how is evident
a EmailMidlet.java,EmailSender.java,EmailServlet.java
well i put EmailMidlet.java in the src (folder apps toolkit) of an project to execute the example
the rest of both java files go to an independent project or folder in tomcat (5.5.9)
(the web.xml and classes is fine) coz i execute other examples of the same style (that needs localhost or tomcat)
well i change of course the line of the url to my localhost
and when i try to send the email appear this message in my visual console in the toolkit
(is not the unique case related with servlets and email, coz there is an another example of this style that
throw this message) and the application,
Project settings saved
Building "SUN02"
Build complete
Running with storage root DefaultColorPhone
Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.
and of course the application deadlock
how i can fix the code?
p.d:i only change the line of the url
thanks a lot for your timeHi,
What are u exactly using? The PLSQL front-end or the Java front-end? How are u seeing this cut off? Is it in SQLPlus or ur own application?
thanks
Murali -
Problems with tomcat 4.0.1
hello,
i�ve written some servlets using forte 3.0 with tomcat 3.2.
everything works fine as long as I don�t run the servlets with tomcat 4.0.1.
i use the request dispatcher / forward method - which dosn�t work reliable.
it�s a list on which the user has to select one topic. the strange thing about it is that it works when you choose "back" after the error (dispatcher = null) has occured and select a different topic on that list - only the first choice makes en error.
running on tomcat 3.2 with forte it works fine. but i get the following message in the tomcat output window:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key dispatcher.forwardException
and
2002-01-13 11:40:05 - Ctx( /lg002234 ): Exception in: R( /lg002234 + /eingaben + null) - javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException
can somebody help?
is use the dispatcher three times in that post-method - ist that a problem?...sorry
it�s not a problem with the requestdispatcher,
problem is, that with tomcat 4.0.1 a parameter
sometimes gets lost - but not with tomcat 3.2
critical code is:
String tierartAuswahl = request.getParameter("tierartAuswahl");
is that a known bug of tomcat 4.0.1?? -
Facelets 1.1.14 example with MyFaces 1.2 and Tomcat 6
Hello,
I tried to run a little Faceletexample with MyFaces 1.2 (only Core without Tomahawk or something) and facelets 1.1.14.
I use tomcat 6.0.16.
Here is my project/ code:
FaceletsExample
-- index.xhtml
-- template.xhtml
-- META-INF
-- WEB-INF
-- faces-config.xml
-- web.xml
-- lib
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8 jar
commons-discovery-0.4.jar
commons-logging-1.1.1.jar
el-api-1.0.jar
el-impl-1.0.jar
jsf-api-1.2_04-p20.jar
jsf-facelets.jar
myfaces-all.jar
myfaces-api-1.2.2.jar
myfaces-impl-1.2.2.jar
portlet.jar
servlet-api-2.4.jar
index.xhtml:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui='http://java.sun.com/jsf/facelets">
<body>
<ui:composition template="template.xhtml">
<ui:define name="content">
<h:form>
<h:outputText value="Halloooo!!!" />
<h:commandButton value="OK" />
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
{code}
template.xhtml:
{code}<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title>Facelets-Test</title>
</head>
<body>
<div>
<h1>Facelets-Template</h1>
</div>
<ui:insert name="content">
Default Text for content
</ui:insert>
</body>
</html>
{code}
web.xml:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>FaceletsEx</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>{code}
faces-config.xml:
{code}<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>
{code}
When Tomcat starts there appears the following :
{code}
08.04.2008 10:21:09 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:FaceletsEx' did not find a matching property.
08.04.2008 10:21:09 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Programme\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\Java\jre1.6.0_03\bin\client;C:\Programme\Java\jre1.6.0_03\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Java\jdk1.5.0_14\bin
08.04.2008 10:21:09 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
08.04.2008 10:21:09 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 792 ms
08.04.2008 10:21:09 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
08.04.2008 10:21:09 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
08.04.2008 10:21:09 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\FaceletsEx\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
08.04.2008 10:21:10 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
08.04.2008 10:21:10 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: org/apache/commons/el/Logger
at org.apache.myfaces.util.ClassUtils.<clinit>(ClassUtils.java:41)
at org.apache.myfaces.config.FacesConfigurator.feedStandardConfig(FacesConfigurator.java:138)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:115)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:63)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:46)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
08.04.2008 10:21:10 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
08.04.2008 10:21:10 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/FaceletsEx] startup failed due to previous errors
08.04.2008 10:21:11 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
08.04.2008 10:21:11 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
08.04.2008 10:21:11 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
08.04.2008 10:21:11 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1645 ms
{code}
I thought the logging-file were in the project?(--> commons-logging-1.1.1.jar in WEB-INF/lib)
Where is the mistake?
After many tries to run this example, I only put one of the.war-files (numberguess.war) from the Faceletdownloadfolder in the webapp-folder from Tomcat.
If I now start my tomcat, there appear the following errors:
{code}
08.04.2008 09:29:26 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\Programm
e\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\W
INDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Java\jdk1.5.0_14\bin
08.04.2008 09:29:27 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
08.04.2008 09:29:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 708 ms
08.04.2008 09:29:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
08.04.2008 09:29:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
08.04.2008 09:29:27 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive numberguess.war
08.04.2008 09:29:28 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2-NIGHTLY_20060319)
for context '/numberguess'
08.04.2008 09:29:29 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation (1.2-NIGHTLY_
20060319) for context '/numberguess'
08.04.2008 09:29:29 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
08.04.2008 09:29:29 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/numberguess] startup failed due to previous errors
08.04.2008 09:29:30 org.apache.catalina.core.StandardContext addApplicationListe
ner
INFO: The listener "listeners.ContextListener" is already configured for this co
ntext. The duplicate definition has been ignored.
08.04.2008 09:29:30 org.apache.catalina.core.StandardContext addApplicationListe
ner
INFO: The listener "listeners.SessionListener" is already configured for this co
ntext. The duplicate definition has been ignored.
08.04.2008 09:29:30 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
08.04.2008 09:29:30 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
08.04.2008 09:29:30 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32 config=null
08.04.2008 09:29:30 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3887 ms
{code}
Has anybody got an idea?I hope so.
Many thanks.
NickiS
Edited by: NickiS on 08.04.2008 08:45The class org.apache.commons.el.Logger comes from Commons EL project, it is not a part of Commons Logging library. Try adding Commons EL library to your project as it appears MyFaces depends on it.
http://commons.apache.org/el/ -
Problem with JAAS example in WLS6.0sp1
Hi,
I tried to run the SampleClient from the JAAS example in WLS6.0sp1 and got an
exception
when a valid username/password combination is entered. Has anyone experienced
that in WLS6.0sp1?
Thanx
Ralf
SampleLoginModule.initialize(), debug enabled
SampleLoginModule.initialize(), URL t3://localhost:7001
SampleLoginModule.login(), username guest
SampleLoginModule.login(), password guest
Authentication Failed: Unexpected Exception, java.lang.NoSuchMethodError
at weblogic.security.auth.Authenticate.authenticate(Authenticate.java:124)
at examples.security.jaas.SampleLoginModule.login(SampleLoginModule.java:157)
at java.lang.reflect.Method.invoke(Native Method)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
at examples.security.jaas.SampleClient.main(SampleClient.java:92)Weblogic comes with its own implementation of JAAS, unfortunately
conflicting with Sun's. Contact customer support, they will tell you the
exact differences and incompatibilities. Or reverse engineer the two
versions, you'll find quite a few differences (apart from the BEA version
not implementing JAAS authorization, which is documented).
"Narinder Gaheer" <[email protected]> wrote in message
news:[email protected]..
I am happy someone came up with this problem. I also bent backwardssolving
this problem
in my application.
I figured out that as soon as I remove the standard jaas.jar from my
classpath , I can run the example successfully. Weblogic.jar does contain
necessary jaas library , so don't need to include jaas.jar.
I am not sure, but I get the feeling that there is a jaas library conflict
here. May be weblogic
guys are the best to put some light on this issue.
"Ralf Fritsche" <[email protected]> wrote in message
news:3b15188e$[email protected]..
I found out, that the example runs with the JDK delivered by BEA,
but not with a JDK I downloaded from SUN.
Wheras with the first the provided way to set the user defined
configuration class with the system property'weblogic.security.jaas.Configuration'
works, this is not possible with another JDK. According to the
JAAS standard, this class could only be defined in the properties
file 'java.security' of the Java runtime.
How is BEA doing this?
Thanx
Ralf -
Error while running application with Tomcat 5.0
Hi,
I am trying to run my application on Tomcat 5.0. I have java environment version 1.4
I am getting the following error during the server start up :
Mar 30, 2007 3:51:03 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 30, 2007 3:51:03 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1047 ms
Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHost
getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
Mar 30, 2007 3:51:04 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=tru
e
Mar 30, 2007 3:51:04 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNul
l=true
Mar 30, 2007 3:51:05 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing,
config='org.apache.webapp.admin.ApplicationResources', retur
nNull=true
Mar 30, 2007 3:51:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /jsp-examples from URL
file:C:\
Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path from URL
file:C:\Program Files
\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /servlets-examples from
URL fil
e:C:\Program Files\Apache Software Foundation\Tomcat
5.0\webapps\servlets-exampl
es
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /tomcat-docs from URL
file:C:\P
rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webdav from URL
file:C:\Progra
m Files\Apache Software Foundation\Tomcat 5.0\webapps\webdav
Mar 30, 2007 3:51:07 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 30, 2007 3:51:07 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 30, 2007 3:51:07 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=C:\Program Files\Apache Software
Foundat
ion\Tomcat 5.0\conf\jk2.properties
Mar 30, 2007 3:51:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4266 ms
Mar 30, 2007 3:53:07 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /Hyperceller from URL
file:C:\P
rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\Hyperceller
Mar 30, 2007 3:53:08 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=tru
e
Mar 30, 2007 3:53:08 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNul
l=true
Mar 30, 2007 3:53:09 PM org.apache.commons.digester.Digester
startElement
SEVERE: Begin event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
Utils.java:1656)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
Utils.java:1551)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
java:1580)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
at
org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule
.java:251)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1361)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
e)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1647)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1006)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
.java:955)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1029)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
2)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4013)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
357)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:277)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:701)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.
java:800)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1619)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1628)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1608)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.UnsupportedClassVersionError:
com/hyperceller/form/LoginFor
m (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1634)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:860)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1307)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1189)
at
org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.
java:320)
at
org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:1
91)
... 46 more
Mar 30, 2007 3:53:09 PM org.apache.struts.action.ActionServlet
handleConfigExcep
tion
SEVERE: Parsing error processing resource path
java.lang.reflect.InvocationTargetException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2919)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2945)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1364)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
e)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1647)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1006)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
.java:955)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1029)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
2)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4013)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
357)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:277)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:701)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.
java:800)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1619)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1628)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1608)
at java.lang.Thread.run(Thread.java:534)
Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
returnN
ull=true
Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=tru
e
Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
returnN
ull=true
could anyone tell me what the problem may be???
Note: When I configure my application on the Tomcat 5.5 and java 1.5 then it runs fine. But the problem arises when I compile my code on the java 1.4 and run on the Tomcat 5.0
Thanks in advance!!I am sorry that I forgot to tell you that I am running a struts application. Struts 1.1
-
How to run servlet with tomcat
I have a probrom that how can I run servlet with tomcat?
I have new a folder classes in webapps\root\WEB-INF\,and put the .class
programme in it ,but http://localhost:8080/servlet/HelloWorldExample
can't run ,it give me a error than http:404 not found.
could you tell me how i can solve the problem.
Thank u very much.Hi,
Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
Regards -
PLEASE HELP Can't run my servlet url-pattern with Tomcat
Hi I'm trying to run servlet with Tomcat.
I have don the servlet with tomcat ide abd its runnig ok with Forte with the internal Tomcat
When I'm runing it with external Tomacat its not running at the url that I have given in the web.xml
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>ClaimsServlet</servlet-name>
<servlet-class>ild.claims.ClaimsServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>ild.claims.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ClaimsServlet</servlet-name>
<url-pattern>/ild/claims/claims</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/ild/claims/LoginServlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
90
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
default.jsp
</welcome-file>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.htm
</welcome-file>
</welcome-file-list>
</web-app>
if I runnig the url: /ild/servlet/ild/claims/ClaimsServlet
its running
but //ild/claims/claims
I got: The requested resource (/claims/claims) is not available.
Thanks for help
SnirDo you have to use <url-pattern>/ild/claims/claims</url-pattern>
or you can use <url-pattern>/claims</url-pattern> ? -
Error running A Simple MDB example with oc4j
Hi All,
I am new to OC4J, I am trying the example for MDB from OTN's site, A Simple MDB example with OC4J. When I start my OC4J on the command line > java -jar oc4j.jar
I get the following exception:
Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar homes: No lo
cation set for Topic resource MessageDrivenBean MDB
Error in application mdb: Error loading package at file:/C:/unzipped/mdb_hello_w
orld/build/mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/
mdb/mdb.jar homes: No location set for Topic resource MessageDrivenBean MDB
04/07/09 15:21:40 Error instantiating application 'mdb' at file:/C:/unzipped/mdb
helloworld/build/mdb.ear: Error initializing ejb-module; Exception Error in ap
plication mdb: Error loading package at file:/C:/unzipped/mdb_hello_world/build/
mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar
homes: No location set for Topic resource MessageDrivenBean MDB
04/07/09 15:21:41 Error starting HTTP-Server: Address already in use: JVM_Bind
04/07/09 15:21:41 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
initialized
I have just followed all the steps provided to run the example exactly as given.
I did add my Topic and TopicConnectionFatory entries in my jms.xml -
<topic name="The Topic" location="jms/theTopic">
<description>A MDB topic</description>
</topic>
<topic-connection-factory location="jms/theTopicConnectionFactory" />
Here is the ejb-jar.xml given in the example:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar>
<ejb-jar>
<enterprise-beans>
<message-driven>
<description>My message driven bean</description>
<ejb-name>MDB</ejb-name>
<ejb-class>MDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
<resource-ref>
<description>The log topic where log events are broadcasted...</description>
<res-ref-name>jms/theTopic</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>The Factory used to produce connections to the log topic...</description>
<res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Here is my orion-ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
<orion-ejb-jar deployment-version="1.0.2.2" deployment-time="e7f5a3f42d">
<enterprise-beans>
<message-driven-deployment name="MDB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
<resource-ref-mapping name="jms/theTopic" />
<resource-ref-mapping name="jms/theTopicConnectionFactory" />
</message-driven-deployment>
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>
I don't know what is wrong. Please help me.
RohiniHello,
I guess that you didn't define the Topic and/or TopicConnectionFactory on your OC4J
Inside $J2EE_HOME/config (see: subfolders .../j2ee/home/config e.g.)folder are several xml files appropriate for OC4J configuration. There's also jms.xml. Please, verify this one, it should have some entries for your settings.
Just like in an example below:
<topic-connection-factory name="TopicConnectionFactory" location="jms/TopicConnectionFactory"/>
<topic name="theTopic" location="jms/theTopic"/>
The names should be the same like in your MDB deployment descriptors. It works of course after next OC4J server restart.
I hope helped you
Krzysztof -
Is anyone know how to run the examples in 3d user interfaces with java 3d
hi dear ,
I am trying to run the examples in 3d user interfaces with java 3d.
I hope i can load the library in jcreator. but the libarary for this book are classes files , it do not have jar file for it . the jcreator do not read these classes . i do not know why ? i am wonder if there any one run these code before can give me some idear .
thanks so much .
the code u can get from this link.
http://www.manning.com/books/barrilleaux/source
thank you for u to have a look for me .
regards
xiaocui<h2>{color:red}CROSS POSTED{color}</h2>
[t-5289810]
Cross posting is rude.
db -
JAAS configuration steps for web example in tomcat
Hi,
I have to configure JAAS for the deployement of my web application in tomcat.
but i am not getting any proper document for this.
If any one could provide some useful information or documentation so please help me.
Thanksafter googling i came to the forum.
i am not getting any proper way from where i can start Jaas login module implementation for my web application with tomcat. The information i am getting from google is to do the job using COMMAND PROMT, but I want to implement that in my web application so that i can start that using webUI
Can you provide me some links which will be help ful to start.
Thanks -
Hi
I am facing some problem mouse arrow with out my actions it's automatically running for example If I open a some site the arrow mark is going every where and automatically pressing and the particular sites are opening if u don't mind can u suggest me what I have doIf you can still access the machine and haven't wiped the drive, open the Mac App Store, log in to your Apple ID, and try to download Mavericks from there. If it works, make a bootable USB from the
Mavericks installer (google how to do this). Then boot to the USB wipe the drive and install Mavericks clean. And since it shoudl be associated with your Apple ID at that point you shouldn't have any issues.
Maybe you are looking for
-
How to display the search result without reloading the whole page
HI, I have separate fragments for Search Box to enter keyword and Search Result to display the result. Also I have different sections within the page to put these fragments. So how could I display the results without reloading the whole page. Also if
-
Adobe Photoshop Elements 11 has ended up in my thrash and now will not open i transferred it back to
Adobe Photoshop Elements 11 has ended up in my thrash and now will not open i transferred it back to applications but it will not open it says to re-install but I have lost the cd/dvd I do have the package with the serial no. can you please please he
-
My iphone 4 appears to be dead while using
My phone has gone blank suddenly No button is working Screen is black what should i do
-
Don't know where to go. With the new mouse how do I go about copy and paste. I usually hi-lite, press the left and a menu came down to "copy" Can't seem to do that with the new mouse?
-
I just bought a macbook pro and asks me the password, says it has expired what I do?