Eclipse RCP app fails to start - java

I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reached.
I know I don't have much specific information here, but can anyone give me any pointers on where I might start looking to diagnose the problem?

I wasn't able to locate the runtime/.metadata folder, but this very helpful post directed me to add -consoleLog and -noExit to my runtime arguments, which dumped the errors to the console. Configuration problems.

Have you checked the logs in runtime/.metadata folder?, Also make sure to validate all plugins in the runtime. Having them as a dependency doesn't necessarily mean they are added to the runtime. This is probably the biggest gotcha when launching an rcp app.

I experienced this problem after migrating my RCP app from 3.7 to 4.2. The solution for me was to delete to runtime-product.product directory and re-run.

Related

Eclipse plugin operation does nothing in normal 2019-12 instance, but works fine in rcp debug instance

I'm trying to debug a problem with the Eclipse plugin at https://github.com/davidmichaelkarr/e4macs . This is a fork of the original application, which is now unfortunately abandonware.
As Eclipse has moved on with further releases, there have been a small number of issues in the plugin. I was able to fix the first problem (shown by my diffs with the base repo), but the next problem that appeared around 2019-09 is a little harder to figure out.
Specifically, the "split-window-vertically" command just does nothing when I execute it. It doesn't matter whether it's bound to a key or executed directly from the "execute extended command" prompt. Nothing appears in the log about this.
So, I downloaded an instance of the RCP 2019-12 distro and set up to debug this. I ran an "Eclipse Application" in debug and tested the function. It worked perfectly fine. This means that somehow something else that I have loaded in my regular 2019-12 installation is making this function not do anything.
From the Marketplace Client, I tried installing some of the same plugins in the debug instance that I have in my regular instance, but I didn't get very far doing this. I tried to install the "Spring IDE", but this gave me many errors. It starts out with "Cannot be completed", and it gave me a long list of "will be uninstalled", "Will be upgraded/downgraded", and "Will not be installed". All of the Spring features were in the latter list. I tried to install the "Groovy" plugin, and that gave me several "Missing requirement" errors.
I don't know whether the missing plugins are what is causing the operation to work, and I can't figure out why I can't install the plugins.
I'm not sure what to do here.
Update:
A comment pointed out that the way to install plugins in a debug instance is to add plugins to the target platform. I proceeded to do that, and discovered that one of the choices for sets of plugins to use is from an existing installation, which is perfect, because that's exactly what I want the debug instance to use, all the plugins in my existing 2019-12 installation.
Unfortunately, doing this has apparently removed my other installed plugins as the source of the problem. I tested the plugin code in this newly edited debug instance, which has all of the same plugins as my regular instance, and the plugin is working perfectly fine. In my regular instance, when I execute the operation in question, nothing happens. No error of any kind, and I don't get the expected result. The operation in question is "split-window-vertically", which should do what it sounds like.
Note that by setting the plugin source to the regular installation, that also included the installed copy of the plugin in question, the Emacs+ plugin (which is installed from the "dropins" directory). I'm not sure exactly what that would do. In any case, I set breakpoints in the plugin code, and when I executed the operation, it did hit the breakpoints.
Note that I also did import the same preferences file into the debug instance that I use in the regular installation, so the preferences are identical, and based on the previous information, the set of installed plugins should be almost identical (I'm not convinced they are exactly identical).
The only other difference between the debug instance and my regular installation is that the regular installation is the "Eclipse IDE for Java Developers" variation from the Eclipse installer, but the debug instance was launched from the "Eclipse for RCP and RAP Developers" variation. I have no idea whether that is significant.
Update:
I added logger calls to the plugin code (using "org.eclipse.equinox.log.Logger", is that the correct logger class to use?). I even added a logger call (and even a println) to the constructor of the operation handler class. None of those were seen in the log file. That tells me that something is wrong with my plugin configuration files, like the "plugin.xml" file.
The "plugin.xml" file is 3928 lines long, so I'm a bit hesitant to just paste it here. I tried opening it in Eclipse, and it doesn't complain about anything.
The following is a screen grab showing the relevant entry:
Note that although the executable operation isn't doing anything, and it seems like the handler isn't being executed, there are some aspects of the operation definition that are being properly loaded into Eclipse, like the description of the operation. Emacs+ provides a "describe-command" function, and I can specify "split-window-vertically" to this command, and it properly returns the description of this command as set in the "plugin.properties" file.
Also note that although this particular operation is not doing anything in this version of Eclipse, there are other functions in Emacs+ that are still working perfectly fine.

Eclipse prevents editing after debug mode entered

I'm working on an Android project in Eclipse. I just updated to:
Version: Kepler Service Release 2
Build id: 20140224-0627
Since then, if I hit a breakpoint in debug, I can no longer type in any files. The keyboard seems to work for stepping through code and for typing text elsewhere in Eclipse outside the file editors. The behavior persists even if I terminate the debug session. (I'm debugging on a device.)
I need to restart Eclipse in order to be able to change files in the editor. Not too fun! I've not found any recent bug that explains the behavior. FWIW the upgrade wiped out my preferences too. It looks like my install history was lost too because the previous configuration does not seem available to revert to.
Any help appreciated!
This happens when you're debugging .class files instead of their correspodning .java files. This happens a lot when library projects are involved. Some other things happen too -- you can place double breakpoints, &c. It's a bit annoying.
You can normally fix this issue by editing the Source Lookup when debugging. Please see the answer to this question: Debug Android library project with java source code

Tomcat reference missing from menu and preferences in eclipse

After spending a few hours searching the internet (including this site), I am unable to find a resolution to my issue and hopefully someone here can help out.
I did a clean install of eclipse kepler (ee version) this morning and my issue is getting Tomcat to be made available on the menu as well as on the preferences tab.
I have set up a Tomcat server in eclipse and have been able to start and stop it without any issue and that has me believing that Tomcat is set-up correctly in eclipse.
A few things tried were to create a dynamic web project hoping this would trigger the addition of the Tomcat options to the menu and preferences screen - nothing here, exited eclipse and re-entered thnking it may need a restart - again nothing. This instance is current as far as updates are concerned and with it being the ee version, the WTP tools are also installed.
I am thinking something very obvious is being overlooked but I cannot figure that out at the moment. Any direction you can point me me is greatly appreciated.
Thank you.
Tom
I think the only thing you can do with Tomcat is start it and stop it. What options were you looking for? I think everything you want is under the Tomcat run-configuration that you have already been using. Just edit that run-configuration to set whatever options you want (e.g. heap size, permgen, stack size, debugging options, etc.).
Ok, got this figured out with the help of a co-worker.
I needed to use the Tomcat plug-in (we use the one from Sysdeo) to get this going. I mistakenly thought that by using the EE edition of Eclipse along with having the webtools plugins (WTP) all that was needed was in place. Not so.
The downloaded plug-in was extracted into the eclipse/plugins folder. Once that was done, Eclipse was restarted and the Tomcat references were in place on the menu, the preferences dialog box, and the projects' properties dialog box.
Hope this information will be of value to anyone experiencing the same problem.

Debugger only stops at breakpoints, will not "step over"

I'm trying to debug code that I've built from source. It is started with the wrapper from Tanuki.
I'm debugging inside IntelliJ idea but I'm not sure that is the problem.
The debugger correctly stops at all lines where I've put a break point but never else so F8, "step over" doesn't work. Very tiresome as I have to put break points every where :)
Am I doing something wrong?
How do you build the project? If you build it with Ant or some other tool, make sure that compilation is performed with debug info enabled (debug=true for Ant javac task). Obfuscation and bytecode instrumentation during the build can also affect the possibility to debug. If you run under some non-standard JVM, it may also cause such problem.
When performing remote debug, ensure the target process is started with the correct JVM options suggested in the IntelliJ IDEA Remote debug configuration. Your wrapper configuration may pass them incorrectly.
Make sure you don't have a different jar on the classpath (other than the project) with the same classes. You could be stepping through the compiled classes and "breakpointing" in the sources.
This worked for me: http://devnet.jetbrains.com/thread/267022. Basically there's another lib in the classpath confusing the debugger. Simply find out which library it is by stepping into during the debug. Then find it on the project and delete it.
In my case, it was an auto generated file that was causing the confusion.
happened to me as well, on Eclipse (Mars).
Restart of eclipse solved it... as simple as that...
I also faced the same problem.Below trick worked for me:
Delete the settings for Intellij
Windows User :C:\Users{username}.IntelliJIdea14
This will restart the Intellij for you from the beginning.
Hi I also had the same behavior and I got it fixed by installing the latest IntelliJ after removing/rename the folders found in these locations https://intellij-support.jetbrains.com/hc/articles/206544519
I had to delet all the versions I previously installed. Just give it a try.

Error launching first test application: Android Packaging Problem?

Conversion to Dalvik format failed: Unable to execute dex:
wrapper was not properly loaded first
[project]
Android Packaging Problem
I've never worked with Java or eclipse before, I'm following this introductory guide and all searches via google return no helpful results. I'm guessing the problem is I have built Android stuff with eclipse properly but I have no idea, I followed this guide to the letter and everything went as it explains it should.
Any ideas what caused this problem, or is it specific to the guide? If so I'll post on their help page.
I have tried doing project -> source -> clean up, but that didn't fix anything.
Edit:
I went to Project -> Android tools -> Dex bytecode and it reported:
DexDump: missing classex.dex for project. Please compile first.
So I guess that's my problem! Not sure how to solve though.
Go to Project -> Clean
It will rebuilt workspace and fix the errors if any.
As I said, I had the same problem so I tried all the different versions and
then I stopped filling in the SDK-version number
and finally it did not complain anymore about the wrapper.
After that it was totally fine to write the SDK-version when I created new projects.
Hope it works out for you too.
Had the same problem (running on Windows 7). I resolved it by running Eclipse with Administrator privileges.
try to run eclipse under administrator permission. Problem may be resolve.
I think you installed the SDK in "Program Files" folder . So for do something inside, must have administrator permission.
One thing that may help is to create a new test Android project.
In Eclipse, select File → New → Android Project.
Set the project name to "Test3", check Android 2.3 for the build target, type "com.example.android.apps.test3" for the package name, and type "Test3Activity" in the "Create Activity:" text box. The form should look like:
Click Finish.
Expand the entry for "Test3" in the Package Explorer. Navigate to res/values/strings.xml. Double click on the entry for strings.xml:
Set the text content of the string element having name "app_name" to "Test3":
Right click on "Test3" in the Package Explorer and select Run As → Android Application. The emulator should open and after a long while, you should see:
If these steps do not work, then you probably have an error in your installation.
Try it out and let me know.
I had the same problem earlier today. Google was largely unhelpful.
I fixed it by removing the project from eclipse, then re-importing it.
According to this bug report the problem is caused by upgrading to version 9 of the SDK.
Had the same HelloWorld problem with Ubuntu 64 Lucid / Eclipse 3.5.2 from Ubuntu repository. Restarting Eclipse did the trick, though I notice it still fusses about API level requirement when HelloWorld is run.
Running it as Administrator has solved this issue for me..
Had the same problem - occurred after I tried downloading Android platform v2.3.3 (was using 3.1 and 3.2 earlier) and it interrupted in the middle - restarted eclipse and cleaned all projects and rebuilt and the problem went away
At what point in this tutorial/guide are you running into this problem and did you make sure to include your package information in each file or ie com.something.somethingelse at the top of your class or classes?
Perhaps a registry error or maybe even a problem with activity implementation.
Please post your code if this did not start you in the right direction.
Here are a few things to check:
Make sure you have the latest version oF Eclipse (Helios)
Make sure that you have the Android SDK plug-in for Eclipse.
Now if you have done that... Make sure that any classes you add (Each screen you view on Android is a class and is called an Activity) are in your androidmanifext.xml file See http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/ for help on understanding this process.
otherwise make sure there are no red x's in your code or it wont work.
If you still have problems post some code and we can try to help.
Had the exact same problem the other night. Upgraded to Helios (3.6) and it went away, quite possibly as a side-effect.
Under windows 7, rather than run eclipse as an admin, change the permissions on the eclipse folder so the creator/owner has full control, and do the same with the folder the android SDK is installed into.
I had installed Eclipse using the files provided by Windows' native ZIP extractor. I deleted the files and took them from 7-Zip instead. Now the error is gone. So maybe using another ZIP extraction tool will help.
Recently got this when failing upgrade using adb-manager with eclipse open (win32). As eclipse was open, upgrade failed. Then returning to my project this problem occured.
Was solved by closing eclipse, restart as administrator and cleaned project.
I had the same problem but I resolved it using following steps(using eclipse helios and windows XP ) :-
Right click on eclipse.exe.
click on Run As...
Uncheck the checkbox before "protect my computer from unauthorized activity".
And it is running for me as expected !
hope it will also run for you.

Categories