Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » NPE in AutomationClientAdapter
NPE in AutomationClientAdapter [message #140399] Tue, 17 February 2009 12:29 Go to next message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
Hi,

I am trying to launch a TPTP plugin unit test from ANT using the script
provided with the online help

http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. hyades.test.doc.user/tasks/texecuting-the-test-execution-ser vice.htm

I end up with the following results:

Looking at the sources suggest that something with the result property
is wrong ? Where and how do I have to set this?

Juergen

Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml
parsing buildfile
C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml with URI =
file:/C:/Workspaces/Continous/com.jasche.tptp.anothertest/fo o.xml
Project base dir set to: C:\Workspaces\Continous\com.jasche.tptp.anothertest
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `test' is [test]
Complete build sequence is [test, ]
test:
parsing buildfile
jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
with URI =
jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
[tptp:test] Test execution started.
[tptp:test] Test
'C:\Workspaces\Continous\com.jasche.tptp.anothertest\test-re sources\MyPluginTest.testsuite'
started.
[tptp:test]
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.core.internal.resources.ResourceException: Resource
'/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
does not exist.
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
[tptp:test] at
org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadModelElement(AbstractTestExecutionService.java:86 0)
[tptp:test] at
org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadTestSuite(AbstractTestExecutionService.java:879)
[tptp:test] at
org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.beforeLaunch(AbstractTestExecutionService.java:291)
[tptp:test] at
org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:589)
[tptp:test] at
org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
[tptp:test] at
org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:139)
[tptp:test] at
org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
[tptp:test] at java.lang.Thread.run(Unknown Source)
[tptp:test] Caused by:
org.eclipse.core.internal.resources.ResourceException: Resource
'/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
does not exist.
[tptp:test] at
org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
[tptp:test] at
org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
[tptp:test] at
org.eclipse.core.internal.resources.File.getContents(File.ja va:296)
[tptp:test] at
org.eclipse.core.internal.resources.File.getContents(File.ja va:287)
[tptp:test] at
org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl$WorkbenchHelper.createPlatformResourceInputStream(Hie rarchyURIConverterImpl.java:290)
[tptp:test] at
org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl.createPlatformResourceInputStream(HierarchyURIConvert erImpl.java:368)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:441)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:457)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1212)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
[tptp:test] at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
[tptp:test] ... 9 more

BUILD FAILED
C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml: 17:
java.lang.NullPointerException
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.get(Unknown Source)
at org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
at org.apache.tools.ant.Project.setProperty(Project.java:507)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
... 10 more
--- Nested Exception ---
java.lang.NullPointerException
at java.util.Hashtable.get(Unknown Source)
at org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
at org.apache.tools.ant.Project.setProperty(Project.java:507)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)

Total time: 7 seconds
Re: NPE in AutomationClientAdapter [message #140408 is a reply to message #140399] Wed, 18 February 2009 10:17 Go to previous messageGo to next message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------060606000003010604080608
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

My feeling is that I can prevent this error from happening if I delete
this workspaces meta forlder.

Though I get a different not always satisfying behaviour:

If I run the ant script from within eclipse but in a different JRE it
runs smothly (verification, execution, interogation)

If I run the ant script from within eclipse using the workspace JRE
execution fails throwing the stack trace below

The NPE seems to be caused by a not set *properties* field which should
be done in the init operation of the AutomationClientAdapter.

There is something in the workspace log (see attachment) what I am no be
able to correlate to the output of the console ?!

/Juergen

Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml
parsing buildfile C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml
with URI = file:/C:/Workspaces/Continous/com.jasche.tptp.update/foo.xml
Project base dir set to: C:\Workspaces\Continous\com.jasche.tptp.update
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
Arguments: -v -Dorg.eclipse.ant.core.ANT_PROCESS_ID=1234951410154
Build sequence for target(s) `test-execution' is [test-execution]
Complete build sequence is [test-execution, ]

test-execution:
dropping c:\Users\jasche\.ant\lib\ant-tptp.jar from path as it doesn't exist
parsing buildfile
bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
with URI =
bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
parsing buildfile
bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
with URI =
bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
parsing buildfile
jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
with URI =
jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
[echo] Executing test
suite...'C:\Workspaces\Continous\com.jasche.tptp.anothertest '
parsing buildfile
bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
with URI =
bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
parsing buildfile
bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
with URI =
bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
parsing buildfile
jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
with URI =
jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml

BUILD FAILED
C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml:17:
java.lang.NullPointerException
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:13 4)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:456)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDe legate$1.run(AntLaunchDelegate.java:247)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addConfiguredProperty(AutomationCli entAdapter.java:119)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:176)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:131)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
... 24 more
--- Nested Exception ---
java.lang.NullPointerException
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addConfiguredProperty(AutomationCli entAdapter.java:119)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:176)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:131)
at
org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:13 4)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:456)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDe legate$1.run(AntLaunchDelegate.java:247)
at java.lang.Thread.run(Unknown Source)

Total time: 444 milliseconds



--------------060606000003010604080608
Content-Type: text/plain;
name=".log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename=".log"

!SESSION 2009-02-18 11:01:50.609 -----------------------------------------------
eclipse.buildId=I20080617-2000
java.version=1.6.0_10-rc
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments: -application org.eclipse.hyades.execution.server
Command-line arguments: -os win32 -ws win32 -arch x86 -application org.eclipse.hyades.execution.server -data C:\Workspaces\Continous

!ENTRY org.eclipse.core.resources 2 10035 2009-02-18 11:01:52.843
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:04.116
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:05.118
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.072
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.112
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.246
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.313
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.544
!MESSAGE Can't find bundle for base name feature, locale de_DE

!ENTRY org.eclipse.osgi 4 0 2009-02-18 11:02:28.304
!MESSAGE An error occurred while automatically activating bundle org.eclipse.debug.ui (62).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.debug.internal.ui.DebugUIPlugin.start() of bundle org.eclipse.debug.ui.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1028)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
at org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.core.internal.variables.DynamicVariable.getValue (DynamicVariable.java:47)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .resolve(StringSubstitutionEngine.java:267)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .substitute(StringSubstitutionEngine.java:192)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .performStringSubstitution(StringSubstitutionEngine.java:86)
at org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:567)
at org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:350)
at org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter.setupExecutableObject(AutoGUIExecObjAdapter.java:10 5)
at org.eclipse.hyades.execution.harness.util.ExecutionAdapterUt ilities.adaptExecutableObject(ExecutionAdapterUtilities.java :96)
at org.eclipse.hyades.execution.harness.TestExecutionHarness.la unchTestExecution(TestExecutionHarness.java:2001)
at org.eclipse.hyades.execution.harness.TestExecutionHarness.ac cess$1(TestExecutionHarness.java:1810)
at org.eclipse.hyades.execution.harness.TestExecutionHarness$2. run(TestExecutionHarness.java:730)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingReso urceManager.startup(LaunchingResourceManager.java:528)
at org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingReso urceManager(DebugUIPlugin.java:305)
at org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:502)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
... 32 more
Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingReso urceManager.startup(LaunchingResourceManager.java:528)
at org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingReso urceManager(DebugUIPlugin.java:305)
at org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:502)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
at org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.core.internal.variables.DynamicVariable.getValue (DynamicVariable.java:47)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .resolve(StringSubstitutionEngine.java:267)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .substitute(StringSubstitutionEngine.java:192)
at org.eclipse.core.internal.variables.StringSubstitutionEngine .performStringSubstitution(StringSubstitutionEngine.java:86)
at org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:567)
at org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:350)
at org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter.setupExecutableObject(AutoGUIExecObjAdapter.java:10 5)
at org.eclipse.hyades.execution.harness.util.ExecutionAdapterUt ilities.adaptExecutableObject(ExecutionAdapterUtilities.java :96)
at org.eclipse.hyades.execution.harness.TestExecutionHarness.la unchTestExecution(TestExecutionHarness.java:2001)
at org.eclipse.hyades.execution.harness.TestExecutionHarness.ac cess$1(TestExecutionHarness.java:1810)
at org.eclipse.hyades.execution.harness.TestExecutionHarness$2. run(TestExecutionHarness.java:730)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

--------------060606000003010604080608--
Re: NPE in AutomationClientAdapter [message #140413 is a reply to message #140399] Wed, 18 February 2009 11:36 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Juergen,
It appears that the Ant task cannot locate your test suite. Please
follow our ASF tests as an example:

http://dev.eclipse.org/viewcvs/index.cgi/test-results/test/o rg.eclipse.hyades.test.core.services.tests/resources/Ant/bui ld.xml?root=TPTP_Project&view=log

Paul
"Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
news:gneaj2$pta$1@build.eclipse.org...
> Hi,
>
> I am trying to launch a TPTP plugin unit test from ANT using the script
> provided with the online help
>
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. hyades.test.doc.user/tasks/texecuting-the-test-execution-ser vice.htm
>
> I end up with the following results:
>
> Looking at the sources suggest that something with the result property is
> wrong ? Where and how do I have to set this?
>
> Juergen
>
> Apache Ant version 1.7.0 compiled on December 13 2006
> Buildfile: C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml
> parsing buildfile
> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml with URI =
> file:/C:/Workspaces/Continous/com.jasche.tptp.anothertest/fo o.xml
> Project base dir set to:
> C:\Workspaces\Continous\com.jasche.tptp.anothertest
> [antlib:org.apache.tools.ant] Could not load definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> Build sequence for target(s) `test' is [test]
> Complete build sequence is [test, ]
> test:
> parsing buildfile
> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
> with URI =
> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
> [tptp:test] Test execution started.
> [tptp:test] Test
> 'C:\Workspaces\Continous\com.jasche.tptp.anothertest\test-re sources\MyPluginTest.testsuite'
> started.
> [tptp:test]
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> org.eclipse.core.internal.resources.ResourceException: Resource
> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
> does not exist.
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
> [tptp:test] at
> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadModelElement(AbstractTestExecutionService.java:86 0)
> [tptp:test] at
> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadTestSuite(AbstractTestExecutionService.java:879)
> [tptp:test] at
> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.beforeLaunch(AbstractTestExecutionService.java:291)
> [tptp:test] at
> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:589)
> [tptp:test] at
> org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
> [tptp:test] at
> org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:139)
> [tptp:test] at
> org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
> [tptp:test] at java.lang.Thread.run(Unknown Source)
> [tptp:test] Caused by:
> org.eclipse.core.internal.resources.ResourceException: Resource
> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
> does not exist.
> [tptp:test] at
> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
> [tptp:test] at
> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
> [tptp:test] at
> org.eclipse.core.internal.resources.File.getContents(File.ja va:296)
> [tptp:test] at
> org.eclipse.core.internal.resources.File.getContents(File.ja va:287)
> [tptp:test] at
> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl$WorkbenchHelper.createPlatformResourceInputStream(Hie rarchyURIConverterImpl.java:290)
> [tptp:test] at
> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl.createPlatformResourceInputStream(HierarchyURIConvert erImpl.java:368)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:441)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:457)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1212)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
> [tptp:test] at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
> [tptp:test] ... 9 more
>
> BUILD FAILED
> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml: 17:
> java.lang.NullPointerException
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
> at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
> at
> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
> at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
> at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.get(Unknown Source)
> at
> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
> at org.apache.tools.ant.Project.setProperty(Project.java:507)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> ... 10 more
> --- Nested Exception ---
> java.lang.NullPointerException
> at java.util.Hashtable.get(Unknown Source)
> at
> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
> at org.apache.tools.ant.Project.setProperty(Project.java:507)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
> at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
> at
> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
> at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
> at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
>
> Total time: 7 seconds
Re: NPE in AutomationClientAdapter [message #140422 is a reply to message #140408] Wed, 18 February 2009 11:49 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Juergen,
I believe you are running into one or more of the following defects
related to running TPTP JUnit Plug-in test via ASF:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=210292 Exceptions when
running ASF tasks.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=220391 Connection property
does not deploy all dependencies and execute JUnit Plug-in Tests correctly.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210289 ANT test results
property requires trailing slash to specify location
https://bugs.eclipse.org/bugs/show_bug.cgi?id=222760 Clear remote workspace
launch does not work for remote test execution
https://bugs.eclipse.org/bugs/show_bug.cgi?id=147859
IExecutionDeploymentAdapter.cleanUpTestAssets no longer called

Paul
"Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
news:gngn74$uv1$1@build.eclipse.org...
> My feeling is that I can prevent this error from happening if I delete
> this workspaces meta forlder.
>
> Though I get a different not always satisfying behaviour:
>
> If I run the ant script from within eclipse but in a different JRE it
> runs smothly (verification, execution, interogation)
>
> If I run the ant script from within eclipse using the workspace JRE
> execution fails throwing the stack trace below
>
> The NPE seems to be caused by a not set *properties* field which should
> be done in the init operation of the AutomationClientAdapter.
>
> There is something in the workspace log (see attachment) what I am no be
> able to correlate to the output of the console ?!
>
> /Juergen
>
> Apache Ant version 1.7.0 compiled on December 13 2006
> Buildfile: C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml
> parsing buildfile C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml
> with URI = file:/C:/Workspaces/Continous/com.jasche.tptp.update/foo.xml
> Project base dir set to: C:\Workspaces\Continous\com.jasche.tptp.update
> [antlib:org.apache.tools.ant] Could not load definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> Arguments: -v -Dorg.eclipse.ant.core.ANT_PROCESS_ID=1234951410154
> Build sequence for target(s) `test-execution' is [test-execution]
> Complete build sequence is [test-execution, ]
>
> test-execution:
> dropping c:\Users\jasche\.ant\lib\ant-tptp.jar from path as it doesn't
> exist
> parsing buildfile
> bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
> with URI =
> bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
> parsing buildfile
> bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
> with URI =
> bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
> parsing buildfile
> jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
> with URI =
> jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
> [echo] Executing test
> suite...'C:\Workspaces\Continous\com.jasche.tptp.anothertest '
> parsing buildfile
> bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
> with URI =
> bundleresource://325/org/eclipse/hyades/automation/client/ad apters/ant/antlib.xml
> parsing buildfile
> bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
> with URI =
> bundleresource://325:1/org/eclipse/hyades/automation/client/ adapters/ant/antlib.xml
> parsing buildfile
> jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
> with URI =
> jar:file:C:/java/test/eclipse/plugins/org.eclipse.hyades.exe cution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyade s/automation/client/adapters/ant/antlib.xml
>
> BUILD FAILED
> C:\Workspaces\Continous\com.jasche.tptp.update\foo.xml:17:
> java.lang.NullPointerException
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
> at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:13 4)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
> at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
> at
> org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
> at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
> at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:456)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDe legate$1.run(AntLaunchDelegate.java:247)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addConfiguredProperty(AutomationCli entAdapter.java:119)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:176)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:131)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :591)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> ... 24 more
> --- Nested Exception ---
> java.lang.NullPointerException
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addConfiguredProperty(AutomationCli entAdapter.java:119)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:176)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Automation.addProperty(AutomationClientAdapter .java:131)
> at
> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :591)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:13 4)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
> at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
> at
> org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
> at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
> at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:456)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDe legate$1.run(AntLaunchDelegate.java:247)
> at java.lang.Thread.run(Unknown Source)
>
> Total time: 444 milliseconds
>
>
>


------------------------------------------------------------ --------------------


> !SESSION 2009-02-18
> 11:01:50.609 -----------------------------------------------
> eclipse.buildId=I20080617-2000
> java.version=1.6.0_10-rc
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
> Framework arguments: -application org.eclipse.hyades.execution.server
> Command-line arguments: -os win32 -ws win32 -arch x86 -application
> org.eclipse.hyades.execution.server -data C:\Workspaces\Continous
>
> !ENTRY org.eclipse.core.resources 2 10035 2009-02-18 11:01:52.843
> !MESSAGE The workspace exited with unsaved changes in the previous
> session; refreshing workspace to recover changes.
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:04.116
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:05.118
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.072
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.112
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.246
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.313
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.update.configurator 4 0 2009-02-18 11:02:06.544
> !MESSAGE Can't find bundle for base name feature, locale de_DE
>
> !ENTRY org.eclipse.osgi 4 0 2009-02-18 11:02:28.304
> !MESSAGE An error occurred while automatically activating bundle
> org.eclipse.debug.ui (62).
> !STACK 0
> org.osgi.framework.BundleException: Exception in
> org.eclipse.debug.internal.ui.DebugUIPlugin.start() of bundle
> org.eclipse.debug.ui.
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1028)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
> at
> org.eclipse.core.internal.variables.DynamicVariable.getValue (DynamicVariable.java:47)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .resolve(StringSubstitutionEngine.java:267)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .substitute(StringSubstitutionEngine.java:192)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .performStringSubstitution(StringSubstitutionEngine.java:86)
> at
> org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:567)
> at
> org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:350)
> at
> org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter.setupExecutableObject(AutoGUIExecObjAdapter.java:10 5)
> at
> org.eclipse.hyades.execution.harness.util.ExecutionAdapterUt ilities.adaptExecutableObject(ExecutionAdapterUtilities.java :96)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness.la unchTestExecution(TestExecutionHarness.java:2001)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness.ac cess$1(TestExecutionHarness.java:1810)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness$2. run(TestExecutionHarness.java:730)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.lang.IllegalStateException: Workbench has not been created
> yet.
> at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
> at
> org.eclipse.debug.internal.ui.contextlaunching.LaunchingReso urceManager.startup(LaunchingResourceManager.java:528)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingReso urceManager(DebugUIPlugin.java:305)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:502)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
> ... 32 more
> Root exception:
> java.lang.IllegalStateException: Workbench has not been created yet.
> at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
> at
> org.eclipse.debug.internal.ui.contextlaunching.LaunchingReso urceManager.startup(LaunchingResourceManager.java:528)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingReso urceManager(DebugUIPlugin.java:305)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:502)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
> at
> org.eclipse.core.internal.variables.DynamicVariable.getValue (DynamicVariable.java:47)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .resolve(StringSubstitutionEngine.java:267)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .substitute(StringSubstitutionEngine.java:192)
> at
> org.eclipse.core.internal.variables.StringSubstitutionEngine .performStringSubstitution(StringSubstitutionEngine.java:86)
> at
> org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:567)
> at
> org.eclipse.core.internal.variables.StringVariableManager.pe rformStringSubstitution(StringVariableManager.java:350)
> at
> org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter.setupExecutableObject(AutoGUIExecObjAdapter.java:10 5)
> at
> org.eclipse.hyades.execution.harness.util.ExecutionAdapterUt ilities.adaptExecutableObject(ExecutionAdapterUtilities.java :96)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness.la unchTestExecution(TestExecutionHarness.java:2001)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness.ac cess$1(TestExecutionHarness.java:1810)
> at
> org.eclipse.hyades.execution.harness.TestExecutionHarness$2. run(TestExecutionHarness.java:730)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
Re: NPE in AutomationClientAdapter [message #140436 is a reply to message #140413] Wed, 18 February 2009 13:01 Go to previous messageGo to next message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
Hi Paul,

my understanding is that you don't run these test within workspace JRE.
Am I right ?

The ant task at the current stage of development are supposed to be used
only out of process ?!

/juergen

Paul Slauenwhite schrieb:
> Hi Juergen,
> It appears that the Ant task cannot locate your test suite. Please
> follow our ASF tests as an example:
>
> http://dev.eclipse.org/viewcvs/index.cgi/test-results/test/o rg.eclipse.hyades.test.core.services.tests/resources/Ant/bui ld.xml?root=TPTP_Project&view=log
>
> Paul
> "Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
> news:gneaj2$pta$1@build.eclipse.org...
>> Hi,
>>
>> I am trying to launch a TPTP plugin unit test from ANT using the script
>> provided with the online help
>>
>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. hyades.test.doc.user/tasks/texecuting-the-test-execution-ser vice.htm
>>
>> I end up with the following results:
>>
>> Looking at the sources suggest that something with the result property is
>> wrong ? Where and how do I have to set this?
>>
>> Juergen
>>
>> Apache Ant version 1.7.0 compiled on December 13 2006
>> Buildfile: C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml
>> parsing buildfile
>> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml with URI =
>> file:/C:/Workspaces/Continous/com.jasche.tptp.anothertest/fo o.xml
>> Project base dir set to:
>> C:\Workspaces\Continous\com.jasche.tptp.anothertest
>> [antlib:org.apache.tools.ant] Could not load definitions from resource
>> org/apache/tools/ant/antlib.xml. It could not be found.
>> Build sequence for target(s) `test' is [test]
>> Complete build sequence is [test, ]
>> test:
>> parsing buildfile
>> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
>> with URI =
>> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
>> [tptp:test] Test execution started.
>> [tptp:test] Test
>> 'C:\Workspaces\Continous\com.jasche.tptp.anothertest\test-re sources\MyPluginTest.testsuite'
>> started.
>> [tptp:test]
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>> org.eclipse.core.internal.resources.ResourceException: Resource
>> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
>> does not exist.
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
>> [tptp:test] at
>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadModelElement(AbstractTestExecutionService.java:86 0)
>> [tptp:test] at
>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadTestSuite(AbstractTestExecutionService.java:879)
>> [tptp:test] at
>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.beforeLaunch(AbstractTestExecutionService.java:291)
>> [tptp:test] at
>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:589)
>> [tptp:test] at
>> org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
>> [tptp:test] at
>> org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:139)
>> [tptp:test] at
>> org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
>> [tptp:test] at java.lang.Thread.run(Unknown Source)
>> [tptp:test] Caused by:
>> org.eclipse.core.internal.resources.ResourceException: Resource
>> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
>> does not exist.
>> [tptp:test] at
>> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
>> [tptp:test] at
>> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
>> [tptp:test] at
>> org.eclipse.core.internal.resources.File.getContents(File.ja va:296)
>> [tptp:test] at
>> org.eclipse.core.internal.resources.File.getContents(File.ja va:287)
>> [tptp:test] at
>> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl$WorkbenchHelper.createPlatformResourceInputStream(Hie rarchyURIConverterImpl.java:290)
>> [tptp:test] at
>> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl.createPlatformResourceInputStream(HierarchyURIConvert erImpl.java:368)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:441)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:457)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1212)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
>> [tptp:test] at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
>> [tptp:test] ... 9 more
>>
>> BUILD FAILED
>> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml: 17:
>> java.lang.NullPointerException
>> at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
>> at org.apache.tools.ant.Task.perform(Task.java:348)
>> at org.apache.tools.ant.Target.execute(Target.java:357)
>> at org.apache.tools.ant.Target.performTasks(Target.java:385)
>> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
>> at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
>> at
>> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
>> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
>> at
>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
>> at
>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
>> Caused by: java.lang.NullPointerException
>> at java.util.Hashtable.get(Unknown Source)
>> at
>> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
>> at org.apache.tools.ant.Project.setProperty(Project.java:507)
>> at
>> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
>> ... 10 more
>> --- Nested Exception ---
>> java.lang.NullPointerException
>> at java.util.Hashtable.get(Unknown Source)
>> at
>> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
>> at org.apache.tools.ant.Project.setProperty(Project.java:507)
>> at
>> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
>> at org.apache.tools.ant.Task.perform(Task.java:348)
>> at org.apache.tools.ant.Target.execute(Target.java:357)
>> at org.apache.tools.ant.Target.performTasks(Target.java:385)
>> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
>> at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
>> at
>> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
>> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
>> at
>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
>> at
>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
>>
>> Total time: 7 seconds
>
>
Re: NPE in AutomationClientAdapter [message #140442 is a reply to message #140422] Wed, 18 February 2009 17:50 Go to previous messageGo to next message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
looks like the client adapter is activated differently dependent upon if
the ant script is launched within the workspace JRE or in its own.

If running in its own the client adapter receives setProject() and
init() calls before execute() is called.

If running within the workspace JRE only execute() is called.

The upshot is that the properties are instantiated in the init() method
which explains the NPEs. Though calling init() from execute() in case
*properties* is not initialized won't help because *project* is not
initialized. I guess the *project* field has to be set from within ant.

To me it seems that we either have a problem with the ant plugin that
does not adhere to the protocol or the client adapter is missing
something about inherent subtleties about eclipse and ant.

/Juergen
Re: NPE in AutomationClientAdapter [message #140510 is a reply to message #140436] Thu, 19 February 2009 11:52 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Juergen,
The test executed in a separate JVM process. However, the Ant (and
Java) should be able to be used from the Eclipse IDE, except for the
following defect:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=210292 Exceptions when running
ASF tasks.

Paul
"Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
news:gnh0qs$fem$1@build.eclipse.org...
> Hi Paul,
>
> my understanding is that you don't run these test within workspace JRE. Am
> I right ?
>
> The ant task at the current stage of development are supposed to be used
> only out of process ?!
>
> /juergen
>
> Paul Slauenwhite schrieb:
>> Hi Juergen,
>> It appears that the Ant task cannot locate your test suite. Please
>> follow our ASF tests as an example:
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/test-results/test/o rg.eclipse.hyades.test.core.services.tests/resources/Ant/bui ld.xml?root=TPTP_Project&view=log
>>
>> Paul
>> "Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in
>> message news:gneaj2$pta$1@build.eclipse.org...
>>> Hi,
>>>
>>> I am trying to launch a TPTP plugin unit test from ANT using the script
>>> provided with the online help
>>>
>>> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. hyades.test.doc.user/tasks/texecuting-the-test-execution-ser vice.htm
>>>
>>> I end up with the following results:
>>>
>>> Looking at the sources suggest that something with the result property
>>> is wrong ? Where and how do I have to set this?
>>>
>>> Juergen
>>>
>>> Apache Ant version 1.7.0 compiled on December 13 2006
>>> Buildfile: C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml
>>> parsing buildfile
>>> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml with URI =
>>> file:/C:/Workspaces/Continous/com.jasche.tptp.anothertest/fo o.xml
>>> Project base dir set to:
>>> C:\Workspaces\Continous\com.jasche.tptp.anothertest
>>> [antlib:org.apache.tools.ant] Could not load definitions from resource
>>> org/apache/tools/ant/antlib.xml. It could not be found.
>>> Build sequence for target(s) `test' is [test]
>>> Complete build sequence is [test, ]
>>> test:
>>> parsing buildfile
>>> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
>>> with URI =
>>> jar:file:/C:/java/test/eclipse/plugins/org.eclipse.hyades.ex ecution_4.4.201.v200808111750/ant-tptp.jar!/org/eclipse/hyad es/automation/client/adapters/ant/antlib.xml
>>> [tptp:test] Test execution started.
>>> [tptp:test] Test
>>> 'C:\Workspaces\Continous\com.jasche.tptp.anothertest\test-re sources\MyPluginTest.testsuite'
>>> started.
>>> [tptp:test]
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>> org.eclipse.core.internal.resources.ResourceException: Resource
>>> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
>>> does not exist.
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
>>> [tptp:test] at
>>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadModelElement(AbstractTestExecutionService.java:86 0)
>>> [tptp:test] at
>>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.loadTestSuite(AbstractTestExecutionService.java:879)
>>> [tptp:test] at
>>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.beforeLaunch(AbstractTestExecutionService.java:291)
>>> [tptp:test] at
>>> org.eclipse.hyades.test.core.services.AbstractTestExecutionS ervice.execute(AbstractTestExecutionService.java:589)
>>> [tptp:test] at
>>> org.eclipse.hyades.automation.server.AbstractService.execute (AbstractService.java:43)
>>> [tptp:test] at
>>> org.eclipse.hyades.automation.server.ServiceProxy$1.run(Serv iceProxy.java:139)
>>> [tptp:test] at
>>> org.eclipse.hyades.automation.core.utils.ReusableThread.run( ReusableThread.java:131)
>>> [tptp:test] at java.lang.Thread.run(Unknown Source)
>>> [tptp:test] Caused by:
>>> org.eclipse.core.internal.resources.ResourceException: Resource
>>> '/com.jasche.tptp.anothertest/Workspaces/Continous/com.jasch e.tptp.anothertest/test-resources/MyPluginTest.testsuite'
>>> does not exist.
>>> [tptp:test] at
>>> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:317)
>>> [tptp:test] at
>>> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
>>> [tptp:test] at
>>> org.eclipse.core.internal.resources.File.getContents(File.ja va:296)
>>> [tptp:test] at
>>> org.eclipse.core.internal.resources.File.getContents(File.ja va:287)
>>> [tptp:test] at
>>> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl$WorkbenchHelper.createPlatformResourceInputStream(Hie rarchyURIConverterImpl.java:290)
>>> [tptp:test] at
>>> org.eclipse.hyades.models.hierarchy.util.HierarchyURIConvert erImpl.createPlatformResourceInputStream(HierarchyURIConvert erImpl.java:368)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:441)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:457)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1212)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
>>> [tptp:test] at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
>>> [tptp:test] ... 9 more
>>>
>>> BUILD FAILED
>>> C:\Workspaces\Continous\com.jasche.tptp.anothertest\foo.xml: 17:
>>> java.lang.NullPointerException
>>> at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115)
>>> at org.apache.tools.ant.Task.perform(Task.java:348)
>>> at org.apache.tools.ant.Target.execute(Target.java:357)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:385)
>>> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
>>> at
>>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
>>> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
>>> Caused by: java.lang.NullPointerException
>>> at java.util.Hashtable.get(Unknown Source)
>>> at
>>> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
>>> at org.apache.tools.ant.Project.setProperty(Project.java:507)
>>> at
>>> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
>>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
>>> ... 10 more
>>> --- Nested Exception ---
>>> java.lang.NullPointerException
>>> at java.util.Hashtable.get(Unknown Source)
>>> at
>>> org.apache.tools.ant.PropertyHelper.setProperty(PropertyHelp er.java:308)
>>> at org.apache.tools.ant.Project.setProperty(Project.java:507)
>>> at
>>> org.eclipse.hyades.automation.client.adapters.ant.Automation ClientAdapter$Execution.execute(AutomationClientAdapter.java :637)
>>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
>>> at org.apache.tools.ant.Task.perform(Task.java:348)
>>> at org.apache.tools.ant.Target.execute(Target.java:357)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:385)
>>> at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
>>> at
>>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
>>> at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
>>> at
>>> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)
>>>
>>> Total time: 7 seconds
>>
Re: NPE in AutomationClientAdapter [message #140520 is a reply to message #140442] Thu, 19 February 2009 11:54 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Juergen,
This is a definitely defect, possibly related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210292. Please open a TPTP
ASF (ASF.Runtime component) Bugzilla:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=TPTP%20A SF

Paul
"Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
news:gnhhpq$hq9$1@build.eclipse.org...
> looks like the client adapter is activated differently dependent upon if
> the ant script is launched within the workspace JRE or in its own.
>
> If running in its own the client adapter receives setProject() and init()
> calls before execute() is called.
>
> If running within the workspace JRE only execute() is called.
>
> The upshot is that the properties are instantiated in the init() method
> which explains the NPEs. Though calling init() from execute() in case
> *properties* is not initialized won't help because *project* is not
> initialized. I guess the *project* field has to be set from within ant.
>
> To me it seems that we either have a problem with the ant plugin that does
> not adhere to the protocol or the client adapter is missing something
> about inherent subtleties about eclipse and ant.
>
> /Juergen
Previous Topic:Unable to profile application "Read timed out" response from Agent Controller
Next Topic:TPTP 4.5.3 planning
Goto Forum:
  


Current Time: Thu Mar 28 16:38:10 GMT 2024

Powered by FUDForum. Page generated in 0.05373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top