Could not initialize class org.adempiere.webui.event.ZKBroadCastManager

1,646 views
Skip to first unread message

Anozi Mada

unread,
Apr 29, 2013, 6:32:20 AM4/29/13
to idem...@googlegroups.com
This error is occurred after login in ZK. Does anyone experience the same thing when running server.product from eclipse? or Does somebody know how to troubleshoot this kind of error? I check the felix console but it seems the plugins (org.adempiere.ui.zk & org.adempiere.base) loaded perfectly (Active). I also make sure that related package is visible by other plugin in MANIFEST.MF.

Thank you.

29 Apr 13 14:46:30 org.adempiere.webui.AdempiereWebUI createDesktop
WARNING: Failed to instantiate desktop. Class=org.adempiere.webui.desktop.DefaultDesktop
29 Apr 13 14:46:44 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1359
SEVERE: >>java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager
>>    at org.adempiere.webui.desktop.DefaultDesktop.<init>(DefaultDesktop.java:142)
>>    at org.adempiere.webui.AdempiereWebUI.createDesktop(AdempiereWebUI.java:387)
>>    at org.adempiere.webui.AdempiereWebUI.loginCompleted(AdempiereWebUI.java:329)
>>    at org.adempiere.webui.AdempiereWebUI.onCreate(AdempiereWebUI.java:152)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:597)
>>    at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2724)
>>    at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654)
>>    at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
>>    at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
>>    at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
>>    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:471)
>>    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
>>    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
>>    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
>>    at org.adempiere.webui.session.WebUIServlet.doGet(WebUIServlet.java:95)
>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>    at org.adempiere.webui.session.WebUIServlet.service(WebUIServlet.java:108)
>>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>>    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
>>    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>>    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
>>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
>>    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
>>    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
>>    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
>>    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>    at java.lang.Thread.run(Thread.java:662)

Heng Sin Low

unread,
Apr 29, 2013, 6:52:21 AM4/29/13
to idem...@googlegroups.com

try to create your target platform again.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Anozi Mada

unread,
Apr 29, 2013, 7:29:46 AM4/29/13
to idem...@googlegroups.com
Thanks for the fast response hengsin. I have done it but the error still occurred. Then I try to re-import adempiere.mspec but the problem still exists.
I was thinking that someone experience the same thing but I guess it's only me. I'll try to run it with fresh database and strip all custom plugins & fragments first. Maybe something is wrong with my customization.

Hiep Lq

unread,
Aug 8, 2013, 2:21:35 AM8/8/13
to idem...@googlegroups.com

i have this issue too. 
my server is normal running. after server is interrupt power. i rerun server and encounter the issue.

Hiep Lq

unread,
Aug 8, 2013, 6:24:21 AM8/8/13
to idem...@googlegroups.com

hum. i has revert all change of source.
re setup eclipse project but nothing change. error message still display.

I has other server run same database. in other server everything is ok.

Hiep Lq

unread,
Aug 8, 2013, 7:05:11 AM8/8/13
to idem...@googlegroups.com

oh. after i restart machine, everything run perfect.
i think error by java machine :)

Anozi Mada

unread,
Aug 8, 2013, 7:17:48 AM8/8/13
to idem...@googlegroups.com
Hi, sorry for not updating this thread.

In my case, the error exists when I run the server.product from eclipse. It was solved by clicking Add Required Plug-ins in server.product configuration. :)

Pccom Computers

unread,
Nov 5, 2013, 9:44:30 AM11/5/13
to idem...@googlegroups.com
I still got this error and cannot get rid of it. 
I am running PCBSD 9.2 stable.
It seems ok in Windows 7 and Ubuntu 12.04. OS related issue?

Please help me out!

Thank you!



osgi> SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://28.fwk135085423:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://28.fwk135085423:2/org/slf4j/impl/StaticLoggerBinder.class]
Nov 5, 2013 9:41:16 AM org.slf4j.impl.JCLLoggerAdapter info
INFO: Configuring Tomcat from fragment entry 'bundleentry://55.fwk135085423/META-INF/tomcat/server.xml'
Nov 5, 2013 9:41:16 AM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '75' did not find a matching property.
Nov 5, 2013 9:41:16 AM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '75' did not find a matching property.
Nov 5, 2013 9:41:16 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlValidation' to 'false' did not find a matching property.
Nov 5, 2013 9:41:16 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlNamespaceAware' to 'false' did not find a matching property.
Nov 5, 2013 9:41:16 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 5, 2013 9:41:16 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Nov 5, 2013 9:41:17 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 5, 2013 9:41:17 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 5, 2013 9:41:17 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.21
Nov 5, 2013 9:41:17 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 5, 2013 9:41:17 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
Nov 5, 2013 9:41:17 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Nov 5, 2013 9:41:17 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Nov 5, 2013 9:41:18 AM org.compiere.web.AdempiereMonitorFilter init
INFO: 
09:41:18.429 Adempiere.startup: iDempiere(r) Release 2.0_2013-10-31 -Smart Suite ERP, CRM and SCM- (c) 1999-2013 iDempiere(r); Implementation: iDempiere - Supported by iDempiere community [11]
09:41:18.432 Ini.loadProperties: /usr/home/peng/idempiere/idempiere.properties #33 [11]
[INFO] MLog clients using com.mchange.v2.log.FallbackMLog logging.
[INFO] Initializing c3p0-0.9.2 [built 09-February-2013 02:13:17 +0000; debug? true; trace: 10]
[INFO] Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> iDempiereDS, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> z8kflt8yban99h1vb4099|b57b39f, idleConnectionTestPeriod -> 1200, initialPoolSize -> 10, jdbcUrl -> jdbc:postgresql://localhost:5432/idempiere?encoding=UNICODE, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1200, maxIdleTimeExcessConnections -> 1200, maxPoolSize -> 90, maxStatements -> 0, maxStatementsPerConnection -> 30, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> SELECT Version FROM AD_System, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
09:41:18.859 Language.getLanguage: Adding Language=en, Country=US, Locale=en_US [11]
09:41:18.861 Language.getLanguage: Adding Language=en, Country=US, Locale=en_US [11]
09:41:18.915 WebEnv.initWeb: Servlet Context Init Parameters: iDempiere Root
ServerRoot=1 [11]
09:41:18.926-----------> EMail.setFrom: you @ company.org: javax.mail.internet.AddressException: Local address contains control or whitespace in string ``you @ company.org'' [11]
09:41:18.931-----------> EMail.addTo: you @ company.org: javax.mail.internet.AddressException: Local address contains control or whitespace in string ``you @ company.org'' [11]
09:41:18.931-----------> EMail.isValid: From is invalid=null [11]
09:41:18.932-----------> EMail.isValid: From is invalid=null [11]
09:41:18.932-----------> MClient.sendEMail: Could NOT Send Email: Server started: ? to you @ company.org: Invalid Data (System) [11]
09:41:18.932 WebEnv.initWeb: Servlet Init Parameter: idempiereMonitor [11]
09:41:18.932 AdempiereMonitor.init:  [11]
09:41:23.651           WebUIServlet.init: iDempiere Web Client started successfully [12]
Nov 5, 2013 9:42:00 AM org.adempiere.webui.AdempiereWebUI createDesktop
WARNING: Failed to instantiate desktop. Class=org.adempiere.webui.desktop.DefaultDesktop
Nov 5, 2013 9:42:00 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1359
SEVERE: >>java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager
>> at org.adempiere.webui.desktop.DefaultDesktop.<init>(DefaultDesktop.java:151)
>> at org.adempiere.webui.AdempiereWebUI.createDesktop(AdempiereWebUI.java:402)
>> at org.adempiere.webui.AdempiereWebUI.loginCompleted(AdempiereWebUI.java:338)
>> at org.adempiere.webui.window.LoginWindow.loginCompleted(LoginWindow.java:131)
>> at org.adempiere.webui.panel.RolePanel.validateRoles(RolePanel.java:606)

Hiep Lq

unread,
Jan 24, 2014, 4:30:17 AM1/24/14
to idem...@googlegroups.com

More detect.
I again see this message.
I debug as below:

1. make break point at class BroadCastUtil line 41 (subscribers.add(subscriber);)
2. after login. code is stop at this point. when I run next line. a exception is raise.
java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager
exception is not relate to command subscribers.add(subscriber) and i see it not relate to ZKBroadCastManager
because when code stop at class BroadCastUtil line 41 => ZKBroadCastManager is instanced.

3. I make new break point at class BroadCastUtil, line 33.
when start server. main thread code stop at this point.
at console i see message 
15:33:56.550 AtmosphereFramework.info: Atmosphere Framework 1.0.4 started. [47]
15:33:56.556           WebUIServlet.init: iDempiere Web Client started successfully [47]
15:34:02.370 zkoss.loadLabels:232: Loading labels for en_US [58]
15:34:02.383 zkoss.loadLabels:232: Loading labels for en [58]
15:34:04.811 XmlConfigBuilder: Looking for hazelcast.xml config file in classpath. [41]
15:34:04.814 XmlConfigBuilder: Using configuration file /hazelcast.xml in the classpath. [41]
15:34:05.170 AddressPicker: Prefer IPv4 stack is true. [41]
15:34:05.179 AddressPicker: Picked Address[192.168.56.1]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true [41]
15:34:05.296 system: [192.168.56.1]:5701 [dev] Hazelcast Community Edition 2.4 (20121017) starting at Address[192.168.56.1]:5701 [41]
15:34:05.296 system: [192.168.56.1]:5701 [dev] Copyright (C) 2008-2012 Hazelcast.com [41]
15:34:05.300===========> Node: [192.168.56.1]:5701 [dev] Address already in use [41]
java.net.BindException: Address already in use
at java.net.PlainDatagramSocketImpl.bind0(Native Method)

4. I run over break point (F8)
5. when I login, code run as step 1, 2

I repeat many time. and always see "java.net.BindException: Address already in use"

6. I restart machine.
7. rerun server with debug.
current I not see "java.net.BindException: Address already in use" and also not see "java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager"

8. => maybe it's relate together.

9. to test 8. I make skype use port 5701 and rerun debug.
but Hazelcast auto swith to port 5702 :) => don't redo bug.

anyone can make Hazelcast encounter error java.net.BindException?

Hiep Lq

unread,
Jan 24, 2014, 4:43:19 AM1/24/14
to idem...@googlegroups.com
redo success.
change config 
<port auto-increment="true">5701</port>
=> <port auto-increment="false">5701</port>

I can make "java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager" anytime i want :)

1. don't know why sometime port is not auto increment.
2. still don't find solution

Hiep Lq

unread,
Feb 15, 2015, 10:09:53 AM2/15/15
to idem...@googlegroups.com
i'm moving to close root cause (but still isn't root cause)
Some days ago, I run my instance in a window 2008 server.
sometime my server turn off by outage, when it turn on sometime i encounter this issue.
it will always at here (ever i restart idempiere for many time) until i restart my server (sometime i must re-start server two or three time).

today i again meet it. i decide debug more deep from latest report. and below is my report.
code stack:
line 164 class DefaultDesktop: ZKBroadCastManager.getBroadCastMgr();
line 36 class ZKBroadCastManager: BroadCastUtil:BroadCastUtil.subscribe(this);
line 43 class BroadCastUtil: ITopic<BroadCastMsg> topic= service.getTopic(TOPIC_BROADCAST_MESSAGE);

at line 43, because topic = null, ZKBroadCastManager can't init. it make error "java.lang.NoClassDefFoundError: Could not initialize class org.adempiere.webui.event.ZKBroadCastManager"

zoom to MessageServiceImpl.getTopic, i see:
HazelcastInstance instance = Activator.getHazelcastInstance();
and instance = null.

because must has a wrong thing when load plug-in org.idempiere.hazelcast.service

re-run idempiere with turn on trace of org.eclipse.osgi (debug/event) i get a log of hazelcast maybe has issue:
"filterServiceEvent(org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener@1757fcd0, "null", {component.name=org.idempiere.hazelcast.service.MessageServiceImpl, component.id=68, service.id=167, service.bundleid=155, service.scope=bundle})"

for debug more deep. i detect when load plug-in org.idempiere.hazelcast.service
at line 190 class com.hazelcast.instance.Node: multicastSocket.bind(new InetSocketAddress(multicastConfig.getMulticastPort()));
make a exception java.net.SocketException: Unrecognized Windows Sockets error: 0: Cannot bind
when log this exception logger of hazelcast make a NPE, it's "null" in above message

google with "hazelcast java.net.SocketException: Unrecognized Windows Sockets" i see someone has this issue but still no resolved.
i also still can't detect how to make environment to redo it.

a hot fix i can suggest is:
add check null at line 55 class BroadCastUtil: ITopic<BroadCastMsg> topic= service.getTopic(TOPIC_BROADCAST_MESSAGE);
add a log at server level when topic = null and disable BroadCast, because server still can run normal

i attach my trace copy form command line. i also notify has some issue relate to load other core plug-in (core)
I also try newest hazelcast release 3.4.1 but can't resolve issue.
hazelcast .log

Hiep Lq

unread,
Mar 29, 2015, 10:12:49 AM3/29/15
to idem...@googlegroups.com
i resolve it in my window server. share for someone has same issue.
my root cause by my dns service keep almost port. make hazelcast can't create a instance.

about dns keep port can refer:
http://serverfault.com/questions/558104/dns-exe-allocates-5000-ports-immediately
http://support.microsoft.com/en-us/kb/953230

to fix it, i change config in hazelcast.xml to <multicast-port>60327</multicast-port>
Reply all
Reply to author
Forward
0 new messages