Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027244Openbravo ERPA. Platformpublic2014-07-31 08:522014-11-12 17:40
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q1 
AugustoMauch
Core
No
0027244: Tomcat 7 is not supported
Openbravo doesn't work with Tomcat 7, the problem is caused by current Weld version not supporting Tomcat 7.
-Try to start Openbravo in Tomcat 7 -> This exception is thrown:
SEVERE: Exception sending context initialized event to listener instance of class org.jboss.weld.environment.servlet.Listener
java.lang.NoClassDefFoundError: org/apache/AnnotationProcessor
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at org.jboss.weld.environment.tomcat.Tomcat6Container.initialize(Tomcat6Container.java:47)
    at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:184)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.apache.AnnotationProcessor
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    ... 25 more
No tags attached.
depends on feature request 0027245 closed alostale Openbravo ERP upgrade weld 
depends on defect 0028129 closed alostale Openbravo ERP API break for tomcat 7 support 
related to design defect 0027247 closed caristu Openbravo ERP Tomcat 8 is not supported 
related to defect 0029849 closed alostale Openbravo ERP Not possible to overwrite the result of a callout from your own callout using a requestdispatcher an a decorator 
related to defect 00299213.0PR15Q3 closed mtaal Openbravo ERP ImportEntryProcessor.LocalHttpRequest compilation errors with Tomcat 7 
related to defect 0034653 closed alostale Openbravo ERP non existing url request displays axis services 
causes defect 0028151 closed alostale Retail Modules ci ret-full-oracle 1084 broken 
causes defect 00289493.0PR15Q2 closed alostale Openbravo ERP Business objects with document number can not be created from background processes 
causes defect 0030093 closed vmromanos Modules Contract Billing Background finishes with Error after 3.0PR15Q1 
diff tomcat7.diff (28,268) 2014-08-01 09:13
https://issues.openbravo.com/file_download.php?file_id=7114&type=bug
Issue History
2014-07-31 08:52alostaleNew Issue
2014-07-31 08:52alostaleAssigned To => alostale
2014-07-31 08:52alostaleModules => Core
2014-07-31 08:52alostaleTriggers an Emergency Pack => No
2014-07-31 08:53alostaleRelationship addeddepends on 0027245
2014-07-31 10:04alostaleRelationship addedrelated to 0027247
2014-08-01 09:13alostaleNote Added: 0069024
2014-08-01 09:13alostaleFile Added: tomcat7.diff
2014-11-10 13:28alostaleRelationship addeddepends on 0028129
2014-11-11 11:05alostaleReview Assigned To => AugustoMauch
2014-11-12 09:37hgbotCheckin
2014-11-12 09:37hgbotNote Added: 0071583
2014-11-12 09:37hgbotStatusnew => resolved
2014-11-12 09:37hgbotResolutionopen => fixed
2014-11-12 09:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/88f346f9fcf1c935b9148772d391a4d85e36e35c [^]
2014-11-12 10:32alostaleRelationship addedcauses 0028151
2014-11-12 17:40AugustoMauchNote Added: 0071613
2014-11-12 17:40AugustoMauchStatusresolved => closed
2014-11-12 17:40AugustoMauchFixed in Version => 3.0PR15Q1
2015-02-16 17:41alostaleRelationship addedcauses 0028949
2015-05-13 08:25alostaleRelationship addedrelated to 0029849
2015-05-19 09:09alostaleRelationship addedrelated to 0029921
2015-06-04 13:37ngarciaRelationship addedcauses 0030093
2016-11-30 10:29alostaleRelationship addedrelated to 0034653

Notes
(0069024)
alostale   
2014-08-01 09:13   
Reported problem is fixed by wel upgrade (0027245)

Having that solved it is possible to deploy an Openbravo instance in a Tomcat 7 servlet (extensive testing has NOT being done).

But there are still some problems when trying to work in Eclipse with it. If Tomcat 7 libraries are added to the classpath (which include servlet-api for servlet 3.0 specs), there are compilation errors in some classes implementing some of the 2.50 spec interfaces. Attached a partial solution for this issue. This code allows to compile with 3.0 api but fails with 2.50.
(0071583)
hgbot   
2014-11-12 09:37   
Repository: erp/devel/pi
Changeset: 88f346f9fcf1c935b9148772d391a4d85e36e35c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Nov 12 09:24:21 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/88f346f9fcf1c935b9148772d391a4d85e36e35c [^]

fixed 27244: tomcat 7 support

  -implemented changes required (Servlet 3.0 compliance) to allow usage of
   tomcat 7 as web app server within eclipse
  -changed classpath in restart tomcat task to make it possible to restart
   from UI both in 6 and 7

---
M README
M build.xml
M legal/Licensing.txt
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/servlet/CalloutHttpServletResponse.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java
M src-core/build.xml
M src-core/src/org/openbravo/base/VariablesBase.java
M src-test/src/org/openbravo/test/datasource/TestComboDatasource.java
M src-wad/src/org/openbravo/wad/web.xml
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
A src-core/src/org/openbravo/base/HttpSessionWrapper.java
---
(0071613)
AugustoMauch   
2014-11-12 17:40   
Code reviewed and verified in pi@88f346f9fcf1