[JBoss JIRA] (WFLY-6441) naming context is not setup when starting the persistence unit
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-6441?page=com.atlassian.jira.plugin.... ]
Scott Marlow updated WFLY-6441:
-------------------------------
Fix Version/s: 10.1.0.Final
> naming context is not setup when starting the persistence unit
> --------------------------------------------------------------
>
> Key: WFLY-6441
> URL: https://issues.jboss.org/browse/WFLY-6441
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: JBoss AS7 7.1.1.Final, JBoss AS7 7.2.0.Final, 9.0.2.Final, 10.0.0.Final
> Reporter: Scott Marlow
> Assignee: Scott Marlow
> Fix For: 10.1.0.Final
>
>
> ookup of env-entry throws NameNotFoundException during persistence unit startup
> Version-Release number of selected component (if applicable):
> How reproducible:
> always
> Steps to Reproduce:
> 1. add env-entry in application.xml
> 2. try to lookup during persistent unit startup, e.g.
> public class MyType implements UserType {
> ...
> @Override
> public int[] sqlTypes() {
> try {
> Object ctx = new InitialContext().lookup("java:app/env");
> log.info("java:app/env from JPA = " + ctx);
> } catch (Exception e) {
> log.error("unable to get java:app/env from JPA", e);
> }
> return new int[] { Types.VARCHAR };
> }
> Actual results:
> NameNotFoundException
> Expected results:
> value of env-entry is available
> Additional info:
> On 21.03.2016 23:47, Stuart Douglas wrote:
> > This should fix it (I think): https://github.com/stuartwdouglas/wildfly/tree/jpa-java-namespace
> >
> > Stuart
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (WFCORE-1448) AttributeParser for ObjectListAttributeDefinitions doesn't differentiate between empty and absent object lists
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1448?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-1448:
-------------------------------------
Fix Version/s: 3.0.0.Alpha1
Git Pull Request: https://github.com/wildfly/wildfly-core/pull/1477
> AttributeParser for ObjectListAttributeDefinitions doesn't differentiate between empty and absent object lists
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-1448
> URL: https://issues.jboss.org/browse/WFCORE-1448
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 2.1.0.Final
> Reporter: Tomaz Cerar
> Assignee: Tomaz Cerar
> Fix For: 3.0.0.Alpha1
>
>
> Attributes of type ObjectList are left undefined when their enclosing element is empty, which makes it impossible to differentiate an empty object list from an unspecified one.
> The ability to distinguish the two scenarios is important in the security manager subsystem. Consider this configuration:
> {code:xml}
> <subsystem xmlns="urn:jboss:domain:security-manager:1.0">
> <deployment-permissions>
> <mininum-set>
> ....
> </minimum-set>
> </deployment-permissions>
> </subsystem>
> {code}
> The maximum-set is absent and this case we want to use a default set with AllPermission. Now consider another configuration:
> {code:xml}
> <subsystem xmlns="urn:jboss:domain:security-manager:1.0">
> <deployment-permissions>
> <mininum-set/>
> <maximum-set/>
> </deployment-permissions>
> </subsystem>
> {code}
> In this case, maximum-set has been specified but it is empty, which means the admin/user deliberately wants to use an emtpy set, possibly to enforce that no deployments with special permissions requirements get deployed.
> The problem is that both scenarios result in an undefined attribute for the maximum-set, which means that the default AllPermission set ends up being used in both cases. The parser doesn't initialize the attribute with an empty list when the enclosing element is present but is empty. So in the end, both approaches result in an undefined attribute.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (WFLY-6444) Apache http classes not found
by Andrei Ivanov (JIRA)
Andrei Ivanov created WFLY-6444:
-----------------------------------
Summary: Apache http classes not found
Key: WFLY-6444
URL: https://issues.jboss.org/browse/WFLY-6444
Project: WildFly
Issue Type: Bug
Affects Versions: 10.0.0.Final, 10.1.0.Final
Reporter: Andrei Ivanov
Assignee: Jason Greene
Attachments: wildfly-httpclient-test.zip
Hi,
I've created a trivial JAX-RS application with a CDI producer for a RestEasy JAX-RS client proxy.
I also need to customize the HTTP engine a bit.
The app deploys fine on JBoss 7.1.1.
Trying to upgrade to WildFly 10.0, I got a weird error:
{noformat}
DEBUG [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 2) Catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class siteaccess.web.backend.service.RestEasyClientProducer
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:186)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:113)
at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.createContext(FastAnnotatedTypeLoader.java:102)
at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:91)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:65)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/conn/socket/LayeredConnectionSocketFactory
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getDeclaredConstructors(Class.java:2020)
at org.jboss.weld.annotated.slim.backed.SecurityActions.getDeclaredConstructors(SecurityActions.java:57)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:163)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:160)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:156)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:160)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:160)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:61)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:44)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
... 14 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.socket.LayeredConnectionSocketFactory from [Module "deployment.wildfly-httpclient-test.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 38 more
{noformat}
I've upgraded Weld to 2.3.3 and the http client jars to the latest versions (using details from https://developer.jboss.org/thread/242798).
Now I get the exception for a different class:
{noformat}
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext from [Module "deployment.wildfly-httpclient-test.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 38 more
{noformat}
I'm getting this exception also when testing with an unmodified WildFly 10.1 snapshot ( Build #2244 (Mar 24, 2016 1:10:44 PM) from https://ci.jboss.org/hudson/job/WildFly-latest-master/lastBuild/)
I've first asked for help on the [forum|https://developer.jboss.org/thread/268871], but got no answers :(
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (JBEE-161) BeanELResolver does not support methods that use varargs
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/JBEE-161?page=com.atlassian.jira.plugin.s... ]
Scott Marlow commented on JBEE-161:
-----------------------------------
released jboss-el-api_2.2_spec-1.0.6.Final
> BeanELResolver does not support methods that use varargs
> --------------------------------------------------------
>
> Key: JBEE-161
> URL: https://issues.jboss.org/browse/JBEE-161
> Project: JBoss JavaEE Spec APIs
> Issue Type: Bug
> Components: jboss-el-api
> Environment: jboss-el-api_2.2_spec-1.0.4.Final-redhat-1
> Reporter: Ingo Weiss
> Assignee: Scott Marlow
> Labels: el
> Fix For: jboss-el-api_3.0_spec-1.0.6.Final
>
> Attachments: beanELResolver4VarArgs.zip
>
>
> When passing BeanELResolver a method that uses varargs, BeanELResolver throws the following exception:
> {code}
> java.lang.IllegalArgumentException: wrong number of arguments
> 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:497)
> at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:834)
> at javax.el.BeanELResolver.invoke(BeanELResolver.java:527)
> at org.apache.el.parser.AstValue.getValue(AstValue.java:156)
> at BeanELResolverTest.readExpressionValue(BeanELResolverTest.java:32)
> at BeanELResolverTest.testMethodWithFixArgumentList(BeanELResolverTest.java:21)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months