You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kamal Bhatt <kb...@tt.com.au> on 2006/08/11 13:35:35 UTC

Trouble compiling custom generator

Hi
I followed more or less everything specified in the tutorial:

http://cocoon.apache.org/2.1/tutorial/tutorial-generator.html

Now, even though I compile I get the following errors:

ImageInfoGenerator.java:6: cannot access
org.apache.avalon.framework.component.C
omponent
file org\apache\avalon\framework\component\Component.class not found
public class ImageInfoGenerator extends AbstractGenerator
       ^
ImageInfoGenerator.java:24: cannot find symbol
symbol  : variable contentHandler
location: class ImageInfoGenerator
      contentHandler.startDocument();
      ^
ImageInfoGenerator.java:26: cannot find symbol
symbol  : variable contentHandler
location: class ImageInfoGenerator
      contentHandler.startElement("", "example", "example", emptyAttr);
      ^
ImageInfoGenerator.java:28: cannot find symbol
symbol  : variable contentHandler
location: class ImageInfoGenerator
      contentHandler.characters("Hello World!".toCharArray(),0,
      ^
ImageInfoGenerator.java:31: cannot find symbol
symbol  : variable contentHandler
location: class ImageInfoGenerator
      contentHandler.endElement("","example", "example");
      ^
ImageInfoGenerator.java:33: cannot find symbol
symbol  : variable contentHandler
location: class ImageInfoGenerator
      contentHandler.endDocument();
      ^
6 errors

Now, the only difference between the code's example and my case is the
name. The filename is the same is the same as the class. Now this is
probably my unfamiliarity with Java that is at fault, but I cannot see
what I am doing wrong. I have imported AbstractGenerator and I am
including cocoon.jar in the class path. I even tried to include files in
lib/endorsed and lib/core.

Any help would be appreciated.

Cheers.



--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble compiling custom generator

Posted by Kamal Bhatt <kb...@tt.com.au>.
>
> You'll need more than just cocoon.jar in the classpath, you'll also need
>  the avalon* jars and probably the excalibur* jars as well.  Wouldn't
> hurt to just use everything in Cocoon's WEB-INF/lib to be safe.

That is it exactly, thanks. I thought I tried that, obviously I did it
incorrectly. The command to compile is:

javac -endorseddirs %COCOON_LOCATION%\build\webapp\WEB-INF\lib\ *.java

in the directory where the file is of course.  %COCOON_LOCATION% is where
the file is located.





--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble compiling custom generator

Posted by Jason Johnston <co...@lojjic.net>.
Kamal Bhatt wrote:
> Hi
> I followed more or less everything specified in the tutorial:
> 
> http://cocoon.apache.org/2.1/tutorial/tutorial-generator.html
> 
...
> 
> Now, the only difference between the code's example and my case is the
> name. The filename is the same is the same as the class. Now this is
> probably my unfamiliarity with Java that is at fault, but I cannot see
> what I am doing wrong. I have imported AbstractGenerator and I am
> including cocoon.jar in the class path. I even tried to include files in
> lib/endorsed and lib/core.
> 
> Any help would be appreciated.
> 

You'll need more than just cocoon.jar in the classpath, you'll also need 
the avalon* jars and probably the excalibur* jars as well.  Wouldn't 
hurt to just use everything in Cocoon's WEB-INF/lib to be safe.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org