Hmm... I don't really know what's going on here, but it looks like the error you are getting is generated from the following method :


org.jahia.data.containers.JahiaContainerList.getContainer(int index)

I didn't see a call to this in the code you posted. Is it somewhere else ?

Also, the jData object contains ONLY containers that are on the CURRENT page. So if you are accessing a container list in absolute manner, you are not allowed to then try to access it through :

jData.containers.getContainerList("threadDataHolder");

You must only address it through getAbsoluteContainerList.

I think this might be your problem. If the container list is not found, I think this might trigger the error you were having.

Regards,
 Serge Huber.

Predrag Viceic wrote:

Hi,

Hum, I have checked everything, my field types are ok.
The fields in the db have the right ctnids, the lists are ok too, workflow states, language codes, versions, everything is ok..Realy don't know why this error happens.


The template I use has the following code:

---------------8<-------------------------8<----------------8<-----------

jData.containers().declareField("threadName", "Le path du thread", FieldTypes.SMALLTEXT, "testThread1");
jData.containers().declareField("threadDescription", "La description du thread", FieldTypes.SMALLTEXT, "Un thread de test");
jData.containers().declareField("threadUseValidation", "Thread avec validation?", FieldTypes.BOOLEAN, "on");
jData.containers().declareField("threadIsOptional", "Peut-on se desabonner de ce canal?", FieldTypes.BOOLEAN, "on");


Vector threadData = new Vector();
threadData.add( "threadName" );
threadData.add( "threadDescription" );
threadData.add( "threadUseValidation" );
threadData.add( "threadIsOptional" );
jData.containers().declareContainer( "threadDataHolder", "Le container des donn�es du thread", threadData);


JahiaContainerList threadDataHolderCL=
jData.containers().getAbsoluteContainerList("threadDataHolder", jData.page().getID());


---------------8<-------------------------8<----------------8<-----------

and error occurs here:

String thisThreadName=jData.containers().getContainer("threadDataHolder").getField("threadName").getValue();

When i create the page using the engines everything is fine, but when I create the page with API, I have the error...

Any help?

Predrag Viceic





Le vendredi 15 Octobre 2004 11:35, Serge Huber a �crit :


Hi Predrag,

Database synchronization errors are usually triggered when a field's
type has changed. You should rename your field in you want to change
it's type (this is a data consistency safegard because content might
exist in the old type).

Regards,
 Serge Huber.

Predrag Viceic wrote:


Hi,

Does anybody know what this error means?:


-----------------------8<------------------------8<----------------------- ------ - Error in JahiaContainerList : trying to get entry 0 for container threadDataHolder -> BAILING OUT org.jahia.exceptions.JahiaException: Error in database synchronisation, Error in JahiaContainerList : trying to get entry 0 for container threadDataHolder -----------------------8<------------------------8<---------------------- -------

Thanks,
Predrag viceic








Reply via email to