How to create Groovy class in Eclipse - java

My Computer is Macbook pro, the computer's system version is: OS X 10.11.4 (OS X El Capitan)
My Eclipse's version is 4.5.
the Eclipse is installed Groovy plugin (URL is http://dist.springsource.org/milestone/GRECLIPSE/e4.3/) ;
restart my Eclipse.
I create a Groovy project ----> success
I create a Groovy class ----> error !
have 2 alert .
the 1st :
‘Building workspace’ has encountered a problem . Errors occurred during the build .
error details : Errors occurred during the build.
Errors running builder 'Java Builder' on project 'GroovyJavaProject'.
org/codehaus/jdt/groovy/integration/LanguageSupportFactory
the 2nd :
Creation of element failed .
org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.codehaus.jdt.groovy.model.GroovyCompilationUnit.

Maybe the update site you have used is not the right one
From Groovy/Grails Tool Suite™ Downloads page the update link for Eclipse 4.5 is http://dist.springsource.com/release/TOOLS/update/e4.5/.
I believe the one you have used is for Eclipse 4.3.

Related

Selnium + Maven test run locally but fail in Azure Pipeline. Getting error "cannot access org.testng.Assert"

When I run from TestNG or Maven test from locally all the test cases are working fine but in pipeline it gives me this "cannot access org.testng.Assert".
I am attaching the error screenshot of Azure Pipeline:
enter image description here
enter image description here
The error message: class file has wrong version 55.0, should be 52.0.
You should update Java version to at least Java 11.
Try adding task Java Tool Installer task.
- task: JavaToolInstaller#0
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
I think you are facing this issue because of JDK version on the Azure pipeline.
If you can check first if you have JDK and second what is the version.
java -version
Locally the tests work because the JDK version is the proper one.

Error while building the demonstration environment for Stucco on MacOS

On following the instructions in http://stucco.github.io/
I am getting the following traceback on terminal:
TASK [smola.java : Install Java packages] **************************************
failed: [stucco] (item=[u'java_packages']) => {"failed": true, "item":
["java_packages"], "msg": "No package matching 'java_packages' is
available"}
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Any idea on how I can fix this error?
This playbooks are two years old. They use abandoned Ansible syntax. For example here:
- name: Install Java packages
apt: pkg={{ item }} state=latest
with_items: java_packages
You can't use bare variables in with_ with modern Ansible versions (latest version to support this with giant deprecation warning was 2.1).
From Stucco Dev-Setup manual:
Download Ansible. (Tested with version 1.7.x.). (Ansible requires Python 2.6.)

Playscape publishing kir (1.17) error: Failed to execture lib2dex

We have problem with PlayscapeSDK 1.17.411 in our Unity Android project.
When we build the game, on "Publishing kit post-process" step we have this error:
An error occured while applying post-build logic: Failed to execture lib2dex. Error description: jar2dex.
PlayscapeSDK we add in project according to official instruction.
We build project on OS Windows7 x64.
System variables ANDROID_HOME, JAVA_HOME, JDK_HOME added.
Also path to JAVA exist in PATH variable.
Google Play Service lib(google-play-services.jar) we stripped (3,79 MB)
Using soft:
Playscape sdk 1.17.411
Unity 5.3.2f1
JDK jdk1.8.0_71
By the way, the same error we have, when try to build app on MacOS (El Capitan)

Can't build cordova projects

I have a problem with setting up the work environment for Cordova on Windows 7 for Android. I use NetBeans 8 and followed this guide: Link Here
New project -> Cordova -> Hello World Template.
Whenever I try to build a Cordova project (in NetBeans) I get this message:
BUILD FAILED
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml
Total time: 0 seconds
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\node_modules\q\q.js:126
throw e;
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Command finished with error code 8: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat --emulator
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\nbproject\build.xml:272: exec returned: 1
BUILD FAILED (total time: 47 seconds)
I have googled it for hours but can't seem to find a solution. Some people get some of the same errors(not exact, but similar), but the solutions did not work for me. One issue was regarding Java 8 and ant versions beneath 1.9.0 (I use Node 0.10.26, java 1.7.0_25, cordova 3.5.0-0.2.4 and ant 1.9.4). I also tried to create a new project with the console (CMD), but it gives the exact same error when I build. It's no problem to create the project, nor adding Android as a platform, the problem is building the project. I think the environment variables are set correctly since the java, node, ant and cordova commands work fine in cmd/powershell, and the check_reqs.bat said that the environment was fine.
It's this line that creates the error: <import file="${sdk.dir}/tools/ant/build.xml" />. This is the rest of the message: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml.
Here is the error I get in the command window (not using NetBeans):
PS C:\Users\Administrator\Desktop\test\fakeApp> cordova build android
Running command: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat
Buildfile: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml
BUILD FAILED
C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\
Skolegang\Dataingeni├©r\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Admini
strator\Desktop\test\fakeApp\platforms\android\build.xml
Total time: 0 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Desktop\test\fakeApp\platforms\androi
d\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\s
rc\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I thought maybe it was a path issue since I have a special letter in the path were the NetBeansProjects are stored (and it's pretty long too), but creating a test directory at C:\ and creating the project with the command window gave the same error. I'm new at Cordova so I'm sure there's an easy solution, thanks in advance.
I solved it, though I tried to create a cordova project outside the OneDrive folder I did not think of the SDK path (which also were stored in OneDrive). By moving the SDK files to C: (the path could probably not contain the special letter 'ø') and changing the path of the environment variables (and the SDK path in NetBeans) it now runs perfectly.

Unable to start server in Eclipse Gallileo IDE with WAS7

Server not starting in Eclipse Gallileo IDE with WAS7.
I run the server from outside of Eclipse but I want to start it from within the eclipse
Below are the details of my Workspace configurations :
Eclipse Java EE IDE for Web Developers.
WAS 7.0
An alert is coming saying "Cannot connect to VM socket closed".
I got the following exception in console :
JVMSHRC154E Escape character g not valid for cache name
<JIT: FullSpeedDebug: ignoring countString>
<JIT: FullSpeedDebug: ignoring countString>
JVMJ9VM015W Initialization error for library j9shr24(13): JVMJ9VM009E J9VMDllMain failed
Per the JVMSHRC154E, it appears that somehow -Xshareclasses:name=...%g... is being added to your server JVM command line. I do not know why there would be a difference between Eclipse and the command-line (perhaps a product issue that should be reported to IBM), but you could try working around the issue by adding -Xshareclasses:nonfatal to your server's generic JVM arguments.
IBM has released development tools for WebSphere Application Server (WAS).
You can download it from eclipse market place.
There are tools for the WAS7 and up. (IBM Information page)
You probably need WAS 7 Tools - marketplace page.
The short instruction is:
In the eclipse click Help->Eclipse Market Place->Search WebSphere Application Server Tools.
Inside eclipse installation folder go to \plugins.....\cdcla\eclipse\launch\simple.
Open the file websphere70.properties.
You will see the following content and remove the
"_%g"
part and save it
shareclasses=webspherev70_%g,groupAccess,nonfatal

Categories

Resources