Hi,

Is 'derby.jar' referenced as part of the CLASSPATH for Spring?

If not, then it cannot find the embedded Derby driver
('org.apache.derby.jdbc.EmbeddedDriver') required to connect to an embedded
Derby instance.

Cheers

--francois

On Thu, Aug 13, 2009 at 7:23 AM, nagl <[email protected]> wrote:

>
> Hi,
>
> I am using spring framework to create datasource using xapool and jotm.
> I want a configurable datasource for oracle and derby.
> The following are the bean definitions I am using:
>
> [code]<bean id="innerorgDataSource"
>                class="org.enhydra.jdbc.standard.StandardXADataSource"
>                destroy-method="shutdown">
>                <property name="transactionManager">
>                        <ref local="jotm" />
>                </property>
>                <property name="driverName">
>                        <value>${jdbc.ClassName}</value>
>                </property>
>                <property name="url">
>                        <value>
>                                ${jdbc.org.URL}
>                        </value>
>                </property>
> </bean>
> <bean id="orgDataSource"
>                class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"
>                destroy-method="shutdown">
>                <property name="dataSource">
>                        <ref local="innerorgDataSource" />
>                </property>
>                <property name="user">
>                        <value>${jdbc.org.user}</value>
>                </property>
>                <property name="password">
>                        <value>${jdbc.org.password}</value>
>                </property>
>                <property name="maxSize">
>                        <value>30</value>
>                </property>
>        </bean>[/code]
>
> Following are the properties I am using for derby datasource:
>
> [code]  org.apache.derby.jdbc.EmbeddedDriver
>        jdbc:derby:target/derby/orgDB;create=true
>        org
>        org[/code]
>
> Now when i am passing oracle properties for the placeholders the datasource
> is successfully created.
> But when i switch to derby i get the following error.
>
> java.sql.SQLException: Cannot get connection for URL
>                                jdbc:derby:target/derby/luDB;create=true
>                         : No suitable driver found for
>                                jdbc:derby:target/derby/luDB;create=true
>
> Now I am using Maven for dependencies and have made sure that derby is
> included in the dependency and its also clearly visible in the dependency
> graph in eclipse.
> What else can be the issue. Please put in your suggestions.
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Unable-to-create-derby-datasource-tp24954784p24954784.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>
>

Reply via email to