Re: context().hasSession() returns false... then true?
Re: context().hasSession() returns false... then true?
- Subject: Re: context().hasSession() returns false... then true?
- From: Rams <email@hidden>
- Date: Thu, 26 Jun 2008 20:40:55 -0400
Yes, the application has a login with the logged in user entity stored
in the session. I do have an error in the log file, although I don't
know what it means...
Jun 26, 2008 6:05:13 PM org.apache.catalina.core.StandardContext
processTlds SEVERE: Error reading tld listeners
javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/tlds/WOtaglib_1_0.tld in context /myapp
javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/tlds/WOtaglib_1_0.tld in context /myapp at
org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:557)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:295)
at
org
.apache.catalina.core.StandardContext.processTlds(StandardContext.java:
4441) at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4248) at
org
.apache
.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
771) at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:
829) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
490) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:
1215) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
293) at
org
.apache
.catalina
.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org
.apache
.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:
1337) at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at
java.lang.Thread.run(Thread.java:613) Caused by:
java.lang.NullPointerException at
org
.apache
.xerces.impl.dtd.models.DFAContentModel.buildDFA(DFAContentModel.java:
538) at
org
.apache
.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:
253) at
org.apache.xerces.impl.dtd.DTDGrammar.createChildModel(DTDGrammar.java:
2271) at
org
.apache
.xerces
.impl.dtd.DTDGrammar.getElementContentModelValidator(DTDGrammar.java:
1727) at
org.apache.xerces.impl.dtd.DTDGrammar.getElementDecl(DTDGrammar.java:
1271) at
org
.apache
.xerces
.impl.dtd.XMLDTDValidator.getContentSpecType(XMLDTDValidator.java:
1645) at
org
.apache
.xerces
.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:
1831) at
org
.apache
.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:
724) at
org
.apache
.xerces
.impl
.XMLDocumentFragmentScannerImpl
.scanStartElement(XMLDocumentFragmentScannerImpl.java:759) at
org.apache.xerces.impl.XMLDocumentScannerImpl
$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:
957) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$
FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:
1544) at
org
.apache
.xerces
.impl
.XMLDocumentFragmentScannerImpl
.scanDocument(XMLDocumentFragmentScannerImpl.java:329) at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
525) at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
581) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org
.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
1175) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:
1644) at
org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:
518) at
org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:
555) ... 17 more
On Jun 26, 2008, at 8:07 PM, Don Lindsay wrote:
Hello;
Are there any errors in your catalina.out or localhost_ÚTETIME
%.log files? Is this an application that requires a user to login?
Don
Sorry this was supposed to apply to this message not Wonder/Tomcat
Documentation.
Don
On Jun 26, 2008, at 7:21 PM, Rams wrote:
Hi Everyone...
I have an app deployed on Tomcat 6.0.16 and it appears that
context().hasSession() is failing to produce reliable results. In
my Main WO I have:
public Boolean authenticated() {
return (context().hasSession() &&
session().valueForKey(User.ENTITY_NAME.toLowerCase()) != null);
}
and in my Main WO, that resolves to false, and then true. I'm not
calling session() anywhere. I'm logging session creation in my
Application.createSessionForRequest method and the session *should*
exist before the first call. It's also failing in my logout direct
action
public WOActionResults logoutAction() {
if(context().hasSession()) {
NSLog.out.appendln("Terminating session: " +
session().sessionID());
session().terminate();
} else {
NSLog.out.appendln("logoutAction(): context().hasSession() ==
FALSE");
}
WORedirect mainPage = (WORedirect)
pageWithName(WORedirect.class.getName());
mainPage.setUrl(
context().directActionURLForActionNamed(
"default", new NSDictionary<Object,Object>(Boolean.FALSE,
"wosid")));
return mainPage;
}
All of this works fine in WOLips. It's failing on Tomcat. I'm
using WO 5.3.3 and Wonder. Is this a known bug with a known
workaround? Am I doing something dumb? Any help/advice/insight
would be appreciated.
Thanks all!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden