You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Antonio Gallardo <ag...@agsoftware.dnsalias.com> on 2003/09/28 06:54:35 UTC

OJB block posted to the CVS.

Hi cocooners:

First I am sorry for the large commit comment I did. I dont tought it
would look too ugly. I am really sorry of that. :-(

My initial idea was to post a good comment about this new block. I learned
a lesson with this. I will never will post a long comment in the CVS
again. I promise it.

Well, the OJB block is posted. We worked from 07:30 to 22:33 to make the
lastest tunning before posting:

mocks clasess, finding licenses and links of the libraries and technology,
trying to get woody + flow works with this (the most of the time), an at
least when woody binding does not worked at all we did a very dumb XSP
example that works with hsqldb. We does not know HSQLDB, but we did it
worked.

The initial XSP example (in JDO) just insert into the database a new
department (id=5" + a name) of course it would not work two times, because
the primary key cannot be duplicated. But this XSP example is just to show
a proof that the concept can work. We tried to do a example with woody,
but for an unknow reasons, the binding does not work with the integer
datatype defined in the Employee table of the HSQLDB database shipped with
Cocoon. :(

Of course help is needed and I guess here is very talented people that can
help us to make the block much better for the good of Cocoon.

The idea is now shared with all of you.

Best Regards,

Antonio Gallardo



Re: OJB block posted to the CVS.

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-09-29 at 20:07, Antonio Gallardo wrote:
> Bruno Dumon dijo:
> > On Mon, 2003-09-29 at 17:29, Antonio Gallardo wrote:
> >> Bruno Dumon dijo:
> >> > On Sun, 2003-09-28 at 06:54, Antonio Gallardo wrote:
> >> > <snip/>
> >> >>
> >> >> The initial XSP example (in JDO) just insert into the database a
> >> new department (id=5" + a name) of course it would not work two
> >> times, because the primary key cannot be duplicated. But this XSP
> >> example is just to show a proof that the concept can work. We tried
> >> to do a example with woody, but for an unknow reasons, the binding
> >> does not work with the integer datatype defined in the Employee
> >> table of the HSQLDB database shipped with Cocoon. :(
> >> >
> >> > I guess this is because Woody doesn't have an integer
> >> > (java.lang.Integer) datatype yet, only long and bigdecimal. I hope
> >> to add that one and others (float and double) in the future.
> >>
> >> Thanks for your answer. How we can implement this?
> >
> > Similar to the other datatypes: you need at least a IntegerType and
> > IntegerTypeBuilder class (similar to the LongType and LongTypeBuilder
> > classes). Then you'll also need "convertors", similar to the
> > *LongConvertors.
> 
> I already done all your told. 4 classes and still we got and error.
> 
> Please show us the light again! :-D

Here's some more light:

you need to register the new datatype in the file:
src/blocks/woody/conf/woody-datatype.xconf

Note that after this, you need to do a clean build (or at least remove
the cocoon.xconf).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: OJB block posted to the CVS.

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Bruno Dumon dijo:
> On Mon, 2003-09-29 at 17:29, Antonio Gallardo wrote:
>> Bruno Dumon dijo:
>> > On Sun, 2003-09-28 at 06:54, Antonio Gallardo wrote:
>> > <snip/>
>> >>
>> >> The initial XSP example (in JDO) just insert into the database a
>> new department (id=5" + a name) of course it would not work two
>> times, because the primary key cannot be duplicated. But this XSP
>> example is just to show a proof that the concept can work. We tried
>> to do a example with woody, but for an unknow reasons, the binding
>> does not work with the integer datatype defined in the Employee
>> table of the HSQLDB database shipped with Cocoon. :(
>> >
>> > I guess this is because Woody doesn't have an integer
>> > (java.lang.Integer) datatype yet, only long and bigdecimal. I hope
>> to add that one and others (float and double) in the future.
>>
>> Thanks for your answer. How we can implement this?
>
> Similar to the other datatypes: you need at least a IntegerType and
> IntegerTypeBuilder class (similar to the LongType and LongTypeBuilder
> classes). Then you'll also need "convertors", similar to the
> *LongConvertors.

I already done all your told. 4 classes and still we got and error.

Please show us the light again! :-D

Best Regards,

Antonio Gallardo

"resource://org/apache/cocoon/woody/flow/javascript/woody2.js", line 83:
uncaught JavaScript exception: at woody
(resource://org/apache/cocoon/woody/flow/javascript/woody2.js, Line 204)
at Form (resource://org/apache/cocoon/woody/flow/javascript/woody2.js,
Line 83): org.apache.avalon.framework.CascadingException: Unknown datatype
'integer' specified at
file:/home/desarrollo/tomcat/webapps/cocoon/samples/ojb/woody/employee.xml:64:37


cause: org.apache.avalon.framework.service.ServiceException: Non-existing
component for this hint (Key='integer')

Original Exception: org.apache.avalon.framework.CascadingException:
Unknown datatype 'integer' specified at
file:/home/desarrollo/tomcat/webapps/cocoon/samples/ojb/woody/employee.xml:64:37
	at
org.apache.cocoon.woody.datatype.DefaultDatatypeManager.createDatatype(DefaultDatatypeManager.java:111)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:180)
	at $Proxy0.createDatatype(Unknown Source)
	at
org.apache.cocoon.woody.formmodel.FieldDefinitionBuilder.buildWidgetDefinition(FieldDefinitionBuilder.java:75)
	at
org.apache.cocoon.woody.formmodel.AbstractWidgetDefinitionBuilder.buildAnotherWidgetDefinition(AbstractWidgetDefinitionBuilder.java:113)
	at
org.apache.cocoon.woody.formmodel.FormDefinitionBuilder.buildWidgetDefinition(FormDefinitionBuilder.java:73)
	at
org.apache.cocoon.woody.DefaultFormManager.getFormDefinition(DefaultFormManager.java:152)
	at
org.apache.cocoon.woody.DefaultFormManager.createForm(DefaultFormManager.java:128)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)

.....

Caused by: org.apache.avalon.framework.service.ServiceException:
Non-existing component for this hint (Key='integer')
	at
org.apache.cocoon.woody.util.SimpleServiceSelector.select(SimpleServiceSelector.java:119)
	at
org.apache.cocoon.woody.datatype.DefaultDatatypeManager.createDatatype(DefaultDatatypeManager.java:109)
	... 82 more


>
>>  If we really need to
>> connect to database stuff all the datatypes are very important :-D
>
> yep, I know.
>
>>
>> Can we work in this area?
>
> sure. There's a code-freeze going on though.
>
> --
> Bruno Dumon                             http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> bruno@outerthought.org                          bruno@apache.org




Re: OJB block posted to the CVS.

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-09-29 at 17:29, Antonio Gallardo wrote:
> Bruno Dumon dijo:
> > On Sun, 2003-09-28 at 06:54, Antonio Gallardo wrote:
> > <snip/>
> >>
> >> The initial XSP example (in JDO) just insert into the database a new
> >> department (id=5" + a name) of course it would not work two times,
> >> because the primary key cannot be duplicated. But this XSP example is
> >> just to show a proof that the concept can work. We tried to do a
> >> example with woody, but for an unknow reasons, the binding does not
> >> work with the integer datatype defined in the Employee table of the
> >> HSQLDB database shipped with Cocoon. :(
> >
> > I guess this is because Woody doesn't have an integer
> > (java.lang.Integer) datatype yet, only long and bigdecimal. I hope to
> > add that one and others (float and double) in the future.
> 
> Thanks for your answer. How we can implement this?

Similar to the other datatypes: you need at least a IntegerType and
IntegerTypeBuilder class (similar to the LongType and LongTypeBuilder
classes). Then you'll also need "convertors", similar to the
*LongConvertors.

>  If we really need to
> connect to database stuff all the datatypes are very important :-D

yep, I know.

> 
> Can we work in this area?

sure. There's a code-freeze going on though.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: OJB block posted to the CVS.

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Bruno Dumon dijo:
> On Sun, 2003-09-28 at 06:54, Antonio Gallardo wrote:
> <snip/>
>>
>> The initial XSP example (in JDO) just insert into the database a new
>> department (id=5" + a name) of course it would not work two times,
>> because the primary key cannot be duplicated. But this XSP example is
>> just to show a proof that the concept can work. We tried to do a
>> example with woody, but for an unknow reasons, the binding does not
>> work with the integer datatype defined in the Employee table of the
>> HSQLDB database shipped with Cocoon. :(
>
> I guess this is because Woody doesn't have an integer
> (java.lang.Integer) datatype yet, only long and bigdecimal. I hope to
> add that one and others (float and double) in the future.

Thanks for your answer. How we can implement this? If we really need to
connect to database stuff all the datatypes are very important :-D

Can we work in this area?

Best Regards,

Antonio Gallardo



Re: OJB block posted to the CVS.

Posted by Bruno Dumon <br...@outerthought.org>.
On Sun, 2003-09-28 at 06:54, Antonio Gallardo wrote:
<snip/>
> 
> The initial XSP example (in JDO) just insert into the database a new
> department (id=5" + a name) of course it would not work two times, because
> the primary key cannot be duplicated. But this XSP example is just to show
> a proof that the concept can work. We tried to do a example with woody,
> but for an unknow reasons, the binding does not work with the integer
> datatype defined in the Employee table of the HSQLDB database shipped with
> Cocoon. :(

I guess this is because Woody doesn't have an integer
(java.lang.Integer) datatype yet, only long and bigdecimal. I hope to
add that one and others (float and double) in the future.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org