[jira] [Commented] (DELTASPIKE-1351) Java 10: IllegalArgumentException in ClassReader.

2018-06-28 Thread Florian Lieb (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526475#comment-16526475
 ] 

Florian Lieb commented on DELTASPIKE-1351:
--

[~tandraschko] just tested against commit 
3a2106c672e96c5d23d996f69572948eff72bfc2, works fine :)

> Java 10: IllegalArgumentException in ClassReader.
> ---
>
> Key: DELTASPIKE-1351
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1351
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Proxy-Module
>Affects Versions: 1.8.2
>Reporter: Florian Lieb
>Assignee: Thomas Andraschko
>Priority: Major
> Fix For: 1.9.0
>
>
> With java10, we get an exception
> {code:java}
> Caused by: java.lang.IllegalArgumentException
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:160)
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:143)
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:418)
> at 
> org.apache.deltaspike.proxy.impl.AsmDeltaSpikeProxyClassGenerator.generateProxyClassBytes(AsmDeltaSpikeProxyClassGenerator.java:154)
> ... 51 more
> at 
> org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)
> at 
> org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:61)
> at 
> org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:420){code}
>  
> Since ASM is shaded within deltaspike-proxy-asm, it is impossible to update 
> ASM to a more recent version.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DELTASPIKE-1265) Align JSF module to features provided by JSF 2.3

2018-06-28 Thread Thomas Andraschko (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526243#comment-16526243
 ] 

Thomas Andraschko edited comment on DELTASPIKE-1265 at 6/28/18 11:56 AM:
-

What features do you mean?
 I would target it 2.0 (it's already 2.0, sry)


was (Author: tandraschko):
What features do you mean?
 I would target it 2.0

> Align JSF module to features provided by JSF 2.3
> 
>
> Key: DELTASPIKE-1265
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1265
> Project: DeltaSpike
>  Issue Type: Improvement
>Reporter: John D. Ament
>Priority: Major
> Fix For: 2.0
>
>
> The JSF module provides a lot of functionality that overlaps with JSF 2.1/2.2 
> features.  We should review this content and see what can be removed vs what 
> is provided OOTB.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DELTASPIKE-1265) Align JSF module to features provided by JSF 2.3

2018-06-28 Thread Thomas Andraschko (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526243#comment-16526243
 ] 

Thomas Andraschko commented on DELTASPIKE-1265:
---

What features to you mean?
I would target it 2.0

> Align JSF module to features provided by JSF 2.3
> 
>
> Key: DELTASPIKE-1265
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1265
> Project: DeltaSpike
>  Issue Type: Improvement
>Reporter: John D. Ament
>Priority: Major
> Fix For: 2.0
>
>
> The JSF module provides a lot of functionality that overlaps with JSF 2.1/2.2 
> features.  We should review this content and see what can be removed vs what 
> is provided OOTB.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DELTASPIKE-1265) Align JSF module to features provided by JSF 2.3

2018-06-28 Thread Thomas Andraschko (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526243#comment-16526243
 ] 

Thomas Andraschko edited comment on DELTASPIKE-1265 at 6/28/18 11:56 AM:
-

What features do you mean?
 I would target it 2.0


was (Author: tandraschko):
What features to you mean?
I would target it 2.0

> Align JSF module to features provided by JSF 2.3
> 
>
> Key: DELTASPIKE-1265
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1265
> Project: DeltaSpike
>  Issue Type: Improvement
>Reporter: John D. Ament
>Priority: Major
> Fix For: 2.0
>
>
> The JSF module provides a lot of functionality that overlaps with JSF 2.1/2.2 
> features.  We should review this content and see what can be removed vs what 
> is provided OOTB.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (DELTASPIKE-1333) Support default methods in interface based configuration

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko reassigned DELTASPIKE-1333:
-

Assignee: Mark Struberg

> Support default methods in interface based configuration
> 
>
> Key: DELTASPIKE-1333
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1333
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Configuration
>Affects Versions: 1.8.1
> Environment: Java 8, DeltaSpike 1.8.1
>Reporter: Niels Ull Harremoes
>Assignee: Mark Struberg
>Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> I wanted to implement a default method in one of my configuration methods as 
> a simple way to configure a Duration:
> {code:java}
> @Configuration
> interface CacheConfig {
>   @ConfigProperty(name = "cache.lifetime", defaultValue = "P1D")
>   String cacheLifetime();
>   default Duration getCacheLifetimeDuration() {
>     try {
>        return Duration.parse(cacheLifetime());
>     } catch (DateTimeParseException e) {
>         ...
>   }
> }
> {code}
> However, a runtime I get the error
> {quote}java.lang.UnsupportedOperationException: public default 
> java.time.Duration com.example.CacheConfig.getLifetimeDuration() doesn't have 
> @ConfigProperty and therefore is illegal
> {quote}
> It would be nice if default methods were not processed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DELTASPIKE-1206) support for CDI 2.0 feature

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko updated DELTASPIKE-1206:
--
Fix Version/s: 2.0

> support for CDI 2.0  feature
> ---
>
> Key: DELTASPIKE-1206
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1206
> Project: DeltaSpike
>  Issue Type: Test
>Affects Versions: 1.7.1
>Reporter: Mark Struberg
>Assignee: Mark Struberg
>Priority: Major
> Fix For: 2.0
>
>
> CDI 2.0 will add support for only picking up beans with an explicit scope 
> annotation. This reduced the memory footprint while also speeding up the 
> bootstrapping.
> See https://issues.jboss.org/browse/CDI-420
> We should add this annotation to our beans.xml and verify that we still work. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (DELTASPIKE-1342) Upgrade to ASM 6.1 for Java 10 support

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko resolved DELTASPIKE-1342.
---
   Resolution: Duplicate
Fix Version/s: 1.9.0

h2. DELTASPIKE-1351

> Upgrade to ASM 6.1 for Java 10 support
> --
>
> Key: DELTASPIKE-1342
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1342
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Data-Module, PartialBean, Proxy-Module
>Reporter: Christian Beikov
>Priority: Major
> Fix For: 1.9.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (DELTASPIKE-1342) Upgrade to ASM 6.1 for Java 10 support

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko closed DELTASPIKE-1342.
-

> Upgrade to ASM 6.1 for Java 10 support
> --
>
> Key: DELTASPIKE-1342
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1342
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Data-Module, PartialBean, Proxy-Module
>Reporter: Christian Beikov
>Priority: Major
> Fix For: 1.9.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DELTASPIKE-1218) Backport CDI 2.0 Request Context Controller

2018-06-28 Thread Thomas Andraschko (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526248#comment-16526248
 ] 

Thomas Andraschko commented on DELTASPIKE-1218:
---

[~johndament]
Will you still do it? Otherwise i would close as many containers already have 
cdi2.0 support.

> Backport CDI 2.0 Request Context Controller
> ---
>
> Key: DELTASPIKE-1218
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1218
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: CdiControl
>Reporter: John D. Ament
>Assignee: John D. Ament
>Priority: Major
>
> Backport the new features of context control to enable users to leverage the 
> functionality now.
> {{@ActivateRequestContext}}
> {{RequestContextController}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DELTASPIKE-1238) Create a better default TransactionStrategy

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko updated DELTASPIKE-1238:
--
Fix Version/s: 2.0

> Create a better default TransactionStrategy
> ---
>
> Key: DELTASPIKE-1238
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1238
> Project: DeltaSpike
>  Issue Type: Improvement
>Reporter: John D. Ament
>Assignee: John D. Ament
>Priority: Major
> Fix For: 2.0
>
>
> Create a better default TransactionStrategy that handles more use cases out 
> of the box.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (DELTASPIKE-1255) query.or

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko closed DELTASPIKE-1255.
-
Resolution: Incomplete

No response and example since 1+ year, i will close it.

> query.or
> 
>
> Key: DELTASPIKE-1255
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1255
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: JPA-Module
>Reporter: Pátkai Attila
>Priority: Major
>
> i have this query: query.or(query.eq(partnerAttributeA, 
> partner),query.eq(partnerAttributeB, partner));  
> and i get stackoverflow exception 
> how can i fix it? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (DELTASPIKE-680) Lazy init should not rely on BeanManagerProvider

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko closed DELTASPIKE-680.

Resolution: Done

Should already be implemted, i also refactor this alot during ~2 years ago.

> Lazy init should not rely on BeanManagerProvider
> 
>
> Key: DELTASPIKE-680
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-680
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Data-Module
>Affects Versions: 1.0.1
>Reporter: Harald Wellmann
>Assignee: Harald Wellmann
>Priority: Major
>
> Trying to work with DeltaSpike Data in OSGi (with on-the-fly OSGification, 
> see DELTASPIKE-660), I found that things break when the TCCL is not set to 
> the classloader of the current repository.
> This is caused by lazy initialization of {{RepositoryComponent}} using 
> {{BeanManagerProvider}}.
> Now the current strategies of {{BeanManagerProvider}} to locate the "current" 
> {{BeanManager}} do not work in OSGi where each bundle may have its own 
> BeanManager and there is no obvious interpretation of "current", and the TCCL 
> is not by default set to anything useful for this problem.
> However, in the context of DeltaSpike Data, is it easy to avoid the 
> {{BeanManagerProvider}} even with lazy initialization. The correct 
> {{BeanManager}} is known when a {{RepositoryComponent}} is instantiated, so 
> its sufficient to keep a reference to this {{BeanManager}} to perform lazy 
> initialization.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DELTASPIKE-1239) Add ability to return QueryResult without predicate

2018-06-28 Thread Thomas Andraschko (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526291#comment-16526291
 ] 

Thomas Andraschko commented on DELTASPIKE-1239:
---

Do you put this method inside your PersonRepository?
Why not just "QueryResult findAll()" then?

> Add ability to return QueryResult without predicate
> ---
>
> Key: DELTASPIKE-1239
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1239
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Data-Module
>Reporter: Matti Tahvonen
>Priority: Minor
>
> A following method name in repository would be handy for dynamic sorting and 
> paging of all entities:
> QueryResult findAllBy();
> Currently the library don't know how to handle that and it requires one to 
> add @Query("from Person") annotation. It would be handy if the query 
> annotation could be left out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (DELTASPIKE-1318) Unsatisfied dependencies for type ApplicationContext (deltaspike-cdictrl-weld) in payara 4.1.2.174

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko reassigned DELTASPIKE-1318:
-

Assignee: Mark Struberg

> Unsatisfied dependencies for type ApplicationContext 
> (deltaspike-cdictrl-weld) in payara 4.1.2.174
> --
>
> Key: DELTASPIKE-1318
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1318
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: CdiControl
>Affects Versions: 1.8.1
> Environment: payara 4.1.2.174
>Reporter: Andreas Keefer
>Assignee: Mark Struberg
>Priority: Major
>
> ApplicationContext can't be injected in WeldContextControl on payara 4.1.2.174
>  
> Maven dependencies
> {code:java}
> 
> org.apache.deltaspike.cdictrl
> deltaspike-cdictrl-api
> compile
> 
> 
> org.apache.deltaspike.cdictrl
> deltaspike-cdictrl-weld
> runtime
> 
> {code}
>  Sample Bean:
> {code:java}
> @Singleton
> @Startup
> public class KafkaVehicleReceiver {
>   @Inject
>   private ContextControl contextControl;
>   ...
> }{code}
>  payara log:
> {code:java}
> [2018-02-27T00:40:54.713+0100] [Payara 4.1] [SCHWERWIEGEND] [NCLS-CORE-00026] 
> [javax.enterprise.system.core] [tid: _ThreadID=47 
> _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1519688454713] 
> [levelValue: 1000] [[
> Exception during lifecycle processing
> org.glassfish.deployment.common.DeploymentException: CDI deployment 
> failure:WELD-001408: Unsatisfied dependencies for type ApplicationContext 
> with qualifiers @Default
> at injection point [BackedAnnotatedField] @Inject private 
> org.apache.deltaspike.cdise.weld.WeldContextControl.applicationContext
> at 
> org.apache.deltaspike.cdise.weld.WeldContextControl.applicationContext(WeldContextControl.java:0)
> at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:270)
> at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
> at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:333)
> at 
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
> at 
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
> at 
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:508)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:360)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:360)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
> at 
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
> at 
> org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:407)
> at 
> org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
> 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.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
> at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
> at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
> at 
> org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
> at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
> at 
> 

[jira] [Closed] (DELTASPIKE-1007) test @Transactional and @TransactionScoped support for @Repository

2018-06-28 Thread Thomas Andraschko (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko closed DELTASPIKE-1007.
-
Resolution: Later

> test @Transactional and @TransactionScoped support for @Repository
> --
>
> Key: DELTASPIKE-1007
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1007
> Project: DeltaSpike
>  Issue Type: Task
>  Components: Data-Module, Tests
>Affects Versions: 1.5.1
>Reporter: Gerhard Petracek
>Assignee: Harald Wellmann
>Priority: Major
>
> currently it's tested manually, but we should add a test to the test-suite.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DELTASPIKE-1350) TransactionalInterceptor should use the EntityManagerResolver for lookups

2018-06-28 Thread Gerhard Petracek (JIRA)


[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16525983#comment-16525983
 ] 

Gerhard Petracek commented on DELTASPIKE-1350:
--

please have a look at:
http://deltaspike.apache.org/documentation/jpa.html#MultipleEntityManagers

and if you need it in combination with the data-module also:
https://issues.apache.org/jira/browse/DELTASPIKE-1062

> TransactionalInterceptor should use the EntityManagerResolver for lookups
> -
>
> Key: DELTASPIKE-1350
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1350
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: JPA-Module
>Affects Versions: 1.8.2
>Reporter: Andrei Ivanov
>Priority: Major
>
> Hi,
> I'm trying to use the transaction support from the JPA module with multiple 
> entity managers that are created by a producer defined in a separate/common 
> module.
> That means that any specific qualifiers defined in the client modules (like 
> {{@DbA}} / {{@DbB}}{{}} from the examples) are not visible to the producer. 
> To make this work, I've followed the approach from the 
> {{EntityManagerFactoryProducer}} and I've defined my own qualifier, 
> {{PersistenceContextName}}, duplicated from {{PersistenceUnitName}} (and 
> similar to the {{CustomQualifier}} from the example).
> I've also created an {{EntityManagerResolver}} in one of the client modules 
> and configured it in the DAOs inside it (which are not DeltaSpike 
> repositories), with {{@Transactional}} and 
> {{@EntityManagerConfig(entityManagerResolver = 
> BranchManagementResolver.class, qualifier = PersistenceContextName.class)}}
> As far as I see, only the {{qualifier}} attribute is used, but it invokes my 
> producer with a {{null}} {{InjectionPoint}}:
> {noformat}
> java.lang.NullPointerException: null
>     at 
> EntityManagerProducer.getEntityManagerFactory(EntityManagerProducer.java:109) 
> ~[server-core-impl-1.0.21-SNAPSHOT.jar:?]
>     at 
> EntityManagerProducer.createEntityManager(EntityManagerProducer.java:95) 
> ~[server-core-impl-1.0.21-SNAPSHOT.jar:?]
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> ~[?:1.8.0_172]
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> ~[?:1.8.0_172]
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[?:1.8.0_172]
>     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
>     at 
> org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:103)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
> ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:700) 
> ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:723) 
> ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:64)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:86)
>  ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
>     at 
> org.apache.deltaspike.jpa.spi.entitymanager.QualifierBackedEntityManagerResolver.resolveEntityManager(QualifierBackedEntityManagerResolver.java:59)
>  ~[deltaspike-jpa-module-api-1.8.2.jar:1.8.2]
>     at 
> org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.resolveEntityManagerForQualifier(ResourceLocalTransactionStrategy.java:381)
>  ~[deltaspike-jpa-module-impl-1.8.2.jar:1.8.2]
> {noformat}
> The NPE line has {{LOGGER.info(injectionPoint.getAnnotated())}}, and 
> 

[jira] [Updated] (DELTASPIKE-1350) TransactionalInterceptor should use the EntityManagerResolver for lookups

2018-06-28 Thread Andrei Ivanov (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Ivanov updated DELTASPIKE-1350:
--
Description: 
Hi,

I'm trying to use the transaction support from the JPA module with multiple 
entity managers that are created by a producer defined in a separate/common 
module.

That means that any specific qualifiers defined in the client modules (like 
{{@DbA}} / {{@DbB}}{{ from the examples) are not visible to the producer. To 
make this work, I've followed the approach from the 
EntityManagerFactoryProducer}} and I've defined my own qualifier, 
{{PersistenceContextName}}, duplicated from {{PersistenceUnitName}} (and 
similar to the {{CustomQualifier}} from the example).

I've also created an {{EntityManagerResolver}} in one of the client modules and 
configured it in the DAOs inside it (which are not DeltaSpike repositories), 
with {{@Transactional}} and {{@EntityManagerConfig(entityManagerResolver = 
BranchManagementResolver.class, qualifier = PersistenceContextName.class)}}

As far as I see, only the {{qualifier}} attribute is used, but it invokes my 
producer with a {{null}} {{InjectionPoint}}:
{noformat}
java.lang.NullPointerException: null
    at 
EntityManagerProducer.getEntityManagerFactory(EntityManagerProducer.java:109) 
~[server-core-impl-1.0.21-SNAPSHOT.jar:?]
    at EntityManagerProducer.createEntityManager(EntityManagerProducer.java:95) 
~[server-core-impl-1.0.21-SNAPSHOT.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_172]
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_172]
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
    at 
org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:103)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180) 
~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:700) 
~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:723) 
~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:64)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:86)
 ~[weld-core-impl-3.0.4.Final.jar:3.0.4.Final]
    at 
org.apache.deltaspike.jpa.spi.entitymanager.QualifierBackedEntityManagerResolver.resolveEntityManager(QualifierBackedEntityManagerResolver.java:59)
 ~[deltaspike-jpa-module-api-1.8.2.jar:1.8.2]
    at 
org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.resolveEntityManagerForQualifier(ResourceLocalTransactionStrategy.java:381)
 ~[deltaspike-jpa-module-impl-1.8.2.jar:1.8.2]
{noformat}
The NPE line has {{LOGGER.info(injectionPoint.getAnnotated())}}, and 
{{injectionPoint}} is null.

Maybe this is a separate bug?

 

If I understand this correctly, my problem would be solved if my custom 
resolver would be used for lookups, but the only reference to it is from 
{{EntityManagerRefLookup#lookupReference}}, and that just got removed from 
{{TransactionStrategyHelper}}.

 

  was:
Hi,

I'm trying to use the transaction support from the JPA module with multiple 
entity managers that are created by a producer defined in a separate/common 
module.

That means that any specific qualifiers defined in the client modules (like 
{{@DbA}} / {{@DbB}}{{}} from the examples) are not visible to the producer. To 
make this work, I've followed the approach from the 
{{EntityManagerFactoryProducer}} and I've defined my own qualifier, 
{{PersistenceContextName}}, duplicated from {{PersistenceUnitName}} (and 
similar to the 

[jira] [Assigned] (DELTASPIKE-1351) Java 10: IllegalArgumentException in ClassReader.

2018-06-28 Thread Gerhard Petracek (JIRA)


 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek reassigned DELTASPIKE-1351:


Assignee: Thomas Andraschko

> Java 10: IllegalArgumentException in ClassReader.
> ---
>
> Key: DELTASPIKE-1351
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1351
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Proxy-Module
>Affects Versions: 1.8.2
>Reporter: Florian Lieb
>Assignee: Thomas Andraschko
>Priority: Major
> Fix For: 1.9.0
>
>
> With java10, we get an exception
> {code:java}
> Caused by: java.lang.IllegalArgumentException
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:160)
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:143)
> at org.apache.deltaspike.proxy.asm.ClassReader.(ClassReader.java:418)
> at 
> org.apache.deltaspike.proxy.impl.AsmDeltaSpikeProxyClassGenerator.generateProxyClassBytes(AsmDeltaSpikeProxyClassGenerator.java:154)
> ... 51 more
> at 
> org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)
> at 
> org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:61)
> at 
> org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:420){code}
>  
> Since ASM is shaded within deltaspike-proxy-asm, it is impossible to update 
> ASM to a more recent version.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)