Giter Site home page Giter Site logo

migrator's Introduction

Migrator :Tool to migrate struts web application into a spring web application

Initial Flow

Step 1: FrameworkMigrator.java run this class, which will open a GUI to take input values like input struts project directory path, new migrated spring project name, output directory path for spring project

Step 2: FrameworkMigrator. Process method will basically create initial output project directory structure, as for typical dynamic web project as required.

Step3: SourceMigrateAction. processSourceFiles will do migration of java classes

Step 4: SourceMigrateAction. processWebContent will do migration of config files, jsps

migrator's People

Contributors

shashikiranbs avatar

Stargazers

 avatar  avatar Simmaco Di Maio avatar Spaich avatar

Watchers

James Cloos avatar  avatar Pankaj Bhalla avatar  avatar

migrator's Issues

Not working sevral errors

Errors are popping please help. How to convert from struts to spring if you can help please contact.

No migration activity was carried out

Hello,

I tried to use this tool against following projects

https://mkyong.com/struts/struts-hello-world-example/
https://mkyong.com/struts/configure-a-welcome-page-in-struts/

For both of above projects, only empty directories with spring libraries were created.

On the console, following error gets logged.

Failed to create multiple directories!
Failed to create multiple directories!
Failed to create multiple directories!
Failed to create multiple directories!
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java
dir Name;javadir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java
[Ljava.lang.String;@15ab81c2
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp
dir Name;webappdir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp
[Ljava.lang.String;@2af5e3c4
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp\HelloWorld.jsp
Package nametemp\Struts-Hello-World-Example\StrutsExample\src\main\webapp:FilePathC:\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp:InputprojectPath:C:\temp\Struts-Hello-World-Example\StrutsExample
Input path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp
file name:HelloWorld.jsp
file name:WEB-INF
java.io.FileNotFoundException: Source 'C:\temp\Struts-Hello-World-Example\StrutsExample\src\temp\Struts-Hello-World-Example\StrutsExample\src\main\webapp' does not exist
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com
dir Name;comdir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com
[Ljava.lang.String;@3f2d7dfb
at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1300)
at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1193)
at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1162)
at com.framework.migrator.main.SourceMigrateAction.visitAndProcessAllFiles(SourceMigrateAction.java:94)
at com.framework.migrator.main.SourceMigrateAction.processSourceFiles(SourceMigrateAction.java:121)
at com.framework.migrator.main.FrameworkMigrator.process(FrameworkMigrator.java:190)
at com.framework.migrator.main.FrameworkMigrator$3.actionPerformed(FrameworkMigrator.java:100)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong
dir Name;mkyongdir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong
[Ljava.lang.String;@76c14e4d
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common
dir Name;commondir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common
[Ljava.lang.String;@732f6892
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\form
dirToProcess:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action
dir Name;actiondir path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action
[Ljava.lang.String;@724835f1
file path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action\HelloWorldAction.java
Package nametemp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action:FilePathC:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action:InputprojectPath:C:\temp\Struts-Hello-World-Example\StrutsExample
Input path:C:\temp\Struts-Hello-World-Example\StrutsExample\src\main\java\com\mkyong\common\action
file name:HelloWorldAction.java
class name:HelloWorldAction.java
file Name:HelloWorldAction.java
import name:javax.servlet.http.HttpServletRequest,Class name:HttpServletRequest
file name:HttpServletRequest.java not found
import name:javax.servlet.http.HttpServletResponse,Class name:HttpServletResponse
file name:HttpServletResponse.java not found
import name:org.apache.struts.action.Action,Class name:Action
import name:org.apache.struts.action.ActionForm,Class name:ActionForm
import name:org.apache.struts.action.ActionForward,Class name:ActionForward
import name:org.apache.struts.action.ActionMapping,Class name:ActionMapping
import name:com.mkyong.common.form.HelloWorldForm,Class name:HelloWorldForm
file name:HelloWorldForm.java not found
list of dependent forms:[]
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.framework.migrator.main.SourceMigrateAction.getNewPackageName(SourceMigrateAction.java:70)
at com.framework.migrator.main.SourceMigrateAction.processSourceFiles(SourceMigrateAction.java:120)
at com.framework.migrator.main.FrameworkMigrator.process(FrameworkMigrator.java:190)
at com.framework.migrator.main.FrameworkMigrator$3.actionPerformed(FrameworkMigrator.java:100)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.