On 6/16/07, MDA Team <[EMAIL PROTECTED]> wrote:
Hi all,
I'd have couple of starter questions regarding appfuse 2.0:
- Where can be found log files containing errors with bean loading? It seems
that adding a controller and a related jsp page causes the tests to return
errors. So far, I have noticed that mvn does not give any indicators when
bean loading fails or there is somethign missing/wrong in the config files.
What is the best practice for discovering the cause of such problems?
If you're running a test, the log will be in
target/surefire-reports/fullyqualifiedclassname.txt. If you're getting
these errors when starting up your server, you may want to run
something like "mvn jetty:run-war | tee mvn.log". This will show
output in your console and log to a file. The "tee" command will only
work in a Unix environment (Linux, OS X or Cygwin on Windows). You can
also pass in -Dsurefire.useFile=false from the command line (when
running tests) to get test output in your console.
http://appfuse.org/display/APF/Maven+2
- What is the correct procedure for adding external libraries to the
project, and having them checked out in svn? To integrate the smack
libraries, I have done the following steps:
1) mvn install:install-file -DgroupId= org.jivesoftware -DartifactId=smack
-Dversion=3.0.3 -Dpackaging=jar -Dfile=/lib/smack.jar
2) mvn eclipse:eclipse
after that eclipse correctly recognized the dependencies, but the manager
tests (using smack) fail. I'd have a few questions:
- How to make install of third party libraries in e.g. myproject\lib
directory instead of maven repository, so that I can commit them to SVN
You should setup a Maven repository to store 3rd party artifacts. Or
try to get smack uploaded to Maven's central repository. To search for
existing artifacts, you can use http://mvnrepository.com. It looks
like smack is already available:
http://mvnrepository.com/search.html?query=smack
You might also want to consider setting up an internal repository to
handle 3rd party artifacts. See the bottom of the following page for
more information:
http://appfuse.org/display/APF/Maven+2#Maven2-InstallingalocalMavenRepository
- Is it needed to do generation of source code of appfuse into the project
and run mvn eclipse:eclipse after every such update?
No, you'll only need to run "eclipse:eclipse" after adding new libraries.
- What could be the problem with importing smack.jar in the project?
Extremly simple manager test fails, returning:
Error! A startup class specified in smack-config.xml could not be loaded:
org.jivesoftware.smackx.ServiceDiscoveryManager (and couple
of other classes from the same package) It's very awkward, but
smack-config.xml file can't be found anywhere on the hard drive. Is it maybe
generated, and how?!
How could I trace the calls and discover what is the problem there?
You should be able to debug the test in Eclipse.
Furthermore, for the project I need only classes from smack.jar, additional
functionality from smackx.jar is not needed. Can you please help to find out
what could be the problem?
- Has anybody tried to integrate a Jabber Client API in Appfuse? What would
be th easiest way for embedding a jabber client into Web Interface (simillar
to Gtalk integration in Gmail) and would you maybe have some code/example of
integration with Ajax or other technologies used there?
- How can this Junit error be resolved?
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
This happens when jdbc.properties is picked up before being parsed and
replaced with properties from pom.xml. If you run "mvn
resources:testResources", it'll copy and parse the file into
target/classes. You may have to exclude
src/main/resources/jdbc.properties in order to get the 2nd one picked
up properly.
Another option, which I haven't tried, is to use the jdbc.properties
file as the source of variables.
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
Hope this helps,
Matt
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java
:249)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors
(AbstractApplicationContext.java:467)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
at
org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext
(AbstractSingleSpringContextTests.java:199)
at
org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:179)
at
org.springframework.test.AbstractSingleSpringContextTests.loadContext
(AbstractSingleSpringContextTests.java:158)
at
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:105)
at
org.springframework.test.AbstractSingleSpringContextTests.setUp
(AbstractSingleSpringContextTests.java:87)
at junit.framework.TestCase.runBare(TestCase.java:128)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
at junit.framework.TestResult$1.protect
(TestResult.java:106)
at
junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at
junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Here ar the contents of applicationContext-resources.xml :
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:jdbc.properties</value>
<value>classpath:mail.properties</value>
</list>
</property>
</bean>
<!-- JNDI DataSource for J2EE environments -->
<!--<jee:jndi-lookup id="dataSource"
jndi-name="java:comp/env/jdbc/appfuse"/>-->
<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="maxIdle" value="30"/>
<property name="maxWait" value="1000"/>
<property name="defaultAutoCommit" value="true"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="60"/>
</bean>
Thank you very much for your help in advance!
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]