Luyi Tian
Luyi Tian

Reputation: 371

Solve: java.lang.NoClassDefFoundError

I download the source code of a project and want to build it. But I met the NoClassDefFoundError, the error msg like:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/cxf/jaxws/JaxWsProxyFactoryBean

Seems the project uses cxf, so I went to http://cxf.apache.org/ ,downloaded binary source and include them in classpath: enter image description here

but the error still there :-(

this is where project import JaxWsProxyFactoryBean

enter image description here

What should I do to let jax work correctly in this project? I am new to java.

Upvotes: 1

Views: 631

Answers (1)

azurefrog
azurefrog

Reputation: 10955

If you take a look inside the directory that you downloaded, you will realize that it is an installation of cxf, not just a library. You need to actually include the jar files that come with cxf in your project, not just the cxf home directory.

Take a look at C:\Users\luyi\Downloads\apache-cxf-2.2.5\lib\WHICH_JARS, this will have instructions on which jar files you need to include in your project, depending on what you want to do in your project.

Upvotes: 1

Related Questions