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

Bug 832389

Summary: Errai: Broken EAR scanning on Windows
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: ErraiAssignee: Pavel SLegr <pslegr>
Status: CLOSED CURRENTRELEASE QA Contact: thradec
Severity: high Docs Contact:
Priority: urgent    
Version: 2.0.0.ER8CC: cbrock, csadilek, jfuerth, kpiwko, mnovotny, myarboro, pslegr, rnewton, thradec
Target Milestone: ---   
Target Release: 2.0.0.CR1   
Hardware: Unspecified   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Windows 2008 r2 64bit JDK 7
Last Closed: 2012-06-22 07:32:18 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:
Attachments:
Description Flags
Patch none

Description Karel Piwko 2012-06-15 09:56:40 UTC
Description of problem:

Annotation scanner in Errai does not seem to handle URL classpaths on windows correctly. 

How reproducible:

Always.

Steps to Reproduce:
1. Run integration tests over Errai src distribution. 
  
Actual results:

Didn't find @Local annotated class FunAnnotatedClientClass in ear-war nesting
Stacktrace

junit.framework.AssertionFailedError: Didn't find @Local annotated class FunAnnotatedClientClass in ear-war nesting
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.jboss.errai.bus.tests.PackageScanTest.testEarScan(PackageScanTest.java:74)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)
Standard Output

Scan time: 41

Expected results:

Passing.

Additional info:

https://hudson.qa.jboss.com/hudson/view/WFK/view/WFK-2.0/job/wfk-2.0-errai-eap6/CONTAINER=eap6,FRAMEWORK=errai,LABEL=Win2k8r2_x86_64,USE_PRIVATE_REPOSITORY_CACHE=true,jdk=java17_default/

Comment 1 thradec 2012-06-16 12:18:40 UTC
This bug is in class `org.jboss.errai.common.metadata.PackagingUtil` method `findActualDeploymentFile`, where is like path separator used string "/" instead `File.separator`. Const `File.separator` should be used as well another places.

Comment 2 Karel Piwko 2012-06-18 06:28:57 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Annotation scanning of WARs included in EAR package does not work properly in Windows based environments.

Comment 3 mark yarborough 2012-06-18 15:23:58 UTC
Patch en route from QE will be attached to this bug and then pslegr will include the patch in an Errai re-build

Comment 4 thradec 2012-06-18 16:16:37 UTC
Created attachment 592702 [details]
Patch

Comment 6 JBoss JIRA Server 2012-06-19 05:42:18 UTC
Tomas Hradec <thradec> made a comment on jira ERRAI-322

patch

Comment 8 Rebecca Newton 2012-06-19 06:00:49 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Annotation scanning of WARs included in EAR package does not work properly in Windows based environments.+Annotation scanning of WARs included in EAR package did not work properly in Windows based environments but this issue is fixed in the JBoss Web Framework Kit 2 release.

Comment 10 Pavel SLegr 2012-06-19 07:01:14 UTC
backported into Errai-2.0.1 - WFK2 CR1 with 
http://git.app.eng.bos.redhat.com/?p=errai/errai.git;a=commit;h=9c24a52cb135b43e1bb122f1e00b27e30cfd07aa

Comment 11 JBoss JIRA Server 2012-06-19 10:23:21 UTC
Pavel Slegr <pslegr> updated the status of jira ERRAI-322 to Coding In Progress

Comment 12 JBoss JIRA Server 2012-06-19 10:26:54 UTC
Pavel Slegr <pslegr> made a comment on jira ERRAI-322

Fixed upstream with https://github.com/pslegr/errai/commit/b134244cb0a02f0c7cb6ffdd32763bb25c5b7d18 & asked for pull into 2.0.1 and 2.1.0
https://github.com/errai/errai/pull/7, https://github.com/errai/errai/pull/8

Comment 13 Marek Novotny 2012-06-19 11:54:50 UTC
new build with fix was picked up in WFK aggregator build

Comment 14 JBoss JIRA Server 2012-06-19 14:39:23 UTC
Christian Sadilek <csadilek> updated the status of jira ERRAI-322 to Resolved

Comment 15 JBoss JIRA Server 2012-06-19 14:39:23 UTC
Christian Sadilek <csadilek> made a comment on jira ERRAI-322

Thanks! Pull requests merged.

Comment 17 Rebecca Newton 2012-06-20 05:56:49 UTC
Deleted Technical Notes Contents.

Old Contents:
Annotation scanning of WARs included in EAR package did not work properly in Windows based environments but this issue is fixed in the JBoss Web Framework Kit 2 release.

Comment 18 Karel Piwko 2012-06-20 14:20:17 UTC
Verified, classpath scanning works correctly on windows.

Comment 20 JBoss JIRA Server 2012-10-19 20:08:33 UTC
Christian Sadilek <csadilek> updated the status of jira ERRAI-322 to Closed