Hi,
You do not use the default DatabaseMap with your MapBuilder with your class in the
line:
DBBroker.getInstance().getDatabaseMap("dabasename");
instead of
DBBroker.getInstance().getDatabaseMap(DBBroker.DEFAULT);
This means that you use a non-default MapBuilder and therefore need to explicitly
set the MapBuilder with setDbName() in your Criteria object before you do any
updates. I suspect the same goes for doSelect & doInsert. REMEMBER this when you
use DatabaseMaps other than the default map.
Because the IDBroker does updates that are outside of your control we need to have
a look at this. I think it will work if we add the following line before we call
doUpdate:
criteria.setDbName ( tableMap.getDatabaseMap().getName() );
Any thoughts on this?
~ Leon
----- Original Message -----
From: Dan Diephouse <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Thursday, August 03, 2000 9:00 AM
Subject: Re: Problem using IDBroker
> Greg, Thank you very much for your response. Yet I have one other persistent
> problem. Upon starting tomcat the IDBroker seems to work fine for me (Not the
> problem :). It will work indefinately util I recompile any class. Even if I
> don't change the code IDBroker will stop working. After staring at the code
> for many hours I am able to come up with nothing and am again stumped.
>
> Dan Diephouse
> ------------
> The offending line of code in BasePeer is :
>
> ColumnMap[] columnMaps = tempDbMap.getTable( tables.get(i) ).getColumns();
>
> And the stack trace:
>
> java.lang.NullPointerException
> at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1183)
> at org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java:332)
> at org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java:203)
> at org.apache.turbine.util.db.IDBroker.getNextId(IDBroker.java:179)
> at
>
com.compassarts.modules.actions.TimeSheet.UpdateSheet.doPerform(UpdateSheet.java:3
6)
>
> at org.apache.turbine.modules.Action.perform(Action.java:77)
> at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:111)
>
> at
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:79)
> at org.apache.turbine.modules.Page.build(Page.java:81)
> at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:111)
> at Turbine.doGet(Turbine.java:298)
> at Turbine.doPost(Turbine.java:368)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
> at org.apache.tomcat.core.Handler.service(Handler.java:261)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:720)
>
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
> at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12
ConnectionHandler.java:166)
>
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java)
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]