You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by CJay Horton <ja...@gmail.com> on 2008/09/17 02:19:05 UTC

Help needed w/ Beginner's Practice Application

Hello Everyone,

I am new here and want to thank everyone that has contributed to this
project.  I apologize in advance if the formatting of this becomes
poor.

I am experiencing issues with Part-2 of the "OFBiz Beginner's
Development Guide Using Practice Application".  Part-1 works after i
add:

<handler name="screen" type="view"
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>

to my controller.xml file.

I have made many, many attempts at this, hacking little things here
and there and always get errors  when running the application.  These
have varied depending on what I have changed, but the latest one is
"java.lang.NullPointerException".  I ended up unzipping the
practice.zip attachment and using sections of the files from it.

I have listed the steps below and commented where necessary:

-----------------Step 1:  My CommonScreens.xml file is as
follows:----------------------------

<?xml version="1.0" encoding="UTF-8"?>

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
    <screen name="main-decorator">
        <!-- The main-decorator screen 'wraps' or 'decorates' all of
the screens in the
            practice component. It is also decorated - by the
GlobalDecorator screen. -->
        <section>
            <actions>
                <!-- base/top/most specific map first, then more
common map added for shared labels.
                    Setting things up this way enables a component to
redefine the more common
                    UI labels. -->
                <property-map resource="CommonUiLabels"
map-name="uiLabelMap" global="true"/>
                <property-map resource="PracticeUiLabels"
map-name="uiLabelMap" global="true"/>
                <!-- The layoutSettings field is a Map that is used to
pass variables and layout
                    information to the GlobalDecorator and any
templates that it uses. -->
                <set field="layoutSettings.companyName"
from-field="uiLabelMap.PracticeCompanyName" global="true"/>
                <set field="activeApp" value="practice" global="true"/>
                <set field="applicationMenuName"
value="PracticeAppBar" global="true"/>
                <set field="applicationMenuLocation"
value="component://practice/widget/PracticeMenus.xml" global="true"/>
            </actions>
            <widgets>
                <include-screen name="GlobalDecorator"
location="component://common/widget/CommonScreens.xml"/>
            </widgets>
        </section>
    </screen>

    <screen name="CommonPracticeDecorator">
        <section>
            <widgets>
                <decorator-screen name="main-decorator">
                    <decorator-section name="body">
                        <decorator-section-include name="body"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>

-----------------------Step 2----------------------------------

I copied the contents of PracticeMenus.xml file from the practice.zip

-----------------------Step 3-------------------

Person.groovy created

------------------------Step 4----------------

Person.ftl  created

------------------------Step 5--------------------

Here is my PracticeScreens.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <screen name="Main">
        <section>
            <actions>
                <set field="headerItem" value="main"/>
                <set field="titleProperty" value="PageTitlePracticeMain"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPracticeDecorator"
location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <label text="${uiLabelMap.PracticeApplication}"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="Person">
        <section>
            <actions>
                <set field="headerItem" value="person"/>
                <set field="titleProperty" value="PageTitlePracticePerson"/>
                <script
location="component://practice/webapp/practice/WEB-INF/actions/Person.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPracticeDecorator"
location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html>
                                <html-template
location="component://practice/webapp/practice/person.ftl"/>
                            </html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

</screens>

Here is my PracticeMenus.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">

    <menu name="PracticeAppBar" default-menu-item-name="main"
id="app-navigation" type="simple" title="Practice Application"
        default-selected-style="selected"
selected-menuitem-context-field-name="headerItem">
        <menu-item name="main" title="Main"><link target="main"/></menu-item>
        <menu-item name="person" title="Person"><link
target="person"/></menu-item>
        <menu-item name="personForm" title="Person Form"><link
target="personForm"/></menu-item>
        <menu-item name="events" title="Events"><link
target="events"/></menu-item>
        <menu-item name="eca" title="ECA"><link target="eca"/></menu-item>
        <menu-item name="serviceGroup" title="Service Group"><link
target="serviceGroup"/></menu-item>
        <menu-item name="interface" title="Interface"><link
target="interface"/></menu-item>
        <menu-item name="Logout" title="Logout"
align-style="col-right" selected-style="selected">
            <condition><not><if-empty field-name="userLogin"/></not></condition>
            <link target="logout"/>
        </menu-item>
        <menu-item name="Login" title="Login" align-style="col-right"
selected-style="selected">
            <condition><if-empty field-name="userLogin"/></condition>
            <link target="${checkLoginUrl}"/>
        </menu-item>
    </menu>

    <menu name="EventMenu" default-menu-item-name="eventMinilang"
default-selected-style="selected"
         type="simple" menu-container-style="button-bar
button-style-1" selected-menuitem-context-field-name="headerItem">
         <menu-item name="eventMinilang" title="Create Person ---
Event MiniLang">
             <link target="createPracticePersonEventM"/>
         </menu-item>
         <menu-item name="eventJava" title="Create Person --- Event Java">
             <link target="createPracticePersonEventJ"/>
         </menu-item>
     </menu>

    <menu name="EcaMenu" default-menu-item-name="seca"
default-selected-style="selected"
         type="simple" menu-container-style="button-bar
button-style-1" selected-menuitem-context-field-name="headerItem">
         <menu-item name="seca" title="Create Person --- SECA">
             <link target="seca"/>
         </menu-item>
         <menu-item name="eeca" title="Create Person --- EECA">
             <link target="eeca"/>
         </menu-item>
     </menu>
</menus>

--------------------Step 6--------------------------

Here is my controller.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">

       <include
location="component://common/webcommon/WEB-INF/common-controller.xml"/>
       <description>Practice Component Site Configuration File</description>
       <owner>Copyright 2001-2008 The Apache Software Foundation</owner>
       <!-- Event Handlers -->

       <handler name="screen" type="view"
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>

       <!-- Request Mappings -->

        <!-- Request Mappings -->
       <request-map uri="main">
           <security https="false" auth="true"/>
           <response name="success" type="view" value="main"/>
       </request-map>
       <request-map uri="person">
           <security https="false" auth="true"/>
           <response name="success" type="view" value="Person"/>
       </request-map>
       <request-map uri="personForm">
           <security https="false" auth="true"/>
           <response name="success" type="view" value="PersonForm"/>
       </request-map>
       <!-- end of request mappings -->

       <!-- View Mappings -->

       <view-map name="main" type="screen"
page="component://practice/widget/PracticeScreens.xml#Main"/>
       <view-map name="Person" type="screen"
page="component://practice/widget/PracticeScreens.xml#Person"/>
       <!-- end of view mappings -->

</site-conf>




When I run the application I get the "java.lang.NullPointerException"
error.  I am sure I am making a trivial mistake, but any help with
this would be appreciated.

Many Thanks!!

Re: Help needed w/ Beginner's Practice Application

Posted by CJay Horton <ja...@gmail.com>.
Adrian,

That was the issue.  I was using the release version instead of the
Trunk.  The application now works as expected.  This also allowed me
to get familiar with svn and get it working on my box.  I should have
read the instructions more carefully. =(

Hopefully others can learn from my mistake.

Thank you!

-CJ



On Wed, Sep 17, 2008 at 12:40 PM, Adrian Crum <ad...@hlmksw.com> wrote:
> You need the *trunk* - not the release.
>
> -Adrian
>
> CJay Horton wrote:
>>
>> Adrian,
>>
>> If I download the current release.zip and unzip it, it should put that
>> file in there correct?
>>
>> I am not sure how it would not be there.
>>
>> -CJ
>>
>> On Wed, Sep 17, 2008 at 11:57 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>>>
>>> Then something went wrong somewhere. The folder structure you described
>>> is
>>> from Release 4. The common-controller.xml file was introduced well after
>>> the
>>> Release 4 branch.
>>>
>>> -Adrian
>>>
>>> CJay Horton wrote:
>>>>
>>>> Adrian,
>>>>
>>>> You are correct that the file isn't there.  In fact, the WEB-INF
>>>> directory isn't there.  The only two things inside the
>>>> /common/webcommon directory are an includes directory and a login.ftl
>>>> file.  As far as I know I haven't mixed release 4 and trunk versions.
>>>> I simply downloaded the version stated, unzipped, and ran it.
>>>>
>>>> -CJ
>>>>
>>>> On Wed, Sep 17, 2008 at 11:28 AM, Adrian Crum <ad...@hlmksw.com>
>>>> wrote:
>>>>>
>>>>> The log is telling you that the
>>>>> component://common/webcommon/WEB-INF/common-controller.xml file doesn't
>>>>> exist. Check your folders.
>>>>>
>>>>> I might be wrong, but it looks like you're trying to mix release 4 and
>>>>> trunk
>>>>> code. That will cause a multitude of problems.
>>>>>
>>>>> -Adrian
>>>>>
>>>>> CJay Horton wrote:
>>>>>>
>>>>>> Thanks for responding everyone!
>>>>>>
>>>>>> I am using release version 695779.
>>>>>>
>>>>>> Here is the error I get regarding the common-controller.xml file:
>>>>>>
>>>>>> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
>>>>>> [RequestHandler Loading...]
>>>>>> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
>>>>>> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
>>>>>> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
>>>>>> :WARN ] Unable to get file URL for component location; expanded
>>>>>> location was
>>>>>>
>>>>>>
>>>>>> [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
>>>>>> original location was
>>>>>> [component://common/webcommon/WEB-INF/common-controller.xml]
>>>>>> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
>>>>>> [UtilXml.readXmlDocument] URL was null, doing nothing
>>>>>> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
>>>>>> ---- runtime exception report
>>>>>> --------------------------------------------------
>>>>>> Exception: java.lang.NullPointerException
>>>>>> Message: null
>>>>>>
>>>>>> Here is the error I get when trying to view the web page for practice:
>>>>>>
>>>>>> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
>>>>>> ControlServlet.java:206:ERROR] An error occurred, going to the
>>>>>> errorPage: /error/error.jsp
>>>>>> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
>>>>>> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
>>>>>> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
>>>>>> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
>>>>>> Finished- total:1.982,since last([main] Setup done...):1.982]]
>>>>>>
>>>>>>
>>>>>> Please let me know if I need to provide any more information.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
>>>>>> <ra...@hotwaxmedia.com> wrote:
>>>>>>>
>>>>>>> Hi CJay,
>>>>>>> Please provide the console log for the error message instead of
>>>>>>> putting
>>>>>>> all
>>>>>>> the code in mail and please tell us ofbiz version that you are using.
>>>>>>> and
>>>>>>> please made a cross check of your code step by step as guided in
>>>>>>> Practice
>>>>>>> tutorial.
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Ravindra Mandre
>>>>>>> HotWax Media, Inc.
>>>>>>> http://www.hotwaxmedia.com
>>>>>>> ravindra.mandre@hotwaxmedia.com
>>>>>>> -------------------------------------------
>>>>>>> Mobile   : +91 - 9300023686
>>>>>>>
>>>>>>>
>>
>

Re: Help needed w/ Beginner's Practice Application

Posted by Adrian Crum <ad...@hlmksw.com>.
You need the *trunk* - not the release.

-Adrian

CJay Horton wrote:
> Adrian,
> 
> If I download the current release.zip and unzip it, it should put that
> file in there correct?
> 
> I am not sure how it would not be there.
> 
> -CJ
> 
> On Wed, Sep 17, 2008 at 11:57 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>> Then something went wrong somewhere. The folder structure you described is
>> from Release 4. The common-controller.xml file was introduced well after the
>> Release 4 branch.
>>
>> -Adrian
>>
>> CJay Horton wrote:
>>> Adrian,
>>>
>>> You are correct that the file isn't there.  In fact, the WEB-INF
>>> directory isn't there.  The only two things inside the
>>> /common/webcommon directory are an includes directory and a login.ftl
>>> file.  As far as I know I haven't mixed release 4 and trunk versions.
>>> I simply downloaded the version stated, unzipped, and ran it.
>>>
>>> -CJ
>>>
>>> On Wed, Sep 17, 2008 at 11:28 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>>>> The log is telling you that the
>>>> component://common/webcommon/WEB-INF/common-controller.xml file doesn't
>>>> exist. Check your folders.
>>>>
>>>> I might be wrong, but it looks like you're trying to mix release 4 and
>>>> trunk
>>>> code. That will cause a multitude of problems.
>>>>
>>>> -Adrian
>>>>
>>>> CJay Horton wrote:
>>>>> Thanks for responding everyone!
>>>>>
>>>>> I am using release version 695779.
>>>>>
>>>>> Here is the error I get regarding the common-controller.xml file:
>>>>>
>>>>> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
>>>>> [RequestHandler Loading...]
>>>>> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
>>>>> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
>>>>> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
>>>>> :WARN ] Unable to get file URL for component location; expanded
>>>>> location was
>>>>>
>>>>> [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
>>>>> original location was
>>>>> [component://common/webcommon/WEB-INF/common-controller.xml]
>>>>> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
>>>>> [UtilXml.readXmlDocument] URL was null, doing nothing
>>>>> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
>>>>> ---- runtime exception report
>>>>> --------------------------------------------------
>>>>> Exception: java.lang.NullPointerException
>>>>> Message: null
>>>>>
>>>>> Here is the error I get when trying to view the web page for practice:
>>>>>
>>>>> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
>>>>> ControlServlet.java:206:ERROR] An error occurred, going to the
>>>>> errorPage: /error/error.jsp
>>>>> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
>>>>> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
>>>>> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
>>>>> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
>>>>> Finished- total:1.982,since last([main] Setup done...):1.982]]
>>>>>
>>>>>
>>>>> Please let me know if I need to provide any more information.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
>>>>> <ra...@hotwaxmedia.com> wrote:
>>>>>> Hi CJay,
>>>>>> Please provide the console log for the error message instead of putting
>>>>>> all
>>>>>> the code in mail and please tell us ofbiz version that you are using.
>>>>>> and
>>>>>> please made a cross check of your code step by step as guided in
>>>>>> Practice
>>>>>> tutorial.
>>>>>>
>>>>>> --
>>>>>> Thanks & Regards,
>>>>>>
>>>>>> Ravindra Mandre
>>>>>> HotWax Media, Inc.
>>>>>> http://www.hotwaxmedia.com
>>>>>> ravindra.mandre@hotwaxmedia.com
>>>>>> -------------------------------------------
>>>>>> Mobile   : +91 - 9300023686
>>>>>>
>>>>>>
> 

Re: Help needed w/ Beginner's Practice Application

Posted by CJay Horton <ja...@gmail.com>.
Adrian,

If I download the current release.zip and unzip it, it should put that
file in there correct?

I am not sure how it would not be there.

-CJ

On Wed, Sep 17, 2008 at 11:57 AM, Adrian Crum <ad...@hlmksw.com> wrote:
> Then something went wrong somewhere. The folder structure you described is
> from Release 4. The common-controller.xml file was introduced well after the
> Release 4 branch.
>
> -Adrian
>
> CJay Horton wrote:
>>
>> Adrian,
>>
>> You are correct that the file isn't there.  In fact, the WEB-INF
>> directory isn't there.  The only two things inside the
>> /common/webcommon directory are an includes directory and a login.ftl
>> file.  As far as I know I haven't mixed release 4 and trunk versions.
>> I simply downloaded the version stated, unzipped, and ran it.
>>
>> -CJ
>>
>> On Wed, Sep 17, 2008 at 11:28 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>>>
>>> The log is telling you that the
>>> component://common/webcommon/WEB-INF/common-controller.xml file doesn't
>>> exist. Check your folders.
>>>
>>> I might be wrong, but it looks like you're trying to mix release 4 and
>>> trunk
>>> code. That will cause a multitude of problems.
>>>
>>> -Adrian
>>>
>>> CJay Horton wrote:
>>>>
>>>> Thanks for responding everyone!
>>>>
>>>> I am using release version 695779.
>>>>
>>>> Here is the error I get regarding the common-controller.xml file:
>>>>
>>>> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
>>>> [RequestHandler Loading...]
>>>> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
>>>> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
>>>> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
>>>> :WARN ] Unable to get file URL for component location; expanded
>>>> location was
>>>>
>>>> [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
>>>> original location was
>>>> [component://common/webcommon/WEB-INF/common-controller.xml]
>>>> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
>>>> [UtilXml.readXmlDocument] URL was null, doing nothing
>>>> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
>>>> ---- runtime exception report
>>>> --------------------------------------------------
>>>> Exception: java.lang.NullPointerException
>>>> Message: null
>>>>
>>>> Here is the error I get when trying to view the web page for practice:
>>>>
>>>> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
>>>> ControlServlet.java:206:ERROR] An error occurred, going to the
>>>> errorPage: /error/error.jsp
>>>> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
>>>> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
>>>> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
>>>> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
>>>> Finished- total:1.982,since last([main] Setup done...):1.982]]
>>>>
>>>>
>>>> Please let me know if I need to provide any more information.
>>>>
>>>> Thanks!
>>>>
>>>> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
>>>> <ra...@hotwaxmedia.com> wrote:
>>>>>
>>>>> Hi CJay,
>>>>> Please provide the console log for the error message instead of putting
>>>>> all
>>>>> the code in mail and please tell us ofbiz version that you are using.
>>>>> and
>>>>> please made a cross check of your code step by step as guided in
>>>>> Practice
>>>>> tutorial.
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>>
>>>>> Ravindra Mandre
>>>>> HotWax Media, Inc.
>>>>> http://www.hotwaxmedia.com
>>>>> ravindra.mandre@hotwaxmedia.com
>>>>> -------------------------------------------
>>>>> Mobile   : +91 - 9300023686
>>>>>
>>>>>
>>
>

Re: Help needed w/ Beginner's Practice Application

Posted by Adrian Crum <ad...@hlmksw.com>.
Then something went wrong somewhere. The folder structure you described 
is from Release 4. The common-controller.xml file was introduced well 
after the Release 4 branch.

-Adrian

CJay Horton wrote:
> Adrian,
> 
> You are correct that the file isn't there.  In fact, the WEB-INF
> directory isn't there.  The only two things inside the
> /common/webcommon directory are an includes directory and a login.ftl
> file.  As far as I know I haven't mixed release 4 and trunk versions.
> I simply downloaded the version stated, unzipped, and ran it.
> 
> -CJ
> 
> On Wed, Sep 17, 2008 at 11:28 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>> The log is telling you that the
>> component://common/webcommon/WEB-INF/common-controller.xml file doesn't
>> exist. Check your folders.
>>
>> I might be wrong, but it looks like you're trying to mix release 4 and trunk
>> code. That will cause a multitude of problems.
>>
>> -Adrian
>>
>> CJay Horton wrote:
>>> Thanks for responding everyone!
>>>
>>> I am using release version 695779.
>>>
>>> Here is the error I get regarding the common-controller.xml file:
>>>
>>> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
>>> [RequestHandler Loading...]
>>> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
>>> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
>>> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
>>> :WARN ] Unable to get file URL for component location; expanded
>>> location was
>>> [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
>>> original location was
>>> [component://common/webcommon/WEB-INF/common-controller.xml]
>>> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
>>> [UtilXml.readXmlDocument] URL was null, doing nothing
>>> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
>>> ---- runtime exception report
>>> --------------------------------------------------
>>> Exception: java.lang.NullPointerException
>>> Message: null
>>>
>>> Here is the error I get when trying to view the web page for practice:
>>>
>>> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:206:ERROR] An error occurred, going to the
>>> errorPage: /error/error.jsp
>>> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
>>> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
>>> Finished- total:1.982,since last([main] Setup done...):1.982]]
>>>
>>>
>>> Please let me know if I need to provide any more information.
>>>
>>> Thanks!
>>>
>>> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
>>> <ra...@hotwaxmedia.com> wrote:
>>>> Hi CJay,
>>>> Please provide the console log for the error message instead of putting
>>>> all
>>>> the code in mail and please tell us ofbiz version that you are using. and
>>>> please made a cross check of your code step by step as guided in Practice
>>>> tutorial.
>>>>
>>>> --
>>>> Thanks & Regards,
>>>>
>>>> Ravindra Mandre
>>>> HotWax Media, Inc.
>>>> http://www.hotwaxmedia.com
>>>> ravindra.mandre@hotwaxmedia.com
>>>> -------------------------------------------
>>>> Mobile   : +91 - 9300023686
>>>>
>>>>
> 

Re: Help needed w/ Beginner's Practice Application

Posted by CJay Horton <ja...@gmail.com>.
Adrian,

You are correct that the file isn't there.  In fact, the WEB-INF
directory isn't there.  The only two things inside the
/common/webcommon directory are an includes directory and a login.ftl
file.  As far as I know I haven't mixed release 4 and trunk versions.
I simply downloaded the version stated, unzipped, and ran it.

-CJ

On Wed, Sep 17, 2008 at 11:28 AM, Adrian Crum <ad...@hlmksw.com> wrote:
> The log is telling you that the
> component://common/webcommon/WEB-INF/common-controller.xml file doesn't
> exist. Check your folders.
>
> I might be wrong, but it looks like you're trying to mix release 4 and trunk
> code. That will cause a multitude of problems.
>
> -Adrian
>
> CJay Horton wrote:
>>
>> Thanks for responding everyone!
>>
>> I am using release version 695779.
>>
>> Here is the error I get regarding the common-controller.xml file:
>>
>> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
>> [RequestHandler Loading...]
>> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
>> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
>> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
>> :WARN ] Unable to get file URL for component location; expanded
>> location was
>> [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
>> original location was
>> [component://common/webcommon/WEB-INF/common-controller.xml]
>> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
>> [UtilXml.readXmlDocument] URL was null, doing nothing
>> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
>> ---- runtime exception report
>> --------------------------------------------------
>> Exception: java.lang.NullPointerException
>> Message: null
>>
>> Here is the error I get when trying to view the web page for practice:
>>
>> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:206:ERROR] An error occurred, going to the
>> errorPage: /error/error.jsp
>> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
>> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
>> Finished- total:1.982,since last([main] Setup done...):1.982]]
>>
>>
>> Please let me know if I need to provide any more information.
>>
>> Thanks!
>>
>> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
>> <ra...@hotwaxmedia.com> wrote:
>>>
>>> Hi CJay,
>>> Please provide the console log for the error message instead of putting
>>> all
>>> the code in mail and please tell us ofbiz version that you are using. and
>>> please made a cross check of your code step by step as guided in Practice
>>> tutorial.
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> Ravindra Mandre
>>> HotWax Media, Inc.
>>> http://www.hotwaxmedia.com
>>> ravindra.mandre@hotwaxmedia.com
>>> -------------------------------------------
>>> Mobile   : +91 - 9300023686
>>>
>>>
>>
>

Re: Help needed w/ Beginner's Practice Application

Posted by Adrian Crum <ad...@hlmksw.com>.
The log is telling you that the 
component://common/webcommon/WEB-INF/common-controller.xml file doesn't 
exist. Check your folders.

I might be wrong, but it looks like you're trying to mix release 4 and 
trunk code. That will cause a multitude of problems.

-Adrian

CJay Horton wrote:
> Thanks for responding everyone!
> 
> I am using release version 695779.
> 
> Here is the error I get regarding the common-controller.xml file:
> 
> 2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
> [RequestHandler Loading...]
> 2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
> XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
> 2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
> :WARN ] Unable to get file URL for component location; expanded
> location was [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
> original location was
> [component://common/webcommon/WEB-INF/common-controller.xml]
> 2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
> [UtilXml.readXmlDocument] URL was null, doing nothing
> 2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
> ---- runtime exception report --------------------------------------------------
> Exception: java.lang.NullPointerException
> Message: null
> 
> Here is the error I get when trying to view the web page for practice:
> 
> 008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:206:ERROR] An error occurred, going to the
> errorPage: /error/error.jsp
> 2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
> 2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
> Finished- total:1.982,since last([main] Setup done...):1.982]]
> 
> 
> Please let me know if I need to provide any more information.
> 
> Thanks!
> 
> On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
> <ra...@hotwaxmedia.com> wrote:
>> Hi CJay,
>> Please provide the console log for the error message instead of putting all
>> the code in mail and please tell us ofbiz version that you are using. and
>> please made a cross check of your code step by step as guided in Practice
>> tutorial.
>>
>> --
>> Thanks & Regards,
>>
>> Ravindra Mandre
>> HotWax Media, Inc.
>> http://www.hotwaxmedia.com
>> ravindra.mandre@hotwaxmedia.com
>> -------------------------------------------
>> Mobile   : +91 - 9300023686
>>
>>
> 

Re: Help needed w/ Beginner's Practice Application

Posted by CJay Horton <ja...@gmail.com>.
Thanks for responding everyone!

I am using release version 695779.

Here is the error I get regarding the common-controller.xml file:

2008-09-17 11:02:01,319 (main) [     RequestHandler.java:75 :INFO ]
[RequestHandler Loading...]
2008-09-17 11:02:01,333 (main) [            UtilXml.java:243:DEBUG]
XML Read 0.013s: jndi:/0.0.0.0/practice/WEB-INF/controller.xml
2008-09-17 11:02:01,334 (main) [ComponentLocationResolver.java:43
:WARN ] Unable to get file URL for component location; expanded
location was [/home/cjhorton/ofbiz/ofbiz-release4.0/framework/common/webcommon/WEB-INF/common-controller.xml],
original location was
[component://common/webcommon/WEB-INF/common-controller.xml]
2008-09-17 11:02:01,334 (main) [            UtilXml.java:176:WARN ]
[UtilXml.readXmlDocument] URL was null, doing nothing
2008-09-17 11:02:01,338 (main) [    ConfigXMLReader.java:151:ERROR]
---- runtime exception report --------------------------------------------------
Exception: java.lang.NullPointerException
Message: null

Here is the error I get when trying to view the web page for practice:

008-09-17 11:02:24,435 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:206:ERROR] An error occurred, going to the
errorPage: /error/error.jsp
2008-09-17 11:02:24,450 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:213:ERROR] Including errorPage: /error/error.jsp
2008-09-17 11:02:25,825 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:256:DEBUG] [[[main] Done rendering page, Servlet
Finished- total:1.982,since last([main] Setup done...):1.982]]


Please let me know if I need to provide any more information.

Thanks!

On Tue, Sep 16, 2008 at 11:38 PM, Ravindra Mandre
<ra...@hotwaxmedia.com> wrote:
> Hi CJay,
> Please provide the console log for the error message instead of putting all
> the code in mail and please tell us ofbiz version that you are using. and
> please made a cross check of your code step by step as guided in Practice
> tutorial.
>
> --
> Thanks & Regards,
>
> Ravindra Mandre
> HotWax Media, Inc.
> http://www.hotwaxmedia.com
> ravindra.mandre@hotwaxmedia.com
> -------------------------------------------
> Mobile   : +91 - 9300023686
>
>

Re: Help needed w/ Beginner's Practice Application

Posted by onima kasliwal <on...@gmail.com>.
hi CJay..
i m also working on practice application part 1st but it worked well for me
without adding

<handler name="screen" type="view"
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>

to my controller.xml file. n for the second problem u can provide me
console log for it..so that our community can help u out...


On Wed, Sep 17, 2008 at 11:04 AM, Sneha Chaturvedi <
sneha.chaturvedi@yahoo.com> wrote:

> Hi CJay,
>
> I have also followed the steps shown in this application tutorial and found
> no problems.
> May be you are doing a small mistake in following the proper steps shown in
> the tutorial.
> I didn't include ScreenWidgetViewHandler explicitly in my development it
> worked fine for me as all of the handlers are available to me from
> common-controller.xml file. Please provide the console log which will give a
> clear picture of the problem you are facing.
>
> Thanks
> --
> Sneha
>
>
>
> --- On Wed, 17/9/08, Ravindra Mandre <ra...@hotwaxmedia.com>
> wrote:
> From: Ravindra Mandre <ra...@hotwaxmedia.com>
> Subject: Re: Help needed w/ Beginner's Practice Application
> To: user@ofbiz.apache.org
> Date: Wednesday, 17 September, 2008, 4:38 AM
>
> Hi CJay,
> Please provide the console log for the error message instead of putting
> all the code in mail and please tell us ofbiz version that you are
> using. and please made a cross check of your code step by step as guided
> in Practice tutorial.
>
> --
> Thanks & Regards,
>
> Ravindra Mandre
> HotWax Media, Inc.
> http://www.hotwaxmedia.com
> ravindra.mandre@hotwaxmedia.com
> -------------------------------------------
> Mobile   : +91 - 9300023686
>
>
>
>
>       Unlimited freedom, unlimited storage. Get it now, on
> http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Re: Help needed w/ Beginner's Practice Application

Posted by Sneha Chaturvedi <sn...@yahoo.com>.
Hi CJay,

I have also followed the steps shown in this application tutorial and found no problems.
May be you are doing a small mistake in following the proper steps shown in the tutorial.
I didn't include ScreenWidgetViewHandler explicitly in my development it worked fine for me as all of the handlers are available to me from common-controller.xml file. Please provide the console log which will give a clear picture of the problem you are facing.

Thanks
--
Sneha
 


--- On Wed, 17/9/08, Ravindra Mandre <ra...@hotwaxmedia.com> wrote:
From: Ravindra Mandre <ra...@hotwaxmedia.com>
Subject: Re: Help needed w/ Beginner's Practice Application
To: user@ofbiz.apache.org
Date: Wednesday, 17 September, 2008, 4:38 AM

Hi CJay,
Please provide the console log for the error message instead of putting 
all the code in mail and please tell us ofbiz version that you are 
using. and please made a cross check of your code step by step as guided 
in Practice tutorial.

-- 
Thanks & Regards,

Ravindra Mandre
HotWax Media, Inc.
http://www.hotwaxmedia.com
ravindra.mandre@hotwaxmedia.com
-------------------------------------------
Mobile   : +91 - 9300023686




      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Re: Help needed w/ Beginner's Practice Application

Posted by Ravindra Mandre <ra...@hotwaxmedia.com>.
Hi CJay,
Please provide the console log for the error message instead of putting 
all the code in mail and please tell us ofbiz version that you are 
using. and please made a cross check of your code step by step as guided 
in Practice tutorial.

-- 
Thanks & Regards,

Ravindra Mandre
HotWax Media, Inc.
http://www.hotwaxmedia.com
ravindra.mandre@hotwaxmedia.com
-------------------------------------------
Mobile   : +91 - 9300023686