[opencms-dev] REQ: NoClassDefFoundError

Jeroen Habets Jeroen.Habets at framfab.nl
Wed Jan 3 14:59:58 CET 2001


Hi,

I want to add functionality to OpenCMS 4.1.47 and wrote the class Test:

package testpak;

import com.opencms.template.*;
import com.opencms.file.*;
import com.opencms.core.*;

public class Test extends CmsXmlTemplate {

  public Object getHello(CmsObject cms,
    String tagcontent,
    A_CmsXmlContent doc,
    Object userObject) throws CmsException {
    return "Hello from java!";
  }
}

with the class file saved as xxx/servlets/testpak/Test.class

and template file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<page>
    <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
    <MASTERTEMPLATE>/content/templates/empty</MASTERTEMPLATE>
    <ELEMENTDEF name="body">
        <CLASS>testpak.Test</CLASS>
        <TEMPLATE>/content/bodys/test.html</TEMPLATE>
    </ELEMENTDEF>
</page>

I get the error:

java.lang.NoClassDefFoundError: com/opencms/template/CmsXmlTemplate
        at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:323)

        at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
        at java.lang.Thread.run(Thread.java:498)

Help me, please!
Jeroen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20010103/4ba19324/attachment.htm>


More information about the opencms-dev mailing list