Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependencies problem in creation Maven+ mvc Spring Proyect

 
Francisco Llaryora
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.

I download the mvc-basic project from the spring repository and work as well.

Now I trying create a Maven Spring project to zero in eclipse (SpringSource Tool Suite 2.9.2), using "Spring Template Project".
But it get errors: like:
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" home.jsp
Class 'org.springframework.web.servlet.view.InternalResourceViewResolver' not found

I trying copy the dependencies and sources from pom file of mvc-basic to the template, and nothing.

How can i create a new Spring+Maven Project in a straightforward way?
Or How can i resolve this error?
I don't want Create a Maven and then convert it in a spring project .

thanks for readme!




 
vijayakrishna Mikkilineni
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Francisco,

You possibly do not have JSTL jar in your class path. Please add this dependency to your POM.

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

Thanks,
Vijay.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which template project are you creating? It should just work, are there any other errors in your maven console when it is creating the project from an archetype?
Try and delete the contents of your .m2/repository folder maybe something got corrupted. Also the template project gets horked up if you try to get it through certain proxies in Enterprises that forward to their own repositories.
 
Francisco Llaryora
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello vijayakrishna Mikkilineni and Bill Gorder!
Which template project are you creating? Spring MVC Project (in home.jsp try to show the server time)

Ok, i cut and paste the files ("just in case" for other maven project ) in another location.
This are my "problems" in my problem view.
Description Resource Path Location Type
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" home.jsp /Lucky/src/main/webapp/WEB-INF/views line 1 JSP Problem
Controller cannot be resolved to a type HomeController.java /Lucky/src/main/java/ar/com/lucky line 17 Java Problem
Logger cannot be resolved to a type HomeController.java /Lucky/src/main/java/ar/com/lucky line 20 Java Problem
Logger cannot be resolved to a type HomeController.java /Lucky/src/main/java/ar/com/lucky line 27 Java Problem
LoggerFactory cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 20 Java Problem
Model cannot be resolved to a type HomeController.java /Lucky/src/main/java/ar/com/lucky line 26 Java Problem
RequestMapping cannot be resolved to a type HomeController.java /Lucky/src/main/java/ar/com/lucky line 25 Java Problem
RequestMethod cannot be resolved to a variable HomeController.java /Lucky/src/main/java/ar/com/lucky line 25 Java Problem
The attribute method is undefined for the annotation type RequestMapping HomeController.java /Lucky/src/main/java/ar/com/lucky line 25 Java Problem
The attribute value is undefined for the annotation type RequestMapping HomeController.java /Lucky/src/main/java/ar/com/lucky line 25 Java Problem
The import org.slf4j cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 7 Java Problem
The import org.slf4j cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 8 Java Problem
The import org.springframework cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 9 Java Problem
The import org.springframework cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 10 Java Problem
The import org.springframework cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 11 Java Problem
The import org.springframework cannot be resolved HomeController.java /Lucky/src/main/java/ar/com/lucky line 12 Java Problem

Thanks for the help! ;)
Best regards!
PS:just mvc-basic/ its going to be my Template? (laugh)
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you try and delete the contents of the .m2/repository folder like I said? I remember having a problem where the bundlor jars for the Spring MVC template were corrupted and caused weird issues. Try to do that and then create a new Spring MVC template project. It will take awhile as it will have to download all the dependencies again.
 
Francisco Llaryora
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill Gorder!
I did move the contents of the .m2/repository to other folder, and then i did create a new Spring MVC template project.
And after copy the problems.

Sory for my poor english. What is a "bundlor"?
or what do you mean with "bundlor jars" ?
 
Jayesh A Lalwani
Rancher
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do the project compile when you compile through maven? How are you importing the project into Eclipse? I have found that mvn eclipse:eclipse is not very convenient. Using the m2eclipse plugin works much better for me.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean "after copy". Maybe I am misunderstanding something. I thought you were going to file -> new Spring Template Project -> Spring MVC Project and using the wizard to create the project. Once the project is created are there errors? Are you able to right click the project in package explorer and choose run as -> maven install?

If you are trying to import an existing project delete the .project and .classpath files and choose file -> Import -> existing Maven Projects and browse to the projects root POM.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic