DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43365>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43365

           Summary: Null Pointer Exception in
                    CollectionManager.createCollection
           Product: Xindice
           Version: cvs head (1.1)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML:DB API
        AssignedTo: xindice-dev@xml.apache.org
        ReportedBy: [EMAIL PROTECTED]


Using the sample code provided in the developer guide:

public static void main(String[] args) {

Collection collection = null;
                
try{

String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
                        
Database database = (Database)c.newInstance();
DatabaseManager.registerDatabase(database);
                        
String uri = "xmldb:xindice://localhost:8601/db/";
collection = DatabaseManager.getCollection(uri);
                        
String collectionName = "mycollection";
CollectionManager manager = (CollectionManager)collection.getService
("CollectionManger", "1.0");
                        
String collectionConfig =
"<collection compressed=\"true\" " +
"name=\"" + collectionName + "\">" +
"   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\"/>" +
"</collection>";

System.out.println(collectionConfig);
collection = manager.createCollection(collectionName, DOMParser.toDocument
(collectionConfig));
                        
System.out.println("Collection " + collectionName + " created.");
}
catch(Exception e){
e.printStackTrace(System.out);
}

}

I recieved the following system output:

trying to register database

<collection compressed="true"             name="mycollection">   <filer 
class="org.apache.xindice.core.filer.BTreeFiler"/></collection>

java.lang.NullPointerException
        at gov.ed.eric.xindice.CreateCollection.main(CreateCollection.java:38)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to