After installation lombok eclipse stopped working - eclipse

I have started to learn Spring with book Spring in action. In chapter 2 author uses Lombok. I wrote annotation #Data, #RequiredArgsConstructor but it doesn't work. Then I tried download lombok from official site and install with terminal. When I installed lombok, my eclipse stopped working. I get a error JVM terminated. Exit code=1. I don't understand why.Please help me. My linux system - fedora workstation 32, ide - eclipse. My eclipse.ini:
-startup<br/>
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar <br/>
--launcher.library <br/>
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200508-1552<br/>
-product<br/>
org.eclipse.epp.package.java.product<br/>
-showsplash<br/>
org.eclipse.epp.package.common<br/>
--launcher.defaultAction<br/>
openFile<br/>
--launcher.defaultAction<br/>
openFile<br/>
--launcher.appendVmargs<br/>
-vmargs<br/>
-Dosgi.requiredJavaVersion=1.8<br/>
-Dosgi.instance.area.default=#user.home/eclipse-workspace<br/>
-XX:+UseG1GC<br/>
-XX:+UseStringDeduplication<br/>
--add-modules=ALL-SYSTEM<br/>
-Dosgi.requiredJavaVersion=1.8<br/>
-Dosgi.dataAreaRequiresExplicitInit=true<br/>
-Xms256m<br/>
-Xmx2048m<br/>
--add-modules=ALL-SYSTEM<br/>
-Dosgi.configuration.area=#user.home/.var/app/org.eclipse.Java/eclipse/configuration<br/>
--patch-module=java.base=/app/eclipse/flatpak-dev-shim.jar<br/>
-javaagent:/var/lib/flatpak/app/org.eclipse.Java/x86_64/stable/d4c91ac7edee3f6afb68040498d32d5857e12079794fd0be8ec1fae9279450bd/files/eclipse/lombok.jar <br/>

You need to change the last line of eclipse.ini file for:
-javaagent:/app/eclipse/lombok.jar
Flatpak runs isolated, so it has his own environment. The .jar will be mounted in /app/eclipse folder.
OR
You can install the plugin via "Install New Software..." menu as documented in https://projectlombok.org/setup/eclipse.

Related

Eclipse CDT 4.11.0 crashes with SWT library not found error

I am trying to get Eclipse 4.11.0 running on my RHEL 6.10 system but it crashes when I try to run it. It points me to a log file that states:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I tried running it again and it crashed again with a different log file entry:
...UnsatisfiedLinkError Could not load SWT library
It was looking for:
~/.swt/lib/linux/x86_64/libswt-pi4-gtk-4924r25.so
but the only file in that directory was libswt-pi3-gtk-4924r25.so
I also found libswt-pi3-gtk-4924r25.so in eclipse/configuration/org.eclipse.osgi/458/0/.cp.
I removed my ~/.swt directory and ran it again. Once again I got:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I noticed that it made the ~/.swt/… directory structure and put the libswt-pi3-gtk-4924r25.so file in it so I tried to run it again and it (not surprisingly) gave me the following:
...UnsatisfiedLinkError Could not load SWT library
Does this have something to do with the version of gtk that I'm running on my system? Why does eclipse include the libswt-pi3-gtk.4924r25.so library in their installation, then look for the libswt-pi4-gtk-4924r25.so library?
Installing libgthread resolved the issue for me (SLES15, GTK3).

PHPUnit is Working With Command Line, but not with Eclipse

Whenever I run a test file from eclipse it works and display result as:
. 1/1 (100%)
Time: 371 ms, Memory: 8.00MB
OK (1 test, 1 assertion)
But If I run the same test from the Eclipse Oxygen, I get the error:
PHP Fatal error: Declaration of PHPUnitLogger::addFailure(Test $test, AssertionFailedError $e, $time): void must be compatible with PHPUnit\Framework\TestListener::addFailure(PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, float $time): void in /tmp/phpunit_printer/PHPUnitLogger.php(415) : eval()'d code on line 1
I downloaded phpunit-7.1.phar, and installed it globally by making it executable and moving it to /usr/local/bin and for Eclipse, I have downloaed in the Download directory and without making it executable I added it into my Eclipse Project as an External Phar but it is not working and giving the above error.
Can someone help me fixing the issue?
By the way, I am a NetBeanse User, but NetBeans is not supporting PHP7.1 that's why moving to Eclipse.
UPDATE
Here is my test file:
<?php
namespace tests\Unit\;
use PHPUnit\Framework\TestCase;
class MyTest extends TestCase
{
public function testSimple() {
$this->assertEquals(1, 1);
}
}
I had exactly the same problem with PHPUnit 7.5.14 and didn't find a solution.
Since I wanted to test my application running with PHP 7.1, I decided to try PHPUnit 6 and it worked at once. So PHPUnit 6.5.14 did the trick for me.
It seems Eclipse is not compatible with PHPUnit 7. My Eclipse Version is 2018-12 (4.10.0) with PDT 6.2. After switching to PHPUnit 6 other problems (that I managed to find workarounds for) were gone too. For example the generated class code overrides TestCase::__construct without calling the parent constructor. It seems to be a problem with PHPUnit 7, not so with 6.
I didn't find a compatibility chart of Eclipse PDT to support my thesis.

Installing Smalltalk project from GitHub Repository

First of all: I never worked with Smalltalk before, so it's a bit of a culture shock for me. I am using Squeak 5.1 (32bit).
Now to my question: I want to install a Smalltalk project from a GitHub Repository. I successfully installed Metacello using this code, executing it in Transcript:
"Get the Metacello configuration (for Squeak users)"
Installer gemsource
project: 'metacello';
addPackage: 'ConfigurationOfMetacello';
install.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk at: #ConfigurationOfMetacello) project
version: #'previewBootstrap') load.
"Load the Preview version of Metacello from GitHub"
(Smalltalk at: #Metacello) new
configuration: 'MetacelloPreview';
version: #stable;
repository: 'github://dalehenrich/metacello-work:configuration';
load.
"Now load latest version of Metacello"
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
get.
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
load.
And I also installed the Metacello Scripting API using this code:
Installer gemsource
project: 'metacello';
install: 'ConfigurationOfMetacello'.
If I now want to install a project from a GitHub Repository, for example this:
Metacello new
baseline: 'Animations';
repository: 'github://hpi-swa/animations/repository';
load.
Then I allways get this error:
gofer repository error: 'GoferRepositoryError: UndefinedObject>>thisOSProcess'...ignoring
Am I missing something?
You're absolutely right, that doesn't work. OSProcess is has not yet been marked as compatible with Squeak 5.1 and even if it were, it's not being pulled in by Metacello. I'll report this to the developers.
In the mean time you can load OSProcess with
(Installer ss project: 'OSProcess') install: 'OSProcess-dtl.98'

How to add a plugin to eclipse via cookbook using chef-solo

I have chef-solo installed on ubuntu(12.04). I have been able to successfully install eclipse using the cookbook provided in the following site: https://github.com/geocent-cookbooks/eclipse.
Now i wish to add the pydev plugin to this using chef-solo. Can someone help me on how i can do this. Do i need a new cookbook (if yes then where can i find the cookbook) or is some editing required in the existing eclipse cookbook(if yes then what is it)?
I am new to chef. Please help
Thank you
cookbook delivers a method to install the eclipse plugins.
default ['Eclipse'] ['plugins'] - list of repositories and install plugins to Automatically With This eclipse deployment
for pydev:
"default_attributes": {
"eclipse": {
"plugins": [{"http://pydev.org/updates" => "org.python.pydev.feature.feature.group"}]
}
}
}
check this issues (certificate error)
http://sourceforge.net/p/pydev/bugs/1244/
I guess installing the certificate should work correctly.
http://pydev.org/manual_101_install.html#pydev-certificate
you would have to adapt this code to automatically add the certificate.
https://gist.github.com/lusis/2203083
Another option is to adapt the cookbook for install liclipse (eclipse + PyDev)
http://brainwy.github.io/liclipse/
Sorry for my English.
Best regards
I ran the eclipse cookbook in a vm with ubuntu 12.04 and install pydev without problems, attached to the chef-solo json file.
{
"java": {
"jdk_version": "7"
},
"eclipse": {
"plugins": [ {"http://pydev.org/updates": "org.python.pydev.feature.feature.group"} ]
},
"run_list": [
"recipe[eclipse::default]"
]
}
If it does not work, attached the json file and debug log of chef run
Best Regards

MakeGood-Error with PhpUnit in Eclipse

I want to use the Eclipse plugin "makegood" to use php-unit-tests in Eclipse. When I'm running phpunit on console, everything is working.
I followed the following instruction to set up the makegood-plugin in Eclipse: http://www.stuermer-benjamin.de/v12_1/eclipse-4-2-with-php-android-and-unit-testing/
The status of makegood is "Waiting for a test run...", but when I try to run a unit-test, I get this error printed in the console:
Fatal error: Class
> 'Stagehand\TestRunner\CLI\TestRunnerApplication\Command\CommandRepository'
> not found in C:\Users\myNameWith18Charac
> \.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\php\Stagehand\TestRunner\CLI\TestRunnerApplication\Application.php
> on line 64
>
> Call Stack:
> 0.0000 148336 1. {main}() C:\Users\myNameWith18Charac\.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\bin\testrunner.php:0
> 0.0100 460744 2. Stagehand\TestRunner\CLI\TestRunnerApplication\Application->__construct()
> C:\Users\myNameWith18Charac\.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\bin\testrunner.php:58
The class Stagehand\TestRunner\CLI\TestRunnerApplication\Command\CommandRepository is existing!
Is the path maybe too long? But I don't know, how to change it. I'm using win7 x64.
I'm seeing the same thing in Ubuntu, running Eclipse Kepler and PDT 3.3.
Enabling debug in MakeGood, I can see that the command that's actually being run is php with a single argument of the file I'm currently viewing (E.G the test).
It simply doesn't work as advertised, as it's just trying to execute the file on its own.
Downgrading to Eclipse 3.8 (Juno), and PDT 3.0.0 worked for me.
*Edit:
You can define a custom bash script as the php executable as a workaround, and hardcode the path to testrunner.php
#!/bin/bash
# MakeGood for PHP stopped working after Eclipse Indigo (3.8) due to inability to run testrunner.php
# This is a hack PHP binary, to be configured as PHP executable for MakeGood to start working in Juno, Kepler and Luna.
# Remove the -n operator to read all config files
options=`echo $# | sed 's%-n %%' | sed 's%-c .+? %%'`
# Hardcode path to testrunner.php
options=`echo $options | sed 's#open_tag=on [^ ]*#open_tag=on /opt/testrunner.php
/usr/bin/php $options