How to import/add libraries into Spring STS? - java

I am having an issue with Spring STS. I'm receiving the following messages:
This one when trying to download the template projects:
"Error while downloading or parsing descriptors file
'https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/descriptor.xml':
org.eclipse.core.runtime.CoreException: Error while retrieving
https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/descriptor.xml"
...and this one when I check for updates:
"Some sites could not be found. See the error log for more detail. No
repository found at
http://download.eclipse.org/tools/gef/updates/releases/site.xml. No
repository found at http://geronimo.apache.org/devtools/. Unable to
read repository at
https://dl-ssl.google.com/android/eclipse/content.xml.
java.util.NoSuchElementException"
also, see the attachment for a screen shoot of how the tool suite will not import java.whatever and/or org.springframework.whatever
I believe that all three of these issues are related however, I can't prove or fix it.

There are some possible things to be checked in here,
1. Are you under some kind of proxy?
2. Did you download Spring STS directly or updated eclipse?
3. If your Spring STS is not working properly, you can download latest eclipse and use this link as update site.
4. You can check your project classpath also to just cross confirm that you are not missing anything up there.
HTH

Related

java.lang.module.FindException: Unable to derive module descriptor for cucumber-core-7.3.4.jar

I initially created a plain Java project that followed the steps mentioned here and here but unfortunately, my project didn't work, I am getting this above error. I have not reached the step where it talks about integrating selenium.
Just to mention I used all the latest versions of the jar files as shown below.
I also got other various problems also, and to resolve them when I searched on the internet everyone was talking about the configuration inside the pom.xml file. But this file comes in the Maven project! so I converted my project to a Maven project. But that too didn't resolve my issues so I "disabled the Maven nature". No luck even after that.
currently, it is a Maven project but when I am following this step it is giving me the subject error.
This is how my package explorer look like:-
The trick is to start small with something working. And then after each change check if it still works. This will help you build an understanding of what each component and change does without overwhelming you.
Unfortunately you are following tutorials that do a whole lot at once. Try to break this down a bit. First learn about Maven, with plain Java and maybe a unit test. Then learn about how Eclipse works with Maven projects. Then use Cucumber with Maven, then add Selenium.
This may seem like a lot more work but it is faster because you'll only have to solve one problem at a time.
I don't have any tutorials for Maven or Eclipse but for Cucumber you use:
https://docs.cucumber.io/docs/guides/10-minute-tutorial/

Error when validating Xtext DSL in standalone Java project

I recently followed Sebastian Zarnekow's short guide on how to deploy an Xtext DSL into a standalone project (found here: http://zarnekow.blogspot.co.uk/2010/06/how-to-deploy-xtext-standalone.html)
However I receive the following error when attempting to run the project...
"The string resource '_UI_DiagnosticRoot_diagnostic' could not be located"
Could this be something to do with how the JAR is exported, I chose the "Extract required libraries into generated JAR" option, if I try to use the second option where the libraries are packaged into the JAR I receive a different error telling me that a main method could not be found.
Has anyone come across this issue before? I tried updating EMF and Xtext but it didn't seem to have any affect.
Any help is appreciated.
this should be a "warning" only - maybe logged as error but not prevent the program from running.
the problem is there a multiple plugin.properties in the root of the jars that may override each other. seems one from the org.eclipse.emf.ecore is going lost.
so you may create a plugin.properties that contains this (and maybe other keys) as well.

Info about version dependancies of enterprise java libraries

I am new to enterprise application developement and trying to create a REST server with Spring REST, JPA taking to mySQL database and Javascript on the client side. As I see loads of opensource libraries doing specific task, I started off with using 'maven project' with different 'arch type' (which is nothing but predefined POM with relevent libraries as I understand) provided by Eclipse. But I often run into version mismatch issues, in many cases found specific solution to that perticular libraries in StackOverflow or other sites.
Hence I started looking for a information these version dependancies such as, this version of JPA works with that version of Hibernate library and so on. I checked maven repository of major libraries, I did not find such information so far.
My queries are:
Where can I find these information about the versions dependancies?
Are these pre defined POM in eclipse reliable? Who owns them, where can I get last modified dates on these maven 'arch types'? (I find the ones I choose having fairly old version of libraries).
If I have to start off on my own creating a Maven dependacies, where will I get information about what are the dependent libraries, for example, if I need spring MVC, for sure it needs java servlet library. I am worried becuase the maven 'spring-mvc-jap' arch type whooping 50 libaries as dependancies.(Coming from embeded domain, I find to too hard to digest :D). So not sure if it is the right way.
Please correct if I am missing anything in my understanding.
You can find this information, if you are using maven and some IDE you can go to the dependancy and make click un > and this will show the librarys used for this dependancy or if you want to use the console you have http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html this will show the same that the IDE.
After normally in the documentation of the library used, you can find some doc about the dependancy about this.
Other solution is get the .jar and use 7zip to see the POM and know the dependancy used.
And for finish my answer if the IDE tell you that you dont have x dependancy normally you have to add this because any of the other dependancy used have it (they used only for the compiling task), but sometime somes projet change a lots of code between the version .a to .b so you will have some problem using the version .b, at this moment i didnt find one good and easy way to fix this, only using the way that i told you (only if i found some problem in the compilation)
3> I am not sure how it works in eclipse but in IntelliJ IDEA when you start using some class without proper dependency IDEA suggest you to add proper dependency automatically. The same approach should be in eclipse.

Appengine: Backend API Tutorial, cannot build project

I have completed the Java Tutorial for Google App Engine.
Now I wanted to do the Backend API Tutorial, but I get errors..
I installed Maven and I was able to generate the project from the command line with maven as described in "Creating an Endpoints Backend Project". I have problems with the next step: Configuring the Maven Project for Endpoints.
Under the point "Setting required plugin configuration" it says "2. Locate and replace the default appengine-maven-plugin configuration entirely with the following: ", before they were talking about the pom file from "helloendpoints/helloendpoints-war".
--> But in that pom.xml-file from "helloendpoints/helloendpoints-war", I cannot locate that configuration... I found that in the pom file of "helloendpoints/helloendpoints-ear".
Question 1: Is this (in ear-folder) the pom-file that i shall edit or should there be that configuration in the pom from the war folder?
However, replacing that code there or not both gives me an error when I invoke maven with "mvn install".
The error-message is the following: "Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war on project helloendpoints-war: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: basedir C:\Users...\helloendpoints\helloendpoints-war\target\generated-sources\appengine-endpoints does not exist".
And I can see that in "...\helloendpoints-war\target", there is no "generated-sources"-folder!
And this is where I am stuck now.
Question 2: Can all this be done without Maven and is there any tutorial for that? Because that is another source of errors and I had to deal with enough errors now... I just want to get an understanding of how the appengine works, how I can use it for my android app and then start from a WORKING basic-project, but I already had to deal with lots of errors. This is pretty frustrating, because I just wanted to do what is told in the tutorial and I still did not write any own code yet...
Question 3: In the next part of the tutorial, are they using the m2e-plugin or anything? Because that was mentioned nowhere, but somehow you have to import that maven project into eclipse...
Yes you can do it without Maven.This and this are simple tutorials from Google that shows you how to add a backend to an Android project.
I would suggest to delete this topic, because I switched to the tutorial without Maven, which has not much to do with my original post. That tutorial works now, but I cannot explain what solved it. I think this whole topic is more confusion and also wasted time for anyone else, who is trying to find an answer here.

How to resolve error "No runtime specified. WLS Web Service projects require a runtime to be present for most tooling." when publishing my project?

I spend one day trying to fix this issue, and finally found a solution. As Google doesn't have any answer for this Eclipse error, I thought of putting this for everyone.
Issue:
When I try to publish project via eclipse, I'm getting this error message:
No runtime specified. WLS Web Service projects require a runtime to be present for most tooling.
How to solve this problem?
(Credits go to Akshay who originally posted this solution in his question.)
This error message appears if your target runtime is not set to the Weblogic version you are using.
The fix is pretty simple, just follow these steps:
Right click on your Project Folder, then Properties
Select Target Runtimes
Once you select you will see the WebLogic version you have added for your project
Just activate the checkbox and hit Apply
Done - your error should be gone

Categories

Resources