You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Woude, Alexander van der" <al...@capgemini.com> on 2010/05/19 14:03:15 UTC
C3p0 datasource
Hello guys,
I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 6.0.26.
I have the following config in my server.xml:
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="jdbc/servicesds" auth="Container"
maxActive="100" maxIdle="30" maxWait="10000"
username="****r" password="****" driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@//****:1521/development"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
factory="com.mchange.v2.c3p0.DataSources"
minPoolSize="50"
maxPoolSize="150"
timeout="250"
maxStatements="100"
acquireRetryAttempts="4"
acquireIncrement="1"
/>
</GlobalNamingResources>
During startup of the server things already go wrong.
In the http://localhost:8080/manager/resources I get an error.
the error is :
FAIL - Encountered exception javax.naming.NamingException: Could not create resource factory instance
[Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory
can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
Any ideas?
Regards
Alexander
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: C3p0 datasource
Posted by "Woude, Alexander van der" <al...@capgemini.com>.
hahaha
I already tried that.
FAIL - Encountered exception javax.naming.NamingException: No set method found for property: driverClassName
and removing that just gives another error too.
Thanks :-)
________________________________________
Van: Pid [pid@pidster.com]
Verzonden: woensdag 19 mei 2010 15:06
Aan: Tomcat Users List
Onderwerp: Re: C3p0 datasource
On 19/05/2010 13:52, Woude, Alexander van der wrote:
> Pid,
>
> changing the factory give me the following:
> FAIL - Encountered exception javax.naming.NamingException: No set method found for property: maxIdle
I'd take out the maxIdle="30" attribute, then.
p
________________________________________
> Van: Pid [pid@pidster.com]
> Verzonden: woensdag 19 mei 2010 14:39
> Aan: Tomcat Users List
> Onderwerp: Re: C3p0 datasource
>
> On 19/05/2010 13:03, Woude, Alexander van der wrote:
>> Hello guys,
>>
>> I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 6.0.26.
>>
>> I have the following config in my server.xml:
>>
>> <GlobalNamingResources>
>>
>> <!-- Editable user database that can also be used by
>> UserDatabaseRealm to authenticate users -->
>>
>> <Resource name="jdbc/servicesds" auth="Container"
>> maxActive="100" maxIdle="30" maxWait="10000"
>> username="****r" password="****" driverClassName="oracle.jdbc.driver.OracleDriver"
>> url="jdbc:oracle:thin:@//****:1521/development"
>> type="com.mchange.v2.c3p0.ComboPooledDataSource"
>> factory="com.mchange.v2.c3p0.DataSources"
>
> Is this the correct value for the factory? I found an alternative
> value, suitable for Tomcat 5.5 (which is different, yes, I know).
>
> factory="org.apache.naming.factory.BeanFactory"
>
>
> p
>
>
>
>> minPoolSize="50"
>> maxPoolSize="150"
>> timeout="250"
>> maxStatements="100"
>> acquireRetryAttempts="4"
>> acquireIncrement="1"
>> />
>> </GlobalNamingResources>
>>
>>
>> During startup of the server things already go wrong.
>> In the http://localhost:8080/manager/resources I get an error.
>>
>> the error is :
>> FAIL - Encountered exception javax.naming.NamingException: Could not create resource factory instance
>> [Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory
>> can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
>>
>> Any ideas?
>>
>> Regards
>> Alexander
>>
>>
>>
>>
>>
>>
>> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
>> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
>> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
>> in error, please notify the sender immediately and delete all copies of this message.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.
>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: C3p0 datasource
Posted by Pid <pi...@pidster.com>.
On 19/05/2010 13:52, Woude, Alexander van der wrote:
> Pid,
>
> changing the factory give me the following:
> FAIL - Encountered exception javax.naming.NamingException: No set method found for property: maxIdle
I'd take out the maxIdle="30" attribute, then.
p
________________________________________
> Van: Pid [pid@pidster.com]
> Verzonden: woensdag 19 mei 2010 14:39
> Aan: Tomcat Users List
> Onderwerp: Re: C3p0 datasource
>
> On 19/05/2010 13:03, Woude, Alexander van der wrote:
>> Hello guys,
>>
>> I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 6.0.26.
>>
>> I have the following config in my server.xml:
>>
>> <GlobalNamingResources>
>>
>> <!-- Editable user database that can also be used by
>> UserDatabaseRealm to authenticate users -->
>>
>> <Resource name="jdbc/servicesds" auth="Container"
>> maxActive="100" maxIdle="30" maxWait="10000"
>> username="****r" password="****" driverClassName="oracle.jdbc.driver.OracleDriver"
>> url="jdbc:oracle:thin:@//****:1521/development"
>> type="com.mchange.v2.c3p0.ComboPooledDataSource"
>> factory="com.mchange.v2.c3p0.DataSources"
>
> Is this the correct value for the factory? I found an alternative
> value, suitable for Tomcat 5.5 (which is different, yes, I know).
>
> factory="org.apache.naming.factory.BeanFactory"
>
>
> p
>
>
>
>> minPoolSize="50"
>> maxPoolSize="150"
>> timeout="250"
>> maxStatements="100"
>> acquireRetryAttempts="4"
>> acquireIncrement="1"
>> />
>> </GlobalNamingResources>
>>
>>
>> During startup of the server things already go wrong.
>> In the http://localhost:8080/manager/resources I get an error.
>>
>> the error is :
>> FAIL - Encountered exception javax.naming.NamingException: Could not create resource factory instance
>> [Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory
>> can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
>>
>> Any ideas?
>>
>> Regards
>> Alexander
>>
>>
>>
>>
>>
>>
>> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
>> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
>> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
>> in error, please notify the sender immediately and delete all copies of this message.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.
>
RE: C3p0 datasource
Posted by "Woude, Alexander van der" <al...@capgemini.com>.
Pid,
changing the factory give me the following:
FAIL - Encountered exception javax.naming.NamingException: No set method found for property: maxIdle
________________________________________
Van: Pid [pid@pidster.com]
Verzonden: woensdag 19 mei 2010 14:39
Aan: Tomcat Users List
Onderwerp: Re: C3p0 datasource
On 19/05/2010 13:03, Woude, Alexander van der wrote:
> Hello guys,
>
> I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 6.0.26.
>
> I have the following config in my server.xml:
>
> <GlobalNamingResources>
>
> <!-- Editable user database that can also be used by
> UserDatabaseRealm to authenticate users -->
>
> <Resource name="jdbc/servicesds" auth="Container"
> maxActive="100" maxIdle="30" maxWait="10000"
> username="****r" password="****" driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@//****:1521/development"
> type="com.mchange.v2.c3p0.ComboPooledDataSource"
> factory="com.mchange.v2.c3p0.DataSources"
Is this the correct value for the factory? I found an alternative
value, suitable for Tomcat 5.5 (which is different, yes, I know).
factory="org.apache.naming.factory.BeanFactory"
p
> minPoolSize="50"
> maxPoolSize="150"
> timeout="250"
> maxStatements="100"
> acquireRetryAttempts="4"
> acquireIncrement="1"
> />
> </GlobalNamingResources>
>
>
> During startup of the server things already go wrong.
> In the http://localhost:8080/manager/resources I get an error.
>
> the error is :
> FAIL - Encountered exception javax.naming.NamingException: Could not create resource factory instance
> [Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory
> can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
>
> Any ideas?
>
> Regards
> Alexander
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: C3p0 datasource
Posted by Pid <pi...@pidster.com>.
On 19/05/2010 13:03, Woude, Alexander van der wrote:
> Hello guys,
>
> I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 6.0.26.
>
> I have the following config in my server.xml:
>
> <GlobalNamingResources>
>
> <!-- Editable user database that can also be used by
> UserDatabaseRealm to authenticate users -->
>
> <Resource name="jdbc/servicesds" auth="Container"
> maxActive="100" maxIdle="30" maxWait="10000"
> username="****r" password="****" driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@//****:1521/development"
> type="com.mchange.v2.c3p0.ComboPooledDataSource"
> factory="com.mchange.v2.c3p0.DataSources"
Is this the correct value for the factory? I found an alternative
value, suitable for Tomcat 5.5 (which is different, yes, I know).
factory="org.apache.naming.factory.BeanFactory"
p
> minPoolSize="50"
> maxPoolSize="150"
> timeout="250"
> maxStatements="100"
> acquireRetryAttempts="4"
> acquireIncrement="1"
> />
> </GlobalNamingResources>
>
>
> During startup of the server things already go wrong.
> In the http://localhost:8080/manager/resources I get an error.
>
> the error is :
> FAIL - Encountered exception javax.naming.NamingException: Could not create resource factory instance
> [Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory
> can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
>
> Any ideas?
>
> Regards
> Alexander
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
RE: C3p0 datasource
Posted by "Woude, Alexander van der" <al...@capgemini.com>.
Hello Charles,
I use C3P0 0.9.1.
The JVM is Sun JDK 1.6.0_18 (64 bit)
Platform RH Enterprise linux 5
The full stacktrace is :
javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"]
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:144)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.IllegalAccessException: Class org.apache.naming.factory.ResourceFactory can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers "private"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:349)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
... 18 more
________________________________________
Van: Caldarale, Charles R [Chuck.Caldarale@unisys.com]
Verzonden: woensdag 19 mei 2010 15:02
Aan: Tomcat Users List
Onderwerp: RE: C3p0 datasource
> From: Woude, Alexander van der
> [mailto:alexander.vander.woude@capgemini.com]
> Subject: C3p0 datasource
>
> I have some trouble in getting c3p0 ComboPooledDataSource working in
> Tomcat 6.0.26.
What version of c3p0?
What JVM?
What platform?
Are you running with a security manager?
> the error is :
> FAIL - Encountered exception javax.naming.NamingException: Could not
> create resource factory instance
> [Root exception is java.lang.IllegalAccessException: Class
> org.apache.naming.factory.ResourceFactory
> can not access a member of class com.mchange.v2.c3p0.DataSources with
> modifiers "private"]
The above would indicate that the version of c3p0 you're using is not quite spec compliant.
Is there anything else in the logs, such as a stack trace?
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: C3p0 datasource
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Woude, Alexander van der
> [mailto:alexander.vander.woude@capgemini.com]
> Subject: C3p0 datasource
>
> I have some trouble in getting c3p0 ComboPooledDataSource working in
> Tomcat 6.0.26.
What version of c3p0?
What JVM?
What platform?
Are you running with a security manager?
> the error is :
> FAIL - Encountered exception javax.naming.NamingException: Could not
> create resource factory instance
> [Root exception is java.lang.IllegalAccessException: Class
> org.apache.naming.factory.ResourceFactory
> can not access a member of class com.mchange.v2.c3p0.DataSources with
> modifiers "private"]
The above would indicate that the version of c3p0 you're using is not quite spec compliant.
Is there anything else in the logs, such as a stack trace?
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org