[jira] [Commented] (ARIES-960) Support type inference and generics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (ARIES-960) Support type inference and generics

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/ARIES-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755980#comment-16755980 ]

Grzegorz Grzybek commented on ARIES-960:
----------------------------------------

https://stackoverflow.com/questions/54339093/how-to-pass-validation-query-for-sql-server-in-fuse-osgi-environment/54350230?noredirect=1#comment95604193_54350230

> Support type inference and generics
> -----------------------------------
>
>                 Key: ARIES-960
>                 URL: https://issues.apache.org/jira/browse/ARIES-960
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.0.1
>         Environment: Karaf
>   Karaf version               2.3.0
>   Karaf home                  /home/ceefour/git/bippo-commerce5/karaf
>   Karaf base                  /home/ceefour/git/bippo-commerce5/karaf
>   OSGi Framework              org.apache.felix.framework - 4.0.3
> JVM
>   Java Virtual Machine        OpenJDK 64-Bit Server VM version 23.2-b09
>   Version                     1.7.0_07
>   Vendor                      Oracle Corporation
>   Uptime                      7 minutes
>   Total compile time          33.261 seconds
> Threads
>   Live threads                101
>   Daemon threads              86
>   Peak                        135
>   Total started               177
> Memory
>   Current heap size           228,508 kbytes
>   Maximum heap size           466,048 kbytes
>   Committed heap size         256,000 kbytes
>   Pending objects             0
>   Garbage collector           Name = 'PS Scavenge', Collections = 55, Time = 0.443 seconds
>   Garbage collector           Name = 'PS MarkSweep', Collections = 2, Time = 0.280 seconds
> Classes
>   Current classes loaded      11,212
>   Total classes loaded        11,213
>   Total classes unloaded      1
> Operating system
>   Name                        Linux version 3.2.0-32-generic
>   Architecture                amd64
>   Processors                  8
>            Reporter: Hendy Irawan
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: blueprint-core-1.9.0
>
>
> This is similar to #ARIES-834 and #ARIES-843, which was reported as fixed, but for some reason, it's not fixed in my case.
> {code}
> 2012-11-07 18:30:50,648 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_security.xml
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching constructor on class org.soluvas.web.login.SoluvasRealm for arguments [org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@5c2a497b, org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@5c3e5982] when instanciating bean shiroRealm
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:336)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:646)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
>         at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
> {code}
> The constructor:
> {code}
> public SoluvasRealm(Supplier<SecurityCatalog> securityCatalogSupplier,
> SecurityRepository securityRepo) {
> super();
> this.securityCatalogSupplier = securityCatalogSupplier;
> this.securityRepo = securityRepo;
> setName(securityRepo.getDomainBase());
> CredentialsMatcher cm = new LdapBindCredentialsMatcher(securityRepo.getBindConfig(),
> securityRepo.getUsersRdn() + "," + securityRepo.getDomainBase());
> setCredentialsMatcher(cm);
> }
> {code}
> Relevant beans:
> {code}
> <bean id="securityPackage" class="org.soluvas.security.impl.SecurityPackageImpl" factory-method="init" />
> <bean id="aggregatingSecurityCatalogSupplier" class="org.soluvas.commons.AggregatingSupplier">
> <argument>
> <bean class="org.soluvas.security.impl.SecurityFactoryImpl" factory-method="init" />
> </argument>
> <argument>
> <bean factory-ref="securityPackage" factory-method="getSecurityCatalog" />
> </argument>
> <argument>
> <list />
> </argument>
> </bean>
> <service ref="aggregatingSecurityCatalogSupplier" auto-export="interfaces">
> <service-properties>
> <entry key="clientId" value="${clientId}" />
> <entry key="tenantEnv" value="${tenantEnv}" />
> <entry key="tenantId" value="${tenantId}" />
> <entry key="suppliedClass" value="org.soluvas.security.SecurityCatalog" />
> <entry key="layer" value="application" />
> </service-properties>
> </service>
> <bean id="securityRepo" class="org.soluvas.security.ldap.LdapSecurityRepository">
> <argument ref="ldapPool" />
> <argument value="${mallLdapBaseDn}" />
> <argument>
> <bean factory-ref="ldapConfigSupplier" factory-method="get" />
> </argument>
> <argument ref="rolePersonAssoc" />
> </bean>
> <service ref="securityRepo" auto-export="interfaces">
> <service-properties>
> <entry key="clientId" value="${clientId}" />
> <entry key="tenantId" value="${tenantId}" />
> <entry key="tenantEnv" value="${tenantEnv}" />
> </service-properties>
> </service>
> <bean id="shiroRealm" class="org.soluvas.web.login.SoluvasRealm" init-method="init">
> <argument ref="aggregatingSecurityCatalogSupplier" />
> <argument ref="securityRepo" />
> </bean>
> {code}
> Removing the generics in the constructor parameter makes it work:
> {code}
> Supplier<SecurityCatalog> securityCatalogSupplier
> {code}



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