[izpack-user] Conditions read twice when using type "and", "or", "not"

75 views
Skip to first unread message

mtjandra

unread,
Jul 2, 2013, 11:38:09 AM7/2/13
to us...@izpack.codehaus.org

Within my resources.xml I import conditions.xml as follows,
<res id="conditions.xml" src="<path_to_my_conditions.xml>"/>

If I only have conditions of type="variable" the installer works fine.

When I add the following condition as specified at
http://docs.codehaus.org/display/IZPACK/And+Condition
<condition type="and" id="port.offsetShowSpecify">
<condition type="ref" refid="port.decisionIsAssist" />
<condition type="ref" refid="port.offsetTypeIsSpecify" />
</condition>^M

Izpack ends up re-reading the conditions file after it hits the following
line in RulesEngineImpl.java
result = (Condition) container.getComponent(id);
Seems to trace back to PicoDefaultContainer.getComponent method

This causes the following error
Exception in thread "AWT-EventQueue-0"
com.izforge.izpack.api.exception.IzPackException:
com.izforge.izpack.api.exception.ContainerException:
com.izforge.izpack.api.exception.IzPackException:
com.izforge.izpack.api.exception.IzPackException:
com.izforge.izpack.api.exception.ContainerException:
org.picocontainer.PicoCompositionException: Duplicate Keys not allowed.
Duplicate for 'server.standalone'
at
com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:65)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: com.izforge.izpack.api.exception.ContainerException:
com.izforge.izpack.api.exception.IzPackException:
com.izforge.izpack.api.exception.IzPackException:
com.izforge.izpack.api.exception.ContainerException:
org.picocontainer.PicoCompositionException: Duplicate Keys not allowed.
Duplicate for '<first_condition_in_conditions.xml>'

I'll be grateful if anybody can help me with this issue.
Thanks.

--
View this message in context: http://old.nabble.com/Conditions-read-twice-when-using-type-%22and%22%2C-%22or%22%2C-%22not%22-tp35690034p35690034.html
Sent from the izpack - users @ codehaus mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Paul Bors

unread,
Jul 2, 2013, 1:24:21 PM7/2/13
to us...@izpack.codehaus.org
Reduce it to a simple install.xml file and attach it to a bug at:
http://jira.codehaus.org/browse/IZPACK

In the mid-time try to work around it by creating a single condition (java
class) and register it (works for me).

~ Thank you,
Paul Bors

René Krell

unread,
Jul 2, 2013, 4:02:30 PM7/2/13
to us...@izpack.codehaus.org
Which version of IzPack is this related to?
René


2013/7/2 mtjandra <whoca...@yopmail.com>

mtjandra

unread,
Jul 3, 2013, 10:27:44 AM7/3/13
to us...@izpack.codehaus.org

Thank you for the responses.
This is related to the latest version 5.0.0 I checked out from
https://github.com/izpack/izpack 2013-06-25.

From pom.xml
<artifactId>izpack</artifactId>
<groupId>org.codehaus.izpack</groupId>
<version>5.0.0-rc1-SNAPSHOT</version>
<packaging>pom</packaging>




Which version of IzPack is this related to?
René


--
View this message in context: http://old.nabble.com/Conditions-read-twice-when-using-type-%22and%22%2C-%22or%22%2C-%22not%22-tp35690034p35694010.html

mtjandra

unread,
Jul 4, 2013, 1:21:57 PM7/4/13
to us...@izpack.codehaus.org

False alarm.
I was migrating from izpack 4.3.5 to izpack 5.
Previously the conditions were defined as a resource.
I have moved this into the install.xml and seems to be working as intended.
Thank you for your help.
--
View this message in context: http://old.nabble.com/Conditions-read-twice-when-using-type-%22and%22%2C-%22or%22%2C-%22not%22-tp35690034p35699656.html
Reply all
Reply to author
Forward
0 new messages