geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Is this due to a problem in Derby Embedded DB?
Date Wed, 05 Jul 2006 15:44:35 GMT
Can you try changing the dependency

             <dep:dependency>
                 <dep:groupId>org.apache.derby</dep:groupId>
                 <dep:artifactId>derby</dep:artifactId>
                 <dep:version>10.1.1.0</dep:version>
                 <dep:type>jar</dep:type>
             </dep:dependency>

to
             <dep:dependency>
                 <dep:groupId>geronimo</dep:groupId>
                 <dep:artifactId>system-database</dep:artifactId>
                 <dep:type>car</dep:type>
             </dep:dependency>


I think this problem might be caused by loading 2 copies of the derby  
database in 2 classloaders: this typically breaks a lot of derby.  If  
this is the problem I don't know why restarting the server would fix it.

thanks
david jencks


On Jul 5, 2006, at 4:46 AM, Lasantha Ranaweera wrote:

> Hi Aron,
>
> I changed the URL in the deployment plan of the DB Pool as you  
> suggested. Then deploy it using a command prompt. Error still  
> appears in the same scenario until it restarts.
>
> Thanks,
> Lasantha
>
>
>
> Aaron Mulder wrote:
>> If you haven't manually created the Derby DB before these tests, can
>> you try changing your URL to "jdbc:derby:InventoryDB;create=true" and
>> let us know if that fixes the problem on Windows?
>>
>> Also, the security realm issue was not a Derby problem, it was a
>> problem with how the admin console tries to create the new security
>> realm service.
>>
>> Thanks,
>>     Aaron
>>
>> On 7/5/06, Lasantha Ranaweera <lasantha@opensource.lk> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi All,
>>>
>>> An interesting observation made when I was writing a sample  
>>> application to
>>> the Geronimo v1.1. The sample application just a small web  
>>> application which
>>> refers to the embedded Derby DB from a DataSource. I carried out  
>>> some
>>> investigation regarding the observation. Following are my  
>>> observations in a
>>> list of test scenarios.
>>>
>>>  Scenario => Deploying a database pool in Geronimo v1.1 and  
>>> accessing it
>>> without restarting the server
>>>
>>>  Scenario 1:-
>>>  OS :- Windows XP
>>>  Server :- Geronimo v1.1/ Tomcat
>>>  Database :- Embedded Derby DB.
>>>  Condition :- Access Without Restarting.
>>>  Result :- Attached Error Occurs.
>>>
>>> Scenario 2:-
>>>  OS :- Windows XP
>>>  Server :- Geronimo v1.1/ Tomcat
>>>  Database :- Embedded Derby DB.
>>>  Condition :- Access DB Pool After Restarting the Server.
>>>  Result :- Application works without an error.
>>>
>>>  Scenario 3:-
>>>  OS :- Linux
>>>  Server :- Geronimo v1.1/ Tomcat
>>>  Database :- Embedded Derby DB.
>>>  Condition :- Access Without Restarting.
>>>  Result :- Application works without an error.
>>>
>>> Scenario 4:-
>>>  OS :- Windows XP
>>>  Server :- Geronimo v1.1/ Tomcat
>>>  Database :- MySQL
>>>  Condition :- Access Without Restarting.
>>>  Result :- Application works without an error.
>>>
>>>
>>>
>>>
>>> Due to above results I suspect there is a problem in Derby  
>>> database of
>>> Geronimo 1.1 in Windows environment. Also I think error reported  
>>> by Markus
>>> as "creating security realm in 1.1 fails" same due to a problem  
>>> Derby
>>> Database. Please correct me if I am wrong.
>>>
>>>
>>> Herewith I attached necessary files to test the application too.
>>>
>>> With Kind Regards,
>>>  Lasantha
>>>
>>>  Lasantha Ranaweera
>>>  Senior Software Engineer,
>>>  Lanka Software Foundation,
>>>  Sri Lanka.
>>> SQL Exception: Failed to start database 'InventoryDB', see the next
>>> exception fo
>>> r details.
>>>         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.EmbeddedDriver.connect(Unknown
>>> Source)
>>>         at
>>> org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection 
>>> (JDBCDri
>>> verMCF.java:96)
>>>         at
>>> org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection 
>>> (JDBCD
>>> riverMCF.java:73)
>>>         at
>>> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getC 
>>> o
>>> nnection(MCFConnectionInterceptor.java:41)
>>>         at
>>> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInter 
>>> c
>>> eptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
>>>         at
>>> org.apache.geronimo.connector.outbound.SinglePoolConnectionIntercept 
>>> o
>>> r.internalGetConnection(SinglePoolConnectionInterceptor.java:63)
>>>         at
>>> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionI 
>>> n
>>> terceptor.getConnection 
>>> (AbstractSinglePoolConnectionInterceptor.java:73)
>>>         at
>>> org.apache.geronimo.connector.outbound.TransactionEnlistingIntercept 
>>> o
>>> r.getConnection(TransactionEnlistingInterceptor.java:47)
>>>         at
>>> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor 
>>> .
>>> getConnection(TransactionCachingInterceptor.java:86)
>>>         at
>>> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.g 
>>> e
>>> 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.all 
>>> o
>>> 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$$a80fed92.getConnection 
>>> (<gener
>>> ated>)
>>>         at
>>> org.apache.geronimo.samples.inventory.util.DBManager.getConnection 
>>> (Un
>>> known Source)
>>>         at
>>> org.apache.geronimo.samples.inventory.dao.ItemDAO.getItems(Unknown
>>> So
>>> urce)
>>>         at
>>> org.apache.geronimo.samples.inventory.services.InventoryManager.getI 
>>> t
>>> ems(Unknown Source)
>>>         at
>>> org.apache.jsp.welcome_jsp._jspService(org.apache.jsp.welcome_jsp: 
>>> 65)
>>>
>>>         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.valves.AccessLogValve.invoke 
>>> (AccessLogValve.java:
>>> 541)
>>>         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:534)
>>> 15:08:17,171 ERROR [[jsp]] Servlet.service() for servlet jsp  
>>> threw exception
>>> java.lang.NullPointerException
>>>         at
>>> org.apache.geronimo.samples.inventory.dao.ItemDAO.getItems(Unknown
>>> So
>>> urce)
>>>         at
>>> org.apache.geronimo.samples.inventory.services.InventoryManager.getI 
>>> t
>>> ems(Unknown Source)
>>>         at
>>> org.apache.jsp.welcome_jsp._jspService(org.apache.jsp.welcome_jsp: 
>>> 65)
>>>
>>>         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.valves.AccessLogValve.invoke 
>>> (AccessLogValve.java:
>>> 541)
>>>         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:534)
>>>
>>>
>>> CREATE TABLE item(
>>>         item_id VARCHAR(10) PRIMARY KEY,
>>>         item_name VARCHAR(25),
>>>         description VARCHAR(100)
>>> );
>>>
>>> CREATE TABLE item_master(
>>>         item_id VARCHAR(10) PRIMARY KEY,
>>>         quantity INTEGER
>>> );
>>>
>>> INSERT INTO item VALUES('001', 'Item 1', 'Test Item 1');
>>> INSERT INTO item VALUES('002', 'Item 2', 'Test Item 2');
>>> INSERT INTO item VALUES('003', 'Item 3', 'Test Item 3');
>>> INSERT INTO item VALUES('004', 'Item 4', 'Test Item 4');
>>>
>>>
>>> INSERT INTO item_master VALUES('001', 12);
>>> INSERT INTO item_master VALUES('002', 8);
>>> INSERT INTO item_master VALUES('003', 49);
>>> INSERT INTO item_master VALUES('004', 34);
>>>
>>>
>>>
>>
>


Mime
View raw message