Re: problem with removeMixin

2011-01-05 Thread Alexander Klimetschek
On 05.01.11 16:35, "PALMER, THOMAS C (ATTCORP)"  wrote:
>ries to strip the mix-in when
>promoting to the next workspace in the workflow.

Just a guss: was the mixin added through Node.addMixin() (then it should
work, if the version history is gone, afaik) or is it already part of the
node's primary node type (then you can't remove a mixin from a certain
node)?

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






RE: problem with removeMixin

2011-01-05 Thread PALMER, THOMAS C (ATTCORP)
It's part of the node definition:

[att:cmsFolder] > nt:base, mix:versionable, mix:deletable 
 - att:nodeTypeKey (STRING) mandatory
 - * (UNDEFINED) multiple
 - * (UNDEFINED)
 + * (att:cmsContent) VERSION
 + * (att:cmsFolder) VERSION

 [att:cmsContent] > nt:base, mix:versionable, mix:deletable
 - att:nodeTypeKey (STRING) mandatory
 - * (UNDEFINED) multiple
 - * (UNDEFINED)

Thanks -

-Original Message-
From: Alexander Klimetschek [mailto:aklim...@adobe.com] 
Sent: Wednesday, January 05, 2011 10:52 AM
To: users@jackrabbit.apache.org
Subject: Re: problem with removeMixin

On 05.01.11 16:35, "PALMER, THOMAS C (ATTCORP)"  wrote:
>ries to strip the mix-in when
>promoting to the next workspace in the workflow.

Just a guss: was the mixin added through Node.addMixin() (then it should
work, if the version history is gone, afaik) or is it already part of
the
node's primary node type (then you can't remove a mixin from a certain
node)?

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






RE: problem with removeMixin

2011-04-11 Thread davidjgonzalez
Were you able to resolve this? I am running into a similar problem trying to
remove a MixinType from a Workflow .. I was trying it from a different
method (though the removeMixin seems like the better way). 
I kept getting a "Node (Property) is protected" and have been unable to
toggle the Protected flag. 


--
View this message in context: 
http://jackrabbit.510166.n4.nabble.com/problem-with-removeMixin-tp3175806p3440159.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: problem with removeMixin

2011-04-11 Thread Justin Edelson
You should use removeMixin(). But, as the OP noted, you can't remove a
mixin which wasn't added by addMixin().

On Sun, Apr 10, 2011 at 1:40 PM, davidjgonzalez
 wrote:
> Were you able to resolve this? I am running into a similar problem trying to
> remove a MixinType from a Workflow .. I was trying it from a different
> method (though the removeMixin seems like the better way).
> I kept getting a "Node (Property) is protected" and have been unable to
> toggle the Protected flag.
>
>
> --
> View this message in context: 
> http://jackrabbit.510166.n4.nabble.com/problem-with-removeMixin-tp3175806p3440159.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>


Re: problem with removeMixin

2011-04-11 Thread Alexander Klimetschek
On 11.04.11 09:55, "Justin Edelson"  wrote:

>You should use removeMixin(). But, as the OP noted, you can't remove a
>mixin which wasn't added by addMixin().

Exactly. Because a mixin that is part of a (primary) node type because
that node type includes it / inherits from it, is not really a mixin
anymore.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






Re: problem with removeMixin

2011-04-11 Thread Gazi Mushfiqur Rahman
In my case, I added 'mix:shareable' mixin to a node created earler. But
later if I try to remove the mixin, I get the error message that
'mix:shareable' mixin can not be removed from the node. Any idea why this is
happening or how I can fix this issue?

On Tue, Apr 12, 2011 at 12:29 AM, Alexander Klimetschek
wrote:

> On 11.04.11 09:55, "Justin Edelson"  wrote:
>
> >You should use removeMixin(). But, as the OP noted, you can't remove a
> >mixin which wasn't added by addMixin().
>
> Exactly. Because a mixin that is part of a (primary) node type because
> that node type includes it / inherits from it, is not really a mixin
> anymore.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> Developer // Adobe (Day) // Berlin - Basel
>
>
>
>
>


Re: problem with removeMixin

2011-04-12 Thread Alexander Klimetschek
On 11.04.11 23:16, "Gazi Mushfiqur Rahman" 
wrote:

>In my case, I added 'mix:shareable' mixin to a node created earler. But
>later if I try to remove the mixin, I get the error message that
>'mix:shareable' mixin can not be removed from the node. Any idea why this
>is
>happening or how I can fix this issue?

This could be the case because (mandatory) properties defined by the mixin
are still set on the node.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






Re: problem with removeMixin

2011-04-13 Thread Gazi Mushfiqur Rahman
I am not sure how that is possible. This is what I have done:
   1. Added 'mix:shareable' mixin to a node.
   2. Created a shared node for that node
   3. Removed the shared node (by calling: 'node.removeShare();' on the
shared node)
   4. Remove the 'mix:shareable' mixin from the original node (which is
failing).

The stack trace of the error is given below:

13.04.2011 14:51:59.019 *ERROR* [10.0.0.87 [1302684719009] POST
/sling/content/hello.move.html HTTP/1.1]
org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
SlingException org.mozilla.javascript.WrappedException: Wrapped
javax.jcr.UnsupportedRepositoryOperationException: Removing mix:shareable is
not supported. (/apps/versionable/document/move/POST.esp#13)
at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1757)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:170)
at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at
org.mozilla.javascript.gen.c25._c0(/apps/versionable/document/move/POST.esp:13)
at
org.mozilla.javascript.gen.c25.call(/apps/versionable/document/move/POST.esp)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at
org.mozilla.javascript.gen.c25.call(/apps/versionable/document/move/POST.esp)
at
org.mozilla.javascript.gen.c25.exec(/apps/versionable/document/move/POST.esp)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1227)
at
org.apache.sling.scripting.javascript.internal.RhinoJavaScriptEngine.eval(RhinoJavaScriptEngine.java:114)
at
org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:351)
at
org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:163)
at
org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:449)
at
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:529)
at
org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:274)
at
org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
at
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
at
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
at
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at
org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:161)
at
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:277)
at
org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:148)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

Re: problem with removeMixin

2011-04-13 Thread Stefan Guggisberg
On Wed, Apr 13, 2011 at 11:01 AM, Gazi Mushfiqur Rahman
 wrote:
> I am not sure how that is possible. This is what I have done:
>   1. Added 'mix:shareable' mixin to a node.
>   2. Created a shared node for that node
>   3. Removed the shared node (by calling: 'node.removeShare();' on the
> shared node)
>   4. Remove the 'mix:shareable' mixin from the original node (which is
> failing).

the exception thrown answers your question:

> Caused by: javax.jcr.UnsupportedRepositoryOperationException: Removing
> mix:shareable is not supported.

cheers
stefan

>
> The stack trace of the error is given below:
>
> 13.04.2011 14:51:59.019 *ERROR* [10.0.0.87 [1302684719009] POST
> /sling/content/hello.move.html HTTP/1.1]
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
> SlingException org.mozilla.javascript.WrappedException: Wrapped
> javax.jcr.UnsupportedRepositoryOperationException: Removing mix:shareable is
> not supported. (/apps/versionable/document/move/POST.esp#13)
>        at
> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1757)
>        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:170)
>        at
> org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
>        at
> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
>        at
> org.mozilla.javascript.gen.c25._c0(/apps/versionable/document/move/POST.esp:13)
>        at
> org.mozilla.javascript.gen.c25.call(/apps/versionable/document/move/POST.esp)
>        at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
>        at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
>        at
> org.mozilla.javascript.gen.c25.call(/apps/versionable/document/move/POST.esp)
>        at
> org.mozilla.javascript.gen.c25.exec(/apps/versionable/document/move/POST.esp)
>        at org.mozilla.javascript.Context.evaluateReader(Context.java:1227)
>        at
> org.apache.sling.scripting.javascript.internal.RhinoJavaScriptEngine.eval(RhinoJavaScriptEngine.java:114)
>        at
> org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:351)
>        at
> org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:163)
>        at
> org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:449)
>        at
> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:529)
>        at
> org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:274)
>        at
> org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
>        at
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
>        at
> org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
>        at
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>        at
> org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:161)
>        at
> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183)
>        at
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
>        at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
>        at
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
>        at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
>        at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
>        at
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
>        at
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
>        at
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>        at
> org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>        at
> org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:277)
>        at
> org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:148)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.jav

Re: problem with removeMixin

2011-05-03 Thread Alexander Klimetschek
On 12.04.11 07:31, "Alexander Klimetschek"  wrote:
>This could be the case because (mandatory) properties defined by the mixin
>are still set on the node.

As I just learned, this is actually wrong - removing a ("normal") mixin
should automatically remove the properties it defines.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel