<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Courier New", monospace; font-size: 11pt; color: rgb(0, 0, 0);">
Thank you to both you and Scott, you fixed my issue.</div>
<div class="elementToProof" style="font-family: "Courier New", monospace; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Courier New", monospace; font-size: 11pt; color: rgb(0, 0, 0);">
Cheers!</div>
<div class="elementToProof" style="font-family: "Courier New", monospace; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature" style="color: inherit;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif;" dir="ltr" id="divtagdefaultwrapper">
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Arial; font-size: 9.75pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><b>Diego  </b></span></p>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Paul B. Henson <henson@cpp.edu><br>
<b>Sent:</b> August 1, 2024 3:09 PM<br>
<b>To:</b> Shib Users <users@shibboleth.net><br>
<b>Cc:</b> Diego Figueroa <dfiguero@yorku.ca><br>
<b>Subject:</b> Re: Ex: JDBC Storage Service exception on IDP 5.1.1</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">It's telling you:<br>
<br>
> Failed to convert property value of type<br>
> 'org.apache.commons.dbcp2.BasicDataSource' to required type<br>
> 'org.opensaml.storage.StorageService' for property 'storageService';<br>
<br>
You're setting idp.session.StorageService = MyDataSource; MyDataSource<br>
is an org.apache.commons.dbcp2.BasicDataSource. It wants an<br>
org.opensaml.storage.StorageService, which shibboleth.JDBCStorageService<br>
is a child of.<br>
<br>
I've never used the JDBC storage before, but I'm assuming you want:<br>
<br>
idp.session.StorageService = JDBCStorageService<br>
<br>
<br>
On Thu, Aug 01, 2024 at 07:03:48PM +0000, Diego Figueroa via users wrote:<br>
> Hi,<br>
> <br>
> I am trying to setup a storage service using MySQL with JDBC on Shibboleth 5.1.1 and I tried following the instructions on these two places:<br>
> <br>
> <a href="https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199509576/StorageConfiguration">
https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199509576/StorageConfiguration</a><br>
> <a href="https://shibboleth.atlassian.net/wiki/spaces/IDPPLUGINS/pages/2989096970/JDBCStorageService">
https://shibboleth.atlassian.net/wiki/spaces/IDPPLUGINS/pages/2989096970/JDBCStorageService</a><br>
> <br>
> I installed the JDBC plugin, copied the MariaDB jar to the lib folder and in idp.properties I have:<br>
> <br>
> <br>
>     idp.session.StorageService = MyDataSource<br>
> <br>
> <br>
> While in the global.xml I have the following:<br>
> <br>
> <br>
>     <bean id="MyDataSource" class="org.apache.commons.dbcp2.BasicDataSource"<br>
>           p:driverClassName="org.mariadb.jdbc.Driver"<br>
>           p:url="jdbc:mysql://localhost:3306/shibboleth?autoReconnect=true"<br>
>           p:username="shibboleth"<br>
>           p:password="%{mysql.password}"<br>
>           p:maxIdle="5"<br>
>           p:testOnBorrow="true"<br>
>           p:testWhileIdle="true"<br>
>           p:testOnReturn="true"<br>
>           p:timeBetweenEvictionRunsMillis="120000"<br>
>           p:minEvictableIdleTimeMillis="120000"<br>
>           p:validationQuery="select 1"<br>
>           p:validationQueryTimeout="5" /><br>
> <br>
>     <bean id="JDBCStorageService" parent="shibboleth.JDBCStorageService"<br>
>           p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}"<br>
>           p:dataSource-ref="MyDataSource" /><br>
> <br>
> <br>
> But every time I start Tomcat I get the error below:<br>
> <br>
> <br>
> 2024-08-01 14:14:02,672 -  - ERROR [org.springframework.web.context.ContextLoader:294] - Context initialization failed<br>
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.SessionManager' defined in class path resource [net/shibboleth/idp/conf/session-manager-system.xml]: Failed to convert property value of type 'org.apache.commons.dbcp2.BasicDataSource'
 to required type 'org.opensaml.storage.StorageService' for property 'storageService'; Cannot convert value of type 'org.apache.commons.dbcp2.BasicDataSource' to required type 'org.opensaml.storage.StorageService' for property 'storageService': no matching
 editors or conversion strategy found<br>
>       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607)<br>
> Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.commons.dbcp2.BasicDataSource' to required type 'org.opensaml.storage.StorageService' for property 'storageService'; Cannot convert
 value of type 'org.apache.commons.dbcp2.BasicDataSource' to required type 'org.opensaml.storage.StorageService' for property 'storageService': no matching editors or conversion strategy found<br>
>       at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:595)<br>
> Caused by: java.lang.IllegalStateException: Cannot convert value of type 'org.apache.commons.dbcp2.BasicDataSource' to required type 'org.opensaml.storage.StorageService' for property 'storageService': no matching editors or conversion strategy found<br>
>       at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:273)<br>
> <br>
> <br>
> I have also tried the following classes, but I still get the same type of conversion exception:<br>
> <br>
> <br>
>     org.apache.tomcat.dbcp.dbcp2.BasicDataSource<br>
>     org.apache.tomcat.jdbc.pool.DataSource<br>
> <br>
> <br>
> Any ideas where I should look at?<br>
> <br>
> <br>
> Thanks,<br>
> <br>
> Diego<br>
> <br>
> CAUTION: This email was not sent from a Cal Poly Pomona service. Exercise caution when clicking links or opening attachments. Please forward suspicious email to suspectemail@cpp.edu<mailto:suspectemail@cpp.edu>.<br>
> <br>
<br>
> -- <br>
> For Consortium Member technical support, see <a href="https://shibboleth.atlassian.net/wiki/x/ZYEpPw">
https://shibboleth.atlassian.net/wiki/x/ZYEpPw</a><br>
> To unsubscribe from this list send an email to users-unsubscribe@shibboleth.net<br>
<br>
<br>
-- <br>
Paul B. Henson | Operating Systems and Network Analyst<br>
henson@cpp.edu | California State Polytechnic University Pomona</div>
</span></font></div>
</body>
</html>