Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0033077 | Openbravo ERP | A. Platform | public | 2016-05-30 13:58 | 2016-08-11 18:40 |
Reporter | shuehner | ||||
Assigned To | alostale | ||||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR16Q4 | |||
Merge Request Status | |||||
Review Assigned To | caristu | ||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0033077: ImportEntryManager constructor called twice even if ApplicationScoped | ||||
Description | The constructor of ImportEntryManager is called two times. However it is marked as ApplicationScoped + assumes single instance as storing itself in static variable (+getInstace()). So calling constructor twice seems wrong. Note: Impact of this is unclear Note: the 2 instanciones come from the 2 contextListeners which instantiate (via weld) the class. Stacktrace (produced with the diff attached): 10473 [main] INFO org.openbravo.service.importprocess.ImportEntryManager - Calling ImportEntryManager constructor java.lang.Throwable at org.openbravo.service.importprocess.ImportEntryManager.<init>(ImportEntryManager.java:176) at org.openbravo.service.importprocess.ImportEntryManager$Proxy$_$$_WeldClientProxy.<init>(ImportEntryManager$Proxy$_$$_WeldClientProxy.java) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344) at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173) at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341) at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:237) at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:105) at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:87) at org.jboss.weld.bean.proxy.ClientProxyProvider.access$000(ClientProxyProvider.java:43) at org.jboss.weld.bean.proxy.ClientProxyProvider$1.load(ClientProxyProvider.java:53) at org.jboss.weld.bean.proxy.ClientProxyProvider$1.load(ClientProxyProvider.java:46) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) at com.google.common.cache.LocalCache.get(LocalCache.java:3937) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824) at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49) at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:73) at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:102) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:621) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:653) at org.openbravo.base.weld.WeldUtils.getInstanceFromStaticBeanManager(WeldUtils.java:93) at org.openbravo.service.importprocess.ImportProcessContextListener.contextInitialized(ImportProcessContextListener.java:38) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 10475 [main] INFO org.openbravo.service.importprocess.ImportEntryManager - Calling ImportEntryManager constructor java.lang.Throwable at org.openbravo.service.importprocess.ImportEntryManager.<init>(ImportEntryManager.java:176) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.jboss.weld.introspector.jlr.WeldConstructorImpl.newInstance(WeldConstructorImpl.java:206) at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:117) at org.jboss.weld.bean.ManagedBean.createInstance(ManagedBean.java:340) at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:204) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:296) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) at org.openbravo.service.importprocess.ImportEntryManager$Proxy$_$$_WeldClientProxy.start(ImportEntryManager$Proxy$_$$_WeldClientProxy.java) at org.openbravo.mobile.core.process.POSTerminalContextListener.contextInitialized(POSTerminalContextListener.java:35) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) | ||||
Steps To Reproduce | Apply simple logging diff: diff -r 65a012587054 src/org/openbravo/service/importprocess/ImportEntryManager.java --- a/src/org/openbravo/service/importprocess/ImportEntryManager.java Thu May 26 20:02:26 2016 +0200 +++ b/src/org/openbravo/service/importprocess/ImportEntryManager.java Mon May 30 13:57:30 2016 +0200 @@ -173,6 +173,7 @@ numberOfThreads, 4); maxTaskQueueSize = ImportProcessUtils.getCheckIntProperty(log, "import.max.task.queue.size", maxTaskQueueSize, 50); + log.info("Calling ImportEntryManager constructor", new Throwable()); } public synchronized void start() { | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-05-30 13:58 | shuehner | New Issue | |||
2016-05-30 13:58 | shuehner | Assigned To | => platform | ||
2016-05-30 13:58 | shuehner | OBNetwork customer | => No | ||
2016-05-30 13:58 | shuehner | Modules | => Core | ||
2016-05-30 13:58 | shuehner | Triggers an Emergency Pack | => No | ||
2016-07-15 08:46 | alostale | Note Added: 0088511 | |||
2016-07-15 08:46 | alostale | Status | new => acknowledged | ||
2016-07-15 08:47 | alostale | Priority | normal => urgent | ||
2016-07-15 08:47 | alostale | Severity | minor => major | ||
2016-07-15 09:04 | alostale | Note Edited: 0088511 | bug_revision_view_page.php?bugnote_id=0088511#r12658 | ||
2016-07-15 09:04 | alostale | Severity | major => minor | ||
2016-07-15 09:09 | alostale | Review Assigned To | => caristu | ||
2016-07-15 09:13 | alostale | Status | acknowledged => scheduled | ||
2016-07-15 09:13 | alostale | Assigned To | platform => alostale | ||
2016-07-15 10:46 | hgbot | Checkin | |||
2016-07-15 10:46 | hgbot | Note Added: 0088516 | |||
2016-07-15 10:46 | hgbot | Status | scheduled => resolved | ||
2016-07-15 10:46 | hgbot | Resolution | open => fixed | ||
2016-07-15 10:46 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e05fce66f7ed8e89d6107aa70e790f973ab9d2ef [^] | ||
2016-07-22 11:33 | caristu | Note Added: 0088630 | |||
2016-07-22 11:33 | caristu | Status | resolved => closed | ||
2016-07-22 11:33 | caristu | Fixed in Version | => 3.0PR16Q4 | ||
2016-08-11 18:40 | hudsonbot | Checkin | |||
2016-08-11 18:40 | hudsonbot | Note Added: 0089015 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|