[JBoss JIRA] (WFLY-7371) JAXRS endpoint - CDI injection to constructor doesn't work
by Tomas Remes (JIRA)
Tomas Remes created WFLY-7371:
---------------------------------
Summary: JAXRS endpoint - CDI injection to constructor doesn't work
Key: WFLY-7371
URL: https://issues.jboss.org/browse/WFLY-7371
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, REST
Affects Versions: 10.1.0.Final
Reporter: Tomas Remes
Assignee: Stuart Douglas
Deploying app with following JAXRS endpoint
{code}
@Path("/test")
public class MyTimeResource {
private final LocalDateTime dateTime;
@Inject
public MyTimeResource(LocalDateTime dateTime){
this.dateTime = dateTime;
};
}
{code}
is failing with following stack trace:
{noformat}
Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.example.microprofile.MyTimeResource
at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:692)
at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:42)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:208)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:194)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:180)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:157)
at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:76)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:409)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:250)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
{noformat}
Note that app contains beans.xml so the JAXRS resource should be really managed by CDI.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (DROOLS-1335) Classpath is not checked for Kie Module ReleaseId
by Jan Hrcek (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1335?page=com.atlassian.jira.plugi... ]
Jan Hrcek commented on DROOLS-1335:
-----------------------------------
Hi [~mfusco],
the change introduced in your commit is now causing errors when building & deploying containers to kie-server.
To be specific I see the following stacktrace from kie-server when trying to build&deploy simplest project.
Not sure if this requires fixing on drools-compiler or on kie-server side, so feel free to reassign this..
{noformat}
08:29:29,338 ERROR [org.kie.server.services.impl.KieServerImpl] (default task-11) Error creating container 'abn_1.0' for module 'demo:abn:1.0': java.lang.ClassCastException: org.kie.server.api.model.ReleaseId cannot be cast to org.drools.compiler.kproject.ReleaseIdImpl
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.checkClasspathForKieModule(KieRepositoryImpl.java:156)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:136)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:119)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:184)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:245)
{noformat}
> Classpath is not checked for Kie Module ReleaseId
> -------------------------------------------------
>
> Key: DROOLS-1335
> URL: https://issues.jboss.org/browse/DROOLS-1335
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 6.4.0.Final, 6.5.0.CR2, 7.0.0.Beta2
> Reporter: Chadi El Masri
> Assignee: Mario Fusco
> Fix For: 7.0.0.Beta3
>
> Attachments: 0001-Implement-the-method-to-read-the-KieModule-from-clas.patch
>
>
> Injecting a ksession annotated with a particular @KReleaseId is not able to read the passed release id from the classpath (the part that does that is not implemented).
> The bug is here: https://github.com/droolsjbpm/drools/blob/6.4.0.Final/drools-compiler/src...
> Patch attached.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFCORE-1868) wrong parse of double quote in `\\"`
by Hisanobu Okuda (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1868?page=com.atlassian.jira.plugi... ]
Hisanobu Okuda commented on WFCORE-1868:
----------------------------------------
Jean-Francois, could you please ask Stale to review my pr?
> wrong parse of double quote in `\\"`
> -------------------------------------
>
> Key: WFCORE-1868
> URL: https://issues.jboss.org/browse/WFCORE-1868
> Project: WildFly Core
> Issue Type: Bug
> Components: CLI
> Environment: JBoss EAP 7.0.0
> Reporter: Hisanobu Okuda
> Assignee: Jean-Francois Denise
>
> jboss-cli does not parse command line if command line contains {code}\\"{code}
> When a command is
> {code}/system-property=foo4:add(value="vvv\\"){code}
> it shows the sub-prompt '> ' like:
> {code}
> [standalone@localhost:9990 /] /system-property=foo4:add(value="vvv\\")
> >
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFLY-7367) add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-7367?page=com.atlassian.jira.plugin.... ]
Scott Marlow commented on WFLY-7367:
------------------------------------
Good point [~swd847], thanks for the feedback. I updated the description to reflect your suggestion. My local testing of [https://github.com/scottmarlow/wildfly/commit/e63a5ac75f2ca764dac9fda776e...] was successful so far. If we keep this change, we should also have a persistence unit hint for disabling the caching.
An alternative might be for Hibernate ORM to do the caching of the getNewTempClassLoader() result, which might also help reduce permgen use for applications with a large number of entities.
> add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-7367
> URL: https://issues.jboss.org/browse/WFLY-7367
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Reporter: Scott Marlow
> Assignee: Scott Marlow
>
> The new temporary classloader returned by the WildFly PersistenceUnitInfo.getNewTempClassLoader() is currently created on every call.
> Ensure that the cached temp classloader reference is cleared after the PersistenceProvider.createContainerEntityManagerFactory() call returns.
> Javadoc description from [http://docs.oracle.com/javaee/7/api/javax/persistence/spi/PersistenceUnit...]
> {quote}
> ClassLoader getNewTempClassLoader()
> Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by getClassLoader(). None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map) call.
> Returns:
> temporary ClassLoader with same visibility as current loader
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFLY-7367) add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-7367?page=com.atlassian.jira.plugin.... ]
Scott Marlow updated WFLY-7367:
-------------------------------
Description:
The new temporary classloader returned by the WildFly PersistenceUnitInfo.getNewTempClassLoader() is currently created on every call.
Ensure that the cached temp classloader reference is cleared after the PersistenceProvider.createContainerEntityManagerFactory() call returns.
Javadoc description from [http://docs.oracle.com/javaee/7/api/javax/persistence/spi/PersistenceUnit...]
{quote}
ClassLoader getNewTempClassLoader()
Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by getClassLoader(). None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map) call.
Returns:
temporary ClassLoader with same visibility as current loader
{quote}
was:
The new temporary classloader returned by the WildFly PersistenceUnitInfo.getNewTempClassLoader() is currently created on every call.
Ensure that the cached temp classloader reference is cleared at undeploy time, which is when the org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner#CLASSES_IN_JAR_CACHE are also cleared.
Javadoc description from [http://docs.oracle.com/javaee/7/api/javax/persistence/spi/PersistenceUnit...]
{quote}
ClassLoader getNewTempClassLoader()
Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by getClassLoader(). None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map) call.
Returns:
temporary ClassLoader with same visibility as current loader
{quote}
> add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-7367
> URL: https://issues.jboss.org/browse/WFLY-7367
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Reporter: Scott Marlow
> Assignee: Scott Marlow
>
> The new temporary classloader returned by the WildFly PersistenceUnitInfo.getNewTempClassLoader() is currently created on every call.
> Ensure that the cached temp classloader reference is cleared after the PersistenceProvider.createContainerEntityManagerFactory() call returns.
> Javadoc description from [http://docs.oracle.com/javaee/7/api/javax/persistence/spi/PersistenceUnit...]
> {quote}
> ClassLoader getNewTempClassLoader()
> Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by getClassLoader(). None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map) call.
> Returns:
> temporary ClassLoader with same visibility as current loader
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFLY-7367) add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-7367?page=com.atlassian.jira.plugin.... ]
Stuart Douglas commented on WFLY-7367:
--------------------------------------
I don't think undeploy time is the right time to clear this. As I understand it these resources are only really used during deployment time (and are basically a way for the JPA provider to examine the class path without forcing classes to actually be loaded). If these were cached till undeploy then these deployment time resources will be held for much longer than what is required.
If this is going to be cached IMHO the correct time to clear the cache is after PU service start.
> add per PU cache of the new temp classloader returned from PersistenceUnitMetadataImpl.getNewTempClassLoader()
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-7367
> URL: https://issues.jboss.org/browse/WFLY-7367
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Reporter: Scott Marlow
> Assignee: Scott Marlow
>
> The new temporary classloader returned by the WildFly PersistenceUnitInfo.getNewTempClassLoader() is currently created on every call.
> Ensure that the cached temp classloader reference is cleared at undeploy time, which is when the org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner#CLASSES_IN_JAR_CACHE are also cleared.
> Javadoc description from [http://docs.oracle.com/javaee/7/api/javax/persistence/spi/PersistenceUnit...]
> {quote}
> ClassLoader getNewTempClassLoader()
> Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by getClassLoader(). None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map) call.
> Returns:
> temporary ClassLoader with same visibility as current loader
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFCORE-1742) Allow registering a custom handler for management interface
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1742?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-1742:
-------------------------------------
Git Pull Request: https://github.com/wildfly/wildfly-core/pull/1872 (was: https://issues.jboss.org/browse/WFCORE-1742)
> Allow registering a custom handler for management interface
> -----------------------------------------------------------
>
> Key: WFCORE-1742
> URL: https://issues.jboss.org/browse/WFCORE-1742
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Domain Management
> Reporter: Sebastian Łaskawiec
>
> When building [HealthCheck API for Infisnispan|https://github.com/infinispan/infinispan/pull/4499] we noticed there is no way to register a custom endpoint on Management REST interface. Without it, calling the API requires using HTTP POST method (since it includes runtime parameters) and the URL is very long (and not intuitive for our users):
> {noformat}
> curl --digest -L -D - "http://localhost:9990/management/subsystem/datagrid-infinispan/cache-cont..." --header "Content-Type: application/json" -u ispnadmin:ispnadmin
> HTTP/1.1 401 Unauthorized
> Connection: keep-alive
> WWW-Authenticate: Digest realm="ManagementRealm",domain="/management",nonce="AuZzFxz7uC4NMTQ3MDgyNTU1NTQ3OCfIJBHXVpPHPBdzGUy7Qts=",opaque="00000000000000000000000000000000",algorithm=MD5,qop="auth"
> Content-Length: 77
> Content-Type: text/html
> Date: Wed, 10 Aug 2016 10:39:15 GMT
> HTTP/1.1 200 OK
> Connection: keep-alive
> Authentication-Info: nextnonce="AuZzFxz7uC4NMTQ3MDgyNTU1NTQ3OCfIJBHXVpPHPBdzGUy7Qts=",qop="auth",rspauth="b518c3170e627bd732055c382ce5d970",cnonce="NGViOWM0NDY5OGJmNjY0MjcyOWE4NDkyZDU3YzNhYjY=",nc=00000001
> Content-Type: application/json; charset=utf-8
> Content-Length: 1927
> Date: Wed, 10 Aug 2016 10:39:15 GMT
> {
> "cache-health" : "GREEN",
> "cluster-health" : ["test"],
> "cluster-name" : "clustered",
> "free-memory" : 96778,
> "log-tail" : [
> "2016-08-10 11:54:14,706 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) DGENDPT10001: HotRodServer listening on 127.0.0.1:11222",
> "2016-08-10 11:54:14,706 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10001: MemcachedServer listening on 127.0.0.1:11211",
> "2016-08-10 11:54:14,785 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-6) DGISPN0001: Started ___protobuf_metadata cache from clustered container",
> "2016-08-10 11:54:14,800 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-6) DGISPN0001: Started ___script_cache cache from clustered container",
> "2016-08-10 11:54:15,159 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) DGISPN0001: Started ___hotRodTopologyCache cache from clustered container",
> "2016-08-10 11:54:15,210 INFO [org.infinispan.rest.NettyRestServer] (MSC service thread 1-6) ISPN012003: REST server starting, listening on 127.0.0.1:8080",
> "2016-08-10 11:54:15,210 INFO [org.infinispan.server.endpoint] (MSC service thread 1-6) DGENDPT10002: REST mapped to /rest",
> "2016-08-10 11:54:15,306 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management",
> "2016-08-10 11:54:15,307 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990",
> "2016-08-10 11:54:15,307 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Infinispan Server 9.0.0-SNAPSHOT (WildFly Core 2.2.0.CR9) started in 8681ms - Started 196 of 237 services (121 services are lazy, passive or on-demand)"
> ],
> "number-of-cpus" : 8,
> "number-of-nodes" : 1,
> "total-memory" : 235520
> }%
> {noformat}
> It would be very convenient to allow exposing such endpoints with optional authorization and using custom URLs (e.g. something like http://localhost:9990/health).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFLY-6854) Upgrade Hibernate ORM to 5.1.3
by Gail Badner (JIRA)
[ https://issues.jboss.org/browse/WFLY-6854?page=com.atlassian.jira.plugin.... ]
Gail Badner updated WFLY-6854:
------------------------------
Summary: Upgrade Hibernate ORM to 5.1.3 (was: Upgrade Hibernate ORM to 5.1.2)
> Upgrade Hibernate ORM to 5.1.3
> ------------------------------
>
> Key: WFLY-6854
> URL: https://issues.jboss.org/browse/WFLY-6854
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Reporter: Emmanuel Bernard
> Assignee: Scott Marlow
> Fix For: 11.0.0.Alpha1
>
>
> This is a follow up on WFLY-6682.
> After looking at the list of potential incompatibilities, we decided to not upgrade to 5.2 but instead to 5.1 to provide a smoother experience to users.
> We can consider adding a 5.2 optional switch via Jipijapa if bandwidth permit but let's treat it as a second issue and have [~smarlow] lead it.
> PS: I put v11Alpha1 but feel free to adjust it to any WF 11 version that fits best.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (WFLY-6854) Upgrade Hibernate ORM to 5.1.3
by Gail Badner (JIRA)
[ https://issues.jboss.org/browse/WFLY-6854?page=com.atlassian.jira.plugin.... ]
Gail Badner updated WFLY-6854:
------------------------------
Summary: Upgrade Hibernate ORM to 5.1.3 (was: Upgrade Hibernate ORM to 5.1.3)
> Upgrade Hibernate ORM to 5.1.3
> -------------------------------
>
> Key: WFLY-6854
> URL: https://issues.jboss.org/browse/WFLY-6854
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Reporter: Emmanuel Bernard
> Assignee: Scott Marlow
> Fix For: 11.0.0.Alpha1
>
>
> This is a follow up on WFLY-6682.
> After looking at the list of potential incompatibilities, we decided to not upgrade to 5.2 but instead to 5.1 to provide a smoother experience to users.
> We can consider adding a 5.2 optional switch via Jipijapa if bandwidth permit but let's treat it as a second issue and have [~smarlow] lead it.
> PS: I put v11Alpha1 but feel free to adjust it to any WF 11 version that fits best.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months