Announcement Announcement Module
Collapse
No announcement yet.
Include standalone springapp in web Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Include standalone springapp in web

    Hi,

    I'm currently trying to include my standalone springapplication into my webapp but I can't get it to work. I have the following:

    A jar named syndiction.jar. This jar has a applicationContext.xml in src/applicationContext.xml

    Further a have a web.xml to get the applicationContext.xml using the ContextLoaderListener

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:applicationContext.xml</param-value>
    </context-param>

    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListe ner
    </listener-class>
    </listener>

    I keep thinking i'm not correctly including the applicationContext.xml but I tried serveral variations but I keep getting the following error:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '/hello.htm' defined in ServletContext resource [/WEB-INF/syndicateweb-servlet.xml]: Cannot resolve reference to bean 'channelManager' while setting bean property 'channelManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'channelManager' is defined
    org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
    org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1172)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:940)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:437)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:383)
    java.security.AccessController.doPrivileged(Native Method)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:353)
    org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 45)
    org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:242)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:400)
    org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:736)
    org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:369)
    org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:3 32)
    org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:266 )
    org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:236)
    org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:174)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:874)
    org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
    org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
    org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:689)
    java.lang.Thread.run(Thread.java:595)


    Any suggestions or solutions would be very much appreciated

    Kind regards,

    Josip
    Last edited by josipj; Aug 5th, 2008, 04:52 PM.

  • #2
    I finally got it working. As always it's the classpath. I didn't copy the jar in my WEB-INF/lib folder but I did include in my project in eclipse.

    Comment

    Working...
    X