Hi.
I have some problem with TJDOMObjectModel.
This is simple test I use:
public class TestJDOMObjectModel {
public static void main(String args)
throws Exception {
TConnection connection = TConnectionFactory.getInstance().newConnection( “http://localhost/tamino/objects” );
TXMLObjectModel jdom = TJDOMObjectModel.getInstance();
TXMLObjectAccessor accessor = connection.newXMLObjectAccessor( TAccessLocation.newInstance( “objects” ), jdom );
String queryValue = “object”;
TQuery query = TQuery.newInstance(queryValue);
TResponse response = accessor.query(query);
TXMLObjectIterator objectIterator = response.getXMLObjectIterator();
TJDOMElementIterator i = new TJDOMElementIterator(objectIterator);
while( i.hasNext() ) {
Element currentElement = i.next();
System.out.println( currentElement.toString() );
}
connection.close();
}
}
I have following output:
java.lang.NoSuchMethodError: org.jdom.Element.getContent()Ljava/util/List;
at com.softwareag.tamino.db.API.response.jdom.TJDOMInputStreamInterpreter.setResponseQueryContent(Unknown Source)
at com.softwareag.tamino.db.API.response.jdom.TJDOMInputStreamInterpreter.doInterpret(Unknown Source)
at com.softwareag.tamino.db.API.response.TInputStreamInterpreter.interpret(Unknown Source)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.doBuild(Unknown Source)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.buildForXML(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.query(Unknown Source)
at stahoo.dyplom.persistence.test.TestJDOMObjectModel.main(TestJDOMObjectModel.java:21)
Exception in thread “main”
Can enybody explain what’s going on?
When I use TDOMObjectModel everything works well.
(I use jdom.jar from Tamino 4.1.1 SDK )
It sounds like a JDOM.JAR mismatch problem (e.g. beta8 and beta9). Although you claim that you only use jdom.jar from Tamino, maybe you have another one in the CLASSPATH by accident (e.g. from your development environment)?
Another reason for this might be not enough memory in the JVM.
You were right. I’v had another jdom.jar on classpath from another cofigured library.
Now it’s fixed and works.
Thanks a lot.