DO NOT REPLY [Bug 43365] New: - Null Pointer Exception in CollectionManager.createCollection

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]/bugzilla/>
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: [email protected]
        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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.