I've written a Java Agent in IBM Domino Designer, but I don't know how to run it. Whenever I click "Run Agent" pretty much nothing happens, it only says that
Started running agent 'unzipFiles|unzipFiles' on 08.11.2017 10:45:21
Found 0 document(s) that match search criteria
Ran Java Agent Class
Done running agent 'unzipFiles|unzipFiles' on 08.11.2017 10:45:23
But when I go directly into the class and click Run As -> Java Applciation everything works fine. What's the problem? It seems to me, that it even doesn't go to the JavaAgent class and invoke main method. I've tried to put Thread.sleep(99999) method, but the time of "execution" of this agent is the same - 2 seconds. How can I solve it?
The agent properties
Is there any way to debug it?
A Domino agent is not a java application. You don't need to implement the method 'main' but 'NotesMain'. And the agent class must extend lotus.domino.AgentBase.
If you create a new agent from scratch Domino Designer gives you all the boiler plate code. Just start from the line
//Your code goes here
Related
I am trying to develop a java application which uses jmeter's maven library artifactId: ApacheJMeter_http to load test.
My application does distributed remote tests, and i want to execute some java code after the test finishes execution. Upon reviewing the JMeter docs, I found out that tearDown Thread Group can do the job. In the JMeter GUI, you can simply add this type of Thread Group, but I can't find the equivalent java class in JMeter's library.
Moreover, I am still not sure how to execute java code even after i manage to add this thread group to my test tree.
EDIT:
Found the answer to part 1 of my question. tearDown Thread Groups are named PostThreadGroup by jmeter.
Still not sure how to execute java code using a PostThreadGroup. Basically I want to call a hook after the execution of a test.
If you need to determine the class for this or that JMeter test component:
Open logger panel by clicking yellow triangle with exclamation sign in the top-right corner of JMeter GUI
Having highlighted the test component choose Help -> What's this node
The element class and GUI class will be displayed in the jmeter.log
The class you need is PostThreadGroup, see the JavaDoc for all possible methods/fields/whatever.
More information: How to Debug your Apache JMeter Script
I have an existing set of QTP regression tests that I wrote and have executed through several regression test cycles successfully. I have a JavaWindow that contains several JavaTables where I parse the table data into an array and verify it against the expected results in Excel spreadsheets.
In the current test cycle, the JavaWindow (which contained the JavaTables that I could read and verify) has now changed to a class of Window, and QTP sees this Window as simply one object. I can no longer verify the table data inside the window.
What may have happened that could cause the QTP class of the JavaWindow to change to a class of Window? No code changes have been made to this window, and I have verified that the Java versions on both my test box and app server have not changed and are valid for the current version of QTP.
Any insight into this issue would be greatly appreciated.
It sounds like the Java addin in QTP isn't working. There can be several causes for this.
QTP was loaded without selecting the Java addin in the addin manager
The test's Record and Run settings don't include your application
The Java application was opened before QTP (so QTP wasn't able to hook this application)
Along with the other answer, it might also happen, when you mess up your with Environment Variables. Lets say you installed StarTeam (it happened to me) recently which updates some of the existing environment variables set by QTP like JAVA_OPTIONS.
If it was working before & you could not figure out the issue, i would suggest you to repair UFT (using control panel options).
This is my own version of karel the Robot. The Janitor Robot that can only run un eclipse. My problem is when I open and i click run in a first time the robot moves according to the codes. but when i tried to edit the codes while the window is open, when i click the run button again it did not moves and need to close again.
This is my source code in the run method:
I have a janibot class that is implemented by a runnable and then. and i create its instance dynamically by this code.
Object tempJanibot = Class.forName(className).newInstance();
janibot = (Janibot) tempJanibot;
janibot.run()
where classname is the subclass of Janibot that is takingTurns in the screenshots.
It successfully created the instance of takingTurns class.
But I thought when i edit the code while the program is running and I click the run method the takingTurns class must be updated also but unfortunately it will not update and so I need to close again and click the run button.
What you are looking for is hot loading of the Java class. The default mechanism in Java is to load the class once in classloader reference and re-use it when required. So while Java application is running and if the class is recompiled, it will not pick up the new definition. If you wish to achieve similar functionality, you can look for solutions like JRebel or spring loaded.
"It's not a bug, it's a feature!" Eclipse cannot recompile your code while it is running and merge those changes into your currently running program. You'll have to restart the program each time.
I am a beginner using eclipse for java programming. Recently I downloaded certain source code online and ran it in eclipse successfully. I want to learn how it runs. However, I failed to find a way to monitor the progress during the program running. For example, if I run the application and click certain button in the application GUI, how do I know which class/method is called? In other words, how can I use eclipse to monitor the process of program running?
The general answer is to use the debugger. For example, set a breakpoint in some method and then use "Debug As" instead of "Run As" to run the application within Eclipse.
Here are a couple of tutorials / articles on using the Eclipse Debugger.
http://www.vogella.com/articles/EclipseDebugging/
http://agile.csc.ncsu.edu/SEMaterials/tutorials/eclipse-debugger/
http://www.ibm.com/developerworks/library/os-ecbug/
Put a breakpoint(double click the left side of the line) on your method to be debugged and debug your program.
Simply put breakpoints in the code lines you need to look and run the application in the Debug mode then it'll wait at the relevant code lines you need to check.
I am unable to run more than one instance of java webstart at any given time.
For example, I am unable to run both the production & QA instance of an application at once, both of which are launched via java webstart. Additionally, I am unable to run the java webstart cache viewer at the same time as either the production or QA instance of my application.
I am however able to run any of the above three webstart launches when they are run in isolation of each other. When I try to bring up a second option, I see the 'Java Loading...' screen which then disappears and nothing happens.
Additionally, I have tried to delete the webstart cache (via the java webstart cache viewer) and I receive the following error regardless of which JRE I point to:
"Bad installation. Error invoking Java VM (execv)
'path to my javaw.exe'"
I expect both the problems I mention above are interlinked. I do not believe I have changed any configuration recently and I have been happily running java webstart for years.
Has anyone seen such a problem before?
Thanks,
Jack
EDIT: When the second instance of webstart attempts to run, during the display of the 'Java Loading...' screen I can see in the task manager that a new javaw.exe process is spawned. This process almost immediately dies though. I'm not sure how to inspect the failure in that process, but I expect it is similar to the failure when trying to clear my cache through the webstart cache viewer.
You may be able to use javaws from the command line to run a second instance in -offline mode. The verbose option is handy, too.
javaws -offline -verbose MyApplication.jnlp
I think it is because both instances of the application use the same folder as current working directory. I do not remember exactly but it is somewhere under user home and the folder contains the application name or something...
So, if this is correct the solution is to change the application name like "My Application - QA" vs. "My Application" used on production.
The name is somewhere in jnlp.xml.
The reason may be the startup parameters for client java/javaw, which do not allow to run more than one instance of Java. For example because of set debug port. These parameters can be set in the command line or in the Java Control Panel -> Java -> button View.