In my Lifeary custom portlet i have included one java class in which my custome logic for uploading the media on cloud server is resides.
that java class if i put in one java project then if i run then its working fine. but when that same java class and whatever the reference its need to run that am adding in my custom portlet project as its need to be.but some how its giving me following error..
05:19:41,312 ERROR [http-bio-8080-exec-2][render_portlet_jsp:154] java.lang.ClassNotFoundException: junit.framework.TestCase
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2889)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at cloudkey.Test_FileUpload.main(Test_FileUpload.java:21)
at com.fl.UploadFilePortlet.UploadDocument(UploadFilePortlet.java:74)
at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:153)
at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:250)
at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:80)
at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:220)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
basically i have two package cloudkey and util
in cloudkey package i have test upload class.am calling its method in my porlet action class. there is no compile time error i got..but just this error i am having.and i ahev alredy added Junit3 library in my project as well..
What is this error about??and if u want my code snippet then i will provide as u cant understand my question..
Just verify again that you have added the junit jar file in portlet (use portlet-plugin.properties),stop the server delete the temp and work folder restart the server and deploy your portlet again,also if you are using classLoader in your code then replace it with "getClass().getClassLoader()" save deploy again and verify it.