[MGNLMIGRATION-252] Upgrade to 4.5 gives NoClassDefFoundError on PurExtraConfigTask Created: 25/Jul/13  Updated: 16/Sep/15  Resolved: 19/Sep/14

Status: Closed
Project: Migration 4.4 to 4.5 (closed)
Component/s: Migration Task
Affects Version/s: 1.2.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Gordon Bentvelzen Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, Jetty, Magnolia 4.5.9


Attachments: Zip Archive migrationReport-worldsteel-20130730.zip    
Issue Links:
causality
relation
is related to MGNLMIGRATION-248 Template migration does not seem to w... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:
Visible to:
Edgar Vonk

 Description   

When I try to upgrade from 4.4.11 to 4.5.9 using latest 1.2.4-SNAPSHOT version (magnolia-4-5-migration-1.2.4-20130724.135205-42) the migration task shows the error:

2013-07-25 15:20:08,705 INFO gnolia.migration.reporting.DefaultReportingService: Starting migration of extends definition for the following module:public-user-registration
2013-07-25 15:20:08,705 WARN info.magnolia.cms.util.ClasspathResourcesUtil : missing file: D:\GitWS\worldsteel-magnolia\worldsteel-webapp\target\classes
2013-07-25 15:20:08,847 INFO gnolia.migration.reporting.DefaultReportingService: Finishing migration of extends definition for the following module:public-user-registration
2013-07-25 15:20:08,850 ERROR info.magnolia.module.ui.ModuleManagerWebUI : Could not perform installation: info/magnolia/migration/task/module/pur/PurExtraConfigTask
java.lang.NoClassDefFoundError: info/magnolia/migration/task/module/pur/PurExtraConfigTask
at info.magnolia.module.publicuserregistration.setup.PublicUserRegistrationMigrationTask.executeExtraMigrationTask(PublicUserRegistrationMigrationTask.java:58)
at info.magnolia.migration.task.AbstractSTKRelatedModuleMigrationTask.executeTask(AbstractSTKRelatedModuleMigrationTask.java:115)
at info.magnolia.migration.task.AbstractMigrationTask.execute(AbstractMigrationTask.java:123)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:499)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:481)
at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:270)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:443)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:440)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:403)
at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:264)
at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:127)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: info.magnolia.migration.task.module.pur.PurExtraConfigTask
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
... 12 more
2013-07-25 15:20:08,864 ERROR info.magnolia.module.InstallContextImpl : > Could not perform installation: info/magnolia/migration/task/module/pur/PurExtraConfigTask
java.lang.NoClassDefFoundError: info/magnolia/migration/task/module/pur/PurExtraConfigTask
at info.magnolia.module.publicuserregistration.setup.PublicUserRegistrationMigrationTask.executeExtraMigrationTask(PublicUserRegistrationMigrationTask.java:58)
at info.magnolia.migration.task.AbstractSTKRelatedModuleMigrationTask.executeTask(AbstractSTKRelatedModuleMigrationTask.java:115)
at info.magnolia.migration.task.AbstractMigrationTask.execute(AbstractMigrationTask.java:123)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:499)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:481)
at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:270)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:443)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:440)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:403)
at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:264)
at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:127)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: info.magnolia.migration.task.module.pur.PurExtraConfigTask
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)



 Comments   
Comment by Robert Šiška [ 26/Jul/13 ]

Hello Gordon,

The extra migrations tasks were decided to be moved to the modules themselves.
Please, try again with latest versions of public-user-registration (1.4.4-SNAPSHOT), form (1.4.8-SNAPSHOT) and commenting (1.2.5-SNAPSHOT).
Note, that standard-templating-kit module will undergo the same change any time soon, so you might want to use latest snapshot too (2.0.11-SNAPSHOT).

Robert

Comment by Gordon Bentvelzen [ 26/Jul/13 ]

Hello,

I wasn't able to update the dependencies of the STK and form module though, because these modules are dependent upon the 4.5.10 version and higher. Does it mean that the stable version of these changes will we available in 4.5.10?

Yes. The release of 4.5.10 is planned for end of July, that means this week. We suggest to upgrade!

Do you expect any problems with the worldsteel template migration?

Well, I didn't find any problems with parsing the Freemarker templates, but bear in mind that you will
still probably need to human-review the changes the miration tool did.

Cheers,
Robert

Comment by Gordon Bentvelzen [ 30/Jul/13 ]

Hello Robert,

Ok, thanks, I will upgrade when it 4.5.10 is released!

Did you actually manage to upgrade the Worldsteel freemarker templates? I'm having a bit of trouble though with configuring the Migration Tool. See: http://jira.magnolia-cms.com/browse/SUPPORT-2593

I tried using the script as Rich mentioned, but the interface of the TemplateScriptMigrationTask in the Groovy script doesn't seem to match with the the Java class:

Groovy:

GroovyRuntimeException: Could not find matching constructor for: info.magnolia.migration.task.templates.TemplateScriptMigrationTask(java.lang.String, java.util.LinkedHashMap, java.util.LinkedHashMap, java.lang.Boolean) 

Java:

public TemplateScriptMigrationTask(String moduleName, String templatesPath, Map siteDefinitions, boolean generateScripts)

Could you have a look?

Thanks, you can close this issue then!
Gordon

Comment by Robert Šiška [ 30/Jul/13 ]

The Groovy scripts don't work because they were meant to be removed before 1.2.4 release...

Did the tool page caused any problems? Looking at your support ticket, I would first update
extranet module with default-worldsteel, extranet and intranet, and then internet with internet site definition...

Btw, if you back-up your ftl files and tick "Generate groovy scripts instead of migrating right away", it's not such an one-time process
as it seems

I haven't try to migrate your whole project yet, I'll try once I find a moment.

Robert

Comment by Gordon Bentvelzen [ 30/Jul/13 ]

Ok, thanks! I'll give your settings a try.

That is, the internet site definition also extends the default-worldsteel site definition. Should I include the default-worldsteel as well, when migrating the internet templates?

Ah ok What I meant with one-time process was that when I would adapt the migrated files and found out that they were not migrated right (because I used the wrong settings), I am afraid that I'm not able to rerun it again. But maybe that's not the case?

Gordon

Comment by Gordon Bentvelzen [ 30/Jul/13 ]

Robert,

I tried your settings on the Migration Tool and it seems to work fine.

But although I checked the box 'Generate Groovy scripts instead of migrating right away', the Migration Tool did change the templates when I clicked the button 'Run Migration', and also created a directory templating-kit.bak containing the original templates. Is that the expected behaviour?

You find the resulting migration report attached.
I can't yet decide whether there are comments in the report that are odd or need special attention. Maybe you would like to give it a quick glance to see if you notice something unexpected.

If that's not the case, then maybe it's best to close this issue, and/or start new one(s) when necessary.

Thanks,
Gordon

Comment by Robert Šiška [ 19/Sep/14 ]

The 'Generate Groovy scripts instead of migration right away' option was removed. The backup mechanism is implemented instead.

Comment by Michael Mühlebach [ 16/Sep/15 ]

This ticket was closed because former resolved tickets are deemed to be closed now. If this assumption is untrue in this particular case please feel free to reopen the ticket again.

Generated at Mon Feb 12 10:18:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.