Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330900 - Please provide access to tomcat context configuration
Summary: Please provide access to tomcat context configuration
Status: CLOSED WORKSFORME
Alias: None
Product: Virgo
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 05:55 EST by Ric Klaren CLA
Modified: 2010-12-08 07:05 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ric Klaren CLA 2010-11-23 05:55:29 EST
Build Identifier: 

Our application does not use tomcats session persistence. Yet we cannot unconfigure it anymore. This was possible with DM Server 1 by adding something like:

<Context .. >
  <Manager pathname="" />
</manager></context>

To the tomcat configuration (the exact file evades me at the moment).

Now we regularly see error level logging when tomcat attempts to reload non-serializable objects:

[2010-11-23 10:52:04.143] t-signalling-4 [] ERROR org.apache.catalina.session.ManagerBase Exception loading sessions from persistent storage java.io.StreamCorruptedException: invalid type code: 9A

Stacktrace ommitted since it does not add that much information.


Reproducible: Sometimes
Comment 1 Glyn Normington CLA 2010-11-23 05:59:09 EST
You should be able to configure the context as per the instructions in the User Guide:

http://www.eclipse.org/virgo/documentation/virgo-documentation-2.1.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#configuring-tomcat

in the section entitled "Context Configuration". Have you tried this approach?
Comment 2 Ric Klaren CLA 2010-11-23 11:40:21 EST
(In reply to comment #1)
> in the section entitled "Context Configuration". Have you tried this approach?

I used a context.xml with a blatant XML error (just to see if its picked up).

Putting it in $SERVER_HOME/config/context.xml does not give me an error (or something is eating the stacktrace)

Putting it in $SERVER_HOME/config/Catalina/localhost/context.xml.default does not seem to be picked up either (no errors).

Am I missing something?

Cheers,

Ric
Comment 3 Glyn Normington CLA 2010-11-23 11:44:04 EST
I suppose you checked serviceability/logs/log.log?
Comment 4 Ric Klaren CLA 2010-11-24 07:01:35 EST
(In reply to comment #3)
> I suppose you checked serviceability/logs/log.log?

Yes, and today my brain seemed to reconnect and see that the installation I was looking at was dm server in stead of virgo (it was reinstalled recently). We had the issue originally on DM Server. I guess yesterday was one of those days. 

Virgo looks at the advertised places and some more as it turns out (locations below).

I looked with strace at dmserver and noticed it was looking in various other places:

$SERVER_HOME/conf/context.xml
$CURRENT_WORK_DIR/Catalina/localhost/context.xml.default

(and inside some bundles with the same conf directory)

Out of curiosity I looked at virgo as well with strace. Virgo also has some interest in the conf directory:

$SERVER_HOME/conf/catalina.properties
$SERVER_HOME/conf/tomcat5-mbeans.xml
$SERVER_HOME/conf/Catalina/localhost
$SERVER_HOME/conf/web.xml
$CURRENT_WORK_DIR/config/Catalina/localhost/admin.xml

Not sure if that is all intended.

Anycase my apologies for the static.
Comment 5 Glyn Normington CLA 2010-11-24 07:17:27 EST
No problem. The ability to configure Tomcat contexts is new to Virgo.

What now remains of this Virgo bug?
Comment 6 Ric Klaren CLA 2010-11-24 07:19:30 EST
(In reply to comment #5)
> What now remains of this Virgo bug?

For virgo it is not a bug. 

Unless the extra lookups in the conf/ directory are an issue, I thought I'd mention. In that case the issue should be renamed.
Comment 7 Glyn Normington CLA 2010-11-24 08:25:42 EST
Thanks Ric.

Violeta: before I close this bug, please could you confirm that the file/directory accesses in comment 4 look reasonable. They looked plausible to me.
Comment 8 Violeta Georgieva CLA 2010-12-08 07:01:23 EST
(In reply to comment #7)
> Thanks Ric.
> Violeta: before I close this bug, please could you confirm that the
> file/directory accesses in comment 4 look reasonable. They looked plausible to
> me.

Hi,

The Tomcat implementation is such that it tries to find its configuration files via system properties or in predefined locations (all that starts with $SERVER_HOME/conf… are predefined locations).
For some of the configuration files Tomcat uses also classloader in order to try to load them.
So from my perspective it is OK.

Regards
Violeta
Comment 9 Glyn Normington CLA 2010-12-08 07:05:32 EST
Thanks Violeta!