1 Reply Latest reply on Dec 17, 2013 9:54 PM by Vu Viet Phuong

    Class cast exception when create a page programatically

    Anish Antony Newbie

      Hi all

       

      Got class cast exception when i create a new page by program. The exception follows

       

      15:17:45,107 ERROR [STDERR] java.lang.ClassCastException: Could not cast context EntityContext[state=ObjectStatus[path=/production/mop:workspace/mop:customizations/mop:local%02_anish%02MyHealthPortlet,status=PERSISTENT],mapper=EntityMapper[class=class org.gatein.mop.core.api.workspace.content.WorkspaceClone,typeName=mop:workspaceclone]] with class org.gatein.mop.core.api.workspace.content.WorkspaceClone_Chromattic to class org.gatein.mop.core.api.workspace.UIComponentImpl

      15:17:45,109 ERROR [STDERR]     at org.chromattic.core.DomainSessionImpl.cast(DomainSessionImpl.java:845)

      15:17:45,109 ERROR [STDERR]     at org.chromattic.core.DomainSessionImpl._findByNode(DomainSessionImpl.java:620)

      15:17:45,109 ERROR [STDERR]     at org.chromattic.core.DomainSessionImpl._findById(DomainSessionImpl.java:601)

      15:17:45,109 ERROR [STDERR]     at org.chromattic.core.DomainSession.findById(DomainSession.java:185)

      15:17:45,109 ERROR [STDERR]     at org.chromattic.core.api.ChromatticSessionImpl.findById(ChromatticSessionImpl.java:204)

      15:17:45,110 ERROR [STDERR]     at org.gatein.mop.core.api.ModelImpl.findObjectById(ModelImpl.java:241)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.POMSession.findObjectById(POMSession.java:202)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.data.Mapper.saveChildren(Mapper.java:620)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.data.Mapper.saveChildren(Mapper.java:504)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:436)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:372)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:328)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:405)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:44)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.cache.DataCache.create(DataCache.java:108)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:63)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.cache.PortalNamesCache.execute(PortalNamesCache.java:79)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:253)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.pom.config.POMDataStorage.create(POMDataStorage.java:117)

      15:17:45,110 ERROR [STDERR]     at org.exoplatform.portal.config.DataStorageImpl.create(DataStorageImpl.java:92)

       

      regards

       

      Anish Antony