[Opensource] Loosing connection to DB

Jefferson Magno jefferson at boavistanet.com.br
Mon Apr 7 14:03:09 PDT 2003


Hello all,

I was using DBObject with no problem and I used to set my db context in
the Schema class. One day I decided to change my context name, and I had
some problems.

Expresso searched for the old context many times (like a search in the
cache). So I decided to take off the settings of db context from Schema
and set it in the controllers. Each time I use a dbobj I call
setDBName() method. It's working but frequently I'm loosing my
connections. Can anybody help-me? 

Thks,

Jefferson



The trace is below: 

com.jcorporate.expresso.core.db.DBException: Not connected to database -
called connect method first
(com.jcorporate.expresso.services.dbobj.ControllerDefault, db/context
'erp_os')
        at
com.jcorporate.expresso.core.db.DBConnection.execute(DBConnection.java:716)
        at
com.jcorporate.expresso.core.db.DBConnection.execute(DBConnection.java:806)
        at
com.jcorporate.expresso.core.dbobj.DBObject.find(DBObject.java:2441)
        at
com.jcorporate.expresso.core.dbobj.SecuredDBObject.find(SecuredDBObject.java:358)
        at
com.jcorporate.expresso.core.controller.ServletControllerRequest.getStoredParameters(ServletControllerRequest.java:384)
        at
com.jcorporate.expresso.core.controller.ServletControllerRequest.addDefaultParams(ServletControllerRequest.java:356)
        at
com.jcorporate.expresso.core.controller.ServletControllerRequest.parseParamsReq(ServletControllerRequest.java:168)        at com.jcorporate.expresso.core.controller.ServletControllerRequest.parseParams(ServletControllerRequest.java:567)
        at
com.jcorporate.expresso.core.controller.Controller.perform(Controller.java:1400)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
        at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
        at
com.caucho.server.http.Invocation.service(Invocation.java:312)
        at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
        at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
        at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
        at java.lang.Thread.run(Thread.java:536)






More information about the Opensource mailing list