Greg,
BaseX comes with a xmldb-api-1.0.jar. Are you using this jar? It looks like you are using a different jar for the XML:DP API, probably a newer version. The BXDatabase class form BaseX doesn't support getNames(). The DatabaseManager is calling this method. I have the impression that the xmldb-api-1.0.jar that comes with BaseX is an older version of the XML:DB API. A version that relies on getName() instead of getNames().
Regards, Frans
Op 29 mrt 2011, om 23:20 heeft Meredith Gregory het volgende geschreven:
Dear BaseXes,
i'm attempting to use the published API from Java (well Scala, really, but we're all JVM family, here...). i'm running into an abstract method error (see the trace below). Any clues would be gratefully appreciated.
Best wishes,
--greg
scala> val db = Class.forName( "org.basex.api.xmldb.BXDatabase" ).newInstance().asInstanceOf[Database] val db = Class.forName( "org.basex.api.xmldb.BXDatabase" ).newInstance().asInstanceOf[Database] db: org.xmldb.api.base.Database = org.basex.api.xmldb.BXDatabase@69dbb4d1
scala> DatabaseManager.registerDatabase( db ) DatabaseManager.registerDatabase( db ) java.lang.AbstractMethodError: org.basex.api.xmldb.BXDatabase.getNames()[Ljava/lang/String; at org.xmldb.api.DatabaseManager.registerDatabase(Unknown Source) at .<init>(<console>:25) at .<clinit>(<console>) at RequestResult$.<init>(<console>:9) at RequestResult$.<clinit>(<console>) at RequestResult$scala_repl_result(<console>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$17.apply(Interpreter.scala:988) at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$a... scala>
-- L.G. Meredith Managing Partner Biosimilarity LLC 7329 39th Ave SW Seattle, WA 98136
+1 206.650.3740
http://biosimilarity.blogspot.com
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk