I have this Servlet which consists its constructor as well but when i am trying to run my application on Weblogic server it gives me an error that "SocialMediaSessionHandler" does not have a default constructor. That application is running well on other platform but when i switched between server's that gives me an error: Error occurred while instantiating servlet: "SocialMediaSessionHandler".
public class SocialMediaSessionHandler extends HttpServlet {
private static final long serialVersionUID = 1L;
HttpSession session = null;
private static final CDLoggerInterface log = CDLogger
.getLogger(SocialMediaSessionHandler.class);
Resource resource = new ClassPathResource("/fp.properties");
private boolean debugEnabled;
String serverUrl = "";
IWebServiceManager webServiceManager;
Utility util = null;
/**
* @see HttpServlet#HttpServlet()
*/
public SocialMediaSessionHandler() {
util = new Utility();
// TODO Auto-generated constructor stub
try {
ApplicationContext context = LoadSpringManageService
.LoadApplicationContext();
webServiceManager = (IWebServiceManager) context
.getBean("webserviceManager");
Properties props = PropertiesLoaderUtils.loadProperties(resource);
if (props.getProperty("debug.enable") != null
&& props.getProperty("debug.enable") != "")
debugEnabled = Boolean.parseBoolean(props
.getProperty("debug.enable"));
if (props.getProperty("server.url") != null
&& props.getProperty("server.url") != "")
serverUrl = props.getProperty("server.url");
} catch (MalformedURLException e) {
log.error("MalformedURLException occured.....", e);
} catch (Exception e) {
log.error("Problem in loading CD Logger properties file", e);
}
}