0

Error: Could not initialize class sun.net.www.protocol.http.HttpURLConnection

asked 2017-10-03 04:08:42 +0800

moyacuba gravatar image moyacuba
6

Hi Guys

I'm trying to use the EE package (8.0.5-Eval), but I got a blocking bug if I use the Eval package, The chunk of log error from tomcat startup sequence shows:


02-Oct-2017 16:29:31.699 GRAVE [main] org.zkoss.zk.ui.util.Configuration.invokeWebAppInits Failed to invoke class org.zkoss.zkex.init.WebAppInit
 java.lang.NoClassDefFoundError: Could not initialize class sun.net.www.protocol.http.HttpURLConnection
        at java.base/sun.net.www.protocol.http.Handler.openConnection(Handler.java:62)
        at java.base/sun.net.www.protocol.http.Handler.openConnection(Handler.java:57)
        at java.base/java.net.URL.openConnection(URL.java:1051)
        at org.zkoss.zkex.rt.Runtime.sendError(Unknown Source)
        at org.zkoss.zkex.rt.Runtime.sendError(Unknown Source)
        at org.zkoss.zkex.rt.Runtime.runQuotaServer0(Unknown Source)
        at org.zkoss.zkex.rt.Runtime.runQuotaServer(Unknown Source)
        at org.zkoss.zkex.rt.Runtime.init(Unknown Source)
        at org.zkoss.zkex.init.WebAppInit.init(Unknown Source)
        at org.zkoss.zk.ui.util.Configuration.invokeWebAppInits(Configuration.java:774)
        at org.zkoss.zk.ui.impl.AbstractWebApp.init(AbstractWebApp.java:214)
        at org.zkoss.zk.ui.http.SimpleWebApp.init(SimpleWebApp.java:58)
        at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:233)
        at org.zkoss.zk.ui.http.HttpSessionListener23.contextInitialized(HttpSessionListener23.java:141)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:740)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:716)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:762)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1578)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:964)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:657)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

I did reinstall eclipse, tomcat even JDK in all possible combination as suggested by others forums without any luck, just waste of time.

Tried using: Eclipse Oxygen Tomcat: 8.5.20 and 9.0.0.M26 Java 1.8.0.144 and Java 9 Spring 4.3.11 and 5.0.0

Please any help is appreciated!

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-03 13:12:50 +0800

chillworld gravatar image chillworld flag of Belgium
5143 3 9
https://github.com/chillw...

Oke, your main problem is a class what isn't at the classpath of your application.

java.lang.NoClassDefFoundError: Could not initialize class sun.net.www.protocol.http.HttpURLConnection

please look here, maybe you could do that also.

https://stackoverflow.com/questions/5246537/tomcat-5-5-giving-an-error-java-lang-noclassdeffounderror

Chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-10-03 04:08:42 +0800

Seen: 12 times

Last updated: Oct 03