Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1094962

Summary: [QE] (6.3.0) Missing type argument class causes deployment failure
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ron Šmeral <rsmeral>
Component: CDI/WeldAssignee: Martin Kouba <mkouba>
Status: CLOSED CURRENTRELEASE QA Contact: Ron Šmeral <rsmeral>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: amelicha, jharting, nziakova, pmuir
Target Milestone: ER5   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
EAP 6.3.0.ER3
Last Closed: 2014-06-28 15:25:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1098119    
Bug Blocks:    
Attachments:
Description Flags
Reproducer none

Description Ron Šmeral 2014-05-06 18:48:57 UTC
Created attachment 892965 [details]
Reproducer

Description of problem:
If a class which is used as type argument is missing from the deployment, an exception is thrown and the deployment fails.

E.g., class Bar missing:

public class FooBarProducer {
    
    public Foo<Bar> produceFooBar() {
        return new Foo<Bar>();
    }
}

Result:
...
Caused by: org.jboss.weld.exceptions.WeldException: WELD-000830 Unable to load the cache value for the key class reproducer.FooBarProducer
 at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:73)
 ...
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.TypeNotPresentException: Type reproducer.Bar not present
 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
 ...
Caused by: java.lang.TypeNotPresentException: Type reproducer.Bar not present
 at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) [rt.jar:1.7.0_17]
 ...
Caused by: java.lang.ClassNotFoundException: reproducer.Bar from [Module "deployment.0d036027-2297-41de-95ae-9d2d1dd562ca.jar:main" from Service Module Loader]
 at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1]
 ...


Version-Release number of selected component (if applicable):
EAP 6.3.0.ER3

How reproducible:
Run mvn clean test in the attached reproducer.

Actual results:
Deployment failure.

Expected results:
Successful deployment (ignoring the broken class).

Comment 1 Ron Šmeral 2014-05-09 12:56:18 UTC
This affects WFK 2.6.

It will be certified on EAP 6.3 and will contain DeltaSpike 0.7, which contains a component QuartzSchedulerProducer, which should be just ignored on deployment in case Quartz library is not bundled. This bug however causes a deployment failure for any deployment with bundled DeltaSpike Scheduler module.

Failed DeltaSpike test:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-60-Weld-DeltaSpike-integration/86/jdk=ibm16,label=(RHEL5%20%7C%7C%20RHEL6)/testReport/org.apache.deltaspike.test.scheduler.custom/CustomSchedulerWarFileTest/org_apache_deltaspike_test_scheduler_custom_CustomSchedulerWarFileTest/

Comment 2 Marek Schmidt 2014-06-10 10:51:38 UTC
I believe this should have been ON_QA already.

Comment 3 Ron Šmeral 2014-06-10 12:20:25 UTC
Verified on ER7.

Both, the reproducer and the DS tests pass.