You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Karen Thorn <th...@nlm.nih.gov> on 2001/11/27 19:31:56 UTC
Newbie having trouble configuring Tomcat/Turbine/Velocity
I have an application that is currently running under Tomcat 3.2, Turbine 1.x,
and WebMacro on Solaris and am looking to upgrade the application to Tomcat 4.0,
Turbine 2.2 and Velocity. I have scoured websites such as jguru.com and have
perused the mailing lists for turbine and tomcat for information that may help
identify the problem with my configuration with no luck. Scott Anderson posted
something similar back in March 2001, but I was unable to locate the complete
details of his solution (or if he got it working).
Here's what I've done so far.
1) Downloaded the TDK.
2) Built the sample 'newapp' application which runs fine.
3) Copied the complete directory tree from newapp to kss under webapps and
modified the following files/directories:
* WEB-INF/conf/TurbineResources.properties:
- to change the module.packages to include my package
(gov.nih.nlm.kss.modules)
- to locate the templates directory
- to specify my KssLogin.vm file as the login file
* lib/ directory to have all of the appropriate .jar files for my
application.
* WEB-INF/web.xml to change the name of the servlet from newapp to kss
4) I created a KssLogin.vm file and put it in the templates/screens directory
which makes a call to the action KssLogin.
5) I created a modified login action (KssLogin.java) from my application and
placed it in unpacked area (gov.nih.nlm.kss.modules.actions) in the classes
directory.
I restarted the server and my new login screen appears. When I attempt to login
and execute the KssLogin action, I get the following exception:
Horrible Exception: java.lang.ClassNotFoundException:
Requested Action not found: KssLogin
Turbine looked in the following modules.packages path:
[gov.nih.nlm.kss.modules, org.turbine.app.newapp.modules,
org.apache.turbine.modules]
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.ClassNotFoundException.<init>(Compiled Code)
at
org.apache.turbine.modules.ActionLoader.getInstance(ActionLoader.java:174)
at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Compiled Code)
at org.apache.turbine.Turbine.doPost(Turbine.java:537)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
55)
at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:2
25)
at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163
)
at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(Compiled
Code)
at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
The velocity.log file gives the error
"org.apache.velocity.exception.ResourceNotFoundExcept
ion: Unable to find resource 'VM_global_library.vm'" but I'm not sure that's
related to my missing class problem.
There are no other problems identified in the turbine.log file except the
Requested Action not found error.
I have verified the package structure of the KssLogin.java and that it's located
in the proper place within the classes directory structure
(gov/nih/nlm/kss/modules).
Any ideas are greatly appreciated. Thanks in advance,
Karen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Calling an action from an action?
Posted by Bruce Altner <ba...@hq.nasa.gov>.
Greetings:
I am experimenting with calling one action class from another but it
doesn't seem to work. Specifically, I need to post-process
information after LoginUser executes, without an intervening screen being
called, so I am attempting to send it to another action instead of it's
default destination after a successful login (Index.vm). Can you do this in
Turbine? I was trying to avoid RequestDispatcher (forward()) since this
caused me some trouble under Tomcat 4.0 but I may have to revert to this if
I can't get Turbine to do this.
Thanks,
Bruce
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie having trouble configuring Tomcat/Turbine/Velocity
Posted by Terry McBride <tt...@yahoo.com>.
Karen,
Do you have a KssLogin.java action under
gov.nih.nlm.kss.modules.actions?
I never had a need to change the Login action. Maybe
your KssLogin.vm you should have
$link.setPage("Index.vm[or
whatever]").setAction("LoginUser"). This is Turbine's
Default Login Action.
Also, under $TDK_HOME you should be able to edit
build.properties and run ant within that directory and
you wouldn't have to do as many file modifications.
Then go to app/WEB-INF/build and run 'ant init'.
If you alter the schema in
/WEB-INF/conf/app-schema.xml, when you compile the
first time by running 'ant compile' from the build dir
you'll get an error from a class or two trying to
import a class that is in newapp. Typically you
delete those.
That's what I know about getting started.
--- Karen Thorn <th...@nlm.nih.gov> wrote:
> I have an application that is currently running
> under Tomcat 3.2, Turbine 1.x,
> and WebMacro on Solaris and am looking to upgrade
> the application to Tomcat 4.0,
> Turbine 2.2 and Velocity. I have scoured websites
> such as jguru.com and have
> perused the mailing lists for turbine and tomcat for
> information that may help
> identify the problem with my configuration with no
> luck. Scott Anderson posted
> something similar back in March 2001, but I was
> unable to locate the complete
> details of his solution (or if he got it working).
>
> Here's what I've done so far.
>
> 1) Downloaded the TDK.
> 2) Built the sample 'newapp' application which runs
> fine.
> 3) Copied the complete directory tree from newapp to
> kss under webapps and
> modified the following files/directories:
> * WEB-INF/conf/TurbineResources.properties:
> - to change the module.packages to include my
> package
> (gov.nih.nlm.kss.modules)
> - to locate the templates directory
> - to specify my KssLogin.vm file as the login file
> * lib/ directory to have all of the appropriate
> .jar files for my
> application.
> * WEB-INF/web.xml to change the name of the servlet
> from newapp to kss
>
> 4) I created a KssLogin.vm file and put it in the
> templates/screens directory
> which makes a call to the action KssLogin.
> 5) I created a modified login action (KssLogin.java)
> from my application and
> placed it in unpacked area
> (gov.nih.nlm.kss.modules.actions) in the classes
> directory.
>
> I restarted the server and my new login screen
> appears. When I attempt to login
> and execute the KssLogin action, I get the following
> exception:
>
> Horrible Exception:
> java.lang.ClassNotFoundException:
>
> Requested Action not found: KssLogin
> Turbine looked in the following
> modules.packages path:
> [gov.nih.nlm.kss.modules,
> org.turbine.app.newapp.modules,
> org.apache.turbine.modules]
>
> at
> java.lang.Throwable.fillInStackTrace(Native Method)
> at
> java.lang.Throwable.fillInStackTrace(Compiled Code)
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at
> java.lang.ClassNotFoundException.<init>(Compiled
> Code)
> at
>
org.apache.turbine.modules.ActionLoader.getInstance(ActionLoader.java:174)
> at
>
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
> at
>
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
> at
> org.apache.turbine.modules.Page.build(Page.java:90)
> at
>
org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> at org.apache.turbine.Turbine.doGet(Compiled
> Code)
> at
> org.apache.turbine.Turbine.doPost(Turbine.java:537)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
> erChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
> java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
> 55)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.ContainerBase.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:2
> 25)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.ContainerBase.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardContext.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(Compiled
> Code)
> at
>
org.apache.catalina.valves.AccessLogValve.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.ContainerBase.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(Compiled
> Code)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(Compiled
> Code)
> at
>
org.apache.catalina.core.ContainerBase.invoke(Compiled
> Code)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(Compiled
>
> Code)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(Compiled
> Code)
> at java.lang.Thread.run(Thread.java:479)
>
>
> The velocity.log file gives the error
>
"org.apache.velocity.exception.ResourceNotFoundExcept
> ion: Unable to find resource 'VM_global_library.vm'"
> but I'm not sure that's
> related to my missing class problem.
>
> There are no other problems identified in the
> turbine.log file except the
> Requested Action not found error.
>
> I have verified the package structure of the
> KssLogin.java and that it's located
> in the proper place within the classes directory
> structure
> (gov/nih/nlm/kss/modules).
>
> Any ideas are greatly appreciated. Thanks in
> advance,
> Karen
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
=====
"I'm concerned about a better world. I'm concerned about justice; I'm concerned about brotherhood; I'm concerned about truth. And when one is concerned about that, he can never advocate violence. For through violence you may murder a murderer, but you can't murder murder. Through violence you may murder a liar, but you can't establish truth. Through violence you may murder a hater, but you can't murder hate through violence. Darkness cannot put out darkness; only light can do that."
-M. L. King, Jr., 16 August 1967
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>