You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Henry San <sa...@real-info.com> on 2001/04/16 18:05:24 UTC

java.lang.ClassNotFoundException

Download and Installed tdk-1.1a13.tar.gz

Started turbine and it checked my username/password on my
Informix database. Everything was working fine.

Transfer my newapp which is "ny" to "tomcat-3.2.1/webapp" directory
modified "ny/WEB-INF/conf/TurbineResources.properties" and
"ny/WEB-INF/web.xml"

copy all *.jar from "ny/WEB-INF/lib" to "tomcat-3.2.1/lib"

started tomcat and in the servlet.log:
2001-04-14 12:43:43 - path="/ny" :ny: Turbine: init() Ready to Rumble!
2001-04-14 12:43:53 - path="/ny" :ny: Turbine: doGet() Start Initializing
Services!
2001-04-14 12:43:54 - path="/ny" :ny: Turbine: doGet() Finish Initializing
Services!

But when trying to insert data to RDF table got the following in
"ny/logs/turbine.log"

[Sat Apr 14 12:53:47 EDT 2001] -- ERROR --
        Exception:  java.lang.ClassNotFoundException:

        Requested Action not found: SQL
        Turbine looked in the following modules.packages path:
        [com.realinfo.ny.modules, org.apache.turbine.flux.modules,
org.apache.turbine.modules]

        Stack Trace follows:
        java.lang.ClassNotFoundException:

        Requested Action not found: SQL
        Turbine looked in the following modules.packages path:
        [com.realinfo.ny.modules, org.apache.turbine.flux.modules,
org.apache.turbine.modules]

        at
org.apache.turbine.modules.ActionLoader.getInstance(ActionLoader.java:170)
        at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
        at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:148)
        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(Turbine.java:414)
        at org.apache.turbine.Turbine.doPost(Turbine.java:505)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:479)

That is odd, because there is a
"tomcat-3.2.1/webapp/ny/WEB-INF/classes/com/realinfo/ny/modules/"
and under it there are my actions and screens directory containing the java
classes and
yes the SQL.class is in the actions directory.

This is what I have for module packages in my "TurbineResources.properties":

module.packages=com.realinfo.ny.modules,org.apache.turbine.flux.modules

Can anybody answer why Turbine is not able to find SQL.class in tomcat-3.2.1
but is able to find it in
tdk-1.1a13.tar.gz?


Thanks!
Henry


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: java.lang.ClassNotFoundException

Posted by Henry San <sa...@real-info.com>.
It works when I jar all "flux" and "ny" classes and put them in
"tomcat-3.2.1/lib" directory.
So It can't be my configuration. I think it have to do with the ClassLoader.

> -----Original Message-----
> From: jvanzyl@mail.real-info.com [mailto:jvanzyl@mail.real-info.com]On
> Behalf Of Jason van Zyl
> Sent: Monday, April 16, 2001 12:33 PM
> To: turbine-user@jakarta.apache.org
> Subject: Re: java.lang.ClassNotFoundException
>
>
> Henry San wrote:
> >
> > >Did you generate the sample app first and then move it over?
> > >What is the package listed in the SQL.java action? By default
> > >when the app is generated it defaults to com.mycompany.newapp
> > >unless you edit the newapp.props.
> >
> > yes, I generate the sample app in turbine first then moved myapp (ny) to
> > tomcat.
> > I edited newapp.props to:
> >
> > turbine.app.name=ny
> > turbine.app.view=velocity
> > turbine.app.type=peer
> >
> > target.package=com.realinfo.ny
> > target.directory=com/realinfo/ny
> >
> > This is the package listed in SQL.java:
> > package com.realinfo.ny.modules.actions;
> >
> > >So you had this app working inside the TDK? You tested everything
> > >before you moved it over to your setup?
> >
> > Yes, It works in TDK, and I tested everything from insert,edit,delete on
> > RDF.
> >
> > another strange thing is that what I tested it in TDK, it comes
> up with the
> > Login.vm screen while
> > in tomcat-3.2.1 it comes up with the Index.vm screen.
> >
>
> You should just be able to copy the webapp from one container to the
> other then. You have probably changed or editted something, copied
> jars to the wrong location or something. The webapp should be
> transportable, just moving it from one webapps directory in one
> container to another shouldn't break anything. Everything is self
> contained. But this is why we've spent so many hours making sure
> trying to make sure things work in the TDK, I don't know what
> your setup is, but it's probably a simple configuration error.
>
> If a module is not being found which is the case with your SQL action,
> and the Login screen above then your modules are in the wrong place,
> or TR.properties is wrong, or the classes aren't there.
>
> --
> jvz.
>
> Jason van Zyl
> jvanzyl@apache.org
>
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/turbine
> http://tambora.zenplex.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: java.lang.ClassNotFoundException

Posted by Jason van Zyl <jv...@apache.org>.
Henry San wrote:
> 
> >Did you generate the sample app first and then move it over?
> >What is the package listed in the SQL.java action? By default
> >when the app is generated it defaults to com.mycompany.newapp
> >unless you edit the newapp.props.
> 
> yes, I generate the sample app in turbine first then moved myapp (ny) to
> tomcat.
> I edited newapp.props to:
> 
> turbine.app.name=ny
> turbine.app.view=velocity
> turbine.app.type=peer
> 
> target.package=com.realinfo.ny
> target.directory=com/realinfo/ny
> 
> This is the package listed in SQL.java:
> package com.realinfo.ny.modules.actions;
> 
> >So you had this app working inside the TDK? You tested everything
> >before you moved it over to your setup?
> 
> Yes, It works in TDK, and I tested everything from insert,edit,delete on
> RDF.
> 
> another strange thing is that what I tested it in TDK, it comes up with the
> Login.vm screen while
> in tomcat-3.2.1 it comes up with the Index.vm screen.
> 

You should just be able to copy the webapp from one container to the
other then. You have probably changed or editted something, copied
jars to the wrong location or something. The webapp should be
transportable, just moving it from one webapps directory in one
container to another shouldn't break anything. Everything is self
contained. But this is why we've spent so many hours making sure
trying to make sure things work in the TDK, I don't know what
your setup is, but it's probably a simple configuration error.

If a module is not being found which is the case with your SQL action,
and the Login screen above then your modules are in the wrong place,
or TR.properties is wrong, or the classes aren't there.

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: java.lang.ClassNotFoundException

Posted by Henry San <sa...@real-info.com>.
>Did you generate the sample app first and then move it over?
>What is the package listed in the SQL.java action? By default
>when the app is generated it defaults to com.mycompany.newapp
>unless you edit the newapp.props.

yes, I generate the sample app in turbine first then moved myapp (ny) to
tomcat.
I edited newapp.props to:

turbine.app.name=ny
turbine.app.view=velocity
turbine.app.type=peer

target.package=com.realinfo.ny
target.directory=com/realinfo/ny

This is the package listed in SQL.java:
package com.realinfo.ny.modules.actions;

>So you had this app working inside the TDK? You tested everything
>before you moved it over to your setup?

Yes, It works in TDK, and I tested everything from insert,edit,delete on
RDF.

another strange thing is that what I tested it in TDK, it comes up with the
Login.vm screen while
in tomcat-3.2.1 it comes up with the Index.vm screen.

Thanks!
Henry


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: java.lang.ClassNotFoundException

Posted by Jason van Zyl <jv...@apache.org>.
Henry San wrote:
> 
> Download and Installed tdk-1.1a13.tar.gz
> 
> Started turbine and it checked my username/password on my
> Informix database. Everything was working fine.
> 
> Transfer my newapp which is "ny" to "tomcat-3.2.1/webapp" directory
> modified "ny/WEB-INF/conf/TurbineResources.properties" and
> "ny/WEB-INF/web.xml"
> 

> 
> This is what I have for module packages in my "TurbineResources.properties":
> 
> module.packages=com.realinfo.ny.modules,org.apache.turbine.flux.modules
> 
> Can anybody answer why Turbine is not able to find SQL.class in tomcat-3.2.1
> but is able to find it in
> tdk-1.1a13.tar.gz?

Did you generate the sample app first and then move it over?
What is the package listed in the SQL.java action? By default
when the app is generated it defaults to com.mycompany.newapp
unless you edit the newapp.props.

So you had this app working inside the TDK? You tested everything
before you moved it over to your setup?
 
> Thanks!
> Henry
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org