McNeil, Shane wrote:
bad class file exception

Hi,

I am attempting to call a custom Java API from an XSP document as follows (simplified)...

    <?xml version="1.0" encoding="UTF-8"?>
    <xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
        <xsp:structure>
            <xsp:include>SIM.Zapi.*</xsp:include>
        </xsp:structure>
        <xsp:logic>
    public String getSimDoc()
    {
        ZAssociation za  = new ZAssociation("localhost:7810");
        return "OK";
    }
        </xsp:logic>
        <document>
            <xsp:expr>getSimDoc()</xsp:expr>
        </document>
    </xsp:page>


Can anyone tell me why I am getting the following error...

    Language Exception
    Line 66, column 4: cannot access class ZAssociation; bad class file (java.lang.RuntimeException: class file: SIM.Zapi.ZAssociation contains wrong class: SIM.ZApi.ZAssociation)

The upper case "A"  in the ZApi does not agree with thw lower case in Zapi earlier.
It appears to find the jar file or class file it is just a disagreement between the class name inside the code and the file name.

    Line 66, column 27: constructor ZAssociation(java.lang.String) not found in class SIM.Zapi.ZAssociation
    Line 0, column 0:
    2 errors


I can call the API from a standard Java application successfully.

Regards,

Shane McNeil

Analyst Programmer
Corporate Document Technologies
STANDARDS AUSTRALIA


--------------------------------------------------------------------- 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