File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Dependencies  problem in creation Maven+ mvc Spring Proyect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Dependencies  problem in creation Maven+ mvc Spring Proyect" Watch "Dependencies  problem in creation Maven+ mvc Spring Proyect" New topic
Author

Dependencies problem in creation Maven+ mvc Spring Proyect

Francisco Llaryora
Greenhorn

Joined: Dec 30, 2011
Posts: 14
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

Joined: Nov 10, 2009
Posts: 24
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.


Vijayakrishna M
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

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.


[How To Ask Questions][Read before you PM me]
Francisco Llaryora
Greenhorn

Joined: Dec 30, 2011
Posts: 14
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

Joined: Mar 07, 2010
Posts: 1648
    
    7

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

Joined: Dec 30, 2011
Posts: 14
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
Bartender

Joined: Jan 17, 2008
Posts: 2321
    
  28

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

Joined: Mar 07, 2010
Posts: 1648
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dependencies problem in creation Maven+ mvc Spring Proyect