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.

Advertisements

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.
    http://stackoverflow.com/questions/8306142/java-glassfish-jpa-noclassdeffounderror-javax-persistence-spi-persistenceunit

    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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: