Bug 1018711

Summary: Procedure 4.4. Install and run the IronJacamar Migration tool does not work
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Nikoleta Hlavickova <nziakova>
Component: DocumentationAssignee: sgilda
Status: CLOSED CURRENTRELEASE QA Contact: Russell Dickenson <rdickens>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: pjelinek, sgilda, smumford, twells
Target Milestone: ER5Keywords: Documentation
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:29:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nikoleta Hlavickova 2013-10-14 09:04:45 UTC
When trying Procedure 4.4. Install and run the IronJacamar Migration tool I got the following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/jca/as/converters/Main : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.jboss.jca.as.converters.Main. Program will exit.

I was following the procedure step by step as described in the guide:
1. Procedure 4.5 - download and unzip IronJacamar 1.1
2. Copy example file into jboss-seam-booking-ds.xml
3. Procedure 4.6 - in IRONJACAMAR_HOME/doc/as/ run ./converter.sh -ds jboss-seam-booking-ds.xml new-datasource-config.xml

The same error occurrs when trying Procedure 4.7 in section 4.1.9. Use the IronJacamar Migration Tool to Convert a Resource Adapter Configuration File

Probably the procedure is missing some steps or notes.

NOTES:
(A) URL http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/tools.html#tools_migration is broken (Not Found)
(B) There is no "docs" directory in IRONJACAMAR_HOME, it is called "doc"
(C) A space is missing in the commands: 
    ./converter.sh -ds jboss-seam-booking-ds.xmlnew-datasource-config.xml
    ./converter.bat -ds jboss-seam-booking-ds.xmlnew-datasource-config.xml
    ./converter.sh -ra mttestadapter-ds.xmlnew-adapter-config.xml
    ./converter.bat -ra mttestadapter-ds.xmlnew-adapter-config.xml

Comment 1 sgilda 2014-04-15 14:58:18 UTC
Nikoleta: I found and fixed the following bugs:

The URL for the download had a trailing '/'.
Replaced:
Download the IronJacamar 1.1 or greater distribution from here: http://www.ironjacamar.org/download.html/.
With:
Download the IronJacamar 1.1 or greater distribution from here: http://www.ironjacamar.org/download.html/

Use the IronJacamar Migration Tool to Convert a Datasource Configuration [5409]
Invalid 'doc' directory:
Replaced:
Open a command line and navigate to the IRONJACAMAR_HOME/docs/as/ directory/.. With:
Open a command line and navigate to the IRONJACAMAR_HOME/doc/as/ directory.
			
			
I downloaded the latest distribution and ran it without a problem. I changed the instructions to tell them to download the latest distribution. My guess is that 1.1 no longer works with EAP 6.3.

Could you follow the new instructions and let me know if it works?

Comment 2 Pavel Jelinek 2014-04-22 06:03:44 UTC
*** Bug 1089852 has been marked as a duplicate of this bug. ***

Comment 3 Pavel Jelinek 2014-04-22 06:25:55 UTC
Beware of really removing the trailing slash, see comment above. 

There should be also mentioned that coverter scripts require java 1.7 or higher, otherwise you get exception like Nikoleta.

Comment 4 Nikoleta Hlavickova 2014-04-24 14:30:48 UTC
I noticed that there are missing spaces in Procedure 4.4. Convert a Datasource Configuration File:
For Linux: ./converter.sh -ds jboss-seam-booking-ds.xmlnew-datasource-config.xml
For Microsoft Windows: ./converter.bat -ds jboss-seam-booking-ds.xmlnew-datasource-config.xml 

it should be:
For Linux: ./converter.sh -ds jboss-seam-booking-ds.xml new-datasource-config.xml
For Microsoft Windows: ./converter.bat -ds jboss-seam-booking-ds.xml new-datasource-config.xml

Comment 5 sgilda 2014-05-14 20:03:28 UTC
This one slipped past me since it remained in a modified state.

Modified: Use the IronJacamar Migration Tool to Convert a Datasource Configuration File [5409, rev: 640988]

Comment 7 sgilda 2014-05-21 18:42:15 UTC
This cn be verified at the above links.

Comment 8 Nikoleta Hlavickova 2014-06-02 07:13:58 UTC
(In reply to sgilda from comment #1)
> I downloaded the latest distribution and ran it without a problem. I changed
> the instructions to tell them to download the latest distribution. My guess
> is that 1.1 no longer works with EAP 6.3.

1.1 still works with EAP 6.3, the problem is with the java version - see comment 3

Both 1.1 and 1.2 require java 1.7 or higher, please make a note about it in the guide.

Comment 9 sgilda 2014-06-02 14:45:43 UTC
Added a note about the need for Java 7 or higher to the following topics:

Download and Install the IronJacamar Migration Tool [5411]
Use the IronJacamar Migration Tool to Convert a Datasource Configuration File [5409]
Use the IronJacamar Migration Tool to Convert a Resource Adapter Configuration File [5410]

Comment 10 sgilda 2014-06-03 12:05:52 UTC
This can be verified here:
documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html-single/Migration_Guide/index.html#Use_the_IronJacamar_Tool_to_Migrate_Datasource_and_Resource_Adapter_Configurations

Comment 11 Nikoleta Hlavickova 2014-06-05 11:42:16 UTC
Verified, revision 6.3.0-14