portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sie, Yang" <yang....@fmr.com>
Subject how to move exiting porlets accross layout thru JS API under portal pipeline?
Date Mon, 16 Jun 2008 18:46:49 GMT
Hello:
 
 
Using Jetspeed 2.1,  I am trying to move existing portlets between
different layouts.  The following are my code and exception I got.  

 

I would appreciate if somebody could give me some hints what is the
cause of the error.  The page was update in presentation layer however
the change could not be made in DB .   Thanks!

 

        Caused by:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
org.apache.jetspeed.om.page.ContentFragment

        Impl not found in OJB Repository

                at
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
criptorRepository.java:396)

 

 

in following code, assumed that I have two layouts with some portlets in
each layout, I want to moved all the portlets from the second layout to
the first layout.  Basically, I am adding the portlet list obtained from
layout2 to the layout1 then does a pageManager update. Code and detail
stack trace as follow:

 

Thank you.

 

---Yang

 

public void processAction(ActionRequest request, ActionResponse
response) throws PortletException, IOException{

                RequestContext requestContext =
(RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CO
NTEXT_ATTRIBUTE);

                ContentPage requestPage = requestContext.getPage(); 

                           

                PortletWindow window = requestContext.getActionWindow();

                ContentFragment currentMainFragment =
requestPage.getContentFragmentById(window.getId().toString());

                

                //test

 

                List l1= currentMainFragment.getContentFragments(); 

 

                //f1 and f2 are two layout portlet

                ContentFragment f1 = (ContentFragment) l1.get(0);

                ContentFragment f2 = (ContentFragment) l1.get(1); 

 

               //f3 and f4 are portlets on f1 and f2

                List l3 = f1.getContentFragments();

                List l4 = f2.getContentFragments();

                l3.addAll(l4);

                l4.clear();

                        

                try {

                   pageManager.updatePage(requestPage);


                } catch (InvalidFolderException e) {

                        throw e;

                } catch (NodeException e) {

                        throw e;

                }

        }

        

        

        org.apache.jetspeed.page.PageNotUpdatedException: Page
/_user/axxxxxx /portfolio.psml not updated.

                at
org.apache.jetspeed.page.impl.DatabasePageManager.updatePage(DatabasePag
eManager.java:1035)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:585)

                at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
AopUtils.java:318)

                at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinp
oint(ReflectiveMethodInvocation.java:20

        3)

                at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:162)

                at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:107)

                at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:185)

                at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:209)

                at $Proxy1.updatePage(Unknown Source)

                at
org.apache.jetspeed.portlets.layout.NexueLayoutUtils.updateMainFragment(
NexueLayoutUtils.java:593)

                at
org.apache.jetspeed.portlets.layout.NexusMultiColumnPortlet.processActio
n(NexusMultiColumnPortlet.java:202)

                at
org.apache.jetspeed.factory.JetspeedPortletInstance.processAction(Jetspe
edPortletInstance.java:96)

                at
org.apache.jetspeed.container.invoker.LocalPortletInvoker.invoke(LocalPo
rtletInvoker.java:188)

                at
org.apache.jetspeed.container.invoker.LocalPortletInvoker.action(LocalPo
rtletInvoker.java:108)

                at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContai
nerImpl.java:164)

                at
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.processPor
tletAction(JetspeedPortletContainerWrap

        per.java:132)

                at
org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionVal
veImpl.java:123)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:
76)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValve
Impl.java:255)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginV
alidationValveImpl.java:159)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(Local
izationValveImpl.java:169)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSe
curityValve.java:118)

                at java.security.AccessController.doPrivileged(Native
Method)

                at
javax.security.auth.Subject.doAsPrivileged(Subject.java:454)

                at
org.apache.jetspeed.security.JSSubject.doAsPrivileged(JSSubject.java:195
)

                at
org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractS
ecurityValve.java:112)

                at
com.fmr.portal.security.NTLMSecurityValve.invoke(NTLMSecurityValve.java:
328)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalU
RLValveImpl.java:67)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(Capabil
ityValveImpl.java:128)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
com.fmr.fimt.fw.pipeline.valve.impl.XmlPropertyFileReaderValveImpl.invok
e(XmlPropertyFileReaderValveImpl.java:7

        5)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
com.fmr.fimt.fw.pipeline.valve.impl.PropertyFileReaderValveImpl.invoke(P
ropertyFileReaderValveImpl.java:61)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
com.fmr.fimt.fw.pipeline.valve.impl.StatisticsValveImpl.invoke(Statistic
sValveImpl.java:64)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(Jets
peedPipeline.java:166)

                at
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.ja
va:145)

                at
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:21
4)

                at
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:24
2)

                at
org.apache.jetspeed.engine.JetspeedServlet.doPost(JetspeedServlet.java:2
69)

                at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

                at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

                at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)

                at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

                at
com.fmr.fimt.fw.servlet.filter.NTLMAuthenticationFilter.doFilter(NTLMAut
henticationFilter.java:156)

                at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)

                at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

                at
org.apache.jetspeed.engine.servlet.XXSUrlAttackFilter.doFilter(XXSUrlAtt
ackFilter.java:51)

                at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)

                at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

                at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)

                at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)

                at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:432)

                at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

                at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

                at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)

                at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

                at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
8)

                at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:6

        63)

                at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)

                at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)

                at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)

                at java.lang.Thread.run(Thread.java:595)

        Caused by: org.springmodules.orm.ojb.OjbOperationException: OJB
operation failed; nested exception is org.apache.ojb.broke

        r.metadata.ClassNotPersistenceCapableException:
org.apache.jetspeed.om.page.ContentFragmentImpl not found in OJB
Repositor

        y

                at
org.springmodules.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAcces
sor.java:92)

                at
org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceB
rokerTemplate.java:144)

                at
org.springmodules.orm.ojb.PersistenceBrokerTemplate.store(PersistenceBro
kerTemplate.java:244)

                at
org.apache.jetspeed.page.impl.DatabasePageManager.updatePage(DatabasePag
eManager.java:1009)

                ... 72 more

        Caused by:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
org.apache.jetspeed.om.page.ContentFragment

        Impl not found in OJB Repository

                at
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
criptorRepository.java:396)

                at
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
criptorRepository.java:409)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getClassDescriptor(Pers
istenceBrokerImpl.java:1818)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(P
ersistenceBrokerImpl.java:1050)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persis
tenceBrokerImpl.java:928)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBr
okerImpl.java:1776)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:813)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:726)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(P
ersistenceBrokerImpl.java:1057)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persis
tenceBrokerImpl.java:928)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBr
okerImpl.java:1776)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:813)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:726)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(P
ersistenceBrokerImpl.java:1057)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persis
tenceBrokerImpl.java:928)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBr
okerImpl.java:1776)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:813)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:726)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(P
ersistenceBrokerImpl.java:1057)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persis
tenceBrokerImpl.java:928)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBr
okerImpl.java:1776)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:813)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:726)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(P
ersistenceBrokerImpl.java:1057)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persis
tenceBrokerImpl.java:928)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBr
okerImpl.java:1776)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:813)

                at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:726)

                at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP
ersistenceBroker.java:175)

                at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP
ersistenceBroker.java:175)

                at
org.springmodules.orm.ojb.PersistenceBrokerTemplate$9.doInPersistenceBro
ker(PersistenceBrokerTemplate.java:246)

        

                at
org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceB
rokerTemplate.java:141)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message