Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] Online Training Courses

Hi Walid,

DataSource is a part of Java SE, so your code is correct in importing javax.sql.DataSource.

The error message you get "HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead" indicates that there is at least one property that hasn't been transferred to the jakarta namespace.

I suggest you search through your configuration files for "javax.persistence", and replace it with "jakarta.persistence".
The property should then be: jakarta.persistence.sharedCache.mode

Hope this helps!


On Thu, Feb 2, 2023 at 2:35 AM L.walid (PowerM) <l.walid@xxxxxxxxx> wrote:

I'm using spring boot 3.0.2, and jakarta package almost everywhere, but i get this warning :

2023-02-02T02:19:19.452+01:00  WARN 33455 --- [           main] org.hibernate.orm.deprecation            : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead

When i checked my classes i found this class that populate DB for testing :

package io.cloudgalaxy.galaxyback.config;
import java.sql.SQLException;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.init.ScriptUtils;

import jakarta.annotation.PostConstruct;


public class DatabaseConfig {

private JdbcTemplate jdbcTemplate;
private Resource dataScript;

public void initialize() {
try {
DataSource dS = jdbcTemplate.getDataSource();
if(dS != null)
ScriptUtils.executeSqlScript(dS.getConnection(), dataScript);
throw new RuntimeException("Failed to execute database script");
} catch (SQLException e) {
throw new RuntimeException("Failed to execute database script", e);

As you can see it's using DataSource from javax, so i was looking for the equivalent in jakarta, only found DataSourceDefinition but the methode afterwards doesn't work (no getDataSource, no getConnections)>

Thank you in advance

On Wed, Feb 1, 2023 at 7:33 PM Luqman Saeed <sinaisix@xxxxxxxxx> wrote:
I hope this is allowed. Please pardon me if it's not.

Yes there's this Java EE course on udemy produced by myself and Tim Buchalka. Currently in production process for the Jakarta EE version.

On Wed, 1 Feb 2023, 15:47 Hendré Louw, <hendre@xxxxxxxxxxxxxxxx> wrote:

Are there any online courses for Jakarta EE on sites like or

_______________________________________________ mailing list
To unsubscribe from this list, visit
_______________________________________________ mailing list
To unsubscribe from this list, visit

Best regards, 

Walid Largou
Solution Architect / IBM Champion
Power Maroc
Mobile : +212 621 31 98 71
320 Bd Zertouni 6th Floor, Casablanca, Morocco

This message is confidential .Its contents do not constitute a commitment by Power Maroc S.A.R.L except where provided for in a written agreement between you and Power Maroc S.A.R.L. Any authorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately.

_______________________________________________ mailing list
To unsubscribe from this list, visit


Ivar Grimstad

Jakarta EE Developer Advocate | Eclipse Foundation Eclipse Foundation - Community. Code. Collaboration. 

Back to the top