Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 224843 - Can not load datapool file while running a Juint test
Summary: Can not load datapool file while running a Juint test
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 blocker (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 227770 (view as bug list)
Depends on: 202695
Blocks:
  Show dependency tree
 
Reported: 2008-03-31 04:22 EDT by Xin Ying Huang CLA
Modified: 2016-05-05 10:29 EDT (History)
12 users (show)

See Also:
dmorris: review+
jcayne: review+


Attachments
Patch for #3. (1.63 KB, patch)
2008-04-01 09:07 EDT, Paul Slauenwhite CLA
no flags Details | Diff
Patch for #2. (1.91 KB, patch)
2008-04-01 09:31 EDT, Paul Slauenwhite CLA
no flags Details | Diff
Patch for #15 (778 bytes, patch)
2008-04-01 10:18 EDT, Kiryl Kazakevich CLA
no flags Details | Diff
Patch for commnet #7. (3.36 KB, patch)
2008-04-01 13:17 EDT, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xin Ying Huang CLA 2008-03-31 04:22:54 EDT
Build ID: tptp45 i6

Steps To Reproduce:
1.Set up Juint test enviroment which followed guide in Eclipse help content .
Guide link :
 http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.hyades.test.doc.user/samples/saccessdp.htm

2.Import shoppingCartDatapool.datapool into MyShoppingCartTest.java

3.set up related Deployment ,location , artifact 

4.run Junit test using above setting

5.Test failed ,report below error :
   org.eclipse.hyades.execution.runtime.datapool.DatapoolException: IWAT3056E Datapool could not be loaded from file c:\work\develop\TPTP_EncryptedDatapool\m6\workspace\datapoolExample\src\shoppingCartDatapool.datapool
	at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308)
	at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.load(Common_DatapoolFactoryImpl.java:435)
	at MyShoppingCartTest.setUp(MyShoppingCartTest.java:57)
	at junit.framework.TestCase.runBare(TestCase.java:128)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at org.eclipse.hyades.test.common.junit.HyadesTestCase.run(HyadesTestCase.java:172)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338)
	at org.eclipse.hyades.test.common.junit.HyadesTestRunner.run(HyadesTestRunner.java:504)
	at org.eclipse.hyades.test.java.runner.HyadesJUnitRunner.main(HyadesJUnitRunner.java:117)



More information:
Comment 1 Paul Slauenwhite CLA 2008-04-01 07:44:05 EDT
This problem is caused by a 'java.lang.NoClassDefFoundError: org.eclipse.hyades.models.hierarchy.util.HierarchyURIConverterImpl' exception being thrown in org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(File, boolean) when the resource is retrieved from the resource:

Resource res = resourceSet.getResource(URI.createFileURI(dpAbsolutePath), true);
Comment 2 Paul Slauenwhite CLA 2008-04-01 08:29:10 EDT
The root cause of the exception is a missing dependency.  When the TPTP Models plug-in was split into two plug-ins under https://bugs.eclipse.org/bugs/show_bug.cgi?id=208719 (split curent Models plugin into LTA model, Hierarchy and Models), the old org.eclipse.tptp.platform.models plug-in dependent on the new org.eclipse.tptp.platform.models.hierarchy plug-in.  

However, this new org.eclipse.tptp.platform.models.hierarchy plug-in was not packaged or configured with the Agent Controller and more importantly, not configured in the HyadesTestingSession, provided by the Agent Controller configuration in the org.eclipse.hyades.test.tools.core plug-in. 

Comment 3 Paul Slauenwhite CLA 2008-04-01 08:30:39 EDT
Adding Joanna since the fix will include changes to Platform components.
Comment 4 Paul Slauenwhite CLA 2008-04-01 08:48:12 EDT
Joel, we need to package the org.eclipse.tptp.platform.models.hierarchy plug-in with the Agent Controller.  Can you attach a patch for this change so we can request PMC for all of the changes under the same defect?  Thanks.
Comment 5 Paul Slauenwhite CLA 2008-04-01 09:07:08 EDT
The fix is to:

1) Package the org.eclipse.tptp.platform.models.hierarchy plug-in
with the Agent Controller.

2) Configure the org.eclipse.tptp.platform.models.hierarchy plug-in
in the Agent Controller's serviceconfig.xml as a variable named CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS_HIERARCHY in the AgentControllerEnvironment.

3) Add the CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS_HIERARCHY variable to the classpath of the the HyadesTestingSession application in the Agent Controller
configuration in the org.eclipse.hyades.test.tools.core plug-in. 
Comment 6 Paul Slauenwhite CLA 2008-04-01 09:07:51 EDT
Created attachment 94353 [details]
Patch for #3.
Comment 7 Paul Slauenwhite CLA 2008-04-01 09:18:21 EDT
Joanna, is /org.eclipse.hyades.execution/iac-runtime/extensions/org.eclipse.hyades.test.tools.core/config/pluginconfig.xml still required for the IAC?  The contents seems dated and appear to be for the old IAC configuration since they are no longer packaged with the plug-in (see build.properties).
Comment 8 Paul Slauenwhite CLA 2008-04-01 09:31:00 EDT
Created attachment 94357 [details]
Patch for #2.
Comment 9 Paul Slauenwhite CLA 2008-04-01 09:31:47 EDT
Duwayne, can you please review the patch for #3?
Comment 10 Paul Slauenwhite CLA 2008-04-01 09:33:28 EDT
Jonathan, can you please review the patch for #2?
Comment 11 Paul Slauenwhite CLA 2008-04-01 09:36:16 EDT
Updating hours worked for creating and testing the patches.
Comment 12 DuWayne Morris CLA 2008-04-01 09:40:42 EDT
Reviewed patch for #3.

+1
Comment 13 Paul Slauenwhite CLA 2008-04-01 09:43:34 EDT
(In reply to comment #7)
> Joanna, is
> /org.eclipse.hyades.execution/iac-runtime/extensions/org.eclipse.hyades.test.tools.core/config/pluginconfig.xml
> still required for the IAC?  The contents seems dated and appear to be for the
> old IAC configuration since they are no longer packaged with the plug-in (see
> build.properties).
> 

The same question applies to /org.eclipse.tptp.platform.iac.administrator/src/org/eclipse/tptp/platform/iac/administrator/internal/test/AdminUtilTest.java?   Unlike the above file, this class is still packaged and shipped. 

That is, do we need to apply the same fixes to one or both of these files or are they no longer required.
Comment 14 Harm Sluiman CLA 2008-04-01 09:58:25 EDT
(In reply to comment #13)
> (In reply to comment #7)
> > Joanna, is
> > /org.eclipse.hyades.execution/iac-runtime/extensions/org.eclipse.hyades.test.tools.core/config/pluginconfig.xml
> > still required for the IAC?  The contents seems dated and appear to be for the
> > old IAC configuration since they are no longer packaged with the plug-in (see
> > build.properties).
> > 
> 
> The same question applies to
> /org.eclipse.tptp.platform.iac.administrator/src/org/eclipse/tptp/platform/iac/administrator/internal/test/AdminUtilTest.java?
>   Unlike the above file, this class is still packaged and shipped. 
> 
> That is, do we need to apply the same fixes to one or both of these files or
> are they no longer required.
> 

IAC should be depending on the other plugins and not have redundant content. This is basically a packaging issue and question unless you think the dependancy should not exist in the IAC configuration, and as hte Test project owner you would be the best to determine that ;-)

We need to start thinking about the standalone AC as an extract of the IAC and dependancies, plus additional remote use case support, rather than the remote AC  stuffed inside the Workbench (as the hsitory shows and the name implies)
Comment 15 Joel Cayne CLA 2008-04-01 10:01:02 EDT
(In reply to comment #4)
> Joel, we need to package the org.eclipse.tptp.platform.models.hierarchy plug-in
> with the Agent Controller.  Can you attach a patch for this change so we can
> request PMC for all of the changes under the same defect?  Thanks.

Hi Kiryl,

Can you please include the component org.eclipse.tptp.platform.models.hierarchy contained in the tptp.runtime-*.zip as part of the Agent Controller packaging for this defect?

Thanks
Comment 16 Harm Sluiman CLA 2008-04-01 10:02:07 EDT
(In reply to comment #15)
> (In reply to comment #4)
> > Joel, we need to package the org.eclipse.tptp.platform.models.hierarchy plug-in
> > with the Agent Controller.  Can you attach a patch for this change so we can
> > request PMC for all of the changes under the same defect?  Thanks.
> 
> Hi Kiryl,
> 
> Can you please include the component org.eclipse.tptp.platform.models.hierarchy
> contained in the tptp.runtime-*.zip as part of the Agent Controller packaging
> for this defect?
> 
> Thanks
> 

BTW, this fix also means the packaging of the standalone AC components of the
LTA will need to be checked for redundancies given this is now part of the base
AC.
Comment 17 Kiryl Kazakevich CLA 2008-04-01 10:18:04 EDT
Created attachment 94364 [details]
Patch for #15

(In reply to comment #15)
> ...
> Hi Kiryl,
> 
> Can you please include the component org.eclipse.tptp.platform.models.hierarchy
> contained in the tptp.runtime-*.zip as part of the Agent Controller packaging
> for this defect?
> 
> Thanks

Hi Joel,

Attached is the required patch.

Thanks,
Kiryl
Comment 18 Jonathan West CLA 2008-04-01 10:25:31 EDT
(In reply to comment #10)
> Jonathan, can you please review the patch for #2?

Patch #2 is good.
Comment 19 Paul Slauenwhite CLA 2008-04-01 11:09:33 EDT
Joel, can you please review the patch for #1 (or #15)?
Comment 20 Paul Slauenwhite CLA 2008-04-01 11:10:47 EDT
(In reply to comment #16)

> BTW, this fix also means the packaging of the standalone AC components of the
> LTA will need to be checked for redundancies given this is now part of the base
> AC.

Excellent point!  

Alex: Can you check the LTA packages for redundancies?

Comment 21 Paul Slauenwhite CLA 2008-04-01 11:21:03 EDT
(In reply to comment #14)

> IAC should be depending on the other plugins and not have redundant content.
> This is basically a packaging issue and question unless you think the
> dependancy should not exist in the IAC configuration, and as hte Test project
> owner you would be the best to determine that ;-)

Harm, this was the motivation for the question.  The new dependency needs to exist in both the IAC and Agent Controller configurations.  The org.eclipse.hyades.test.tools.core plug-in has been modified to include this new dependency.  We need confirmation if these two additional files (/org.eclipse.hyades.execution/iac-runtime/extensions/org.eclipse.hyades.test.tools.core/config/pluginconfig.xml and /org.eclipse.tptp.platform.iac.administrator/src/org/eclipse/tptp/platform/iac/administrator/internal/test/AdminUtilTest.java) that make reference to org.eclipse.tptp.platform.models plug-in in context of the IAC configuration need to be updated or if they are no longer required.

Comment 22 Paul Slauenwhite CLA 2008-04-01 13:17:49 EDT
Created attachment 94393 [details]
Patch for commnet #7.
Comment 23 Paul Slauenwhite CLA 2008-04-01 13:18:32 EDT
(In reply to comment #22)
> Created an attachment (id=94393) [details]
> Patch for commnet #7.
> 

Jonathan, can you please review?
Comment 24 Jonathan West CLA 2008-04-01 13:21:47 EDT
> (In reply to comment #22)
> > Created an attachment (id=94393) [details] [details]
> > Patch for commnet #7.
> > 
> 
> Jonathan, can you please review?
> 

Patch is good.
Comment 25 Paul Slauenwhite CLA 2008-04-01 13:56:17 EDT
Patches reviewed, approved, and checked-in to CVS (HEAD).
Comment 26 Xin Ying Huang CLA 2008-04-11 10:25:20 EDT
I verified this defect using below build in my local enviroment :

a) agntctrl.win_ia32.sdk-TPTP-4.5.0-200804031156C

b) eclipse-SDK-3.4M6-win32

c) tptp.sdk-TPTP-4.5.0-200804031156C.zip

d)emf-runtime-2.4.0M6

e)xsd-runtime-2.4.0M6

But still met the same error :

org.eclipse.hyades.execution.runtime.datapool.DatapoolException: IWAT3056E Datapool could not be loaded from file C:\work\develop\TPTP_EncryptedDatapool\TPTP4.5.0\04087\wrokspace\datapoolExample\shoppingCartDatapool.datapool
	at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308)
	at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.load(Common_DatapoolFactoryImpl.java:435)
	at MyShoppingCartTest.setUp(MyShoppingCartTest.java:57)
	at junit.framework.TestCase.runBare(TestCase.java:128)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at org.eclipse.hyades.test.common.junit.HyadesTestCase.run(HyadesTestCase.java:172)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425)
	at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338)
	at org.eclipse.hyades.test.common.junit.HyadesTestRunner.run(HyadesTestRunner.java:504)
	at org.eclipse.hyades.test.java.runner.HyadesJUnitRunner.main(HyadesJUnitRunner.java:117)
Comment 27 Paul Slauenwhite CLA 2008-04-16 11:03:05 EDT
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=202695#c58.
Comment 28 Paul Slauenwhite CLA 2008-04-21 08:18:46 EDT
(In reply to comment #26)

We will fix this problem under defect https://bugs.eclipse.org/bugs/show_bug.cgi?id=227770.
Comment 29 Paul Slauenwhite CLA 2008-04-21 08:48:50 EDT
org.eclipse.hyades.execution.runtime.datapool.DatapoolException: IWAT3056E Datapool could not be loaded from file C:\WINDOWS\TEMP\deployment_root\tarman\D6FDA5781F1662D021A2D8F00CB411DD\D6FDA5781F1662D03A8C69300CB411DD.datapool
org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308)
org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.load(Common_DatapoolFactoryImpl.java:435)
Comment 30 Paul Slauenwhite CLA 2008-04-21 16:51:15 EDT
*** Bug 227770 has been marked as a duplicate of this bug. ***
Comment 31 Paul Slauenwhite CLA 2008-04-21 16:52:06 EDT
(In reply to comment #26)
> I verified this defect using below build in my local enviroment :
> 
> a) agntctrl.win_ia32.sdk-TPTP-4.5.0-200804031156C
> 
> b) eclipse-SDK-3.4M6-win32
> 
> c) tptp.sdk-TPTP-4.5.0-200804031156C.zip
> 
> d)emf-runtime-2.4.0M6
> 
> e)xsd-runtime-2.4.0M6
> 
> But still met the same error :
> 
> org.eclipse.hyades.execution.runtime.datapool.DatapoolException: IWAT3056E
> Datapool could not be loaded from file
> C:\work\develop\TPTP_EncryptedDatapool\TPTP4.5.0\04087\wrokspace\datapoolExample\shoppingCartDatapool.datapool
>         at
> org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308)
>         at
> org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.load(Common_DatapoolFactoryImpl.java:435)
>         at MyShoppingCartTest.setUp(MyShoppingCartTest.java:57)
>         at junit.framework.TestCase.runBare(TestCase.java:128)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:120)
>         at
> org.eclipse.hyades.test.common.junit.HyadesTestCase.run(HyadesTestCase.java:172)
>         at junit.framework.TestSuite.runTest(TestSuite.java:230)
>         at
> org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457)
>         at junit.framework.TestSuite.run(TestSuite.java:225)
>         at
> org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425)
>         at
> org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338)
>         at
> org.eclipse.hyades.test.common.junit.HyadesTestRunner.run(HyadesTestRunner.java:504)
>         at
> org.eclipse.hyades.test.java.runner.HyadesJUnitRunner.main(HyadesJUnitRunner.java:117)
> 

Xin, the symptoms for this defect cannot be reproduced using the 4.5 M6 driver (http://www.eclipse.org/tptp/home/downloads/?buildId=TPTP-4.5.0M6-200804031156) for both the JUnit and URL test types (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=227770#c5).
Comment 32 Xin Ying Huang CLA 2008-04-21 22:11:00 EDT
This defect is closed .