Continuing discussion here. If anyone has any ideas about the problem
below, please speak up. This is a deploy of CMS v6.05.02 on
Weblogic 9.2.

From: Gian Carlo Pace <[EMAIL PROTECTED]>

Hi Bartosz,

I found another bug in my templates, sorry about that.
...
Your build.properties look fine. (AFAICS without knowing your exact
configuration)

I tried  out your configuration but it seems to have some problem:
the error message has not changed. But from what we see this is just
one part of the problem but not the main problem that prevents us to
edit and create out documents.

The maim point seems to be in the handled-errors.log.2008_0X_YY.log
(attached to this mail) in which we find (at the end of the file):

Caused by: org.apache.excalibur.source.SourceNotFoundException: file:/
home/sourcesense/deploy_weblogic/editor.war/sites/hippo-cms/editing/
cf2/ doesn't exist.
         at org.apache.excalibur.source.impl.FileSource.getInputStream
(FileSource.java:150)
         at
org.apache.cocoon.components.source.SourceUtil.getInputSource
(SourceUtil.java:522)
         ... 105 more
Caused by: java.io.FileNotFoundException: /home/sourcesense/
deploy_weblogic/editor.war/sites/hippo-cms/editing/cf2 (Is a directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at org.apache.excalibur.source.impl.FileSource.getInputStream
(FileSource.java:146)
         ... 106 more

Now the path /home/sourcesense/deploy_weblogic/editor.war/sites/hippo-
cms/editing/cf2 is existing but is a directory and not a file and it
seems to me that something should be postponed to that path.

Just to add some infos in the exception I can find the file sites/
hippo-cms/editing/cf2/flow/HippoForm.js involved in the cause and it
seems it fails at line 39

         formMgr = cocoon.getComponent
(Packages.org.apache.cocoon.forms.FormManager.ROLE);
         resolver =   cocoon.getComponent
(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
         src = resolver.resolveURI(uri);
 >>>>>>> this.form = formMgr.createForm(src); <<<<<<<<<<<<<<<<<

Does this error sounds familiar to you? Have you faced this problem
before?
Could you please take a look at the log file? It seems to me that
something related to the cache has gone wrong but I'm quite guessing.

NOTE: Repos has been downloded from the hippo distribution and types
definition is the default one in order to have the whole thing
working in the simplest situation.

Thank again
--
Gian Carlo



--
Bartosz Oudekerk
.-----------------------
| Hippo
| Oosteinde 11
| 1017 WT  Amsterdam
| The Netherlands
| Tel  +31 (0)20 5224466
+----------------------------------------------
| [EMAIL PROTECTED] / http://www.hippo.nl
`----------------------------------------------------------------------

Attachment: handled-errors.log.2008_01_03.log
Description: Binary data

/*

 * Copyright 1999-2004 The Apache Software Foundation.

 *

 * Licensed under the Apache License, Version 2.0 (the "License");

 * you may not use this file except in compliance with the License.

 * You may obtain a copy of the License at

 *

 *      http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */



/**

 * Implementation of the Cocoon Forms/FlowScript integration.

 *

 * @author <a href="http://www.apache.org/~sylvain/";>Sylvain Wallez</a>

 * @version CVS $Id: HippoForm.js,v 1.1 2005/10/06 14:45:15 dennis Exp $

 */



// Revisit this class, so it gives access to more than the value.

defineClass("org.apache.cocoon.forms.flow.javascript.ScriptableWidget");



/**

 * Create a form, given the URI of its definition file

 */

function Form(uri) {

    var formMgr = null;

    var resolver = null;

    var src = null;

    var xmlAdapter = null;

    try {

        formMgr = cocoon.getComponent(Packages.org.apache.cocoon.forms.FormManager.ROLE);

        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);

        src = resolver.resolveURI(uri);

        print("******* Non trova: " + src);

        this.form = formMgr.createForm(src);

        this.binding = null;

        this.eventHandler = null;

        // FIXME : hack needed because FOM doesn't provide access to the context

        this.avalonContext = formMgr.getAvalonContext();

        // TODO : do we keep this ?

        this.formWidget = new Widget(this.form);



    } finally {

        cocoon.releaseComponent(formMgr);

        if (src != null) resolver.release(src);

        cocoon.releaseComponent(resolver);

    }

}



Form.prototype.getModel = function() {

    return this.formWidget;

}





/**

 * Get the actual Form-Widget (the Java object)

 */

Form.prototype.getWidget = function(name) {

    if (name != undefined) {

        throw "getWidget(id) has been deprecated.\n" +

              "Consider using getChild(id) or lookupWidget(path) instead."

    }

    return this.form;

}



/**

 * Get a child Widget (the java object) from the form via its <code>id</code>.

 */

Form.prototype.getChild = function(id) {

    return this.form.getChild(id);

}



/**

 * Get a Widget (the java object) from the form via its <code>path</code>.

 */

Form.prototype.lookupWidget = function(path) {

    return this.form.lookupWidget(path);

}



/**

 * Manages the display of a form and its validation.

 *

 * This uses some additionnal propertied on the form object :

 * - "locale" : the form locale (default locale is used if not set)

 *

 * On return, the calling code can check some properties to know the form result :

 * - "isValid" : true if the form was sucessfully validated

 * - "submitId" : the id of the widget that triggered the form submit (can be null)

 *

 * @parameter uri the page uri (like in cocoon.sendPageAndWait())

 * @parameter bizdata some business data for the view (like in cocoon.sendPageAndWait()).

 *            The "{FormsPipelineConfig.CFORMSKEY}" and "locale" properties are added to this object.

 */

Form.prototype.showForm = function(uri, resultHandler, bizData) {



    if (bizData == undefined) bizData = new Object();

    bizData[Packages.org.apache.cocoon.forms.transformation.FormsPipelineConfig.CFORMSKEY] = this.form;



    if (this.locale == null)

        this.locale = java.util.Locale.getDefault();

    bizData["locale"] = this.locale;



    // Keep the first continuation that will be created as the result of this function

    

    var finished = false;

    this.isValid = false;



    // FIXME: Remove check for removed syntax later.

    if (this.validator != undefined) {

        throw "Forms do not support custom javascript validators anymore. Declare your validators in the form model file.";

    }



    var finished = false;



    var comingBack = false;

    

    var bookmark = cocoon.createWebContinuation();

    

    // Attach the form to the continuation so that we can access by just knowing the continuation id

    bookmark.setAttribute("form", this.form);

    if (this.getUseUniqueContinuations() && typeof this.formName != 'undefined'){

      bookmark.setAttribute(

         Packages.nl.hippo.cocoon.components.flow.ContinuationsManagerImpl.DUPLICATE_CHECK_CONTINUATION_ATTR, this.getFormName());

    }

    

    if (comingBack) {

       

        var formContext = new Packages.org.apache.cocoon.forms.FormContext(cocoon.request, this.locale);



        // Prematurely add the bizData as in the object model so that event listeners can use it

        // (the same is done by cocoon.sendPage())

        // FIXME : hack needed because FOM doesn't provide access to the object model

        var objectModel = org.apache.cocoon.components.ContextHelper.getObjectModel(this.avalonContext);

        org.apache.cocoon.components.flow.FlowHelper.setContextObject(objectModel, bizData);



         finished = this.form.process(formContext);

        if (finished) {

            this.isValid = this.form.isValid();

        }



        // FIXME: Theoretically, we should clone the form widget (this.form) to ensure it keeps its

        // value with the continuation. We don't do it since there should me not much pratical consequences

        // except a sudden change of repeaters whose size changed from a continuation to another.

        

        // [DD] if finished, just stay in the form        

        resultHandler.processResult(this,finished); // if successfull, continue loop

        

        finished = false; // stay in this loop. If there are errors, show them in the editor.

  

    }

    comingBack = true;

    var activeElement = Packages.nl.hippo.cocoon.forms.HippoFormHelper.getBookmark(this.form);

    new HippoFormProcessor().process(this.form);

    bizData["htmlBookmark"]=''+activeElement;

    cocoon.sendPage(uri, bizData, bookmark);

    

    if (this.cleanupHook) {

        this.cleanupHook(this);

    }

    

    FOM_Cocoon.suicide();

    

    var widget = this.form.getSubmitWidget();

    // Can be null on "normal" submit

    this.submitId = widget == null ? null : widget.getId();



}



Form.prototype.createBinding = function(bindingURI) {

    var bindingManager = null;

    var source = null;

    var resolver = null;

    try {

        bindingManager = cocoon.getComponent(Packages.org.apache.cocoon.forms.binding.BindingManager.ROLE);

        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);

        source = resolver.resolveURI(bindingURI);

        this.binding = bindingManager.createBinding(source);

    } finally {

        if (source != null)

            resolver.release(source);

        cocoon.releaseComponent(bindingManager);

        cocoon.releaseComponent(resolver);

    }

}



Form.prototype.setFormName = function(name) {

    this.formName = name;

}



Form.prototype.getFormName = function() {

    return this.formName;

}



Form.prototype.setUseUniqueContinuations = function(val) {

    this.useUniqueContinuations = val;

}



Form.prototype.getUseUniqueContinuations = function() {

    return this.useUniqueContinuations;

}



Form.prototype.load = function(object) {

    if (this.binding == null)

        throw new Error("Binding not configured for this form.");

    this.binding.loadFormFromModel(this.form, object);

}



Form.prototype.save = function(object) {

    if (this.binding == null)

        throw new Error("Binding not configured for this form.");

    this.binding.saveFormToModel(this.form, object);

}



Form.prototype.setAttribute = function(name, value) {

    this.form.setAttribute(name, value);

}



Form.prototype.getAttribute = function(name) {

    return this.form.getAttribute(name);

}



Form.prototype.removeAttribute = function(name) {

    this.form.removeAttribute(name);

}



Form.prototype.getXML = function() {

    if (this.xmlAdapter == null)

        this.xmlAdapter = new Packages.org.apache.cocoon.forms.util.XMLAdapter(this.form);

    return this.xmlAdapter;

}



Form.prototype.loadXML = function(uri) {

    var source = null;

    var resolver = null;

    try {

        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);

        source = resolver.resolveURI(uri);

        Packages.org.apache.cocoon.components.source.SourceUtil.toSAX(source, this.getXML());

    } finally {

        if (source != null)

            resolver.release(source);

        cocoon.releaseComponent(resolver);

    }

}



Form.prototype.saveXML = function(uri) {

    var source = null;

    var resolver = null;

    var outputStream = null;

    try {

        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);

        source = resolver.resolveURI(uri);



        var tf = Packages.javax.xml.transform.TransformerFactory.newInstance();



        if (source instanceof Packages.org.apache.excalibur.source.ModifiableSource

            && tf.getFeature(Packages.javax.xml.transform.sax.SAXTransformerFactory.FEATURE)) {



            outputStream = source.getOutputStream();

            var transformerHandler = tf.newTransformerHandler();

            var transformer = transformerHandler.getTransformer();

            transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.INDENT, "true");

            transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.METHOD, "xml");

            transformerHandler.setResult(new Packages.javax.xml.transform.stream.StreamResult(outputStream));

            this.getXML().toSAX(transformerHandler);

        } else {

            throw new Packages.org.apache.cocoon.ProcessingException("Cannot write to source " + uri);

        }



    } finally {

        if (source != null)

            resolver.release(source);

        cocoon.releaseComponent(resolver);

        if (outputStream != null) {

            try {

                outputStream.flush();

                outputStream.close();

            } catch (error) {

                cocoon.log.error("Could not flush/close outputstream: " + error);

            }

        }

    }

}



function handleForm() {

    var form = new Form(cocoon.parameters["form-definition"]);



    var args = [form];



    // set the binding on the form if there's any

    var bindingURI = cocoon.parameters["bindingURI"];

    if (bindingURI != null) {

        form.createBinding(bindingURI);

    }



    var funcName = cocoon.parameters["function"];

    var func = this[funcName];



    if (!func) {

        throw "Function \"" + funcName + "\" is not defined.";

    } else if (!(func instanceof Function)) {

        throw "\"" + funcName + "\" is not a function.";

    }



    func.apply(this, args);

}



>
>> The other strange thing is that I can startup the context only  
>> shutting down the whole server I created for this project and  
>> firing it up. If I try to stop and start the cms context weblogic  
>> complains with the StackTrace[1]
>
> This seems something from WebLogic itself, not directly related to  
> the CMS. I'm sorry, I can't help you with this.
>
>> Thanks in advance and happy new year!
>
> Happy new year to you too.
>
>> Il giorno 29/dic/07, alle ore 15:47, Bartosz Oudekerk ha scritto:
>>> Gian Carlo Pace wrote:
>>>> Hi Bartosz,
>>>> glad to read you :)
>>>>> check out the latest tag of the CMS
>>>>> unpack the tar.bz2 file[0] on top of it.
>>>>> move the editor/build.properties-weblogic to editor/ 
>>>>> build.properties and
>>>>> configure it match your setup.
>>>>> execute: maven -deditor cocoon:war
>>>>> unpack(jar -xf) the war somewhere WebLogic can find it and deploy.
>>>> It's almost what I've done and it did not worked for me: the war  
>>>> does not seems to have a weblogic.xml in it and does not seems  
>>>> to be complete. The last configuration I tryied used the trunk  
>>>> of the CMS: maybe it does not work with it but only with 6.05  
>>>> version?
>>>
>>> It should have a weblogic.xml, since that one is included in the
>>> template that's in the archive from the wiki. If it doesn't, one of
>>> the above steps must have gone wrong.
>>>
>>> After unpacking it on top of your sources, you should have a
>>> build.properties-weblogic in the editor folder.
>>>
>>> In those build.properties-weblogic there's the line
>>> maven.war.src=${basedir}/../config/webapp
>>> and if you look in that folder(it's also in the archive), you  
>>> will see
>>> there's a WEB-INF with a weblogic.xml, which will be added to  
>>> your war
>>> after it is built.
>>>
>>> So if you rename the build.properties-weblogic to  
>>> build.properties and
>>> do a 'maven -deditor cocoon:war' it should include the  
>>> weblogic.xml when
>>> building. If it doesn't there at least should be some error in the
>>> output of maven.
>>>
>>> Regards,
>>> -- 
>>> Bartosz Oudekerk
>>> .-----------------------
>>> | Hippo
>>> | Oosteinde 11
>>> | 1017 WT  Amsterdam
>>> | The Netherlands
>>> | Tel  +31 (0)20 5224466
>>> +----------------------------------------------
>>> | [EMAIL PROTECTED] / http://www.hippo.nl
>>> `------------------------------------------------------------------- 
>>> ---
>
>
> -- 
> Bartosz Oudekerk
> .-----------------------
> | Hippo
> | Oosteinde 11
> | 1017 WT  Amsterdam
> | The Netherlands
> | Tel  +31 (0)20 5224466
> +----------------------------------------------
> | [EMAIL PROTECTED] / http://www.hippo.nl
> `--------------------------------------------------------------------- 
> -

-- 
Gian Carlo Pace
Sourcesense - making sense of Open Source (http://www.sourcesense.com)
Mobile : +39 3400638601



********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to