java


Java Spring project with mongodb working in local tomact. But its giving error when deployed to Remote server


Java spring with mongodb Project is working fine with local tomcat server. But when I deployed to amazon ubuntu remote server, I get the below errors. Did anybody face the same issue before?
HTTP Status [500] – [Internal Server Error]
Type Exception Report
Message Servlet.init() for servlet [dispatcher] threw exception
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: Servlet.init() for servlet [dispatcher] threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)
Root Cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'parentController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.livetrip.webapp.manager.ParentManager com.livetrip.webapp.controller.ParentController.parentManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'parentManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.livetrip.webapp.dao.ParentDAO com.livetrip.webapp.manager.ParentManager.parentDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'parentDAO' defined in file [/home/ubuntu/tomcat8/apache-tomcat-8.5.15/webapps/livetrip-spring/WEB-INF/classes/com/livetrip/webapp/dao/ParentDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.livetrip.webapp.dao.ParentDAO]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:633)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:681)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:552)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)
Servlet class:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.1.xsd">
<task:annotation-driven executor="executor" />
<task:executor id="executor" pool-size="7" />
<mongo:repositories base-package="com.livetrip.webapp.dao" />
<context:annotation-config />
<context:component-scan base-package="com.livetrip.webapp" />
<bean id="jacksonMessageConverter"
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="jacksonMessageConverter" />
</list>
</property>
</bean>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/views/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<beans:bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- setting maximum upload size -->
<beans:property name="maxUploadSize" value="10000000" />
</beans:bean>
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:annotation-driven />
</beans>

Related Links

String sum jasper
Java recursive method which adds up digits of an argument [duplicate]
Generating a Random Location Within a Given Range (that can be positive or negative)
json value returning null when sent with ajax request
Radio button group name
How to pass parameter like “User[user]” as json string , while using the Restemplate?
Executing Sample Flink Program in Local
AngularJS Java authentication and $scope
What is the correct way to publish a message over JMS topic which has been injected in an EJB from a Netty event loop?
Signaling between threads in Delphi from Java Code
Enumerating FTPFile from FTP using ZipFile
jar class cannot be resolved to a type
JavaFX TreeTableView - center displayed values inside column
How can i do dynamically detect the path of mysqldump at linux server from window with java?
Not able to understand how interrupt() works in java [duplicate]
List names and number of occurrences

Categories

HOME
ionic-framework
jdo
dictionary
vmware
objectgears
yahoo-oauth
ebean
opengl-es-2.0
azure-media-services
portia
add
google-translate
fancybox-3
dynamics-crm-online
django-simple-history
django-admin
jsdoc
firefox-webextensions
lldb
intentfilter
sylius
xpages-ssjs
microsoft-sync-framework
bootstrap-duallistbox
media-queries
nameservers
typed.js
usbserial
bytecode-manipulation
stacked
main
gesture
ansible-playbook
bootstrapper
avconv
user-accounts
outlook-2013
xml-documentation
appcompat
pango
logparser
python-webbrowser
git-diff
yii2-extension
drupal-6
np-complete
sybase-asa
ifs
capacity
pdfclown
flow-control
arrow-keys
color-profile
messenger
firmata
grails-tomcat-plugin
multi-level
underscore.js-templating
gstreamer-0.10
rhino-servicebus
browser-link
freelancer.com-api
reactive-banana
metaclass
wireshark-dissector
sonarqube5.1.2
device-orientation
npapi
geonetwork
ng-animate
qpainter
preferences
googlemock
sgen
jquery-layout
braille
hyprlinkr
uv-mapping
farseer
ril
gwt-rpc
xamlparseexception
android-screen-support
sabredav
anonymous-methods
typoscript2
simba
coderush
propertyeditor
qtkit
netdna-api
external-accessory
javax.script
gdlib
floating
radcombobox
dentrix
preference
meego
zend-tool
mtj
w3wp

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile