Wednesday, August 27, 2008

Baby steps...

After installing Java 5 SE JDK, I tried the migration again...
C:\>%asmt_home%\bin\asmigrate -c -S ws50 -T glassfish -t c:\temp\gfout c:\temp\c
bc_20080717\source\cbci_app_v2\cbci_app.ear
JAVA_HOME=C:\Java\jdk5
ASMT_HOME=c:\Java\SDK\asmt
J2EE_HOME=C:\Java\SDK

Extracting archives :-
-------------------


Extracting: cbci_app.ear
xxx

Extracting: cbci_app.war
xxxxxx

Clean up...


Selected Directory is not empty. Some Output file(s) may be overwritten. Do you
want to continue? (Y/N):y

Pre-processing input :-
-------------------
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||



Migration Status :-
----------------

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||





---------------------- Output SUMMARY ------------------------

Java:

Total files processed : - 36
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 36

JSP:

Total files processed : - 33
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 33

XML:

Total files processed : - 4
Succeded : - 4
Failed : - 0
Partially Processed : - 0
Unchanged : - 0

HTML:

Total files processed : - 17
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 17

Configuration:

Total files processed : - 0
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 0


--------------------- End of SUMMARY ------------------------

C:\>

WOOT!

So, after getting over my elation at the migration tool's successful run, I examine the output folder (C:\temp\GFOUT). Looks like ASMT created a folder structure during the extraction phase of the migration with a root folder entitled Input_Archives and I see an HTML page which turns out to be the migration report. I see only a single EAR that indicate re-packaging the application for deployment - but according to the documentation, I should have some build scripts or the migration tool should've invoked an ANT build. Maybe I'm not clear on what should've happened - so I look at the documentation again and think I should see if I can open the EAR within Eclipse.

Loading up Eclipse and making sure the AppServer is running, then importing the generated EAR file - I get an error message: "A Java EE Enterprise Application must contain one or more modules." referencing application.xml located at cbci_app/EarContent/META-INF.

Opening up the file in Eclipse's text mode:
{adding spaces so this blog won't interpret the XML code}

< ? xml version="1.0" encoding="UTF-8" ? >
< application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" >
< display-name >
cbci_app< / display-name >
< / application >"


Gosh... There's nothing in there at all. Am I going to have to add the JARs manually? Definitely needs work!!! It's time to try this again... (in the morning...) and I'll probably post more info to the forums...

...and so it goes...

No comments: