2 Replies Latest reply on Sep 22, 2010 4:22 PM by John Ament

    Upgrading from ModeShape 1.2 to ModeShape 2.2

    John Ament Master

      So this is sort of cross posted from the infinispan forums, but I wanted to put it out there as food for thought.  I am trying to upgrade our system from ModeShape 1.2 to ModeShape 2.2.  I receive a NPE when the app tries to read the content from the file system using the infinispan connector (and right now, its still infinispan 4.0).  I'm trying to figure out why, but I'm inclined to think that its a class name change somewhere.  Any thoughts?

        • 1. Re: Upgrading from ModeShape 1.2 to ModeShape 2.2
          Randall Hauch Master

          Yes, I suspect there were class changes made, but we'd been trying to avoid changing the classes used to serialize data inside Infinispan. Can you post the NPE exception?

          • 2. Re: Upgrading from ModeShape 1.2 to ModeShape 2.2
            John Ament Master

            Below is the full stack trace.  You will notice there's really no modeshape in it at all - which is why I'm thinking a class went missing/moved.

             

            javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton WebCMSBootstrapper
                    at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:698)
                    at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:444)
                    at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:213)
                    at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:174)
                    at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:152)
                    at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:150)
                    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                    at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.ejb.CreateException: Initialization failed for Singleton WebCMSBootstrapper
                    at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:528)
                    at com.sun.ejb.containers.AbstractSingletonContainer.access$100(AbstractSingletonContainer.java:74)
                    at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:696)
                    ... 36 more
            Caused by: javax.ejb.EJBTransactionRolledbackException
                    at com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2253)
                    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2053)
                    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
                    at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
                    at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
                    at $Proxy212.getRepository(Unknown Source)
                    at apps.jcrinteg.producers.__EJB31_Generated__SITEJcrConfiguration__Intf____Bean__.getRepository(Unknown Source)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
                    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
                    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
                    at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
                    at apps.jcrinteg.producers.SITEJcrConfiguration_$$_javassist_30.getRepository(SITEJcrConfiguration_$$_javassist_30.java)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
                    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
                    at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:113)
                    at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
                    at apps.jcrinteg.producers.SITEJcrConfiguration_$$_javassist_37.getRepository(SITEJcrConfiguration_$$_javassist_37.java)
                    at apps.jcrinteg.bootstrap.WebCMSBootstrapper.bootstrap(WebCMSBootstrapper.java:37)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
                    at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
                    at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109)
                    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133)
                    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961)
                    at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
                    at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390)
                    at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373)
                    at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:521)
                    ... 38 more
            Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
                    at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:4975)
                    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4810)
                    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
                    ... 84 more
            Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.preload() on object
                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:173)
                    at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:852)
                    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:672)
                    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:574)
                    at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:148)
                    at org.infinispan.CacheDelegate.start(CacheDelegate.java:305)
                    at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:449)
                    at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:412)
                    at org.modeshape.connector.infinispan.InfinispanTransaction.getWorkspace(InfinispanTransaction.java:73)
                    at org.modeshape.connector.infinispan.InfinispanTransaction.getWorkspace(InfinispanTransaction.java:40)
                    at org.modeshape.graph.connector.base.Repository.getWorkspace(Repository.java:174)
                    at org.modeshape.graph.connector.base.Processor.getWorkspace(Processor.java:618)
                    at org.modeshape.graph.connector.base.Processor.process(Processor.java:102)
                    at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:654)
                    at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:278)
                    at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:350)
                    at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:228)
                    at org.modeshape.graph.connector.base.Connection.execute(Connection.java:115)
                    at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1129)
                    at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:193)
                    at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:183)
                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                    ... 1 more
            Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
                    ... 25 more
            Caused by: org.infinispan.CacheException: Unable to preload!
                    at org.infinispan.loaders.CacheLoaderManagerImpl.preload(CacheLoaderManagerImpl.java:129)
                    ... 30 more
            Caused by: org.infinispan.loaders.CacheLoaderException: Error while reading from file: /src/dump/jcr/staging/-1458095452
                    at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:185)
                    at org.infinispan.loaders.file.FileCacheStore.loopOverBuckets(FileCacheStore.java:51)
                    at org.infinispan.loaders.bucket.BucketBasedCacheStore.loadAllLockSafe(BucketBasedCacheStore.java:141)
                    at org.infinispan.loaders.LockSupportCacheStore.loadAll(LockSupportCacheStore.java:109)
                    at org.infinispan.loaders.CacheLoaderManagerImpl.loadState(CacheLoaderManagerImpl.java:149)
                    at org.infinispan.loaders.CacheLoaderManagerImpl.preload(CacheLoaderManagerImpl.java:127)
                    ... 30 more
            Caused by: java.lang.NullPointerException
                    at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:253)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:357)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:207)
                    at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
                    at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:109)
                    at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:266)
                    at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:253)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:357)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:207)
                    at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
                    at org.infinispan.loaders.bucket.Bucket$Externalizer.readObject(Bucket.java:115)
                    at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:266)
                    at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:253)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:357)
                    at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:207)
                    at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
                    at org.infinispan.marshall.jboss.GenericJBossMarshaller.objectFromObjectStream(GenericJBossMarshaller.java:162)
                    at org.infinispan.marshall.VersionAwareMarshaller.objectFromObjectStream(VersionAwareMarshaller.java:179)
                    at org.infinispan.loaders.file.FileCacheStore.objectFromInputStreamInReentrantMode(FileCacheStore.java:262)
                    at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:181)
                    ... 35 more