Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:29:14+00:00 2026-06-12T08:29:14+00:00

What am I missing in the following configuration that my Datanucleus JPA 2 Level

  • 0

What am I missing in the following configuration that my Datanucleus JPA 2 Level 2 cache is not using Google App Engine Memcache service? I am using the GAE 1.7.2 SDK.

In the persistence.xml:

<persistence-unit name="transactions-optional">
    <provider>org.datanucleus.api.jpa.PersistenceProviderImpl</provider>
    <properties>
        <property name="datanucleus.NontransactionalRead" value="true"/>
        <property name="datanucleus.NontransactionalWrite" value="true"/>
        <property name="datanucleus.ConnectionURL" value="appengine"/>
        <property name="datanucleus.appengine.datastoreReadConsistency" value="EVENTUAL" />
        <property name="javax.persistence.query.timeout" value="5000" />
        <property name="datanucleus.datastoreWriteTimeout" value="10000" />
        <property name="datanucleus.singletonEMFForName" value="true"/>
        <property name="datanucleus.cache.level2.cacheName" value="someName"/>
        <property name="datanucleus.cache.level2.type" value="javax.cache"/>
    </properties>
</persistence-unit>

Entity annotations contain:

@Entity
@Cacheable(true)

My WEB-INF/lib looks like this:

-rw-r--r--   1 501  20    27M Oct  3 16:13 appengine-api-1.0-sdk-1.7.2.jar
-rw-r--r--   1 501  20   3.3M Oct  3 16:13 appengine-api-labs.jar
-rw-r--r--   1 501  20   5.0M Oct  3 16:13 appengine-endpoints.jar
-rw-r--r--   1 501  20   6.8K Oct  3 16:13 appengine-jsr107cache-1.7.2.jar
-rw-r--r--   1 501  20    45K Oct  3 16:13 asm-4.0.jar
-rw-r--r--   1 501  20   309K Oct  3 16:13 datanucleus-api-jdo-3.1.0-m3.jar
-rw-r--r--   1 501  20   246K Oct  3 16:13 datanucleus-api-jpa-3.1.0-m3.jar
-rw-r--r--   1 501  20   331K Oct  3 16:13 datanucleus-appengine-2.1.0-final.jar
-rw-r--r--   1 501  20   1.6M Oct  3 16:13 datanucleus-core-3.1.0-m5.jar
-rw-r--r--   1 501  20   112K Oct  3 16:13 geronimo-jpa_2.0_spec-1.0.jar
-rw-r--r--   1 501  20   5.2M Oct  3 16:13 gwt-servlet.jar
-rw-r--r--   1 501  20   196K Oct  3 16:13 jdo-api-3.0.1.jar
-rw-r--r--   1 501  20   7.9K Oct  3 16:13 jsr107cache-1.1.jar
-rw-r--r--   1 501  20    15K Oct  3 16:13 jta-1.1.jar

In the WEB-INF/lib directory, running:

for i in *.jar; do echo $i; jar -tf $i | grep Level2; done

yields:

appengine-api-1.0-sdk-1.7.2.jar
appengine-api-labs.jar
appengine-endpoints.jar
appengine-jsr107cache-1.7.2.jar
asm-4.0.jar
datanucleus-api-jdo-3.1.0-m3.jar
datanucleus-api-jpa-3.1.0-m3.jar
datanucleus-appengine-2.1.0-final.jar
datanucleus-core-3.1.0-m5.jar
org/datanucleus/cache/WeakLevel2Cache.class
org/datanucleus/cache/Level2Cache$PinnedClass.class
org/datanucleus/cache/AbstractLevel2Cache.class
org/datanucleus/cache/SoftLevel2Cache.class
org/datanucleus/cache/Level2Cache.class
org/datanucleus/cache/NullLevel2Cache.class
org/datanucleus/cache/JavaxCacheLevel2Cache.class
geronimo-jpa_2.0_spec-1.0.jar
gwt-servlet.jar
jdo-api-3.0.1.jar
jsr107cache-1.1.jar
jta-1.1.jar

which shows that org.datanucleus.cache.JavaxCacheLevel2Cache is present in datanucleus-core-3.1.0-m5.jar. Yet, when I try to access entities that have been persisted before this cache was enabled, I get the following error on the server side.

org.datanucleus.exceptions.NucleusUserException: Level 2 Cache "javax.cache" is registered to use class "org.datanucleus.cache.JavaxCacheLevel2Cache" yet this is not found. Please check your CLASSPATH and plugin specification.

Further down the exception stack trace, I find:

Caused by: java.lang.NoClassDefFoundError: javax/cache/Caching
    at org.datanucleus.cache.JavaxCacheLevel2Cache.<init>(JavaxCacheLevel2Cache.java:63)

Now, that is clear but where can I find this javax.cache.Caching? Which JAR should I need to include in the classpath? A cursory Google search does not immediately answer my question.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:29:15+00:00Added an answer on June 12, 2026 at 8:29 am

    Google “memcached” uses an old version of what will become the standard “javax.cache”. DataNucleus 3.0 supports only this old version (with properties as you have). DataNucleus 3.1 supports both the old version of javax.cache and the most recent. To use the old version (i.e GAE memcached) with DN 3.1 you need to set the property datanucleus.cache.level2.type to jcache. See http://www.datanucleus.org/products/accessplatform_3_1/jpa/cache.html#jcache

    Why you’re using DataNucleus version 3.1.0-m3/m5 I’ve no idea when there are many releases since then!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get following error (SyntaxError): missing ] after element list when using eval function.
I get the following Exception running my app: java.net.SocketException: Permission denied (maybe missing INTERNET
I am using the following code to open up an XML file so that
I have a configuration in teamcity that package and deploys. I am using the
I have the following WCF endpoint configuration: <service behaviorConfiguration=MyNamespace.ContainerManagementServiceBehavior name=MyNamespace.ContainerManagementService> <endpoint address= binding=basicHttpBinding name=ContainerManagementbasicHttpEndpoint
I am working with an app that uses spring-security 3.0 and oauth2 using spring-security-oauth-1.0.0.M3.
What's missing in the following code, for the .Caption gets bellow and the icon
I entered the following SQL commands in Oracle but it complained ORA-00922: missing or
For the following make file copied below, I am getting the missing separator error.
I'm getting odd behavior (it generates only missing values) from the following loop -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.