Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1058394

Summary: java.lang.ClassCastException when configuring JSSE in the CR3 installer - installer misinterprets protocols other than http://
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Filip Elias <felias>
Component: InstallerAssignee: Thomas Hauser <thauser>
Status: CLOSED CURRENTRELEASE QA Contact: Len DiMaggio <ldimaggi>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: atangrin, dlesage, vhalbert
Target Milestone: GAKeywords: QA-Closed
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Users reported a java.lang.ClassCastException when configuring JSSE using the JBoss Data Virtualization installer. The keystore URL was not being handled correctly. This has been resolved by a code changeso users will no longer encounter this exception.
Story Points: ---
Clone Of: Environment:
DV 6 CR3
Last Closed: 2016-02-10 08:52:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Filip Elias 2014-01-27 17:30:28 UTC
Description of problem:

Installer freezes and throws ClassCastException when configuring JSSE.

Steps to reproduce:
1. Start installer
2. Check Add a security-domain in the Configuration window
3. Check Add authentication element
4. Click next
5. Check Add jsse element
6. Add keystore element
7. Fill the attributes and add file url as a Keystore URL
8. Click next

Installer freezes
Exception is thrown: 
Exception in thread "Thread-9" java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
	at com.redhat.installer.util.KeystoreUtils.isValidAccessibleUrl(KeystoreUtils.java:117)
	at com.redhat.installer.util.KeystoreUtils.isValidKeystore(KeystoreUtils.java:34)
	at com.redhat.installer.validator.SecurityDomainValidator.validateData(SecurityDomainValidator.java:41)
	at com.izforge.izpack.installer.IzPanel.validatePanel(IzPanel.java:1242)
	at com.izforge.izpack.installer.IzPanel.panelValidated(IzPanel.java:434)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1664)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1649)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigate(InstallerFrame.java:1812)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$100(InstallerFrame.java:1779)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$1.run(InstallerFrame.java:1796)
	at java.lang.Thread.run(Thread.java:724)

It will freeze when I add these keystore URLs:
file:///home/felias/prace/servers/dv/cr3/keystore.jks
file:/home/felias/prace/servers/dv/cr3/keystore.jks

With this keystore URL installer works correctly:
/home/felias/prace/servers/dv/cr3/keystore.jks

Comment 1 Len DiMaggio 2014-01-27 17:44:24 UTC
Workaround = user can simply enter the file's dir path - not as a file:// URL

Comment 2 Len DiMaggio 2014-01-27 18:12:44 UTC
<thauser> ldimaggi_wfh, confirmed; ftp has a similar issue.

Comment 3 Thomas Hauser 2014-02-19 18:44:40 UTC
This is fixed in later builds.