There was an error getting a DBCP datasource.Exception: java.lang.NullPointerException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

There was an error getting a DBCP datasource.Exception: java.lang.NullPointerException

yong lin-2
 To all:

532078[  ConnectionFactory.java:74 :ERROR]

---- runtime exception report
--------------------------------------------------
There was an error getting a DBCP datasource.
Exception: java.lang.NullPointerException
Message: null
---- stack trace
---------------------------------------------------------------
java.lang.NullPointerException
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
GenericObjectPool.java:771)
org.apache.commons.dbcp.PoolingDataSource.getConnection(
PoolingDataSource.java:95)
org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection (
DBCPConnectionFactory.java:62)
org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources(
ConnectionFactory.java:71)
org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158)
org.ofbiz.entity.transaction.TransactionFactory.getConnection (
TransactionFactory.java:105)
org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java
:53)
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267)
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement (SQLProcessor.java:367)
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:338)
org.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:166)
org.ofbiz.entity.datasource.GenericDAO.insert (GenericDAO.java:118)
org.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java
:75)
org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:526)
org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java :506)
org.ofbiz.entity.GenericValue.create(GenericValue.java:91)
org.ofbiz.content.stats.ServerHitBin.saveHit(ServerHitBin.java:660)
org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:217)
org.ofbiz.content.stats.ServerHitBin.countHit (ServerHitBin.java:94)
org.ofbiz.content.stats.ServerHitBin.countRequest(ServerHitBin.java:67)
org.ofbiz.content.webapp.control.ControlServlet.doGet(ControlServlet.java
:226)
org.ofbiz.content.webapp.control.ControlServlet.doPost (ControlServlet.java
:89)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:237)
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:157)
org.ofbiz.content.webapp.control.ContextFilter.doFilter(ContextFilter.java
:136)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:186)
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:157)
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:214)
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardContextValve.invokeInternal(
StandardContextValve.java:198)
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:152)
org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java
:137)
org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:102)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:102)
org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (
ThreadPool.java:683)
java.lang.Thread.run(Thread.java:536)
--------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: There was an error getting a DBCP datasource.Exception: java.lang.NullPointerException

cjhowe
Could you share what you were doing when this
happened?
Without knowing what was happening, I would guess that
either you haven't started your database or your
connection parameters are incorrect ie username,
password, database name, ip address and port of
database, etc.

--- yong lin <[hidden email]> wrote:

>  To all:
>
> 532078[  ConnectionFactory.java:74 :ERROR]
>
> ---- runtime exception report
> --------------------------------------------------
> There was an error getting a DBCP datasource.
> Exception: java.lang.NullPointerException
> Message: null
> ---- stack trace
>
---------------------------------------------------------------
> java.lang.NullPointerException
>
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
> GenericObjectPool.java:771)
>
org.apache.commons.dbcp.PoolingDataSource.getConnection(
> PoolingDataSource.java:95)
>
org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection
> (
> DBCPConnectionFactory.java:62)
>
org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources(
> ConnectionFactory.java:71)
>
org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158)
>
org.ofbiz.entity.transaction.TransactionFactory.getConnection
> (
> TransactionFactory.java:105)
>
org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java
> :53)
>
org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267)
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement
> (SQLProcessor.java:367)
>
org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:338)
>
org.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:166)
> org.ofbiz.entity.datasource.GenericDAO.insert
> (GenericDAO.java:118)
>
org.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java
> :75)
>
org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:526)
>
org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java
> :506)
>
org.ofbiz.entity.GenericValue.create(GenericValue.java:91)
>
org.ofbiz.content.stats.ServerHitBin.saveHit(ServerHitBin.java:660)
>
org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:217)
> org.ofbiz.content.stats.ServerHitBin.countHit
> (ServerHitBin.java:94)
>
org.ofbiz.content.stats.ServerHitBin.countRequest(ServerHitBin.java:67)
>
org.ofbiz.content.webapp.control.ControlServlet.doGet(ControlServlet.java
> :226)
>
org.ofbiz.content.webapp.control.ControlServlet.doPost
> (ControlServlet.java
> :89)
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:237)
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:157)
>
org.ofbiz.content.webapp.control.ContextFilter.doFilter(ContextFilter.java
> :136)
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (
> ApplicationFilterChain.java:186)
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:157)
>
org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:214)
>
org.apache.catalina.core.StandardValveContext.invokeNext
> (
> StandardValveContext.java:104)
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
org.apache.catalina.core.StandardContextValve.invokeInternal(
> StandardContextValve.java:198)
> org.apache.catalina.core.StandardContextValve.invoke
> (
> StandardContextValve.java:152)
>
org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:104)
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java
> :137)
>
org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:104)
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
>
org.apache.catalina.core.StandardValveContext.invokeNext
> (
> StandardValveContext.java:102)
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :109)
>
org.apache.catalina.core.StandardValveContext.invokeNext
> (
> StandardValveContext.java:104)
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
>
org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:102)
> org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:799)
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
> (Http11Protocol.java:705)
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (
> ThreadPool.java:683)
> java.lang.Thread.run(Thread.java:536)
>
--------------------------------------------------------------------------------
>

Reply | Threaded
Open this post in threaded view
|

Re: There was an error getting a DBCP datasource.Exception: java.lang.NullPointerException

David E Jones-2
In reply to this post by yong lin-2

A couple of thoughts:

1. which version/revision of OFBiz are you using? this appears to be  
from an older one...

2. this is an error related to not being able to connect to the  
database, so check your db setup (URL, etc)

-David


On Aug 15, 2006, at 6:07 AM, yong lin wrote:

> To all:
>
> 532078[  ConnectionFactory.java:74 :ERROR]
>
> ---- runtime exception report
> --------------------------------------------------
> There was an error getting a DBCP datasource.
> Exception: java.lang.NullPointerException
> Message: null
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.NullPointerException
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
> GenericObjectPool.java:771)
> org.apache.commons.dbcp.PoolingDataSource.getConnection(
> PoolingDataSource.java:95)
> org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection (
> DBCPConnectionFactory.java:62)
> org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources(
> ConnectionFactory.java:71)
> org.ofbiz.entity.transaction.JNDIFactory.getConnection
> (JNDIFactory.java:158)
> org.ofbiz.entity.transaction.TransactionFactory.getConnection (
> TransactionFactory.java:105)
> org.ofbiz.entity.jdbc.ConnectionFactory.getConnection
> (ConnectionFactory.java
> :53)
> org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:
> 267)
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement  
> (SQLProcessor.java:367)
> org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement
> (SQLProcessor.java:338)
> org.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:
> 166)
> org.ofbiz.entity.datasource.GenericDAO.insert (GenericDAO.java:118)
> org.ofbiz.entity.datasource.GenericHelperDAO.create
> (GenericHelperDAO.java
> :75)
> org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:526)
> org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java :506)
> org.ofbiz.entity.GenericValue.create(GenericValue.java:91)
> org.ofbiz.content.stats.ServerHitBin.saveHit(ServerHitBin.java:660)
> org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:217)
> org.ofbiz.content.stats.ServerHitBin.countHit (ServerHitBin.java:94)
> org.ofbiz.content.stats.ServerHitBin.countRequest(ServerHitBin.java:
> 67)
> org.ofbiz.content.webapp.control.ControlServlet.doGet
> (ControlServlet.java
> :226)
> org.ofbiz.content.webapp.control.ControlServlet.doPost  
> (ControlServlet.java
> :89)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:237)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:157)
> org.ofbiz.content.webapp.control.ContextFilter.doFilter
> (ContextFilter.java
> :136)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> ApplicationFilterChain.java:186)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:157)
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:214)
> org.apache.catalina.core.StandardValveContext.invokeNext (
> StandardValveContext.java:104)
> org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
> org.apache.catalina.core.StandardContextValve.invokeInternal(
> StandardContextValve.java:198)
> org.apache.catalina.core.StandardContextValve.invoke (
> StandardContextValve.java:152)
> org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:104)
> org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
> org.apache.catalina.core.StandardHostValve.invoke  
> (StandardHostValve.java
> :137)
> org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:104)
> org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java
> :117)
> org.apache.catalina.core.StandardValveContext.invokeNext (
> StandardValveContext.java:102)
> org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
> org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java
> :109)
> org.apache.catalina.core.StandardValveContext.invokeNext (
> StandardValveContext.java:104)
> org.apache.catalina.valves.AccessLogValve.invoke
> (AccessLogValve.java:535)
> org.apache.catalina.core.StandardValveContext.invokeNext(
> StandardValveContext.java:102)
> org.apache.catalina.core.StandardPipeline.invoke  
> (StandardPipeline.java:520)
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> 160)
> org.apache.coyote.http11.Http11Processor.process  
> (Http11Processor.java:799)
> org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.processConnection
> (Http11Protocol.java:705)
> org.apache.tomcat.util.net.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java:577)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (
> ThreadPool.java:683)
> java.lang.Thread.run(Thread.java:536)
> ----------------------------------------------------------------------
> ----------