Pascal
Pascal

Reputation: 2174

Eclipse RCP java.lang.NoClassDefFoundError: javax/validation/ConstraintViolationException

I have written an RCP Application using eclipse Luna repository.

Now I want to update to Mars.

Therefore I have changed my target definition so use the mars repository. My Application is starting but if I use some code snippets including my XML Marshaller I get

java.lang.ClassNotFoundException: javax.validation.ConstraintViolationException cannot be found by org.eclipse.persistence.moxy_2.6.0.v20150309-bf26070

The messages is clear, javax.validation.ConstraintViolationException is missing. I had a look to the content of my target definition and could not find javax.validation

So yes it is missing but why?

EclipseLink MOXy was included in the eclipse Luna repository. The Mars repository is missing this Plugins so I added

http://download.eclipse.org/rt/eclipselink/updates/

to get the MOXy Plugins. But I don't know where to get the missing javax.validation Plugin.

Any ideas?

Someone said to get javax.validation from the milestone-update site but I can not find anything different on http://download.eclipse.org/rt/eclipselink/milestone-updates/


Edit 1

Noone?

For testing I have added the eclipselink 2.6.1 downloaded zip Directory to my target definition and it is showing up "javax.validation"

enter image description here

The build process runs fine. But if I want to construct a Marshaller the Exception is thrown.

enter image description here

I think there is something wrong with the classpath the moxy implementation is looking for that class because the class ConstraintViolationException is present in the javax.validation_1.1.0.v201304101302.jar

Upvotes: 3

Views: 1098

Answers (2)

coastalhacking
coastalhacking

Reputation: 307

I've been having this problem this week too :-/

The below just worked for me!

Get the Plug-ins

Navigate to http://download.eclipse.org/rt/eclipselink/updates/2.6.1.v20150916-55dc7c3/plugins/. Then click on "Show Directory Contents". Download the following plug-ins:

  • javax.validation_1.1.0.v201304101302.jar
  • org.glassfish.javax.json_1.0.4.v201311181159.jar (for javax.json.*, which I guess I needed for my environment. YMMV.)

Import the Plug-ins

Then, import the plugins. In Eclipse, File → Import → Plug-in Development → Plug-ins and Fragments

Click Next.

On Import Plug-ins and Fragments:

  • Import from: Directory. (Select the directory containing the recently downloaded plug-ins)
  • Plug-ins and Fragments to Import: Select from all plug-ins and fragments found at the specified location
  • Import As: Binary projects

Click Next

In Selection, select the plug-ins again. I have the first and third checkboxes checked (default?).

Add as Dependency

Then go to your plug-in and add the two new plug-ins as dependencies.

Upvotes: 2

lukasj
lukasj

Reputation: 136

I believe this has been after 2.6.0 has been released. Can you try with http://download.eclipse.org/rt/eclipselink/nightly-updates?

Upvotes: 1

Related Questions