Does this Delicious object take constructor args, like the username
and password? If so, try:
<bean class="del.icio.us.Delicious">
<constructor-arg index="0" value="username"/>
<constructor-arg index="1" value="password"/>
</bean>
I believe the "index" attribute is zero-based, but I could be wrong.
Matt
On 2/19/07, Dorothy Turner <[EMAIL PROTECTED]> wrote:
Hi Again -
My mission is to connect to delicious using the delicious-java api and
display links on a page within an appfuse app.
With much help, i've managed to include the delicious java jar file into my
lib folder, import the package into my classes and compile successfully.
However, I sense that I still have a long way to go. :)
I created a manager class called LinkManagerImpl which contains an instance
of the Delicious object (from delicious-java api). I added the following
mapping in applicationContext-service.xml and I receive an error. Error is
also below. I soppose that the problem stems from the fact that
Delicious.java is not a javabean..but a regular ol' class.
Best,
Dorothy
Mapping from applicationContext-service.xml
--------------------------------------------------------------------
<bean id="linkService" parent="txProxyTemplate">
<property name="target">
<bean class="del.icio.us.Delicious">
<property name="username" value="username"/>
<property name="password" value="password"/>
</bean>
</property>
</bean>
<bean id="linkManager" parent="txProxyTemplate">
<property name="target">
<bean class="
org.dba.service.link.impl.LinkManagerImpl">
<property name="linkService" ref="linkService"/>
</bean>
</property>
</bean>
My Error:
------------------------------------------------
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'del.icio.us.Delicious#11c19e6' defined in URL
[jar:file:/C:/opt/jakarta-
tomcat-5.0.28/webapps/death/WEB-INF/lib/death-service.jar!/META-INF/applicationContext-service.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.FatalBeanException: Could not
instantiate class [ del.icio.us.Delicious]: no default constructor found;
nested exception is java.lang.NoSuchMethodException:
del.icio.us.Delicious.<init>()
org.springframework.beans.FatalBeanException: Could not
instantiate class [ del.icio.us.Delicious]: no default constructor found;
nested exception is java.lang.NoSuchMethodException:
del.icio.us.Delicious.<init>()
java.lang.NoSuchMethodException: del.icio.us.Delicious.<init>()
at java.lang.Class.getConstructor0(Class.java:2647)
at
java.lang.Class.getDeclaredConstructor(Class.java:1953)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:76)
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]