[ 
http://jira.codehaus.org/browse/JIBX-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski updated JIBX-221:
---------------------------------


This bug report is unfortunately too vague to verify. If anyone sees this 
occur, please attach an Ant project to demonstrate the problem.

> Cannot define name in structure when using custom un/marshaller + related 
> issues
> --------------------------------------------------------------------------------
>
>                 Key: JIBX-221
>                 URL: http://jira.codehaus.org/browse/JIBX-221
>             Project: JiBX
>          Issue Type: Bug
>          Components: core
>    Affects Versions: JiBX 1.1.6
>         Environment: All
>            Reporter: James Watson
>            Assignee: Dennis Sosnoski
>            Priority: Minor
>
> According to the binding tutorial, a name is not required on a mapping for a 
> concrete-type if a custom marshaller-unmarshaller pair is defined.  However, 
> when I try to set a name on a structure that resolves to such a mapping, I 
> get an error: "name attribute not allowed on concrete mapping reference".  
> This seems inconsistent with the above exception but it's not the real 
> problem.
> When I do set the mapping element to abstract="true" and set a name on the 
> structure, I get the following exception:
> Error running binding compiler
> org.jibx.runtime.JiBXException: Unable to change access permissions for 
> <init> in class [my-package].JiBX_MungeAdapter
>         at 
> org.jibx.binding.classes.ClassItem.makeAccessible(ClassItem.java:298)
>         at 
> org.jibx.binding.def.ObjectBinding.genNewInstanceCode(ObjectBinding.java:440)
>         at 
> org.jibx.binding.def.ObjectBinding.genNewInstanceCall(ObjectBinding.java:488)
>         at 
> org.jibx.binding.def.ObjectBinding.genNewInstance(ObjectBinding.java:963)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:267)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:314)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:810)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:954)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:314)
>         at 
> org.jibx.binding.def.MappingDefinition.generateUnmarshalImplementation(MappingDefinition.java:644)
>         at 
> org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:855)
>         at 
> org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:669)
>         at 
> org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:792)
>         at org.jibx.binding.Compile.compile(Compile.java:305)
>         at org.jibx.binding.Compile.main(Compile.java:385)
> This seems pretty strange since this is created by Jibx i.e. why can't it 
> change what it creates? And the name of the element has nothing to do with my 
> code.
> The only think I thought might be an issue is that the binaries for the 
> custom mapped class are not provided for updating but the error doesn't refer 
> to that class anyway and the name of the element is not relevant to that 
> class.
> It seems that I should be able to define the element name on the structure 
> instead of defining a new mapping for every name I want to map my type to.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to