Make sure spring.jar is under WEB-INF/lib.
Main Topics
Browse All TopicsHi Experts,
I was working on a Spring web application using annotations with jdk 1.5. I later came to know that we are deploying this on WAS6.0 , which only supports JDK1.4. I changed my complete code to get rid of annotations.
Though the error I am getting is quite self explanatory, but I dont know hwo to get rid of it. I already compiled my web project as 1.4. is there any jar files I need to include or something like that?
Now today when I deployed my code on WAS6.0, I got the following error:
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You're not missing a jar file. If you were, the class loader would be issuing a ClassNotFoundException. The problem is that you are compiling your code with a different (most likely older) version of the JDK than the spring was compiled with. However, Spring 2.5.x is supposed to fully support java 1.4 so it comes down to are you actually using a 1.4 jdk and what version of spring are you using?
If you have a spring-jpa.jar file hanging around you can get rid of it. However, once you do that you'll start getting ClassNotFoundExceptions so the solution is really just to remove all references to OpenEntityManagerInViewFil
org.springframework.web.se
org.s
or
o
o
org.spr
org
org.sp
o
org.
c
com
c
c
com.spr
com
com.
com.spr
com.spring
com.spri
com
>> Actually when I remove all that from web.xml and dispatcher servlet, the request is not getting to the servlet.
>> and I am not seeing that 49.0 error once I remove it.
Good! That means we fixed your first problem. What do you mean that the request isn't making it to the servlet? What is Log4j reporting?
Okay, a few thoughts. First, try telling the dispatching servlet to load first by setting load-on-startup to 1,
>> <servlet>
>> <servlet-name>analytics</serv
>> <servlet-class>org.springfra
>> <load-on-startup>2</load-on-s
>> </servlet>
and set the resource servlet to start second by adding the following to its servlet definition.
>> <load-on-startup>2</load-on-s
Also, comment out your error page,
>> <error-page>
>> <exception-type>java.lang.Ex
>> <location>/WEB-INF/jsp/uncau
>> </error-page>
It could cause the problem you're complaining about if an exception is being thrown and uncaughtException.jsp doesn't display anything.
Also, what does your log4j.properties file look like?
Does "uncaughtException.jsp" appear in the browser's address bar when it gives you a blank screen? I would think that you'd be getting a 404 or 403 error if you weren't, at least, getting to the DispatcherServlet. So I'm wondering if your controller is loading a view or if an exception being thrown?
Yes, I would try /analytics/chart.html. It makes sense that /analytics/index.html would return a 404 error because the welcome file specified in web.xml is index.jsp and you're not defining a url mapping for index.html in your application context. Try creating a file called index.jsp outside of the WEF-INF directory and set the contents to something like the following code fragment. That way index.jsp forwards the user to your chart controller, or whichever controller you want to use as the default.
Yes, I am based in the US.
You've still got classpath problems. If you're sure that you have org.springframework.orm-2.
org/springframework/orm/hi
If any of the directories are missing or you can't find OpenSessionInViewIntercept
At this point, it's complaining that it can't find a bean named "sessionFactory" because you haven't configured hibernate, which you will need to do if you want to work with a database.
What were you using for persistence before you switched from jdk 1.5 to jdk 1.4? If you don't need to talk to a database, just comment out the OpenSessionInViewIntercept
If you do need to work with a database, then you're going to need to define hibernate a datasource bean which can connect to your database and then you're need to define the hibernate session factory and inject it into the OSIVI. And you would then need to create xml hibernate mappings for your database schema.
Business Accounts
Answer for Membership
by: Micheal_MalePosted on 2009-06-22 at 21:22:23ID: 24688736
Did you tried recompiling the project with 1.4 ? What version of spring you are using ?