On Feb 21, 2008, at 6:52 PM, paulie wrote:
Sorry for my ignorance, but I still have a couple of questions.
Things are running fine with running Maven from the command line. I
executed 'mvn clean' and then 'mvn'. From this point, I was able
to execute
'mvn jetty:run-war' without any problems. It seems that Maven is
the one
that copies the appllicationContext-resources.xml from source to
target.
Wouldn't the parsing/filtering take place at that time?
Yes. However, I've seen Eclipse and IDEA re-copy the file (w/o
parsing) if they think the one in src/main/resources is newer.
Second, I have searched the forum and Google for resolutions to this
problem. From what I have seen, it has been resolved either by
packaging
everything into a war file or by plugging pom.xml values into the
applicationContext-resources.xml (which I can't get to work). Is
there a
specific blog that you can point me towards?
I'm disconnected right now, so I can't google for it, but I know
there's some blogs that've described how to configure Maven with
Eclipse so it doesn't copy unfiltered files.
Matt
I thought I would give one more chance before deploying the war.
Thanks for
all of your hard work.
mraible wrote:
This happens when Eclipse (or another IDE), copies the
applicationContext-resources.xml file from src/main/resources to
target/* w/o parsing/replacing the values. If you use Maven from the
command line, everything should work. You may have to do things with
your IDE to exclude this file from being copies w/o filtering. I
believe some folks have blogged about this in the last couple months.
Matt
On 2/21/08, paulie <[EMAIL PROTECTED]> wrote:
I am having the same issue having deployed my 2.0.1 app from
MyEclipse
to
Tomcat 5.5. I updated the applicationContext-resources.xml with
values
from
the pom.xml file.
Old:
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="maxActive" value="100"/>
<property name="maxWait" value="1000"/>
<property name="poolPreparedStatements" value="true"/>
<property name="defaultAutoCommit" value="true"/>
</bean>
New:
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="com.mysql.jdbc.Driver"/>
<property name="url"
value="![CDATA[jdbc:mysql://localhost/eseed]]"/>
<property name="username" value="root"/>
<property name="password" value=""/>
<property name="maxActive" value="100"/>
<property name="maxWait" value="1000"/>
<property name="poolPreparedStatements" value="true"/>
<property name="defaultAutoCommit" value="true"/>
</bean>
Still getting the same error:
[eseed] ERROR [Thread-1] ContextLoader.initWebApplicationContext
(206) |
Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException:
Error
registering bean with name 'dataSource' defined in class path
resource
[applicationContext-resources.xml]: Circular placeholder reference
'jdbc.driverClassName' in property definitions
Do you have any other ideas to get this resolved? Thanks.
Mike Horwitz wrote:
The file applicationContext-resources.xml contains a set of
placeholder
properties that Maven replaces with values that it reads from
the top
level
pom.xml file in your project. If you want to build your project
using
Eclipse you are more than likely going to have to manually
replace the
placeholders in with the values applicationContext-resources.xml as
per
your
top level pom.xml file.
Mike
On 1/16/08, Casanova <[EMAIL PROTECTED]> wrote:
Hello All,
Iam trying to load the appfuse project into Eclipse(Jobss
tools). The
folder
structure of the project is
Project Name
+Javasource
-com.app..
-com.app..
+resources
-all the resources files
+Java web libraies
+Jre(Jdk 1.5..)
+Apache Tomcat v 6
+ant
+webcontent
-All the jsp files
-web.xml
In my web.xml file, I made sure that contextConfigLocation
points to
classpath:resources/applicationContext-resources.xml.
And in applicationContext-resources.xml I changed it to
classpath:resources\jdbc.properties. Now, Iam still having problem
parsing
jdbc.properties. I did my homework by searching in google and
found
that
this is problem with automatic build but still could not find
how I
can
get
rid this. Its almost 2 nights. So, i request to please help me
to get
rid
of
this problem.
Error: : Error registering bean with name 'dataSource' defined in
class
path
resource [resources/applicationContext-resources.xml]: Circular
placeholder
reference 'jdbc.driverClassName' in property definitions
Thanks in Advance.
Best Regards,
Ajay
--
View this message in context:
http://www.nabble.com/Circular-placeholder-reference-%
27jdbc.driverClassName%27-tp14882226s2369p14882226.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
------------------------------------------------------------------
---
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/Circular-placeholder-reference-%
27jdbc.driverClassName%27-tp14882226s2369p15611508.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context: http://www.nabble.com/Circular-
placeholder-reference-%27jdbc.driverClassName%27-
tp14882226s2369p15625764.html
Sent from the AppFuse - User mailing list
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]