[opencms-dev] OpenCms 6 Alpha 3: SQL Exception: The url cannot be null
Dhariwal, Rathan
Rathan.Dhariwal at tdsecurities.com
Mon Jan 31 19:10:18 CET 2005
Hi Everyone
I am attempting to access JDBC connection from JSP/Java using following
code I am receiving SQL exception.
Can anybody help me in this regard?
CmsJspActionElement cmsjsp = new CmsJspActionElement(pageContext,
request, response);
CmsObject cms = cmsjsp.getCmsObject();
CmsRequestContext cmsCtx = cmsjsp.getRequestContext();
CmsDbContext dbCtx = new CmsDbContext(cmsCtx);
CmsSqlManager sqlMan = new CmsSqlManager();
Connection con = sqlMan.getConnection(dbCtx);
java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:489)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at
org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:35
6)
at
org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:33
0)
at
org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:31
0)
at
com.tdsecurities.site.util.TDSCmsUtil.getCmsDbConnection(TDSCmsUtil.java
:37)
at
com.tdsecurities.site.forexdesk.ForExDeskManager.getCurrencyRates(ForExD
eskManager.java:49)
at
org.apache.jsp.WEB_002dINF.jsp.offline.sites.tds.dispHistRates_jsp._jspS
ervice(dispHistRates_jsp.java:58)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:704)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:590)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:510)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequest
Dispatcher.java:357)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:163)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:410)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:293)
at
org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:442)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:387)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.ja
va:648)
at
org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1346)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:683)
at java.lang.Thread.run(Thread.java:534)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050131/6fd6d963/attachment.htm>
More information about the opencms-dev
mailing list