[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [higgins-dev] Problem with RCPIdentitySelector
|
Jochen,
It is great that you are working on the RCP
demo for the EclipseCON. Right now, the RCP selector is not yet
supported for 1.1. 1.0 is the only supported version of the RCP selector,
so you should be using 1.0 to prepare for EclipseCON since it is only two weeks
away.
Of course it would also be great if, in
parallel, someone would help with debugging getting the RCP selector
to work with 1.1.
-Mary
Hi all,
I am using RCPIdentitySelector from Higgins 1.1M5
branch (for EclipseCon demo). I have problems using this RCP application for
creating self issued cards.
Environment I am using:
- Higgins
1.1M5
- Mac OS X 10.5.6 (I did change code to use native code only on windows
platform ;-) Same behavior in Windows too...
- JDK 1.5.0 (Mac OS X
default)
Procedure to reproduce the error:
1. Start RCP
Identity Selector, create a new cardstore
2. Create a "New Card"
3. Edit
e.g. givenname for a new value
4. Save the changes
You will get a
ClassCastException in "PersonalCard.addClaims:" (see console
output)
-
loading properties
from:/data/p/Higgins/dev/3rdParty/Eclipse-3.4.1/Eclipse.app/Contents/MacOS/crpps.properties
-
org.eclipse.higgins.icard.plugin.internal.ICardPlugin started
org.eclipse.higgins.registry.plugin.internal.RegistryPlugin
started
-
org.eclipse.higgins.icard.registry.plugin.internal.RegistryPlugin
started
-
org.eclipse.higgins.icard.common.plugin.internal.Activator started
-
defaults="{cardstore.password=passw0rd,
cardstore.file=/Users/jhi/.higgins/.icard/cardstore.crds}"
- Create a new
SecureStorageICardProvider
- Cardstore file:
[/Users/jhi/.higgins/.icard/cardstore.crds]
-
config="/Users/jhi/.higgins/.icard/org.eclipse.higgins.icard.provider.securestorage.ini"
- java.io.FileNotFoundException:
/Users/jhi/.higgins/.icard/org.eclipse.higgins.icard.provider.securestorage.ini
(No such file or directory)
- properties="{}"
- element.type=[class
org.eclipse.higgins.icard.provider.securestorage.SecureStorageICardProvider:org.eclipse.higgins.icard.provider.securestorage.SecureStorageICardProvider@69094]
- saving cardstore in
[/Users/jhi/.higgins/.icard/cardstore.crds]
- Reading SecureStore
[/Users/jhi/.higgins/.icard/cardstore.crds]
- Decrypting SecureStorage
[/Users/jhi/.higgins/.icard/cardstore.crds:changeit
passwordCallback=javax.security.auth.callback.PasswordCallback@4e9cde]
- Decrypted SecureStorage
[/Users/jhi/.higgins/.icard/cardstore.crds:changeit
passwordCallback=javax.security.auth.callback.PasswordCallback@4e9cde]
- SyncFromStore:
filename=/Users/jhi/.higgins/.icard/cardstore.crds
- RPPS service begin to
work...
- -> CardlistView()
- Reading SecureStore
[/Users/jhi/.higgins/.icard/cardstore.crds]
- Decrypting SecureStorage
[/Users/jhi/.higgins/.icard/cardstore.crds:changeit
passwordCallback=javax.security.auth.callback.PasswordCallback@4e9cde]
- Decrypted SecureStorage
[/Users/jhi/.higgins/.icard/cardstore.crds:changeit
passwordCallback=javax.security.auth.callback.PasswordCallback@4e9cde]
- SyncFromStore:
filename=/Users/jhi/.higgins/.icard/cardstore.crds
- <- CardlistView()
- tablearea = Rectangle {0, 0, 0,
0}
- Table width is 0
- secondColumnWidth is 225
- localFirstColumnWidth is
100
- BorderWidth is 3
- constructor entered
- setFocus()
- create card
- resetCurrentWidgets
- buildUnselectedImage...imagesize =
16216
- Ignoring inform
- notifySelectionChanged
- notifySelectionChanged
- notifySelectionChanged(ICard)
entered
- modify
- save card
- Set Claims type [First
Name]
- Set Claims type [Last
Name]
- Set Claims type [Street]
- Set Claims type [Locality
(City)]
- Set Claims type [State or
Province]
- Set Claims type [Postal
Code]
- Set Claims type
[Country/Region]
- Set Claims type [Phone
Number]
- Set Claims type [Other
Phone]
- Set Claims type [Mobile
Phone]
- Set Claims type [Date of
Birth]
- Set Claims type [Gender]
- Set Claims type [Web
Page]
- Set Claims type [Email]
- Set Claims ValueFirst
Name:Jochen
- Set Claims ValueLast
Name:
- Set Claims ValueStreet:
- Set Claims ValueLocality
(City):
- Set Claims ValueState or
Province:
- Set Claims ValuePostal
Code:
- Set Claims
ValueCountry/Region:
- Set Claims ValuePhone
Number:
- Set Claims ValueOther
Phone:
- Set Claims ValueMobile
Phone:
- Set Claims ValueDate of
Birth:
- Set Claims ValueGender:
- Set Claims ValueWeb Page:
- Set Claims ValueEmail:
-
org.eclipse.higgins.keystore.plugin.internal.KeyStorePlugin started
- Can't export card
java.lang.ClassCastException:
org.eclipse.higgins.icard.common.ClaimValue
at
org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard.addClaims(PersonalCard.java:544)
at
org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard.toElement(PersonalCard.java:432)
at
org.eclipse.higgins.crpps.ui.EditComposite.saveChanges(EditComposite.java:1024)
at
org.eclipse.higgins.crpps.ui.EditComposite.access$4(EditComposite.java:917)
at
org.eclipse.higgins.crpps.ui.EditComposite$1.widgetSelected(EditComposite.java:221)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at
org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.higgins.crpps.app.Application.run(Application.java:68)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at
org.eclipse.equinox.launcher.Main.main(Main.java:1212)
- Error when creating new version of
card [New Card 0]
org.eclipse.higgins.icard.CardException:
Can't export card
at
org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard.toElement(PersonalCard.java:438)
at
org.eclipse.higgins.crpps.ui.EditComposite.saveChanges(EditComposite.java:1024)
at
org.eclipse.higgins.crpps.ui.EditComposite.access$4(EditComposite.java:917)
at
org.eclipse.higgins.crpps.ui.EditComposite$1.widgetSelected(EditComposite.java:221)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at
org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.higgins.crpps.app.Application.run(Application.java:68)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at
org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by:
java.lang.ClassCastException:
org.eclipse.higgins.icard.common.ClaimValue
at
org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard.addClaims(PersonalCard.java:544)
at
org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard.toElement(PersonalCard.java:432)
... 37
moreI tried to fix the code:
private void
addClaims(Document doc, Element privateData) {
// ...
// ClassCastException:
// String sValue = (dirtyClaimValueMap_.containsKey(sType)) ?
((String)dirtyClaimValueMap_.get(sType)) : "";
// bugfix: getValue() from entry
String sValue = (dirtyClaimValueMap_.containsKey(sType)) ?
((ClaimValue)dirtyClaimValueMap_.get(sType)).getValue() : "";
Element claimValue = doc.createElementNS(CardContext.IC_NS,
CardContext.IC_CLAIM_VALUE);
claimValue.setAttribute("Uri", sType);
claimList.appendChild(claimValue);
Element value = doc.createElementNS(CardContext.IC_NS,
CardContext.IC_VALUE);
XMLUtils.setTextContent(value, sValue);
claimValue.appendChild(value);
}
}This will work only to save the card. Furthermore, the usage of
the card will fail afterwards:
5. Select this created card, you will get
again a ClassCastException in
PersonalCard.getClaim(String)
if (claimValues_.containsKey(type))
return (IClaim) claimValues_.get(type); // ==>
ClassCastException, as object is of type String
else
return null;I tried to debug furthermore.
It seems that the serialization/deserialization within the code of EditComposite
class does fail:
private void
saveChanges(boolean preexistingCard) {
// ...
// newCard does have an IClaim in
dirtyClaimValueMap_
PerspectiveCardStore.getSecureCardProvider().addCard(null,
newCard);
// now the object "card" does NOT have
any claimValues_, but instead dirtyClaimValueMap_ has
// now a map of key=String,
value=String
// e.g. http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname=Jochen
// and NO IClaim object
card =
PerspectiveCardStore.getSecureCardProvider().getICardByID(null, iid);Any idea whats wrong
here?
Thanks for your help, Jochen