You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "turing85 (via GitHub)" <gi...@apache.org> on 2024/01/23 21:40:19 UTC

[I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

turing85 opened a new issue, #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666

   ### Bug description
   
   When we use `JdbcTemplate.queryForRowSet(...)`, the application will fail in native mode with the following stack trace:
   ```
   2024-01-23 22:18:22,146 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /foo failed, error id: 06c0ccc2-ed4f-4822-b478-e00e33ba3a61-1: java.util.MissingResourceException: Can't find bundle for base name com.sun.rowset.RowSetResourceBundle, locale en_US
   	at java.base@21/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2059)
   	at java.base@21/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1697)
   	at java.base@21/java.util.ResourceBundle.getBundleFromModule(ResourceBundle.java:1617)
   	at java.base@21/java.util.ResourceBundle.getBundle(ResourceBundle.java:1017)
   	at java.sql.rowset@21/com.sun.rowset.JdbcRowSetResourceBundle.<init>(JdbcRowSetResourceBundle.java:105)
   	at java.sql.rowset@21/com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(JdbcRowSetResourceBundle.java:124)
   	at java.sql.rowset@21/com.sun.rowset.CachedRowSetImpl.<init>(CachedRowSetImpl.java:364)
   	at java.sql.rowset@21/com.sun.rowset.RowSetFactoryImpl.createCachedRowSet(RowSetFactoryImpl.java:49)
   	at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.newCachedRowSet(SqlRowSetResultSetExtractor.java:90)
   	at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.createSqlRowSet(SqlRowSetResultSetExtractor.java:74)
   	at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.extractData(SqlRowSetResultSetExtractor.java:58)
   	at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.extractData(SqlRowSetResultSetExtractor.java:42)
   	at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:454)
   	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:383)
   	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
   	at org.springframework.jdbc.core.JdbcTemplate.queryForRowSet(JdbcTemplate.java:531)
   	at de.turing85.quarkus.jdbc.template.Resource.get(Resource.java:28)
   	at de.turing85.quarkus.jdbc.template.Resource$quarkusrestinvoker$get_bd3a803a64f67f513762962949efcedfd340aa43.invoke(Unknown Source)
   	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
   	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
   	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
   	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
   	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
   	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.base@21/java.lang.Thread.runWith(Thread.java:1596)
   	at java.base@21/java.lang.Thread.run(Thread.java:1583)
   	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833)
   	at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
   ```
   
   ---
   Reproducer: 
   - clone https://github.com/turing85/quarkus-jdbc-template: 
     ```bash
     git clone https://github.com/turing85/quarkus-jdbc-template.git && cd quarkus-jdbc-template
     ```
   - build & run in JVM mode: 
     ```bash
     ./mvnw clean verify
     ```
   - observe that the integration test passes
   - build & run in native mode: 
     ```bash
     ./mvnw -Dnative clean verify
     ```
   - observe that the integration test fails, and that the above stack trace can be found in the application logs
   
   ---
   Affected quarkus versions: at least `3.2.8.Final` to `3.6.7`.
   
   ---
   Comment: I opened the issue here since the dependency that provides `JdbcTemplate` (`spring-jdbc`) is a transitive dependency of, e.g., `camel-quarkus-sql`. As far as I know, the quarkus core does not import `spring-jdbc` anywhere.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "turing85 (via GitHub)" <gi...@apache.org>.
turing85 commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1907861449

   > It's more likely an issue of quarkus but not camel?
   
   Right now, it is unclear. @gastaldi was able to reproduce something on the quarkus-end, but not the problem I have described here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "gastaldi (via GitHub)" <gi...@apache.org>.
gastaldi commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1908123721

   > Right now, it is unclear. @gastaldi was able to reproduce something on the quarkus-end, but not the problem I have described here.
   
   @turing85 just to be clear, I did reproduce the same error using a snippet like in https://www.baeldung.com/java-jdbc-rowset, and the linked PR fixes it. 
   
   When I tested with your reproducer project, I see the `Caused by: javax.sql.rowset.spi.SyncFactoryException: Resource javax/sql/rowset/rowset.properties not found` error you mentioned in Zulip. I'll submit a new PR fixing that


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1907950580

   I'd expect https://github.com/quarkusio/quarkus/pull/38362 to fix this. @turing85 you mean it does not?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1907312676

   It's more likely an issue of quarkus but not camel?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "gastaldi (via GitHub)" <gi...@apache.org>.
gastaldi commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1908340304

   It should be fixed in Quarkus main now, thanks for the report and the reproducer!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "turing85 (via GitHub)" <gi...@apache.org>.
turing85 commented on issue #5666:
URL: https://github.com/apache/camel-quarkus/issues/5666#issuecomment-1908670882

   Okay, this means we can close this issue then :smile: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] JdbcTemplate is missing a resource bunde for native [camel-quarkus]

Posted by "turing85 (via GitHub)" <gi...@apache.org>.
turing85 closed issue #5666: JdbcTemplate is missing a resource bunde for native
URL: https://github.com/apache/camel-quarkus/issues/5666


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org