aspose file tools*
The moose likes Spring and the fly likes SPrin gMVC w/ Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "SPrin gMVC w/ Eclipse" Watch "SPrin gMVC w/ Eclipse" New topic
Author

SPrin gMVC w/ Eclipse

HectorM Rivera
Greenhorn

Joined: Dec 01, 2010
Posts: 18
I am new to Spring and am trying to use this framework in Eclispe. I am trying to redirect an jsp via an htm. One issue I have is that I am getting an error in my web.xml file with the ".htm" patern

<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>

That is one problem with teh bigger one getting this error:

SEVERE: Context initialization failed
java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:483)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:400)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
... 25 more
Dec 1, 2010 2:48:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:483)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:400)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
... 25 more
Dec 1, 2010 2:48:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Dec 1, 2010 2:48:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SpringMVC] startup failed due to previous errors
Dec 1, 2010 2:48:38 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Dec 1, 2010 2:48:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/SpringMVC] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Thanks - Hector
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10403
    
    8

Welcome to the Ranch.


Do you have the required jars on your classpath.

I think you posted your question in the Swing forum by mistake.
I will move it to the Spring forum for you.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
HectorM Rivera
Greenhorn

Joined: Dec 01, 2010
Posts: 18
I thougthI had all of them. I added spring-web jar
but am getting this error: org.apache.jasper.JasperException: /ctet.jsp(6,0) The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

What are you deploying your app onto. By any chance is this deploying on WebSphere? Do you have the JSTL jars and taglibs configured correctly?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
jQuery in Action, 2nd edition
 
subject: SPrin gMVC w/ Eclipse