Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow the caller to pass in the class name of implementation classes. It all works find standalone. It works fine in Jetty. It fails in Tomcat 6.0.20. The error is a missing method in a Xalan class; as if Tomcat has somehow

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
org.apache.cxf.common.injection.ResourceInjector - method annotated by @PostConstruct throws exception when invoked java.lang.reflect.InvocationTargetException On Tue, Nov 3, 2009 at 7:48 AM, André Warnier a...@ice-sa.com wrote: Benson Margulies wrote: I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
, Rainer On 03.11.2009 14:00, Benson Margulies wrote: Here's the relevant log traffic of the missing method. I can get past this problem by putting xalan into the endorsed directory, but I should not have to do that when using the JAXP 1.4 API to create XPathFactory. Caused

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
wanted to check, whether there's a relation to Java 6 vs. Java 5 (handling in Java 6 is broken). Regards, Rainer On 03.11.2009 14:00, Benson Margulies wrote: Here's the relevant log traffic of the missing method. I can get past this problem by putting xalan into the endorsed directory

Re: Tomcat Xalan classpath problem

2009-11-05 Thread Benson Margulies
a relation to Java 6 vs. Java 5 (handling in Java 6 is broken). Regards, Rainer On 03.11.2009 14:00, Benson Margulies wrote: Here's the relevant log traffic of the missing method. I can get past this problem by putting xalan into the endorsed directory, but I should not have to do

Embedded tomcat contexts confusion

2011-06-09 Thread Benson Margulies
I'm using tomcat 7.0.14. I create a org.apache.catalina.startup.Tomcat;. I call 'addWebapp' lshContext = tomcat.addWebapp(/lsh, docBase.getCanonicalPath());. The webapp in question has a Listener. The listener happens to belong to Spring. contextInitialized has a try/catch block. In the

Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
I'm using import org.apache.catalina.startup.Tomcat to embed tomcat. After it is running, I'm trying to add another webapp with .addWebapp. The addWebapp call logs: 2011-06-20 11:23:23,385 [http-bio-9167-exec-2] INFO org.apache.catalina.util.LifecycleBase - The start() method was called on

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
to prevent the code from seeing a web.xml in the basedir/conf? On Mon, Jun 20, 2011 at 11:31 AM, Benson Margulies bimargul...@gmail.com wrote: I'm using import org.apache.catalina.startup.Tomcat to embed tomcat. After it is running, I'm trying to add another webapp with .addWebapp

A servlet named jsp

2011-06-20 Thread Benson Margulies
This is related to another thread I started, but it's a different question. Some experimentation shows that Tomcat.java disables the default web.xml for a good reason; if I force one back into place, I get a duplicate name error. However, whatever it ends up using does not include a servlet

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
straightforward to me. On Mon, Jun 20, 2011 at 12:56 PM, Rainer Jung rainer.j...@kippdata.de wrote: Hi Benson, On 20.06.2011 17:51, Benson Margulies wrote: Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, String, String), I don't understand the following:         // prevent

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
rainer.j...@kippdata.de wrote: Hi Benson, On 20.06.2011 17:51, Benson Margulies wrote: Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, String, String), I don't understand the following:         // prevent it from looking ( if it finds one - it'll have dup error

Running an old servlet with Tomcat 7.0.16 embedded API

2011-06-20 Thread Benson Margulies
...@kippdata.de wrote: Hi Benson, On 20.06.2011 17:51, Benson Margulies wrote: Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, String, String), I don't understand the following:         // prevent it from looking ( if it finds one - it'll have dup error

Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
The equivalent basic scheme worked perfectly fine in tomcat6. In Tomcat7, it looks like: solrContext = tomcat.addWebapp(/solr, solrWebapp.getCanonicalPath()); WebappLoader solrLoader = new WebappLoader(LSHDemoLauncher.class.getClassLoader());

Re: Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
? Or would it make more sense to have a function createWebapp that left out the addChild and left that to the caller? On Wed, Jun 22, 2011 at 10:00 AM, Mark Thomas ma...@apache.org wrote: On 22/06/2011 14:47, Benson Margulies wrote: The equivalent basic scheme worked perfectly fine in tomcat6

Re: Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
I agree with your preference. Patch to follow later today. On Wed, Jun 22, 2011 at 10:27 AM, Mark Thomas ma...@apache.org wrote: On 22/06/2011 15:18, Benson Margulies wrote: Solr has a particularly bizarre class loading environment. The class causes the problem is the FileUploadServlet from

Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
I'm launching Tomcat 7 via the API. One of the uses of this is that I can launch from Eclipse and 'live-edit' my static files, without tangling myself up in the Eclipse JEE facilities, which I have never succeeded in using very well. Now, I want to meld some shared content into the webapp. In

Re: Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
wrote: On 23/11/2011 18:06, Benson Margulies wrote: I'm launching Tomcat 7 via the API. One of the uses of this is that I can launch from Eclipse and 'live-edit' my static files, without tangling myself up in the Eclipse JEE facilities, which I have never succeeded in using very well. Now, I

Minimal persistent storage for a webapp

2011-11-25 Thread Benson Margulies
I'm fairly certain that I know the answer to the question here, but I want to pose it just in case I've missed something. In a web application, I'd like to store a bit of data without configuring a database, or, indeed anything that has to be edited into an XML file or typed into a

Re: Minimal persistent storage for a webapp

2011-11-25 Thread Benson Margulies
On Fri, Nov 25, 2011 at 4:36 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2011/11/26 Benson Margulies bimargul...@gmail.com: I'm fairly certain that I know the answer to the question here, but I want to pose it just in case I've missed something. In a web application, I'd like

Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
I'm using tomcat 7.0.29, embedded. My web.xml web-app element looks like: web-app 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

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
to potentially scan in the classpath. Is (b) really correct? Unfortunately, I need spring-web in order to get the log4j support, even though I don't want any of that other stuff in there. On Fri, Sep 14, 2012 at 11:56 AM, Benson Margulies ben...@basistech.com wrote: I'm using tomcat 7.0.29

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas ma...@apache.org wrote: Benson Margulies ben...@basistech.com wrote: Apologies for the accidental use of HTML. The problem below is triggered by the facts that: a) spring-web contains a ServletContainerInitializer b) even with metadata-complete

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas ma...@apache.org wrote: Benson Margulies ben...@basistech.com wrote: Apologies for the accidental use of HTML. The problem below is triggered by the facts that: a) spring-web contains a ServletContainerInitializer b) even with metadata-complete

Re: Can't seem to get metadata-complete turned on

2012-09-16 Thread Benson Margulies
On Fri, Sep 14, 2012 at 1:06 PM, Mark Thomas ma...@apache.org wrote: On 14/09/2012 17:36, Benson Margulies wrote: On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas ma...@apache.org wrote: Benson Margulies ben...@basistech.com wrote: Apologies for the accidental use of HTML. The problem below

Populating JNDI entirely in Java code

2013-04-01 Thread Benson Margulies
When embedding Tomcat, I'd like to create some objects purely from code -- I don't want to bother to express them as XML -- and then pick them up inside webapps. Now, calling enableNaming() on Tomcat sets up a bunch of environment, but does not actually create and JNDI objects. If I call

Re: Populating JNDI entirely in Java code

2013-04-01 Thread Benson Margulies
Benson Margulies ben...@basistech.com: When embedding Tomcat, I'd like to create some objects purely from code -- I don't want to bother to express them as XML -- and then pick them up inside webapps. Now, calling enableNaming() on Tomcat sets up a bunch of environment, but does