|
|
|
|
Re: Trying to run an Apache Turbine servlet as a J2EE project [message #189419 is a reply to message #189409] |
Thu, 08 March 2007 13:34 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
I'm not familiar with Apache Turbine, but is there a reason not to
include the jar(s) in WEB-INF/lib? As far as I know, "setting up a
framework" is just a matter of including in the Dynamic Web project what
is needed per the requirements of the framework.
With respect to TPTP, there are a couple of bugs affecting profiling use
with WTP servers, Bug 174863[1] for WTP 1.5.3 and Bug 174886 for WTP 2.0
M5. You haven't mentioned with versions of Eclipse and WTP you are
using, so I can't say if they apply. If you have th TPTP SDK for
profiling, it's fairly easy to patch TPTP to get it working with WTP
1.5.3 and WTP 2.0M5.
I assume the VM argument you are referring to is "-XrunpiAgent", which
is what TPTP silently adds. To help the piAgent to be found, I add a
"PATH" environment variable to the launch configuration that includes
the path to the directory containing the piAgent.dll in TPTP, i.e. the
directory for the org.eclipse.hyades.execution.win32.x86_??? plug-in.
If the piAgent isn't found when executing Profile on server, then Tomcat
won't start.
Cheers,
Larry
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=174863
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=174886
david wrote:
> david wrote:
>> david wrote:
>>> david wrote:
>>>> I have a webapp that uses the Apache Turbine framework. So that
>>>> framework provides the servlet class, not my webapp. I cannot find a
>>>> way of running it using web tools and attached to a Tomcat server
>>>> instance setup in Servers. I need to get it running here to be able
>>>> to use the Profiler, as I have up until now used the sysdeo plugin,
>>>> but there seems no way it will work with TPTP. Neither will TPTP
>>>> work with the Agent controller and an independently running Tomcat.
>>>> It stops Tomcat running adding the JVM arg required. Web tools seems
>>>> to cater purely for JSP application with their own Servlet class, is
>>>> this right?
>>>>
>>>> Is there some documentation on setting up Web tools to work with any
>>>> sort of framework like Turbine or Spring?
>>>>
>>>> Thx.
>>>>
>>>> David
>>> I should point out that when I do try to run the Turbine webapp under
>>> the Tomcat 5.5. server on localhost (Run modules directly from
>>> workspace is unchecked)
>>>
>>> I added the turbine jar ( with the servlet class) into the classpath
>>> and the turbine src directory into the server configuration too.
>>>
>>> My VM args are
>>>
>>> -Dcatalina.base="D:\Tomcat_5.5" -Dcatalina.home="D:\Tomcat_5.5"
>>> -Djava.endorsed.dirs="D:\Tomcat_5.5\common\endorsed"
>>>
>>> I get this.
>>>
>>> java.lang.ExceptionInInitializerError
>>> Caused by: org.apache.commons.logging.LogConfigurationException:
>>> org.apache.commons.logging.LogConfigurationException:
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger (Caused by
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger) (Caused by
>>> org.apache.commons.logging.LogConfigurationException:
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger (Caused by
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger))
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(L ogFactoryImpl.java:543)
>>>
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(L ogFactoryImpl.java:235)
>>>
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(L ogFactoryImpl.java:209)
>>>
>>> at org.apache.commons.logging.LogFactory.getLog(LogFactory.java :351)
>>> at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:53)
>>> Caused by: org.apache.commons.logging.LogConfigurationException:
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger (Caused by
>>> java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger)
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstru ctor(LogFactoryImpl.java:397)
>>>
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(L ogFactoryImpl.java:529)
>>>
>>> ... 4 more
>>> Caused by: java.lang.ClassNotFoundException:
>>> org.apache.commons.logging.impl.Log4JLogger
>>> at java.net.URLClassLoader$1.run(Unknown Source)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at java.net.URLClassLoader.findClass(Unknown Source)
>>> at java.lang.ClassLoader.loadClass(Unknown Source)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>> at java.lang.ClassLoader.loadClass(Unknown Source)
>>> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Unknown Source)
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl$1.run(LogFact oryImpl.java:447)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.loadClass(Log FactoryImpl.java:435)
>>>
>>> at
>>> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstru ctor(LogFactoryImpl.java:376)
>>>
>>> ... 5 more
>>> Exception in thread "main"
>>>
>>>
>>> David
>> I found that because I had included the Turbine jar in the classpath
>> it caused the clash as it also uses log4j. But removing that means it
>> can no longer find the servlet class supplied by that very same
>> Turbine jar. Looks like catch 22 to me. Now I have removed that and I get
>>
>> java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2 94)
>> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:43 2)
>> Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(Unknown Source)
>> at java.security.SecureClassLoader.defineClass(Unknown Source)
>> at java.net.URLClassLoader.defineClass(Unknown Source)
>> at java.net.URLClassLoader.access$100(Unknown Source)
>> at java.net.URLClassLoader$1.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1270)
>>
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1201)
>>
>> at
>> org.apache.catalina.core.StandardWrapper.loadServlet(Standar dWrapper.java:1034)
>>
>> at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrappe r.java:932)
>> at
>> org.apache.catalina.core.StandardContext.loadOnStartup(Stand ardContext.java:3951)
>>
>> at
>> org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4225)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1013)
>> at org.apache.catalina.core.StandardHost.start(StandardHost.jav a:718)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1013)
>> at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine .java:442)
>> at
>> org.apache.catalina.core.StandardService.start(StandardServi ce.java:450)
>> at
>> org.apache.catalina.core.StandardServer.start(StandardServer .java:709)
>> at org.apache.catalina.startup.Catalina.start(Catalina.java:551 )
>> ... 6 more
> Can someone at least tell me that Web Tools will not run with a Apache
> Turbine webapp? I don't have enough knowledge to determine this and I
> feel like I am wasting my time.
>
> David
|
|
|
Powered by
FUDForum. Page generated in 0.03284 seconds