This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143658 - NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpState
Summary: NoClassDefFoundError: Could not initialize class org.apache.commons.httpclien...
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: SoapUI (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: omatzura
URL: http://statistics.netbeans.org/except...
Keywords:
: 149910 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-12 18:50 UTC by Lukas Hasik
Modified: 2009-05-20 16:36 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 22445


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2008-08-12 18:50:21 UTC
Build: NetBeans IDE Dev (Build 20071228165830)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06
OS: Windows XP, 5.1, x86
User comments: Selected "Create Web Service Testing Project" on a newly created WSDL. 
FYI - My project connected to WebServices
Apparently, my NetBeans was messed-up and unresponsive because of an not-completely configured Web Services project. 
After shutting down Netbeans manually deleting the project folder for this messed up project; and restarting NetBeans,
NetBeans started functioning again.
STACKTRACE: (first 10 lines)
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpState
        at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader.<init>(UrlWsdlLoader.java:66)
        at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:219)
        at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:159)
        at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:126)
        at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:121)
        at com.eviware.soapui.impl.WorkspaceImpl.importProject(WorkspaceImpl.java:319)
        at
com.eviware.soapui.netbeans.module.NetBeansSoapUIProjectFactory.loadProject(NetBeansSoapUIProjectFactory.java:115)
        at org.netbeans.api.project.ProjectManager.createProject(ProjectManager.java:352)
        at org.netbeans.api.project.ProjectManager.access$300(ProjectManager.java:79)
        at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:273)
Comment 1 nbertram 2008-09-09 10:27:44 UTC
It probably has to do with the log4j missconfiguration. This is what I got out of the logs prior to using soapui 
module:

log4j:ERROR A "org.apache.log4j.helpers.OnlyOnceErrorHandler" object is not assignable to 
a "org.apache.log4j.spi.ErrorHandler" variable.
log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by 
log4j:ERROR [org.netbeans.StandardModule$OneModuleClassLoader@1321f5[com.eviware.soapui.netbeans.module]] whereas 
object of type 
log4j:ERROR "org.apache.log4j.helpers.OnlyOnceErrorHandler" was loaded by 
[org.netbeans.StandardModule$OneModuleClassLoader@96ad7c[org.codehaus.mevenide.nbmvnembedder]].
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
	at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:175)
	at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
	at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
	at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
	at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)
	at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
	at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:743)
	at com.eviware.soapui.DefaultSoapUICore.initLog(DefaultSoapUICore.java:251)
	at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:78)
	at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:73)
	at com.eviware.soapui.SwingSoapUICore.<init>(SwingSoapUICore.java:42)
	at com.eviware.soapui.SwingPluginSoapUICore.<init>(SwingPluginSoapUICore.java:29)
	at com.eviware.soapui.SwingPluginSoapUICore.<init>(SwingPluginSoapUICore.java:24)
	at com.eviware.soapui.netbeans.module.Installer$1.<init>(Installer.java:196)
	at com.eviware.soapui.netbeans.module.Installer.initSoapUICore(Installer.java:193)
	at com.eviware.soapui.netbeans.module.Installer.restored(Installer.java:84)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:419)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:340)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:936)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:428)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:174)
	at org.netbeans.core.startup.Main.start(Main.java:325)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
	at java.lang.Thread.run(Thread.java:619)
log4j:ERROR Could not parse url [nbjcl:file:/C:/Documents%20and%20Settings/nbertram/.netbeans/6.1/modules/ext/soapui-
2.0.3.jar!/com/eviware/soapui/resources/conf/soapui-log4j.xml].

Comment 2 Exceptions Reporter 2008-09-10 14:08:30 UTC
This issue has already 100 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=22445
Comment 3 omatzura 2008-09-10 18:14:14 UTC
Hi,

these reports all seem to be for pre 6.1 release builds!? Or am I missing something? I can't reproduce this in any way..
any hints to do so would be great!

regards!

/Ole
eviware.com
Comment 4 Lukas Hasik 2008-09-11 08:18:45 UTC
unfortunatelly not. Most of the reports are coming from 6.1 but the latest ones are from 20080702.
Look at http://statistics.netbeans.org/exceptions/detail.do?id=22445
Comment 5 omatzura 2008-09-11 08:50:39 UTC
Hi!

thanks.. but that report is for Netbeans build 20071228165830, which is slightly out of date!? Have you found any report
for a 6.1 release (or later) build?

regards,

/Ole
eviware.com
Comment 6 Lukas Hasik 2008-09-11 09:37:13 UTC
http://statistics.netbeans.org/analytics/detail.do?id=73476

you can follow the URL and you'll see all the reports together with the build number they are coming from
Comment 7 Roderico Cruz 2008-09-24 15:38:13 UTC
Ole,
The build number in the report states: NetBeans IDE 6.1 (Build 200807020101).
Thanks.
Rico
Comment 8 Lukas Jungmann 2008-09-24 15:55:15 UTC
note that having installed meven IDE modules from UC and/or using some kind of maven project type can be important to be
able to reproduce this
Comment 9 pncblessed 2008-09-25 14:58:28 UTC
I found out what the problem was.

I had a web project with some web services and the project kept becoming inaccessible with this error. Turns out by 
adding the JAX LIBRARIES to the project this problem went away. I think the problem is simply that NB is looking in the 
wrong place for its xml classes?

I will leave this to someone else to class as fixed. I would have thought though the solution is to add the JAX CLASSES 
to the web project when a web service is created.
Comment 10 Lukas Jungmann 2008-10-08 12:00:53 UTC
yes, reproducible in 6.1 if one has Maven _and_ soapui modules installed only.

problem seems to be that moth plugins do bundle log4j stuff (or some other logger jars, not sure now)
Comment 11 Milos Kleint 2008-10-08 13:29:17 UTC
maven support ships with the maven embedder which is one big jar containing binaries of multiple projects/jar. So it
contains commons-http and log4j as well (and other apache/non-apache project bits).

The strange thing that has to be noted is that I haven't found any symmetric failures in the maven support when soupui
is installed.  
There can be multiple reasons for it. 
1. all classes using log4j/commons-http are located in one module only. Therefore are served by a simple module
classloader. That could potentially avoid having to deal with the netbeans module system.
2. for some reason the module system places the maven modules ahead of soupui.
3. soupui ships with some log4j configuration files or configures log4j in a way that forces it's init loop to look at
the system classloader (or is it context CL) that looks in all modules. It has to be noted that classes shall generally
not be loaded through the classloader, only resources.
Comment 12 Milos Kleint 2008-10-13 09:19:06 UTC
*** Issue 149910 has been marked as a duplicate of this issue. ***
Comment 13 Milan Kuchtiak 2009-05-20 16:36:36 UTC
I cannot reproduce the issue in 6.7.
 - installed SOAP-UI from 6.1 UC
(http://updates.netbeans.org/netbeans/updates/6.1/uc/final/stable/catalog.xml.gz)

As I correctly understand, the issue was reported against 6.1, but not for later releases.