Spring JAR files not present in new Eclipse Spring project - eclipse

I installed Spring in Eclipse/EE simply from the Eclipse Marketplace.
However, either the Spring jar files aren't there, or am missing something within the project setup.
I looked to find them in the project library thru "Build path". I even tried searching the .jar files within the Windows directories.
I know I'm missing something big-- please bear with me.
Took me hours.
Note: I saw stackoverflow.com/questions/6288563/adding-external-jar-file-in-eclipse/11004869.
Update: found the jars in an earlier release-- 3.05. OK now i think.

Of course they are not there. There is not reason for them to be in eclipse. Select File > New > Spring Template project. This will create new maven project with spring dependencies included

Related

JBoss 6.1.1.EAP Module Deployment: Class not found

The structure is as follows:
Actually deployed module is EAR.
EAR contains WAR module, and WAR module contains another JAR module.
In this last JAR, there are some generated classes and their parent folder is also used as source folder. Its path is "target/generated-sources/java".
The problem that is killing me, is that the deployed application throws ClassNotFoundException on server start, and the classes in question are the generated ones.
Now the trick:
if I explicitly change the Deployment Assembly in WAR project in Eclipse not to contain JAR project as "project", but as an archive from the JAR's project "target" folder, JBoss sees the generated classes and starts.
This solution however works only until next eclipse maven project update, so manual edit of deployment assembly is not really a solution.
Any ideas how to deploy or reorganise packages correctly?
OK, seems I have found the solution.
I looked through the build-path of the mentioned JAR file and saw that the entry Output folder pointed to target/test-classes.
After changing this entry to target/classes the application deploys and starts without any missing generated classes.
This is what worked for me:
Expand the 'target' folder of your maven project inside Eclipse (Project Explorer View);
Refresh it (F5);
Right click on your project on 'Servers' tab, then select "Full Publish";
Start your JBoss.
I had to enforce the JBoss Tool "Full Publish" to get an updated version of my target folder by Refreshing it manually on eclipse.
I don't know why but sometimes the Publishing from maven projects (even Full Publishes) do not copy classes from the target Project as it is in the file system. Maybe it's using some outdated memory info or some cache...
Anyway, this is what works for me.
After an update to Eclipse 4.15 and JBoss tools I got this problem too.
My solution: project -> properties -> Java Build Path --> Source
There my Output folder from my source was linked to project/target/classes, I changed this to project/target/project-projectversion/WEB-INF/classes
When I looked into the standalone JBoss folder I saw the folder structure of my source, but the classes where missing, when I changed the output folder the classes pop up and everything worked like before.
I am pretty sure the update made the problems.

rdf using apache jena on net beans

I want to create a simple RDF graph and then try simple querying using SPARQL. Since I'm familiar with java and net beans, I want to use Apache Jena on NetBeans. I downloaded the related files from http://www.apache.org/dist/jena/ .
What should I do next to write RDF codes on net beans? i.e Should I install something or add lib files/jar files somewhere?
(Too long for a comment on Ian's reply)
Maven is easy on netbeans, and a good way to get started with everything you need (as Ian says). Here's a quick guide to start a jena project:
File -> New Project. Choose Maven then Java Application.
Pick project name, location, etc., then Finish.
Netbeans will create a new maven project and open it.
Right click on Dependencies, choose Add Dependency....
Use org.apache.jena as the Group ID, jena-core (or jena-arq if you want SPARQL) as the Artifact ID, and 2.10.1 as the Version.
Open the Dependencies folder. It ought to have a number jars present -- these are jena and its required jars. You might need to right-click on Dependencies again and choose Download Declared Dependencies to ensure jena is ready for use.
Under Source Packages you'll find App.java. Try some of the simple jena api tutorials and try running them.
You need to put the .jar files from the Jena distribution where Netbeans will find them. I don't know Netbeans, but in Eclipse I might have a lib directory in my project top-level directory, and then set the Eclipse's project classpath to include each of those .jar files. Netbeans I'm sure has something similar.
Actually what I do in Eclipse is not use downloaded jars at all, but I would use Maven to manage the dependencies for me. So I would create a pom.xml file in my project folder that stated that, among other things, my project depends on Jena, and then Maven takes care of downloading the dependencies for me. Eclipse and Maven work well together; I'd hope the same would be true of Netbeans. Setting up Maven to use Jena is described on the Jena site. However, learning Maven can be a bit of a steep curve, so if you're not ready to take that on just yet then downloading the .jar files to a project lib directory is the way to go.

Generalized Steps for configuring imported jsf project's libraries in eclipse

i have checked similar posts and have googled but could not find an eligible answer to this. When ever i import a jsf project from some other system (where its working fine) OR delete the tomcat server in eclipse and add new server back again...there are lots of tag libs and imports that go "unresolved". Such applications are often not created by me and i dont exactly know which libraries are to be added to configure and fix project in eclipse.
I want to ask, is there any general way to find out all the required libraries for any imported jsf project and then add them.
Thanks in advance.
Download the javax.faces.jar file and drop it in project's /WEB-INF/lib folder.
That's all.

STS: Different "view" of Packages in Spring MVC vs Spring Roo - Project

I'm just starting with having fun with Spring Roo...
Everything is nice so far. But eclipse (STS) sometimes behaves strage.
If i generate a new Spring MVC-Project, the containing Packages are shown as I'm familiar with, in eclipse.
If i generate a Roo-Project, Eclipse just shows the Package-Folders.
How can i fix this?
You can fix this by configuring your Eclipse project to contain Roo generated folder src as an Eclipse Source Folder.
For more information and how to, please see the following article.
http://www.informit.com/articles/article.aspx?p=367962
Figure 6-1 is the dialog where you should add your Source folder.
Cheers!

What should I do in order to be able to work with maven + eclipse + wicket + hibernate + spring in Mac OS?

I want to create a web app that will use wicket, hibernate and spring frameworks. My IDE of choice is Eclipse, I am using maven for the .war generation and I am running Mac OS. What steps should I follow to correctly install and configure all the tools so as to have a project running that relies on these 3 frameworks. I was able to successfully set up wicket but I am having trouble for setting up hibernate and spring. I went through multiple tutorials but I still couldn't find the solution.
Thanks!
I will now try to explain a bit what is the problem I can't solve. I first began with a clean project:
mvn archetype:create -DgroupId=test.framework -DartifactId=microForum
Moved on to the project folder and mvn eclipse:eclipse
Imported the project from eclipse
Looked into the apache wicket homepage where there are multiple examples, so I read through the page and that was enough to learn what to add to the pom and had wicket and everything up and running nicely
My next step was trying to use hibernate and/or spring. I thought that "adding" hibernate and spring in the same way I added the wicket necessary configurations and dependencies to the pom (by hand) might not be that easy. So I tried using the maven archetype: appfuse-basic-spring. So:
mvn archetype:generate -> launchs the wizard that lets you choose among different archetypes
After choosing the archetype number 2 ( Hibernate + Spring + Spring MVC) it fails
After googling a bit I found out why it fails (something like I should add a -archetype after appfuse-basic-spring. So, instead of using the wizard, I put:
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring*-archetype* -DarchetypeVersion=2.1.0-M1 -DgroupId=test.framework -DartifactId=microForum2
This created my project (after multiple warnings). I paste a screenshot (Image 1) because some of the information might have some important meaning :
http://img97.imageshack.us/img97/6687/screenshot20100323at112.png
- Image 1
I then did mvn eclipse:eclipse and it started downloading millions of things, which seemed very odd so I Control+C it.
Following schmimd04 answer I tried to use the eclipse maven plugin but I couldn't create a maven project:
Unable to create project from archetype [org.appfuse.archetypes:appfuse-basic-spring:RELEASE]
The defined artifact is not an archetype
Thanks!
p.d: My Mac OS already had maven installed (version 2.2.0), I tried downloading the last one and repeating the same steps but I still had the same trouble.
Bert's recommendation LegUp, jweekend.com/dev/LegUp, have worked just fine for me. I used the wicket + Spring + JPA archetype. I will still look for the reason why maven's Hibernate+Spring+Spring MVC archetype didn't work for me. I'll edit this once I have the answer. For the time being, legup did the job!
Thanks
Install the Maven plugin for Eclipse from the update site: http://m2eclipse.sonatype.org/update.
This will allow you to create Maven projects (I would start with the quickstart archetype) and easily add dependencies, such as Hibernate, Spring, and Wicket.
As Pascal is saying, your question is to broad to answer. A few pointers that might help you:
use 'mvn eclipse:eclipse' to generate an Eclipse project out of your pom.xml. There might even be a working eclipse project that allows to open a pom.xml as eclipse project. I can't say, i left eclipse behind for good.
spring is 'just' a library that need to be in your classpath. the above command will ensure it is there (if it is defind as dependency in the pom.xml) You need to define a applicationContext.xml for Spring that resides in your classpath. See the Spring documentation for that.
hiberate is similar, it is just a library that needs to be in the classpath and that needs to find a config file. in there, the connection to the database is described. See the hibarnate docu (or one of the many blogs out there) for more info.
If you are stuck with a particular problem, please describe it so people can help here.
Bert
I don't know if it sounds odd. But it is because you have archtype data in your .metadata for respective workspace. If you delete the workspace. You can create new archtype. I know deleting worksapce is not a good idea. But still it works.