The class was compiled by another version of the JVM than the actual runtime JVM. Especially JDK version 1.3.x vs. 1.4.x.

Joerg

Andreas Hefti wrote:
hello all,
I try to write my own Generator for Cocoon to get XML source from a EJB. first I try to write a simle sample to find out how it works. I found a sample in a how to.
I wrote the following simple Generator:
---------------------------------------------------------------------------------
package com.ite.generators;
import java.io.IOException;
import java.io.StringReader;
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLReaderFactory;
import org.apache.cocoon.*;

public class TestGen extends org.apache.cocoon.generation.AbstractGenerator {

public TestGen() {
}
public void generate() throws java.io.IOException, org.xml.sax.SAXException, org.apache.cocoon.ProcessingException {
String message = "<doc>My first Cocoon 2 generator!</doc>";
XMLReader xmlreader = XMLReaderFactory.createXMLReader();
xmlreader.setContentHandler(super.xmlConsumer);
InputSource source = new InputSource(new StringReader(message));
xmlreader.parse(source);
} }
--------------------------------------------------------------------------------
if I try to compile this source with Forte4Java 3.0, I get the following compiler error;
--------------------------------------------------------------------------------
com/ite/generators/TestGen.java [24:1] cannot access org.apache.cocoon.generation.AbstractGenerator
bad class file: D:\I-TE\Entwicklung\itech_cvs\develop\senn\src\webMod\WEB-INF\lib\cocoon-2.0.3.jar(org/apache/cocoon/generation/AbstractGenerator.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class TestGen extends org.apache.cocoon.generation.AbstractGenerator {
^
1 error
Errors compiling TestGen.
---------------------------------------------------------------------------------
I', using the cocoon-2.0.3.jar. what is wrong with the class version and what can I do to solve the version problem?
thanks for any help,

Mit freundlichen Grüssen / Kind regards Andreas Hefti

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to