Fix Problem...deploy ofbiz.ear

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix Problem...deploy ofbiz.ear

g.fitini

TO SOLVE THE FOLLOWING PROBLEM, YOU’VE TO CHANGE THE ECOMMERCE WEB.XML, MOVING THE TAG <error...  AT THE END OF PAGE



Hi i’ve this problem during the deploy of Apache-ofbiz version 12.04.01  in Glassfish server 2.1.
I’ve  follow this guide :  https://cwiki.apache.org/confluence/display/OFBTECH/Glassfish+v2.1

Note : when i’ve done my : java -jar ofbiz.jar -setup glassfish21
in my setup folder was missing file : domain.xml
there were only these files : application.xml , deploy.sh, entityengine.xml, README, run.sh, url.properties


But while i’m tryng to deploy my ofbiz.ear i’ve this kind of error :

Deploying application in domain failed; Error loading deployment descriptors for module [ecommerce] Line 165 Column 11 -- Deployment descriptor file WEB-INF/web.xml in archive [ecommerce]. The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,...



i’ve done this deploy, from my administration console,loading manually my ofbiz.ear, to understand what’s wrong.

The ecommerce web.xml, is the default web.xml that i’ve found :

 



<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you 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.
-->

<web-app>
    <display-name>Open For Business - demostore</display-name>
    <description>Demo Store for the Open For Business Project</description>

    <context-param>
        <param-name>webSiteId</param-name>
        <param-value>WebStore</param-value>
        <description>A unique ID used to look up the WebSite entity</description>
    </context-param>
    <context-param>
        <param-name>localDispatcherName</param-name>
        <param-value>ecommerce</param-value>
        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
    </context-param>
    <context-param>
        <param-name>serviceReaderUrls</param-name>
        <param-value>/WEB-INF/services.xml</param-value>
        <description>Configuration File(s) For The Service Dispatcher</description>
    </context-param>
    <context-param>
        <param-name>entityDelegatorName</param-name>
        <param-value>default</param-value>
        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
    </context-param>
    <context-param>
        <param-name>mainDecoratorLocation</param-name>
        <param-value>component://ecommerce/widget/CommonScreens.xml</param-value>
        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
    </context-param>
    <context-param>
        <param-name>forceHttpSession</param-name>
        <param-value>true</param-value>
        <description>
            Forces the JSESSIONID cookie to be sent via http rather https, helps prevent lost sessions in web apps that
            frequently switch between http and https.
        </description>
    </context-param>

    <filter>
        <filter-name>CatalogUrlFilter</filter-name>
        <display-name>CatalogUrlFilter</display-name>
        <filter-class>org.ofbiz.product.category.CatalogUrlFilter</filter-class>
        <init-param><param-name>defaultLocaleString</param-name><param-value>en_US</param-value></init-param>
    </filter>
    <filter>
        <filter-name>ContentUrlFilter</filter-name>
        <display-name>ContentUrlFilter</display-name>
        <filter-class>org.ofbiz.content.content.ContentUrlFilter</filter-class>
        <init-param>
            <param-name>defaultLocaleString</param-name>
            <param-value>en_US</param-value>
        </init-param>
        <init-param><param-name>viewRequest</param-name><param-value>ViewBlogArticle</param-value></init-param>
    </filter>
    <filter>
        <filter-name>ContextFilter</filter-name>
        <display-name>ContextFilter</display-name>
        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
        <init-param>
            <param-name>disableContextSecurity</param-name>
            <param-value>N</param-value>
        </init-param>
        <init-param>
            <param-name>allowedPaths</param-name>
            <param-value>/error:/control:/products:/select:/index.html:/index.jsp:/robots.txt:/default.html:/default.jsp:/images</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>CatalogUrlFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ContentUrlFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ContextFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <error-page>
        <error-code>404</error-code>
        <location>/error/404.jsp</location>
    </error-page>

    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->

    <!-- this listener will save any abandoned cart info -->
    <listener><listener-class>org.ofbiz.order.shoppingcart.CartEventListener</listener-class></listener>
    <!-- this listener will clean up info -->
    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>

    <servlet>
        <servlet-name>ControlServlet</servlet-name>
        <display-name>ControlServlet</display-name>
        <description>Main Control Servlet</description>
        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- un-comment for Worldpay
    <servlet>
        <servlet-name>select</servlet-name>
        <display-name>SelectHandler</display-name>
        <description>WorldPay Select Handler Service</description>
        <servlet-class>com.worldpay.select.merchant.SelectHandler</servlet-class>
        <load-on-startup>5</load-on-startup>
    </servlet>
    -->
    <servlet>
        <servlet-name>CatalogUrlServlet</servlet-name>
        <display-name>CatalogUrlServlet</display-name>
        <description>Catalog (Category/Product) URL Servlet</description>
        <servlet-class>org.ofbiz.product.category.CatalogUrlServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>ControlServlet</servlet-name>
        <url-pattern>/control/*</url-pattern>
    </servlet-mapping>
    <!-- un-comment for Worldpay
    <servlet-mapping>
        <servlet-name>select</servlet-name>
        <url-pattern>/select/*</url-pattern>
    </servlet-mapping>
    -->
    <servlet-mapping>
        <servlet-name>CatalogUrlServlet</servlet-name>
        <url-pattern>/products/*</url-pattern>
    </servlet-mapping>

    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
    </welcome-file-list>
</web-app>

Reply | Threaded
Open this post in threaded view
|

Re: Fix Problem...deploy ofbiz.ear

Jacques Le Roux
Administrator
Thanks for report,

This has been fixed by Jacopo at http://svn.apache.org/viewvc?view=revision&revision=1347559
I backported it at http://svn.apache.org/viewvc?view=revision&revision=1347748
Unfortunately we missed R12.04, it's done at http://svn.apache.org/viewvc?view=revision&revision=1531349.

Jacques

[hidden email] wrote:

> TO SOLVE THE FOLLOWING PROBLEM, YOU’VE TO CHANGE THE ECOMMERCE WEB.XML, MOVING THE TAG <error...  AT THE END OF PAGE
>
>
>
> Hi i’ve this problem during the deploy of Apache-ofbiz version 12.04.01  in Glassfish server 2.1.
> I’ve  follow this guide :  https://cwiki.apache.org/confluence/display/OFBTECH/Glassfish+v2.1
>
> Note : when i’ve done my : java -jar ofbiz.jar -setup glassfish21
> in my setup folder was missing file : domain.xml
> there were only these files : application.xml , deploy.sh, entityengine.xml, README, run.sh, url.properties
>
>
> But while i’m tryng to deploy my ofbiz.ear i’ve this kind of error :
>
> Deploying application in domain failed; Error loading deployment descriptors for module [ecommerce] Line 165 Column 11 --
> Deployment descriptor file WEB-INF/web.xml in archive [ecommerce]. The content of element type "web-app" must match
> "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,...
>
>
>
> i’ve done this deploy, from my administration console,loading manually my ofbiz.ear, to understand what’s wrong.
>
> The ecommerce web.xml, is the default web.xml that i’ve found :
>
>
>
>
>
> <?xml version="1.0"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <!--
> Licensed to the Apache Software Foundation (ASF) under one
> or more contributor license agreements.  See the NOTICE file
> distributed with this work for additional information
> regarding copyright ownership.  The ASF licenses this file
> to you 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.
> -->
>
> <web-app>
>     <display-name>Open For Business - demostore</display-name>
>     <description>Demo Store for the Open For Business Project</description>
>
>     <context-param>
>         <param-name>webSiteId</param-name>
>         <param-value>WebStore</param-value>
>         <description>A unique ID used to look up the WebSite entity</description>
>     </context-param>
>     <context-param>
>         <param-name>localDispatcherName</param-name>
>         <param-value>ecommerce</param-value>
>         <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
>     </context-param>
>     <context-param>
>         <param-name>serviceReaderUrls</param-name>
>         <param-value>/WEB-INF/services.xml</param-value>
>         <description>Configuration File(s) For The Service Dispatcher</description>
>     </context-param>
>     <context-param>
>         <param-name>entityDelegatorName</param-name>
>         <param-value>default</param-value>
>         <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
>     </context-param>
>     <context-param>
>         <param-name>mainDecoratorLocation</param-name>
>         <param-value>component://ecommerce/widget/CommonScreens.xml</param-value>
>         <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in
> screen def XML files.</description>
>     </context-param>
>     <context-param>
>         <param-name>forceHttpSession</param-name>
>         <param-value>true</param-value>
>         <description>
>             Forces the JSESSIONID cookie to be sent via http rather https, helps prevent lost sessions in web apps that
>             frequently switch between http and https.
>         </description>
>     </context-param>
>
>     <filter>
>         <filter-name>CatalogUrlFilter</filter-name>
>         <display-name>CatalogUrlFilter</display-name>
>         <filter-class>org.ofbiz.product.category.CatalogUrlFilter</filter-class>
>         <init-param><param-name>defaultLocaleString</param-name><param-value>en_US</param-value></init-param>
>     </filter>
>     <filter>
>         <filter-name>ContentUrlFilter</filter-name>
>         <display-name>ContentUrlFilter</display-name>
>         <filter-class>org.ofbiz.content.content.ContentUrlFilter</filter-class>
>         <init-param>
>             <param-name>defaultLocaleString</param-name>
>             <param-value>en_US</param-value>
>         </init-param>
>         <init-param><param-name>viewRequest</param-name><param-value>ViewBlogArticle</param-value></init-param>
>     </filter>
>     <filter>
>         <filter-name>ContextFilter</filter-name>
>         <display-name>ContextFilter</display-name>
>         <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
>         <init-param>
>             <param-name>disableContextSecurity</param-name>
>             <param-value>N</param-value>
>         </init-param>
>         <init-param>
>             <param-name>allowedPaths</param-name>
>            
> <param-value>/error:/control:/products:/select:/index.html:/index.jsp:/robots.txt:/default.html:/default.jsp:/images</param-value>
>         </init-param>
>     </filter>
>     <filter-mapping>
>         <filter-name>CatalogUrlFilter</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <filter-mapping>
>         <filter-name>ContentUrlFilter</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <filter-mapping>
>         <filter-name>ContextFilter</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>
>     <error-page>
>         <error-code>404</error-code>
>         <location>/error/404.jsp</location>
>     </error-page>
>
>     <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
>     <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
>     <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
>
>     <!-- this listener will save any abandoned cart info -->
>     <listener><listener-class>org.ofbiz.order.shoppingcart.CartEventListener</listener-class></listener>
>     <!-- this listener will clean up info -->
>     <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
>
>     <servlet>
>         <servlet-name>ControlServlet</servlet-name>
>         <display-name>ControlServlet</display-name>
>         <description>Main Control Servlet</description>
>         <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <!-- un-comment for Worldpay
>     <servlet>
>         <servlet-name>select</servlet-name>
>         <display-name>SelectHandler</display-name>
>         <description>WorldPay Select Handler Service</description>
>         <servlet-class>com.worldpay.select.merchant.SelectHandler</servlet-class>
>         <load-on-startup>5</load-on-startup>
>     </servlet>
>     -->
>     <servlet>
>         <servlet-name>CatalogUrlServlet</servlet-name>
>         <display-name>CatalogUrlServlet</display-name>
>         <description>Catalog (Category/Product) URL Servlet</description>
>         <servlet-class>org.ofbiz.product.category.CatalogUrlServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>ControlServlet</servlet-name>
>         <url-pattern>/control/*</url-pattern>
>     </servlet-mapping>
>     <!-- un-comment for Worldpay
>     <servlet-mapping>
>         <servlet-name>select</servlet-name>
>         <url-pattern>/select/*</url-pattern>
>     </servlet-mapping>
>     -->
>     <servlet-mapping>
>         <servlet-name>CatalogUrlServlet</servlet-name>
>         <url-pattern>/products/*</url-pattern>
>     </servlet-mapping>
>
>     <session-config>
>         <session-timeout>60</session-timeout>
>     </session-config>
>
>     <welcome-file-list>
>         <welcome-file>index.jsp</welcome-file>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>     </welcome-file-list>
> </web-app>