PyDev tagging wsadmin (WebSphere) commands as "Undefined variable" in Eclipse Luna - eclipse

I am, running Eclipse Luna (4.4.1) with PyDev for Eclipse (2.8.2).
My Jython interpreter is pointing to "C:\jython2.1.0\jython.jar" and "C:\IBM\WebSphere\AppServerV85\optionalLibraries\jython\jython.jar".
My Python interpreter is pointing to "C:\Python-2.1.3\python.exe".
I created a new PyDev project with a file called "testJython.py". It runs against my local WebSphere environment by connecting to the server process with a SOAP connector. The script executes successfully.
The part I am having trouble with is the intepretation of the Jython code that is WebSphere specific. For example, in the line of code "AdminControl.queryNames("*:*,type=ConfigRepository,process=nodeagent")" Eclipse throws out an error on "AdminControl". It underlines it in red and shows "Undefined variable: AdminControl".
It seems to me that I am missing a configuration in Eclipse (or in the code) to load the WebSphere internal commands properly (i.e. import a class or something).
Can someone help me configure PyDev correctly?

I found the answer to my own question. Here is an IBM website on how to use wsadmin with PyDev:
http://www.ibm.com/developerworks/websphere/techjournal/1209_vansickel/1209_vansickel.html

Related

debugging python code using pydev fails in eclipse

I was able to debug python code using pydev in Eclipse before I received a new computer but now am encountering errors while in the debugger. There problems do not occur when running the from CLI (subprocess.run fails). The problem appears to be related to mylyn. I tried installing pydev from the eclipse marketplace and have even tried installing the latest version of mylyn (3.25.2). Below is the install summary:
enter image description here
I am running the following versions:
Eclipse 4.25
Java 1.8.0_341
python 3.10

remote debugging jython script runned by java program with eclipse and Pydev

I am trying to debug a jython script which runs via a java project. I have installed pydev in my eclipse IDE and I followed these instructions(http://www.pydev.org/manual_adv_remote_debugger.html). when I am running the java app while python debug server is running debugger recognizes normally that the jython script is going to be executed halt the excecution and wait for step over or resume commands.
The problem is that PyEdit(editor window) does not highlight the lines which are executed. Also debugger does not know the breakpoints of the scripts. It seems like debugger can not correlate the running thread with the script file.
Is there any way to configure pydev server to correlate debugging with a specific file?

Debug in Eclipse while running from command line ubuntu

Is there a way I can debug my application (using breakpoints in eclipse) while running it from command line (ubuntu)? I'm using Eclipse Kepler version on Ubuntu 12.04LTS.
I know there's something like attach to process in .net, was wondering if eclipse has some such setup.
Thanks,
Is your application written in C or in Java?
If your application is in C and you are using CDT, you can attach to existing project by:
Run your application from terminal.
In Eclipse CDT, go to main menu "Run"->"Debug Configurations...", double-click "C/C++ Attach to Application" and press "Debug" (you should not need to specify executable and/or project).
For Java applications, see this

Debugging Eclipse plug-ins

This is my first attempt at creating an Eclipse plug-in. I've created one, along with a feature and update site. I set the target platform as my local Eclipse installation. When I run/debug the plugin from within the development environment everything works fine.
Now, my colleague installed the plug-in from the update site that I hosted. When he starts using any of the functionality exposed by my plugin he gets runtime exceptions.
He sees null pointer exceptions which didn't occur when I ran my plug-in project from my development environment.
I have a wizard that's part of my plug-in. When he close it he gets a "Unhandled event loop exception", and the wizard doesn't close. I didn't have this issue when I was running/debugging my plugin in my development environment.
Now I'm confused as to why the same plug-in is behaving differently in the production environment, as against the dev environment and when I was debugging it from my IDE. The target platform in both cases is the same Eclipse version. What could be the reasons?
And how do I debug the plug-in in a production environment? Is there a remote debugging capability for debugging the plug-ins on the production environment?
Any suggestions would be really useful!
To remote debug your plug-in, first add debug arguments to your target Eclipse .ini file
-vmargs
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
before launching it.
Then open another Eclipse instance with a workspace containing your plug-in project.
Open Run > Debug Configurations..., select Remote Java Application and create a new configuration.
As Project, browse and select your plug-in project.
Also fill in your connection properties (host of target Eclipse and port 1044).
Launching the newly created debug configuration allows you to debug your plug-in the same way you debug locally.
Now I'm confused as to why the same plug-in is behaving differently in
the production environment, as against the dev environment and when I
was debugging it from my IDE. The target platform in both cases is the
same eclipse version. What could be the reasons?
This is a classic: Eclipse plugins and RCP applications do indeed behave differently between PDT (the Eclipse IDE) and the exported product.
In your case, a NullPointerException thrown from the exported version but not from Eclipse is 9 times out of 10 an image or other resource files (properties, etc.) that is loaded by your code but is not listed in the build.properties of your plugin.
Anyway, you'll need to check the logs to retrieve the stacktrace and hunt down its cause. Such logs could be found in your friend's workspace under le .metadata/.log file
From your development workspace as it stands now, use the "Debug As -> Eclipse Application" menu item to startup a test workspace. When it starts up, you'll have two workspaces running: the original development workspace and the new test workspace. You can set breakpoints in your plugin code in the development workspace and run your plugin in the test workspace.
When your plugin execution in the test workspace gets to one of your breakpoints, execution will pause and you can use the Debug view in your development workspace to look at variables, set more breakpoints or anything else you want to do to debuf your plugin.
See the Apache Wiki for Developing with Eclipse.
Under Windows 10 with Tomcat running as a windows service I started:
tomcat8.5\bin\Tomcat8w.exe
& added in the Java tab as the first entry in Java Options to enable remote debugging:
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

can compile c++ in eclipse - Cannot run program "autoreconf": Launching failed

I installed eclipse Helios a week ago. First I installed it without the CDT.
Today I installed the CDT along with the autotool (this it what can be seen in the list of possible updates). Afterwards, I installed also the minGW (Wascana) as written in the manual of CDT.
but after I create an Hello World project in eclipse I get this error (blinking non stopable) in the console tab:
Invoking autoreconf in build directory: D:/eclipse/proj/workspace/testcpp
Configuration failed with error
(Cannot run program "autoreconf": Launching failed)
Can anyone help me with this? What else do I need to install or config so my CDT will work?
thanks,
Eli
The autotools plug-in doesn't work on Windows yet. There is a fix in place for the upcoming Indigo Eclipse release.
The main problem is that Windows doesn't know how to run shell scripts (which is what autoreconf is). You have to launch the shell manually and ask it to run it. And that's what the fix is.