geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shiva Kumar H R (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-3380) Derby embedded database pool created from console doesn't work
Date Mon, 06 Aug 2007 14:09:59 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517941
] 

Shiva Kumar H R commented on GERONIMO-3380:
-------------------------------------------

The wizard generated deployment plan for database pool is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>console.dbpool</dep:groupId>
            <dep:artifactId>BankDBPool</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>org.apache.derby</dep:groupId>
                <dep:artifactId>derby</dep:artifactId>
                <dep:version>10.2.2.0</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>BankDBPool</name>
                    <config-property-setting name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
                    <config-property-setting name="ConnectionURL">jdbc:derby:BankDB</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>

Note that it lists a dependency on "org.apache.derby/derby/10.2.2.0/jar". This earlier used
to be a dependency on "org.apache.geronimo.configs/system-database".

"BankDBPool2.xml" has the above dependency changed back to "system-database". Deploy this
new database pool as below:
cd GERONIMO_HOME
java -jar bin/deployer.jar deploy changedDBPoolPlan.xml \
    \repository\org\tranql\tranql-connector-ra\1.3\tranql-connector-ra-1.3.rar

Now deploy test web-app "WebAppJDBCAccess.war" with the new plan "geronimo-web2.xml" that
uses the new database pool "BankDBPool2". Running the new web-app http://localhost:8080/WebAppJDBCAccess2
shows that it is now able to successfully connect to the database and fetch its data.

> Derby embedded database pool created from console doesn't work
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3380
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3380
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.1
>            Reporter: Shiva Kumar H R
>            Priority: Critical
>         Attachments: BankDB.sql, geronimo-web.xml, WebAppJDBCAccess.war
>
>
> Steps to reproduce:
> 1) From Admin Console's "DB Manager" portlet create a database by name "BankDB" and populate
it with the contents of "BankDB.sql". 
> 2) From "Database Pools" portlet, create a new database pool using the Geronimo database
pool wizard, with the below information:
> Name of Database Pool: BankDBPool
> Database Type: Derby embedded
> Driver JAR: org.apache.derby/derby/10.2.2.0/jar
> Database: BankDB
> 3) From "Deploy New" portlet, deploy "WebAppJDBCAccess.war" using "geronimo-web.xml".
> 4) Open http://localhost:8080/WebAppJDBCAccess/ and click on "Click here to list Customers".
Server will fail to show database contents by throwing following errors at command prompt:
> 19:10:59,555 ERROR [MCFConnectionInterceptor] Error occurred creating ManagedCon
> nection for org.apache.geronimo.connector.outbound.ConnectionInfo@cd7887
> javax.resource.spi.ResourceAllocationException: Unable to obtain physical connec
> tion to jdbc:derby:BankDB
>         at org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDri
> verMCF.java:98)
>         at org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCD
> riverMCF.java:73)
>         at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getCo
> nnection(MCFConnectionInterceptor.java:48)
>         at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterc
> eptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
>         at org.apache.geronimo.connector.outbound.SinglePoolConnectionIntercepto
> r.internalGetConnection(SinglePoolConnectionInterceptor.java:67)
>         at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionIn
> terceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:78)
>         at org.apache.geronimo.connector.outbound.TransactionEnlistingIntercepto
> r.getConnection(TransactionEnlistingInterceptor.java:46)
>         at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.
> getConnection(TransactionCachingInterceptor.java:96)
>         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:87)
>         at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56
> )
>         at myPackage.ListCustomers.doGet(ListCustomers.java:41)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:230)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:175)
>         at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
> bjectValve.java:56)
>         at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
> invoke(GeronimoStandardContext.java:351)
>         at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Gero
> nimoBeforeAfterValve.java:47)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:104)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 563)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:261)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:581)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
> 7)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.sql.SQLException: Database 'BankDB' not found.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow
> n Source)
>         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.<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)
>         ... 31 more
> java.sql.SQLException: Database 'BankDB' not found.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow
> n Source)
>         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.<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.getCo
> nnection(MCFConnectionInterceptor.java:48)
>         at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterc
> eptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
>         at org.apache.geronimo.connector.outbound.SinglePoolConnectionIntercepto
> r.internalGetConnection(SinglePoolConnectionInterceptor.java:67)
>         at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionIn
> terceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:78)
>         at org.apache.geronimo.connector.outbound.TransactionEnlistingIntercepto
> r.getConnection(TransactionEnlistingInterceptor.java:46)
>         at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.
> getConnection(TransactionCachingInterceptor.java:96)
>         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:87)
>         at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56
> )
>         at myPackage.ListCustomers.doGet(ListCustomers.java:41)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:230)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:175)
>         at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
> bjectValve.java:56)
>         at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
> invoke(GeronimoStandardContext.java:351)
>         at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Gero
> nimoBeforeAfterValve.java:47)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:104)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 563)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:261)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:581)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
> 7)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message