Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound]
Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1758394] Tue, 28 March 2017 11:35 Go to next message
muthuk ponnusamy is currently offline muthuk ponnusamyFriend
Messages: 9
Registered: March 2017
Junior Member
i have created an jar file [ Executeable jar file] and placed in <Installaion Directory>/ite/externaljars Folder. -->> JAR Name [testjar.jar] which includes com.test.pck [package name ] , class1[class name] and filecreate [method name]


Component Details:
Component type : Reflection Component
Action Type : Invoke External Method
parameter :
fqcn = com.test.pck.class1 [class1 is class name]
Method name : filecrete

while excuteing it unable to find the jar folder and the class...

But it throws ----- >> Execution Error: "java.lang.ClassNotFoundException: External jars could not be loaded."


Please help on this that if i have an issue in path folder? or with class name ?

Thanks,
Muthu
Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1758567 is a reply to message #1758394] Thu, 30 March 2017 07:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Muthuk,

since there are multiple reasons for this not to work could you please answer the following questions:
- Are you executing your tests on another computer than the ITE runs on?
- Is the Jubula ITE installed into a subdirectory of C:\Program Files or C:\Program Files (x86)? There could be permission problems when Jubula tries to load a file from a subdirectory of Program Files.

Please also attach a screenshot of the properties view of your Execute External Command action.

Best regards,
Kevin
Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1758814 is a reply to message #1758567] Mon, 03 April 2017 13:05 Go to previous messageGo to next message
muthuk ponnusamy is currently offline muthuk ponnusamyFriend
Messages: 9
Registered: March 2017
Junior Member
Thanks for the Reply,

since there are multiple reasons for this not to work could you please answer the following questions:
- Are you executing your tests on another computer than the ITE runs on? - No. in Same Computer
- Is the Jubula ITE installed into a subdirectory of C:\Program Files or C:\Program Files (x86)? There could be permission problems when Jubula tries to load a file from a subdirectory of Program Files. yes it is installed in C:\Program Files (x86), but how to check the permissin problems?

or i think is about giving the fully qulified name. can suggest me how to give values for fully qulified name and method name ,signature & argument ?

but i don't have any signature or arugument in my method. only method name ...


I gave as for fully qulified name : org.eclipse.jubula.examples.extension.javafx.aut.PieChartExampleAUT


Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1758882 is a reply to message #1758814] Tue, 04 April 2017 07:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi Muthuk,

I think it might be more of a permissions problem. Please install Jubula to another location and try to use your external jar there.

Best regards,
Kevin
Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1764954 is a reply to message #1758882] Sun, 04 June 2017 22:45 Go to previous messageGo to next message
Milos Hroudny is currently offline Milos HroudnyFriend
Messages: 24
Registered: June 2017
Junior Member
I have similar problem. Standalone Jubula instaled on D:\Program Files. class ExternalFunctions, package com.mh.util,
method: public static String getIp(). Error message java.lang.NoSuchMethodException.
It would be really helpful to bring some examples of configuration in case that a method does not use any parameters and in case that it uses some ones.
Also clarifying whether jar should be created as executable or normal jar. I use normal one (not executable).
Otherwise it is not clear what's the matter.
Best Regards
Milos Hroudny

Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1765035 is a reply to message #1764954] Mon, 05 June 2017 21:46 Go to previous messageGo to next message
Milos Hroudny is currently offline Milos HroudnyFriend
Messages: 24
Registered: June 2017
Junior Member
Problem was on my side. It works fine with Swing :-)
Anyway the problem remains for RCP :-(
I have created a reusable project based on the concrete toolkit.
Then I reused it in a project created for Swing and this works as expected.
The same library reused in a project created for RCP finishes with Execution Error:
java.lang.ClassNotFoundException. External jars could not be loaded.
Any idea?
Best Regards
Milos

[Updated on: Mon, 12 June 2017 05:13]

Report message to a moderator

Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1765933 is a reply to message #1765035] Wed, 14 June 2017 13:54 Go to previous messageGo to next message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
To clarify the Jar must not be exported as executable since we are not "executing" it, but just calling the java methods and classes in it.

@Milos you are using the ub_rfl_invokeExternal? If this is right, it should work in both cases.

If this is the case, can you please send me the log entries from your Home directory "./jubula/logs/" in specific the "rc_rcp.log" and "client.log" if you do not want to write the log files here you can also send me them in a PM.

with regards
Marvin Mueller
Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1766135 is a reply to message #1765933] Fri, 16 June 2017 10:17 Go to previous messageGo to next message
Milos Hroudny is currently offline Milos HroudnyFriend
Messages: 24
Registered: June 2017
Junior Member
Hi Marvin,
Thanks for your response. The main message is that the same jar used successfully with Swing AUT fails with RCP AUT.
The test actually does not call anything from AUT. AUT is only started to provide a context. The test starts only my external method.
I am not blocked by any rights, I am on the d:, Windows 7.
For creating jar I use Eclipse for Java Developers, neon.3.
In this test I have only one static method in the class and this method counts directories in the specified directory. No main, so exported as a normal jar (not executable).
If you would like to retest it, you can create two projects, one for toolkit Swing, second one for toolkit RCP. You can assign any Swing program and any RCP program, they only must be executable, so that you can start them.
In my project I created one more project LibraryExternalMethods, based on the toolkit concrete and I reuse this project both in Swing and RCP projects.
jar file is in ..\ite\externaljars as required. jar file is attached as well as screenshots.
In none of log files in .jubula.logs is any record from today, when I started the test.

Best Regards
Milos
Re: Reflection component : Invoke External method [Execution Error: "java.lang.ClassNotFound] [message #1766328 is a reply to message #1766135] Tue, 20 June 2017 09:30 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
Sorry to say it, but at the moment the invoke external method is not working in the context of RCP Applications.
Fore more Information see Bug 518498[1]

with regards
Marvin Mueller

[1] http://eclip.se/518498
Previous Topic:Object mapping | several matches of the same CTabFolder due to dynamic views/tabs
Next Topic:get UnsupportedComponentException on AUT launched from Jubula
Goto Forum:
  


Current Time: Thu Mar 28 12:11:42 GMT 2024

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

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

Back to the top