[MAGNOLIA-3439] Update to 4.4 breaks on startup with a freemarker error Created: 02/Dec/10  Updated: 17/Dec/10  Resolved: 02/Dec/10

Status: Closed
Project: Magnolia
Component/s: core, modulemechanism, updatemechanism
Affects Version/s: 4.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Kimmo Björnsson Assignee: Jan Haderka
Resolution: Not an issue Votes: 0
Labels: update
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX Java 1.6


Attachments: Text File MAGNOLIA-3439-stacktrace.txt    
Issue Links:
causality
caused by MAGNOLIA-3127 Update freemarker to 2.3.16 Closed
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   

When trying to update to 4.4 from 4.3.8 I get a freemarker-error. The log tells me to go to ".magnolia" to update as usual. But that page gives me this.

FreeMarker template error!

Method public java.lang.String info.magnolia.module.ModuleManager$ModuleManagementState.getDeltaTypesDescription(java.lang.String[]) threw an exception when invoked on info.magnolia.module.ModuleManager$ModuleManagementState@7c3422b5
The problematic instruction:
----------
==> ${status.getDeltaTypesDescription(['installation', 'update', 'installation and update'])} [on line 19, column 26 in info/magnolia/module/ui/ModuleManagerWebUI.header.html]
in include "ModuleManagerWebUI.header.html" [on line 1, column 1 in info/magnolia/module/ui/ModuleManagerWebUI.listTasks.html]
(see attachment for more)



 Comments   
Comment by Philipp Bärfuss [ 02/Dec/10 ]

I am not able to reproduce the issue. Are you sure that you have remove all the old jars and replaced them with the new ones?

In Magnolia 4.4 should immediately see the installation/update page without having first to click a link.

Comment by Magnolia International [ 02/Dec/10 ]

moved stacktrace to attachment for readability

Comment by Kimmo Björnsson [ 02/Dec/10 ]

I use maven so I am sure the old jars are not there. This was with a jetty:run goal running.
I checked in ModuleManagerWebUI.header.html. And in 4.4 row 19 is:

assign title="Magnolia ${status.getDeltaTypesDescription(['installation', 'update', 'installation and update'])} ..."

But not in 4.3.8. So that file looks like the 4.4 is used at least.

I will try to research more.

Comment by Kimmo Björnsson [ 02/Dec/10 ]

"Can not unwrap argument [installation, update, installation and update] to [Ljava.lang.String;"

Looking at the method signature in
magnolia-core/src/main/java/info/magnolia/module/ModuleManager.java
public String getDeltaTypesDescription(String[] texts) {

For me "['installation', 'update', 'installation and update']" doesn't get converted to a String-array. It could be a freemarker-versioning problem.

Comment by Kimmo Björnsson [ 02/Dec/10 ]

I used freemarker 2.3.15.
In freemarker 2.3.16 they fixed this bug.

http://sourceforge.net/tracker/?func=detail&aid=2105310&group_id=794&atid=100794

"incorrect unwrapping of sequences to Java arrays"

That must be it, and you do depend on 2.3.16 in you pom, so it was my fault using an old freemarker.

Comment by Kimmo Björnsson [ 02/Dec/10 ]

I can now confirm that was the problem and my upgrade works. Magnolia now requires Freemarker 2.3.16. Issue solved for me.

Comment by Magnolia International [ 17/Dec/10 ]

Thanks for the research Kimmo !
We indeed updated to Freemarker 2.3.16 since Magnolia 4.3 (MAGNOLIA-3127)

Generated at Mon Feb 12 13:00:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.