I am using Spring Portlet mvc with file upload. When I was using WebLogic 10.3.0 it was working fine. I am migrating to WebLogic 10.3.7. Here with the same code I am getting below error:
javax.portlet.PortletException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'portletMultipartResolver' defined in PortletContext resource Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.portlet.multipart.CommonsPortletMultipartResolver]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/portlet/ActionRequest
WebLogic server is not able to find ActionRequest.class. I have tried several options like placing jar file (netuix_common.jar
) which contains ActionRequest.class inside the application war file but still it didn't work.
What can I try to resolve this?
java.lang.NoClassDefFoundError - you get this error when weblogic server finds this class in its classloader but not the one with the correct version.
you did the right thing by adding it to the application war file, you may want to add the flag of " prefer-web-inf-classes "
https://docs.oracle.com/cd/E23943_01/web.1111/e13712/weblogic_xml.htm#WBAPP601