[jdom-interest] Trouble with attributes
Jason Hunter
jhunter at collab.net
Thu Dec 14 13:52:42 PST 2000
Ah, check the FAQ and search for NoSuchMethodError. Let us know if that
doesn't solve it.
-jh-
Richard Monson-Haefel wrote:
>
> JDOM or the SAXBuilder is having trouble reading attributes in my XML
> file. I'm using the latest download -- just got it 10 min ago. When I
> remove the attribute "type="Stateless"' It parses the XML file without a
> problem, but as soon as I put it back in, I get the below exception.
>
> Below is the error message and attached are the simple DTD and XML file
> I'm using. Any help you can provide would be greatly appreciated.
>
> ******** ERROR **********
> java.lang.NoSuchMethodError: org.xml.sax.Attributes: method
> getQName(I)Ljava/lang/String; not found
>
> at org.jdom.input.SAXHandler.startElement(SAXBuilder.java:668)
>
> at
> org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1199)
>
> at
> org.apache.xerces.framework.XMLParser.callStartElement(XMLParser.java:1891)
>
> at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1831)
>
> at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1223)
>
> at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
>
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1186)
>
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:336)
>
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:369)
>
> at org.openejb.alt.JdomAssembler.build(JdomAssembler.java:98)
>
> at org.openejb.OpenEJB.init(OpenEJB.java:136)
>
> at org.openejb.ri.server.Server.<init>(Server.java:131)
>
> at org.openejb.ri.server.Server.main(Server.java:235)
>
> at symantec.tools.debug.Agent.runMain(Native Method)
>
> at symantec.tools.debug.MainThread.run(Agent.java:48)
>
> ***************************************
>
> --
> Richard Monson-Haefel
> Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000)
> Co-Author of Java Message Service (O'Reilly 2000)
> http://www.EjbNow.com
>
> ------------------------------------------------------------------------
> <?xml encoding="US-ASCII"?>
> <!ATTLIST container type CDATA #IMPLIED>
>
> <!--
> The Document:
> This DTD is used for the main configuration of the OpenEJB container system.
> Configuration is based on the contents of an XML file based on this DTD (named
> openejb.xml). This information is combined with the ejb-jar.xml and openejb-jar.xml
> files in each JAR that is deployed.
> -->
> <!ELEMENT openejb ( containers+, security-service, transaction-service, (connectors|jar-connectors)*) >
> <!ELEMENT containers (container+ ) >
> <!ELEMENT container (jar-deployments+ ) >
> <!ELEMENT jar-deployments (ejb-name+ ) >
> <!ELEMENT ejb-name (#PCDATA ) >
> <!ELEMENT security-service (classname,codebase?,properties? ) >
> <!ELEMENT transaction-service (classname, codebase?, properties? ) >
> <!ELEMENT classname (#PCDATA ) >
> <!ELEMENT codebase (#PCDATA ) >
> <!ELEMENT properties (property+ ) >
> <!ELEMENT property EMPTY >
> <!ELEMENT connectors (connector+,connection-manager+ ) >
> <!ELEMENT connector (connector-id, connection-manager-id, managed-connection-factory) >
> <!ELEMENT connector-id (#PCDATA) >
> <!ELEMENT connection-manager-id (#PCDATA ) >
> <!ELEMENT managed-connection-factory (classname, properties?) >
> <!ELEMENT connection-manager (connection-manager-id,classname, properties? ) >
> <!ELEMENT jar-connector (connector-id) >
>
> ------------------------------------------------------------------------
> <!DOCTYPE openejb PUBLIC "-//Openejb.org//DTD OpenEJB 1.1//EN" "g:\\openejb\\testing\\calculator\\openejb.dtd">
>
> <openejb>
> <containers>
> <container type="Stateless">
> <jar-deployments>
> <ejb-name>CalculatorEJB</ejb-name>
> </jar-deployments>
> </container>
> </containers>
> <security-service>
> <classname>org.openejb.ri.sp.PseudoSecurityService</classname>
> </security-service>
> <transaction-service>
> <classname>org.openejb.ri.sp.PseudoTransactionService</classname>
> <codebase>http://www.exoffice.com/tyrex</codebase>
> </transaction-service>
> <connectors>
> <connector>
> <connector-id>connector1</connector-id>
> <connection-manager-id>LocalShared</connection-manager-id>
> <managed-connection-factory>
> <classname>
> org.openejb.resource.jdbc.JdbcManagedConnectionFactory
> </classname>
> </managed-connection-factory>
> </connector>
> <connection-manager>
> <connection-manager-id>LocalShared</connection-manager-id>
> <classname>
> org.openejb.resource.SharedLocalConnectionManager
> </classname>
> </connection-manager>
> </connectors>
>
> </openejb>
More information about the jdom-interest
mailing list