Migrating existing Rest Easy Project to SpringBoot
by Lloyd Fernandes
Team,
I am trying to integrate my existing project from RestEasy implementation to SpringBoot 2.x
My current project settings has two application classes(javax.ws.rs.core.Application): App1 and App2
Three Provider Classes: P1, P2 and P3
The providers are registered to the applications as follows:
App1 --> P1, P2
App2 --> P1, P3
Applications are registered by updating the singletons set in the Application Constructors of App1 and App2. Example:
public App1{ singletons.add(new P1()); singletons.add(new P2());}
I was referencing the RestEasy - SpringBootStarter :https://github.com/resteasy/resteasy-spring-boot/blob/main/mds/USAGE.md. Had the following questions after reading the description:
1. I do not see the use of such singletons recommended anymore. So how do I ensure, that the Providers are registered to the correct Application?
2. How do i convert the context param, filter-mapping, login-config, security constraint configurations defined in web.xml to the equivalent SpringBoot configurations that would work with Rest Easy.
3. What has more precedence the SpringBoot Security modules or the RestEasy security constraints?
1 week, 6 days
jakarta.ws.rs vs javax.ws.rs
by Benno Fünfstück
Hello,
I see that resteasy uses the `javax.ws.rs` package. But the jakarta EE
jars provide `jakarta.ws.rs`. It seems that the two namespaces are not
compatible. What's the relation between them?
Best,
Benno
2 months, 2 weeks
Archiving This List
by James Perkins
Hello All,
Some of you may have noticed some increased spam the past couple of weeks.
Due to this and the fact that this mailing list is rarely used, we are
going to ask that this list be archived. For future communications, please
use GitHub Discussions [1].
[1]: https://github.com/orgs/resteasy/discussions
James R. Perkins
Principal Software Engineer
3 months, 1 week
Microprofile config
by Alvaro Arenas
Hi,
I am adding my project to a stream down wildfly v23 (withou microservices modules) and I use smallrye-config in my project. When adding my deployment with the microprofile configuration package incleded (for example "org.apache.geronimo.config:geronimo-config-impl:1.2.2") the souces in the file org.eclipse.microprofile.config.spi.ConfigSource get automatically added by wildfly but the implementation class is not found.
I get the following error
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/resteasy/microprofile/config/ServletConfigSource (Module "org.jboss.resteasy.resteasy-jaxrs" version 3.15.1.Final from local module loader @fc1522fa (finder: local module finder @4332406a (roots: /Users/alvarena/hki/keycloak/standalone/keycloak-13.0.0/modules,/Users/alvarena/hki/keycloak/standalone/keycloak-13.0.0/modules/system/layers/keycloak,/Users/alvarena/hki/keycloak/standalone/keycloak-13.0.0/modules/system/layers/base))): org.eclipse.microprofile.config.spi.ConfigSource
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClassInternal(ClassLoader.java:398)
at java.lang.ClassLoader.defineClass(ClassLoader.java:359)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
at org.jboss.modules.Module.loadModuleClass(Module.java:753)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:408)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at java.lang.Iterable.forEach(Iterable.java:74)
at org.apache.geronimo.config.DefaultConfigBuilder.build(DefaultConfigBuilder.java:130)
at org.apache.geronimo.config.DefaultConfigProvider.getConfig(DefaultConfigProvider.java:62)
at org.apache.geronimo.config.DefaultConfigProvider.getConfig(DefaultConfigProvider.java:46)
at org.eclipse.microprofile.config.ConfigProvider.getConfig(ConfigProvider.java:93)
at org.apache.geronimo.config.cdi.ConfigExtension.validate(ConfigExtension.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
... 26 more
I don't understand how the system is able to find the file org.eclipse.microprofile.config.spi.ConfigSource but not the implementation classes that are in the same package.
Any idea what could be wrong
Best regards,
Alvaro
3 months, 2 weeks