Hi Oscar, The way I read the documentation 'javax.cache' as the configuration value should use a standard caching framework 'out of the box' so to speak.
I can try the other caching options but was wondering if anyone else might have used that one. Cheers On Wed, Dec 7, 2016 at 11:02 PM, Óscar Bou - GOVERTIS <[email protected]> wrote: > Hi Stephen. > > > Have you tried to add through Maven any of the Java Caches available? > > As per [1], seems DN declares a wrapper arround them, so you will need to > add one implementation. > > Many are mentioned on the URL you included. > > HTH, > > Oscar > > > > > > > El 7 dic 2016, a las 12:47, Stephen Cameron <[email protected]> > escribió: > > Hi, > > I am interested to try Level 2 caching to see what performance benefits I > can gain. > > At the moment I cannot configure it. > > In the file persistor_datanucleus.properties I have these settings: > > # > # L2 cache > # off except if explicitly marked as cacheable > # http://www.datanucleus.org/products/datanucleus/jdo/cache.html > # > isis.persistor.datanucleus.impl.datanucleus.cache.level2.type=javax.cache > isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode=UNSPECIFIED > isis.persistor.datanucleus.cache.level2.cacheName=myCache > > I then get the following errors on start-up. This missing class > "org.datanucleus.cache.JavaxCacheLevel2Cache" does seem to be on the > classpath, within datanucleus-core.4.1.7.jar > > 1) Error in custom provider, javax.jdo.JDOFatalUserException: 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. > NestedThrowables: > java.lang.reflect.InvocationTargetException > at > org.apache.isis.core.runtime.runner.IsisInjectModule. > provideIsisSessionFactory(IsisInjectModule.java:109) > at > org.apache.isis.core.runtime.runner.IsisInjectModule. > provideIsisSessionFactory(IsisInjectModule.java:109) > while locating > org.apache.isis.core.runtime.system.session.IsisSessionFactory > for field at > org.apache.isis.viewer.wicket.viewer.IsisWicketApplication. > isisSessionFactory(IsisWicketApplication.java:138) > while locating domainapp.webapp.DomainApplication > > 1 error > at > com.google.inject.internal.Errors.throwProvisionExceptionIfError > sExist(Errors.java:482) > at > com.google.inject.internal.MembersInjectorImpl.injectMembers( > MembersInjectorImpl.java:67) > at > com.google.inject.internal.InjectorImpl.injectMembers( > InjectorImpl.java:984) > at > org.apache.isis.viewer.wicket.viewer.IsisWicketApplication. > init(IsisWicketApplication.java:279) > at domainapp.webapp.DomainApplication.init(DomainApplication.java:64) > at org.apache.wicket.Application.initApplication(Application.java:823) > at > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:427) > ... 19 more > Caused by: javax.jdo.JDOFatalUserException: 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. > NestedThrowables: > java.lang.reflect.InvocationTargetException > at > org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusExcep > tion(NucleusJDOHelper.java:606) > at > org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration( > JDOPersistenceManagerFactory.java:859) > at > org.datanucleus.api.jdo.JDOPersistenceManagerFactory. > createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:337) > at > org.datanucleus.api.jdo.JDOPersistenceManagerFactory. > getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:216) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at javax.jdo.JDOHelper$16.run(JDOHelper.java:1970) > at java.security.AccessController.doPrivileged(Native Method) > at javax.jdo.JDOHelper.invoke(JDOHelper.java:1965) > at > javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation( > JDOHelper.java:1171) > at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:813) > at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:702) > at > org.apache.isis.core.runtime.system.persistence. > DataNucleusApplicationComponents.isSchemaAwareStoreManager( > DataNucleusApplicationComponents.java:117) > at > org.apache.isis.core.runtime.system.persistence. > DataNucleusApplicationComponents.createPmfAndSchemaIfRequired( > DataNucleusApplicationComponents.java:132) > at > org.apache.isis.core.runtime.system.persistence. > DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponen > ts.java:108) > at > org.apache.isis.core.runtime.system.persistence. > DataNucleusApplicationComponents.<init>(DataNucleusApplicationComponen > ts.java:101) > at > org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory. > createDataNucleusApplicationComponents(PersistenceSessionFactory.java:99) > at > org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory. > init(PersistenceSessionFactory.java:76) > at > org.apache.isis.core.runtime.system.session.IsisSessionFactoryBuilder. > buildSessionFactory(IsisSessionFactoryBuilder.java:202) > at > org.apache.isis.core.runtime.runner.IsisInjectModule. > provideIsisSessionFactory(IsisInjectModule.java:118) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > com.google.inject.internal.ProviderMethod$ReflectionProviderMethod. > doProvision(ProviderMethod.java:299) > at > com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172) > at > com.google.inject.internal.ProviderInternalFactory.provision( > ProviderInternalFactory.java:81) > at > com.google.inject.internal.InternalFactoryToInitializable > Adapter.provision(InternalFactoryToInitializableAdapter.java:53) > at > com.google.inject.internal.ProviderInternalFactory.circularGet( > ProviderInternalFactory.java:61) > at > com.google.inject.internal.InternalFactoryToInitializableAdapter.get( > InternalFactoryToInitializableAdapter.java:45) > at > com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call( > ProviderToInternalFactoryAdapter.java:46) > at > com.google.inject.internal.InjectorImpl.callInContext( > InjectorImpl.java:1103) > at > com.google.inject.internal.ProviderToInternalFactoryAdapter.get( > ProviderToInternalFactoryAdapter.java:40) > at > com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) > at > com.google.inject.internal.InternalFactoryToProviderAdapter.get( > InternalFactoryToProviderAdapter.java:41) > at > com.google.inject.internal.SingleFieldInjector.inject( > SingleFieldInjector.java:54) > at > com.google.inject.internal.MembersInjectorImpl.injectMembers( > MembersInjectorImpl.java:132) > at > com.google.inject.internal.MembersInjectorImpl$1.call( > MembersInjectorImpl.java:93) > at > com.google.inject.internal.MembersInjectorImpl$1.call( > MembersInjectorImpl.java:80) > at > com.google.inject.internal.InjectorImpl.callInContext( > InjectorImpl.java:1092) > at > com.google.inject.internal.MembersInjectorImpl.injectAndNotify( > MembersInjectorImpl.java:80) > at > com.google.inject.internal.MembersInjectorImpl.injectMembers( > MembersInjectorImpl.java:62) > ... 24 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance( > NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:422) > at > org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension( > NonManagedPluginRegistry.java:606) > at > org.datanucleus.plugin.PluginManager.createExecutableExtension( > PluginManager.java:301) > at > org.datanucleus.PersistenceNucleusContextImpl.getLevel2Cache( > PersistenceNucleusContextImpl.java:1373) > at > org.datanucleus.PersistenceNucleusContextImpl.initialise( > PersistenceNucleusContextImpl.java:449) > at > org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration( > JDOPersistenceManagerFactory.java:846) > ... 66 more > Caused by: org.datanucleus.exceptions.NucleusException: Error creating > cache > at > org.datanucleus.cache.JavaxCacheLevel2Cache.<init>( > JavaxCacheLevel2Cache.java:98) > ... 75 more > Caused by: javax.cache.CacheException: No CachingProviders have been > configured > at > javax.cache.Caching$CachingProviderRegistry.getCachingProvider(Caching. > java:381) > at > javax.cache.Caching$CachingProviderRegistry.getCachingProvider(Caching. > java:351) > at javax.cache.Caching.getCachingProvider(Caching.java:142) > at > org.datanucleus.cache.JavaxCacheLevel2Cache.<init>( > JavaxCacheLevel2Cache.java:64) > > > > Óscar Bou Bou > Socio - IT & GRC Management Services Director > m: +34 620 267 520 <+34%20620%2026%2075%2020> > s: <http://www.govertis.com>www.govertis.com e: [email protected] > > LinkedIn: https://www.linkedin.com/in/oscarbou > Twitter: @oscarbou <https://twitter.com/oscarbou> > > > > Este mensaje y los ficheros anexos son confidenciales. Los mismos > contienen información reservada que no puede ser difundida. Si usted ha > recibido este correo por error, tenga la amabilidad de eliminarlo de su > sistema y avisar al remitente mediante reenvío a su dirección electrónica; > no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. > > Su dirección de correo electrónico junto a sus datos personales constan en > un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad > es la de mantener el contacto con Ud. Si quiere saber de qué información > disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo > enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a > la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes > Valencianas, 58 – 8º - 6ª. 46015 - Valencia, y Paseo de la Castellana, > 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este > mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso > que los tuvieran eliminarlos. > >
