Hello,
I have following in my app-context.xml.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:couchdb="http://www.ektorp.org/schema/couchdb"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.ektorp.org/schema/couchdb http://www.ektorp.org/schema/couchdb/couchdb.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<util:properties id="props" location="classpath:/couchdb.properties" />@Test
public void testGetAllAsView() throws Exception{
List<String> docIds = myDb.getAllDocIds();
}
My test fails with following output:
Failed tests: init(persistence.couchdb.AppTest): Error creating bean with name 'myDb': Cannot create inner bean '(inner bean)' of type [org.ektorp.spring.HttpClientFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.net.MalformedURLException: no protocol:
init(persistence.couchdb.AppTest): Error creating bean with name 'myDb': Cannot create inner bean '(inner bean)' of type [org.ektorp.spring.HttpClientFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.net.MalformedURLException: no protocol:
Any help is appreciated please...
Thanks.
--
You received this message because you are subscribed to the Google Groups "ektorp-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ektorp-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<?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:context="http://www.springframework.org/schema/context"
xmlns:couchdb="http://www.ektorp.org/schema/couchdb"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.ektorp.org/schema/couchdb http://www.ektorp.org/schema/couchdb/couchdb.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<context:property-placeholder
location="file://${aurin.dir}/user-projects-combined.properties" />
<util:properties id="couchdbProperties" location="file:///${aurin.dir}/couchdb.properties" />
<couchdb:instance id="myDb" properties="couchdbProperties"/>
<couchdb:database name="mydb" instance-ref="myaurinDb" url="${persistent.couchdb.server.url}"/>
</beans>
@Qualifier("myDb")CouchDbConnector myDb;
@Test
public void testFetch(){
List<String> docIds = myDb.getAllDocIds();
}