java.lang.NoClassDefFoundError: javax.persistence.spi.ProviderUtil

Ensure that you have jpa 2.0 jar in your classpath. In case of hibernate,ensure hibernate-jpa-2.0-api-XXXX.jar in your classpath.


One Response to java.lang.NoClassDefFoundError: javax.persistence.spi.ProviderUtil

  1. alanbdee says:

    I ran into a similar problem that took a lot of troubleshooting to figure out. Here is a link to the stack overflow question I posted.

    In short, at least for me, I found that if I removed the explicitly set libraries set in NetBeans Project Properties it seemed to cause the issue. Once they were removed it worked just fine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: