geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin Sun" <linsun....@gmail.com>
Subject unable to run a simple jsp application
Date Mon, 05 Jun 2006 20:06:54 GMT
Hi there,

I have a simple jsp application that worked on 1.0.   It displays the
contents of the EMP table of the Employee database.
I am using the embedded derby database and the
tranql-connector-derby-embed-xa-1.1 rar file in Geronimo 1.1 build
(geronimo-tomcat-j2ee-1.1-410806).

The server wide datasource and application war file deployed fine.   

However, when I access the jsp from my firefox browser, I got the following
exception
in the console when the server is trying to get the database connection:

Got DataSource: org.tranql.connector.jdbc.DataSource@30c4dd0c
SQL Exception: Failed to start database 'Employee', see the next exception
for d
etails.
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source
)
        at
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown So
urce)
        at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Sourc
e)
        at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
Source)
        at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
Source)
        at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
        at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
Source
)
        at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
Source
)
        at
org.apache.derby.jdbc.EmbeddedXADataSource.setupResourceAdapter(Unkno
wn Source)
        at
org.apache.derby.jdbc.EmbeddedXADataSource.getXAConnection(Unknown So
urce)
        at
org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnecti
on(AbstractXADataSourceMCF.java:74)
        at
org.tranql.connector.derby.EmbeddedXAMCF.createManagedConnection(Embe
ddedXAMCF.java:52)
        at
org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getCo
nnection(MCFConnectionInterceptor.java:41)
        at
org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor
.getConnection(XAResourceInsertionInterceptor.java:41)
        at
org.apache.geronimo.connector.outbound.SinglePoolConnectionIntercepto
r.internalGetConnection(SinglePoolConnectionInterceptor.java:63)
        at
org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionIn
terceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73)
        at
org.apache.geronimo.connector.outbound.TransactionEnlistingIntercepto
r.getConnection(TransactionEnlistingInterceptor.java:47)
        at
org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.
getConnection(TransactionCachingInterceptor.java:86)
        at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.ge
tConnection(ConnectionHandleInterceptor.java:43)
        at
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(
TCCLInterceptor.java:39)
        at
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.
getConnection(ConnectionTrackingInterceptor.java:66)
        at
org.apache.geronimo.connector.outbound.AbstractConnectionManager.allo
cateConnection(AbstractConnectionManager.java:61)
        at
org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56
)
        at
$javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)

        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
        at
org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(Co
nnectorMethodInterceptor.java:54)
        at
$javax.sql.DataSource$$EnhancerByCGLIB$$16a1c779.getConnection(<gener
ated>)
        at
org.apache.jsp.jsp.EMPdemo_jsp._jspService(org.apache.jsp.jsp.EMPdemo
_jsp:59)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:332)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
bjectValve.java:46)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
invoke(GeronimoStandardContext.java:342)
        at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Gero
nimoBeforeAfterValve.java:31)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:667)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
        at java.lang.Thread.run(Thread.java:568)
org.apache.derby.impl.jdbc.EmbedSQLExceptionFailed to start database
'Employee',
 see the next exception for details.
java.lang.NullPointerException
        at
org.apache.jsp.jsp.EMPdemo_jsp._jspService(org.apache.jsp.jsp.EMPdemo
_jsp:70)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:332)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
bjectValve.java:46)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
invoke(GeronimoStandardContext.java:342)
        at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Gero
nimoBeforeAfterValve.java:31)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:667)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
        at java.lang.Thread.run(Thread.java:568)
java.lang.NullPointerExceptionnull

----------------------------------------
If I reboot the geronimo server, the application works fine.  Here's the
good trace from the console after the reboot:

Got DataSource: org.tranql.connector.jdbc.DataSource@d169d27
Got Connection: org.tranql.connector.jdbc.ConnectionHandle@13a51d08

Table EMP after SELECT:
3333   JONES   CLERK   1111   20
2222   SMITH   SALESREP   1111   20

Also, if I change the application to use the systemdatabase in derby, (which
is not recommended in general) I don't have the prob.   

Let me know if you want to see my depoyment plans or the application.  This
seems to be a generic problem with any databases except the systemdatabase
in Derby.  I'll continue debugging the prob but any insight is appreciated.

TIA

Lin


Mime
View raw message