tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knute Snortum <kSnor...@catalystitservices.com>
Subject RE: tomcat7-maven-plugin doesn't understand Maven filtering of context files?
Date Tue, 28 Aug 2012 18:48:22 GMT


> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Tuesday, August 28, 2012 11:15 AM
> To: Tomcat Users List
> Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering of
> context files?
> 
> 2012/8/28 Knute Snortum <kSnortum@catalystitservices.com>:
> > If this is the wrong mailing list for tomcat7-maven-plugin, could
> someone direct me to the right place?
> 
> Yes, this is the list.

Thanks

> > I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm
> using the tomcat7-maven-plugin 2.0-beta-1 to help in development by
> running the app in Tomcat inside of the IDE -- or I'm trying.  The error
> I'm getting is:
> >
> > org.springframework.beans.factory.BeanDefinitionStoreException:
> Invalid bean definition with name 'dataSource' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Could not resolve
> placeholder 'db.driverClassName' in string value [${db.driverClassName}]
> >
> > "applicationContext.xml" is my Spring context file.  I have
> placeholders in it to point to the correct database based on Maven
> profiles and filtering.  So a piece of applicationContext.xml looks like
> this:
> >
> >         <bean id="dataSource"
> class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> >                 <property name="driverClassName"
> value="${db.driverClassName}" />
> >                 <property name="url"             value="${db.url}" />
> >                 <property name="username"
> value="${db.username}" />
> >                 <property name="password"
> value="${db.password}" />
> >                 <property name="maxActive"       value="10" />
> >                 <property name="maxIdle"         value="1" />
> >         </bean>
> >
> > As you can see, Tomcat (or Spring?) is finding the dataSource bean
> that does not have the placeholders replaced yet.
> 
> Usually it is Spring job to resolve those.
>  (It has nothing to to with Tomcat or Maven).
> 
> See
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

Well, I'm using Maven filtering, but regardless, I thought the whole point of the tomcat7-maven-plugin
was to run the *war* file, not the development (project) files.  If it doesn't, it's useless
to me.  Or maybe I should ask, How does one run the war file created with mvn clean install
in the IDE (Eclipse)?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message