Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition from Java EE to Jakarta EE #26041

Open
laingke opened this issue Jun 4, 2023 · 24 comments · May be fixed by #27976
Open

Transition from Java EE to Jakarta EE #26041

laingke opened this issue Jun 4, 2023 · 24 comments · May be fixed by #27976
Labels
feature: transaction type: dependencies Pull requests that update a dependency file

Comments

@laingke
Copy link
Contributor

laingke commented Jun 4, 2023

Feature Request

For English only, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

No

Describe the feature you would like.

After Jakarta EE 9 has been released, The group id javax-*** is no longer maintained, it would be a good idea to migrate javax to jakarta namespace.

The following GAVs are mentioned in shardingsphere:

<dependency>
    <groupId>javax.transaction</groupId>
    <artifactId>jta</artifactId>
</dependency>
<dependency>
    <groupId>javax.annotation</groupId>
    <artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>javax.activation-api</artifactId>
</dependency>

Here is the latest version until May 30th, 2023:

<dependency>
    <groupId>jakarta.transaction</groupId>
    <artifactId>jakarta.transaction-api</artifactId>
    <version>2.0.1</version>
</dependency>
<dependency>
    <groupId>jakarta.annotation</groupId>
    <artifactId>jakarta.annotation-api</artifactId>
    <version>2.1.1</version>
</dependency>
<dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>4.0.0</version>
</dependency>
<dependency>
    <groupId>jakarta.activation</groupId>
    <artifactId>jakarta.activation-api</artifactId>
    <version>2.1.2</version>
</dependency>

Refs:
Jakarta EE Maven Coordinates
Transition from Java EE to Jakarta EE
Javax to Jakarta Namespace Ecosystem Progress

@linghengqian
Copy link
Member

linghengqian commented Jun 4, 2023

@linghengqian
Copy link
Member

linghengqian commented Jun 5, 2023

@FlyingZC
Copy link
Member

FlyingZC commented Jun 7, 2023

@linghengqian I personally agree with the removal, atomikos and naryana are enough, and bitronix has not been maintained for a long time.

@laingke
Copy link
Contributor Author

laingke commented Jun 7, 2023

@linghengqian I recently refactored the BTM project(with the latest dependies) https://github.com/laingke/btm , and an unofficial version may be released in the future. Is it possible for shardingsphere to integrate an unofficial artifact?

@linghengqian
Copy link
Member

linghengqian commented Jun 7, 2023

@linghengqian I recently refactored the BTM project(with the latest dependies) https://github.com/laingke/btm , and an unofficial version may be released in the future. Is it possible for shardingsphere to integrate an unofficial artifact?

  • I think there is no problem, because Bitronix is ​​only one of the implementations of a specific SPI in ShardingSphere. For other implementations, as long as the LICENSE is allowed by ASF, they can be included directly.

@laingke
Copy link
Contributor Author

laingke commented Jun 8, 2023

@linghengqian I recently refactored the BTM project(with the latest dependies) https://github.com/laingke/btm , and an unofficial version may be released in the future. Is it possible for shardingsphere to integrate an unofficial artifact?

  • I think there is no problem, because Bitronix is ​​only one of the implementations of a specific SPI in ShardingSphere. For other implementations, as long as the LICENSE is allowed by ASF, they can be included directly.

That is OK, since 3.0.0-SNAPSHOT, Bitronix licensed with APACHE LICENSE 2.0.

@linghengqian
Copy link
Member

@laingke
Copy link
Contributor Author

laingke commented Jul 11, 2023

That is OK, my version still need 1 or 2 month to develop.

@linghengqian
Copy link
Member

@linghengqian
Copy link
Member

        <dependency> 
             <groupId>org.apache.shardingsphere</groupId> 
             <artifactId>shardingsphere-jdbc-core</artifactId> 
             <version>5.4.0</version> 
         </dependency> 
         <dependency> 
             <groupId>org.yaml</groupId> 
             <artifactId>snakeyaml</artifactId> 
             <version>1.33</version> 
         </dependency> 
         <dependency> 
             <groupId>org.glassfish.jaxb</groupId> 
             <artifactId>jaxb-runtime</artifactId> 
             <version>2.3.8</version> 
         </dependency>

@github-actions
Copy link

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

I test with quarkus-shardingsphere-jdbc and it fails to start the application

Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:78)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder.startAllPersistenceUnits(HibernateOrmRecorder.java:101)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits1868654632.deploy_0(Unknown Source)
	at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits1868654632.deploy(Unknown Source)
	... 13 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
	at org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
	at org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.getService(TypedSPILoader.java:110)
	at org.apache.shardingsphere.mode.manager.standalone.NewStandaloneContextManagerBuilder.build(NewStandaloneContextManagerBuilder.java:48)
	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:78)
	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.<init>(ShardingSphereDataSource.java:66)
	at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:95)
	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:167)
	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:102)
	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.createDataSource(DriverDataSourceCache.java:52)
	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.lambda$get$0(DriverDataSourceCache.java:46)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.get(DriverDataSourceCache.java:46)
	at org.apache.shardingsphere.driver.ShardingSphereDriver.connect(ShardingSphereDriver.java:53)
	at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:226)
	at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:536)
	at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:517)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:75)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

It seems that when quarkus build the application, it will exclude the old Java EE artifacts like javax.xml.bind:jaxb-api. Is there any plan to bump to Jakarata EE 10? It's a uncompatitable change from the package name javax. -> jakarta.

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

Or is it possible to implement a memory only repostitory? like MemoryRepository which does not depend on any other external persistent storage.

@linghengqian
Copy link
Member

Or is it possible to implement a memory only repostitory? like MemoryRepository which does not depend on any other external persistent storage.

@linghengqian
Copy link
Member

  • According to the dependencies of org.glassfish.jaxb:jaxb-runtime:2.3.9, is it feasible to only do the following? The following dependencies are still in the Java EE 8 namespace, but the GAV of the corresponding dependencies is migrated to Eclipse.
  • javax.xml.bind:jaxb-api:2.3.1 to jakarta.xml.bind:jakarta.xml.bind-api:2.3.3
  • javax.activation:javax.activation-api:1.2.0 to jakarta.activation:jakarta.activation-api:1.2.2

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

Well, these javax -> jakarta changes are uncompatitable and I think it needs a majar bump version to shardingsphere like 6.0.0. If it only impact the internal parsing xml config file, it could not bump the majar verion.

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

There is only shardingsphere-standalone-mode-repository-jdbc uses jaxb. All of others are test. And it seems it's only used to parse the configuration files like H2.xml internally. So it might not impact users?

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

So @linghengqian are you working on this migration?

@zhfeng
Copy link
Contributor

zhfeng commented Nov 17, 2023

Just FYI, narayana 7.0.0.Final has been moved to support Jakara EE 10 and change the license to Apache License V2.0.

@linghengqian
Copy link
Member

So @linghengqian are you working on this migration?

@linghengqian
Copy link
Member

Or is it possible to implement a memory only repostitory? like MemoryRepository which does not depend on any other external persistent storage.

Copy link

github-actions bot commented Mar 1, 2024

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

@github-actions github-actions bot added the stale label Mar 1, 2024
@terrymanu terrymanu removed the stale label Jul 7, 2024
@linghengqian
Copy link
Member

linghengqian commented Oct 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: transaction type: dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants