[MAGNOLIA-1082] Activation fails depending on the repository data to be activated Created: 26/Sep/06  Updated: 26/Feb/08  Resolved: 28/Sep/06

Status: Closed
Project: Magnolia
Component/s: activation
Affects Version/s: 3.0 RC3
Fix Version/s: 3.0 RC3

Type: Bug Priority: Blocker
Reporter: Ralf Hirning Assignee: Boris Kraft
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File magnolia-activation.log     Text File magnolia-activation.log    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

After uploading content using Packager the content could not be activated. So it seems that activation does not support all possible data stored in a repository.
By the way, XML-Export of this data does not work too. To reproduce this error I can provide a package, just contact me (ralf [at] hirning.de).

The logfile says:
ERROR info.magnolia.module.workflow.jcr.JCRExpressionStore
JCRExpressionStore.java(storeExpression:90) 25.09.2006 14:26:49
store exception failed,
openwfe.org.util.beancoder.BeanCoderException: Failed to encode field named 'appliedWorkitem' of class 'openwfe.org.engine.expressions.ParticipantExpression'
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:443)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeBean
(XmlBeanCoder.java:308)
at openwfe.org.util.beancoder.AbstractBeanCoder.encode
(AbstractBeanCoder.java:201)
at openwfe.org.util.beancoder.XmlBeanCoder.xmlEncode
(XmlBeanCoder.java:505)
at
info.magnolia.module.workflow.jcr.JCRExpressionStore.serializeExpression
AsXml(JCRExpressionStore.java:96)
at
info.magnolia.module.workflow.jcr.JCRExpressionStore.storeExpression
(JCRExpressionStore.java:85)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.update
(SimpleExpressionPool.java:396)
at openwfe.org.engine.impl.expool.CachedExpressionPool.update
(CachedExpressionPool.java:169)
at openwfe.org.engine.expressions.AbstractFlowExpression.storeItself
(AbstractFlowExpression.java:360)
at openwfe.org.engine.expressions.ParticipantExpression.apply
(ParticipantExpression.java:409)
at openwfe.org.engine.expressions.raw.RawExpression.apply
(RawExpression.java:370)
at openwfe.org.engine.expressions.state.NormalState.apply
(NormalState.java:112)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.applyOrLaunch
(SimpleExpressionPool.java:547)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.apply
(SimpleExpressionPool.java:560)
at openwfe.org.engine.expressions.SequentialFlowExpression.apply
(SequentialFlowExpression.java:140)
at openwfe.org.engine.expressions.state.NormalState.apply
(NormalState.java:112)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.applyOrLaunch
(SimpleExpressionPool.java:547)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.apply
(SimpleExpressionPool.java:560)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.apply
(SimpleExpressionPool.java:572)
at openwfe.org.engine.expressions.SequenceExpression.reply
(SequenceExpression.java:130)
at openwfe.org.engine.expressions.state.NormalState.reply
(NormalState.java:118)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.reply
(SimpleExpressionPool.java:731)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.replyToParent
(SimpleExpressionPool.java:662)
at
openwfe.org.engine.expressions.AbstractFlowExpression.replyToParent
(AbstractFlowExpression.java:457)
at
openwfe.org.engine.expressions.AbstractFlowExpression.applyToParent
(AbstractFlowExpression.java:472)
at openwfe.org.engine.expressions.LogExpression.apply
(LogExpression.java:153)
at openwfe.org.engine.expressions.raw.RawExpression.apply
(RawExpression.java:370)
at openwfe.org.engine.expressions.state.NormalState.apply
(NormalState.java:112)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.applyOrLaunch
(SimpleExpressionPool.java:547)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.apply
(SimpleExpressionPool.java:560)
at openwfe.org.engine.expressions.SequentialFlowExpression.apply
(SequentialFlowExpression.java:140)
at openwfe.org.engine.expressions.raw.RawExpression.apply
(RawExpression.java:370)
at openwfe.org.engine.expressions.state.NormalState.apply
(NormalState.java:112)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.applyOrLaunch
(SimpleExpressionPool.java:547)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.apply
(SimpleExpressionPool.java:560)
at openwfe.org.engine.expressions.DefineExpression.launch
(DefineExpression.java:334)
at openwfe.org.engine.expressions.raw.RawExpression.launch
(RawExpression.java:382)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.applyOrLaunch
(SimpleExpressionPool.java:545)
at openwfe.org.engine.impl.expool.SimpleExpressionPool.launch
(SimpleExpressionPool.java:583)
at openwfe.org.engine.impl.launch.SimpleXmlLauncher$1.run
(SimpleXmlLauncher.java:453)
Caused by: openwfe.org.util.beancoder.BeanCoderException: Failed to encode field named 'attributes' of class 'openwfe.org.engine.workitem.InFlowWorkItem'
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:443)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeBean
(XmlBeanCoder.java:308)
at openwfe.org.util.beancoder.AbstractBeanCoder.encode
(AbstractBeanCoder.java:201)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeField
(XmlBeanCoder.java:391)
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:439)
... 39 more
Caused by: openwfe.org.util.beancoder.BeanCoderException: Failed to encode field named 'value' of class 'openwfe.org.engine.workitem.StringAttribute'
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:443)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeBean
(XmlBeanCoder.java:308)
at openwfe.org.util.beancoder.AbstractBeanCoder.encode
(AbstractBeanCoder.java:201)
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeMapEntry
(AbstractBeanCoder.java:521)
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeMap
(AbstractBeanCoder.java:509)
at openwfe.org.util.beancoder.AbstractBeanCoder.encode
(AbstractBeanCoder.java:185)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeField
(XmlBeanCoder.java:391)
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:439)
... 43 more
Caused by: org.jdom.IllegalDataException: The data "Can't
deactivate: : java.io.IOException: The character '' is an invalid XML character" is not legal for a JDOM character content: 0x0 is not a legal XML character.
at org.jdom.Text.setText(Text.java:188)
at org.jdom.Text.<init>(Text.java:99)
at openwfe.org.util.beancoder.XmlBeanCoder.encodePrimitive
(XmlBeanCoder.java:377)
at openwfe.org.util.beancoder.AbstractBeanCoder.encode
(AbstractBeanCoder.java:197)
at openwfe.org.util.beancoder.XmlBeanCoder.encodeField
(XmlBeanCoder.java:391)
at openwfe.org.util.beancoder.AbstractBeanCoder.encodeBean
(AbstractBeanCoder.java:439)
... 50 more



 Comments   
Comment by Sameer Charles [ 26/Sep/06 ]

John, I had the same issue when I was working on versioning. I was storing one serialized class without encoding it.
I think it would make sence to encode all serialized objects in the repository to Base64 to avoid such problems.

Comment by Ralf Hirning [ 26/Sep/06 ]

Hi Sameer, I don't think that this is a good idea to solve the problem. The repository and activation must support binaries without encoding.

Comment by Sameer Charles [ 26/Sep/06 ]

in jackrabbit binaries are always encoded otherwise xml export/import does not work, in magnolia version implementation we also serialize objects in to version store with Base64 so it does not break any XML parsing on this data.

Comment by Ralf Hirning [ 26/Sep/06 ]

Now the transfer part works, but the creation/update on the subscriber fails. I add the activation-log of the subscriber.

This is all very strange, Packager does not use any JCR-API, but uses the Magnolia-API to write to a repository. For example to write a binary, the following code snippet is used

NodeData nodeData = node.createNodeData(getName(), getType());

if (getType() == PropertyType.BINARY)

{ nodeData.setValue(getStream()); }

node.save();

So it should be stored just as binary and activation should be able to deal with it.

Comment by Ralf Hirning [ 26/Sep/06 ]

It seems that this bug is related to jackrabbit's import/export problems with binaries (see http://jira.magnolia.info/browse/MAGNOLIA-603 and http://jira.magnolia.info/browse/MAGNOLIA-1000).

Comment by Sameer Charles [ 27/Sep/06 ]

Its not related to binary in any way,.
It was a problem with some objects in workflow and it has been fixed now.

Activation does not care how repository takes care of encoding, this part is outside the scope of activation.
since simple activation is dependent on JCR export/import its the responsibility of the application, in this care its a convertor to make sure that
data can be exported to XML.
We cannot do otherwise, we have to use export/import in order to preserve UUID's

Comment by Sameer Charles [ 27/Sep/06 ]

after looking at the activation log you attached it looks like some page is missing where you are activating
perhaps a parent node?

ERROR info.magnolia.cms.exchange.simple.SimpleExchangeServlet 26.09.2006 10:56:55 – Exception caught
javax.jcr.PathNotFoundException: /velese/gastronomieberatung
at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:263)
at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.java:127)
at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:202)
at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.java:196)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:291)
at org.apache.jackrabbit.core.SessionImpl.getImportContentHandler(SessionImpl.java:1010)
at org.apache.jackrabbit.core.SessionImpl.importXML(SessionImpl.java:1055)
at info.magnolia.cms.exchange.simple.SimpleExchangeServlet.importResource(SimpleExchangeServlet.java:358)
at info.magnolia.cms.exchange.simple.SimpleExchangeServlet.importFresh(SimpleExchangeServlet.java:286)
at info.magnolia.cms.exchange.simple.SimpleExchangeServlet.update(SimpleExchangeServlet.java:188)

Comment by Ralf Hirning [ 27/Sep/06 ]

The problem is connected to import / export. Se the author's activation.log...

Comment by Sameer Charles [ 28/Sep/06 ]

closing this issue since its not related to activation, please create another issue for content migrator or for JCR impl if needed

Comment by Boris Kraft [ 28/Sep/06 ]

wrong resolution

Comment by Ralf Hirning [ 28/Sep/06 ]

I found the error. An Attribute with Type Date has been saved as String.
If you create a NodeData you have to specify the type with the constructor or the NodeData will be created with type String

Comment by Boris Kraft [ 28/Sep/06 ]

not our bug

Comment by Sameer Charles [ 28/Sep/06 ]

And this is intended to be like this, You must specify if the node has to be Binary type because of the nt:resource handling in JCR

Generated at Mon Feb 12 03:23:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.