I don't know if you really left this in the code but I
noticed this below and wanted to throw this out there
just in case. If you left the following package
declaration:

> >     package com.yourcompany.app.modules.screens;

in your HelloWorld.java file then then it will
actually compile into the wrong package, and that's
your problem.

it should be:
package com.estatcamp.site.modules.screens;

hope that helps,
Lou

--- Gustavo Pinheiro <[EMAIL PROTECTED]> wrote:
> Hello again,
> 
> I think it is now safe to say that my class is not
> being loaded. Looking
> into turbine.log I found this:
> 
>       ...template.mapper.ClassMapper - Looking for
> HelloWorld
>       ...ScreenLoader - Loading Screen HelloWorld from
> the Assembler
> Broker
>       ...assemblerbroker.util.java.JavaScreenFactory -
> Class Fragment is
> HelloWorld
>       ...assemblerbroker.util.java.JavaScreenFactory -
> Trying
> com.estatcamp.site.modules.screens.HelloWorld
>       ...assemblerbroker.util.java.JavaScreenFactory -
> com.estatcamp.site.modules.screens.HelloWorld: No
> Class Definition found
>       ...assemblerbroker.util.java.JavaScreenFactory -
> Trying
>
com.estatcamp.site.modules.screens.screens.HelloWorld
>       ...assemblerbroker.util.java.JavaScreenFactory -
>
com.estatcamp.site.modules.screens.screens.HelloWorld:
> Not found
>               .
>               .
>               .
>       ...assemblerbroker.util.java.JavaScreenFactory -
> Returning: null
> 
> It seems to me that Turbine is looking for
> HelloWorld.class, which is in
>
"C:\tdk-2.3\webapps\site\WEB-INF\classes\com\estatcamp\site\modules\screens"
> , but it can't recognize it is there (but it really
> is!!!! I've double
> checked). In the fifth line above it can be seen the
> message "No Class
> Definition found". What does it mean?
> After that, it tries to look into other dirs, but it
> doesn't find
> HelloWorld, as should be expected cause it just
> isn't in any of those
> places!!!
> 
> Why can't Turbine find my class? Is there some
> strict naming convention to
> be followed?
> 
> -----Mensagem original-----
> De: EXT-McTaggart, Peter
> [mailto:[EMAIL PROTECTED] 
> Enviada em: quarta-feira, 17 de dezembro de 2003
> 22:27
> Para: Turbine Users List
> Assunto: RE: newbie
> 
> 
> Hi Gustavo,
> 
> The code that you put in the email was in the
> package
> 
> package com.yourcompany.app.modules.screens;  
> 
> The class/screen loader uses the module.packages
> list to find you screen
> classes. 
> And you need to tell it where your screen classes
> are, ie. you need to put
> com.yourcompany.app.modules in the module.packages
> list. (If you change your
> package names for your post you can probably ignore
> this.)
> 
> To see if they are running , just put log messges in
> your classes to see if
> they are being run.
> 
> If you are using TDK 2.3
> 
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> 
> 
> declare the following in your class:
> 
>   private static Log log =
> LogFactory.getLog(HelloWorld.class)
> 
> then call 
>       log.debug(">>>>>> running
> HelloWorld.doBuildTemplate"); 
> 
> and you should see something on the console or in
> the log file. If log level
> is set to DEBUG. Alternatively you could do a
> System.println  or something.
> 
> cheers
> Peter
> 
> 
> 
> > -----Original Message-----
> > From: Gustavo Pinheiro
> [mailto:[EMAIL PROTECTED]
> > Sent: 18 December 2003 1:09 
> > To: 'Turbine Users List'
> > Cc: EXT-McTaggart, Peter
> > Subject: RES: newbie
> > 
> > 
> > Hi Peter,
> > 
> > I don�t know if it is loading and running my
> class. How could
> > I verify that?
> > 
> > Anyway, thanks for the answer, but I believe that
> the confs
> > in TurbineResources.prop are not the problem
> because flux 
> > works just fine. And my TurbineResources.prop has
> the following line:
> > 
> >     
> >
>
module.packages=com.estatcamp.site.modules,org.apache.turbine.
> > flux.modules
> > 
> > Which, I believe, is the way its meant to be.
> > 
> > Thanks anyway.
> > 
> > -----Mensagem original-----
> > De: EXT-McTaggart, Peter
> [mailto:[EMAIL PROTECTED]
> > Enviada em: quarta-feira, 17 de dezembro de 2003
> 21:29
> > Para: Turbine Users List
> > Assunto: RE: newbie
> > 
> > 
> > Gustavo,
> > 
> > Is it actually loading and running your Java
> class?
> > 
> > You may have to change your TR.props files to
> point to the
> > package location
> > 
> > check the modules.packages property in that file
> > (WEB-INF/conf/TurbineResources.properties)
> > to see if your java packages are listed, ie.
> > com.yourcompany.app.modules should be in the list.
> > 
> > If you are using the TDK then your Java class
> should be in
> > the screens directory and package, which by the
> code below it 
> > should be.
> > 
> > HTH,
> > 
> > cheers
> > Peter
> > 
> > 
> > > -----Original Message-----
> > > From: Gustavo Pinheiro
> [mailto:[EMAIL PROTECTED]
> > > Sent: 18 December 2003 12:05
> > > To: [EMAIL PROTECTED]
> > > Cc: 'Jeff Painter'
> > > Subject: RES: newbie
> > > 
> > > 
> > > Hi Jeff,
> > > 
> > > I�m using the 2.3 version now, but the same
> thing
> > happens!!! That is a
> > > strong indication that << I >> am doing
> something wrong,
> > but I can�t
> > > figure it out myself. Everything seems fine
> except that I
> > can�t access
> > > anything that�s put in a context from a java
> class. Take a
> > look at the
> > > code:
> > > 
> > >   package com.yourcompany.app.modules.screens;
> > > 
> > >   // Velocity Stuff
> > >   import org.apache.velocity.context.Context;
> > > 
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to