i posted a query yesterday about a StringOutOfBounds in Torque.java line
275. 
Line 275: String handle = key.substring(0, key.indexOf('.'));
{The full block is given at end)

Since i got no answer, i debugged a bit and found that the problem was
caused by the lines: 
    services.DatabaseService.database.adapter=DBMM
    services.DatabaseService.database.DBMM=org.gjt.mm.mysql.Driver

There would not be a dot found in "adapter". I have thus changed the
line reading:

 if (key.endsWith("adapter")) {

 to:

 if (key.endsWith(".adapter")) {

 i.e. i have added a dot prior to adapter and now i get past this
 problem.

Is there a mistake in my properties file, or is it actually the code ??


  //////////////////////////////////////
  // FULL BLOCK 
  if (key.endsWith(".adapter")) { 
      String adapter = c.getString(key);
      category.debug (">>>> RK: adapter:"+ adapter); 
      String handle = key.substring(0, key.indexOf('.')); 
      DB db = DBFactory.create(adapter);
      // register the adapter for this name 
      adapterMap.put(handle, db); 
  }
  //////////////////////////////////////

Anyway, now i am stuck with:
java.lang.NullPointerException: There was no DataSourceFactory
configured for the connection default
    at org.apache.torque.Torque.getConnection(Torque.java:940)

I suspect it is not reading Torque.properties at all, since the same
error comes even when i remove the file altogether. It should have said
"bookstore" instead of "default". No change i make in
Torque.properties is having any impact.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to