Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Marshalling problem for AttributeAssignmentType

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Marshalling problem for AttributeAssignmentType


Chronological Thread 
  • From: Christina Cunningham <>
  • To:
  • Subject: Re: [OpenSAML] Marshalling problem for AttributeAssignmentType
  • Date: Mon, 26 May 2008 10:42:24 +0100

Hi Håkon,

I am having problems building the opensaml jar from svn with this patch. I have checked out the latest copies and rebuild the java-xmltooling and java-openws projects too. The stacktrace is below. Am I missing something?

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenSAML-J
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 341 source files to /home/cc/opensaml-2.1.0CO/java-opensaml2/branches/REL_2/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/home/cc/opensaml-2.1.0CO/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/xacml/policy/impl/AttributeSelectorTypeImpl.java:[88,41] internal error; cannot instantiate <T>prepareForAssignment(T,T) at org.opensaml.xacml.policy.impl.AttributeSelectorTypeImpl to (boolean,boolean)



/home/cc/opensaml-2.1.0CO/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/xacml/policy/impl/AttributeSelectorTypeImpl.java:[88,41] internal error; cannot instantiate <T>prepareForAssignment(T,T) at org.opensaml.xacml.policy.impl.AttributeSelectorTypeImpl to (boolean,boolean)


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
/home/cc/opensaml-2.1.0CO/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/xacml/policy/impl/AttributeSelectorTypeImpl.java:[88,41] internal error; cannot instantiate <T>prepareForAssignment(T,T) at org.opensaml.xacml.policy.impl.AttributeSelectorTypeImpl to (boolean,boolean)


at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
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:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/home/cc/opensaml-2.1.0CO/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/xacml/policy/impl/AttributeSelectorTypeImpl.java:[88,41] internal error; cannot instantiate <T>prepareForAssignment(T,T) at org.opensaml.xacml.policy.impl.AttributeSelectorTypeImpl to (boolean,boolean)


at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon May 26 09:36:59 GMT 2008
[INFO] Final Memory: 16M/75M
[INFO] ------------------------------------------------------------------------


Håkon Sagehaug wrote:
Hi

Does it work for you now?

cheers, Håkon

2008/5/20 Christina Cunningham < <mailto:>>:

Thanks for this Håkon

Håkon Sagehaug wrote:

Hi Christina

I looked at the code and found the error. It was that
AttributeAssignment extends AttribteValue, but this was not
reflected in the marshaller and to some extend not in the
unmarshaller code. I've submitted a patch to it.

cheers, Håkon

2008/5/19 Christina Cunningham
<

<mailto:>

<mailto:

<mailto:>>>:


I am having issues with marshalling an AttributeAssignmentType
whilst constructing an XACMLAuthzDecisionStatementType.
When the
AttributeAssignmentType is marshalled as part of the
XACMLAuthzDecisionStatementType, the AttributeId is set,
but the
dataType and the value are not present.

<code>
AttributeAssignmentTypeImplBuilder attributeAssignmentBuilder =
(AttributeAssignmentTypeImplBuilder)
builderFactory.getBuilder(AttributeAssignmentType.DEFAULT_ELEMENT_NAME);

AttributeAssignmentType attributeAssignment =
attributeAssignmentBuilder.buildObject(); attributeAssignment.setAttributeId("AllowedSoftware");
attributeAssignment.setDataType("http://www.w3.org/2001/XMLSchema#string";
<http://www.w3.org/2001/XMLSchema#string>);
attributeAssignment.setValue("contentService.war");
</code>

The above code produces the following xml:

<xacml:Obligations
xmlns:xacml="urn:oasis:names:tc:xacml:2.0:policy:schema:os">
<xacml:Obligation FulfillOn="Permit"
ObligationId="DeployTarget">
<xacml:AttributeAssignment
AttributeId="AllowedSoftware" />
</xacml:Obligation>
</xacml:Obligations>



I am using opensaml 2.1.0 and the jars etc. that
accompanied that
version; java version "1.6.0_01"

Any suggestions?

Thanks, Christina

-- Christina Cunningham
Software Engineer
Belfast eScience Centre (BeSC)
Queen's University, Belfast
e: c.cunningham [at] besc.ac.uk <http://besc.ac.uk>
<http://besc.ac.uk>
w: www.besc.ac.uk <http://www.besc.ac.uk>
<http://www.besc.ac.uk/>



-- Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


-- Christina Cunningham
Software Engineer
Belfast eScience Centre (BeSC)
Queen's University, Belfast
e: c.cunningham [at] besc.ac.uk <http://besc.ac.uk>
w: www.besc.ac.uk <http://www.besc.ac.uk>
t: +44 (0)28 9097 4809




--
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

--
Christina Cunningham
Software Engineer
Belfast eScience Centre (BeSC)
Queen's University, Belfast
e: c.cunningham [at] besc.ac.uk
w: www.besc.ac.uk




Archive powered by MHonArc 2.6.16.

Top of Page