This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

error: org.springframework.beans.factory.BeanCreationException

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,
I am new to spring cloud and have downloaded a sample application from link: https://github.com/cloudfoundry-samples/hello-spring-cloud

but keeps on getting an error :



If anybody has faced this, please let us know.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post your repository and service code seems auto wire is failing because of that and check your spring context fle for component scan....
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util" xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">


<context:annotation-config />
<context:component-scan base-package="com.cea.controller" />




<mvc:annotation-driven />


<bean
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1" />
<property name="mediaTypes">
<map>
<entry key="json" value="application/json" />
<entry key="xml" value="application/xml" />
</map>
</property>

<property name="defaultViews">
<list>
<!-- JSON View -->
<bean
class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />


</list>
</property>
</bean>

<!-- <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1" /> <property name="mediaTypes"> <map> <entry
key="json" value="application/json" /> </map> </property> <property name="defaultViews">
<list> JSON View <bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
</bean> </list> </property> <property name="ignoreAcceptHeader" value="true"
/> </bean> -->





<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" p:order="2" />
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"
p:order="0" />

<!-- Handles HTTP GET requests for /resources/** by efficiently serving
up static resources in the ${webappRoot}/resources directory -->
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:resources mapping="/CEAscripts/**" location="/CEAscripts/" />




</beans>

 
shikha nirankari
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sriram,
Thanks for your replay but I m using spring cloud where configuration files are not required and also have mentioned the link where I have downloaded the demo application, not done any changes to that.
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!