Hi!
I am sorry for waisting the time of others...
// But if I finish my binding you may see that it is a really complex
one and you may fogive me :-)
The problem was a missing 'name' attribute. If you use an abstract
mapping where you do not define the name, you have to define it in the
'structure' tag.
<collection field="dbReferenceList">
<structure
NAME="something"
type="org.biohegedus.biodb.bindings.SPdbReference"></structure>
</collection>
Have a good weekend,
Tamas
Mocky Habeeb wrote:
So long as entry has a field dbReferenceList that is different and
distinct from dbReferenceList in organism, then that shouldn't cause you
any problems. In that case they are completely different fields. So I
don't know what your problem is. Have you tried changing "map-as=" to
"type=" in your first structure?
Mocky
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tamas
Hegedus
Sent: Thursday, September 22, 2005 5:56 PM
To: [email protected]
Subject: [jibx-users] IllegalStateException
Hi!
I know you like me!
I got the following message: *** Error during code generation - please
report this error on the JiBX users list so that the condition can be
caught during validation ***
-----
What I did?
I have dbReferenceList both in my 'main' tag and a 'child' tag in my xml
file:
ENTRY.dbReferenceList
ENTRY.organism.dbReferenceList
So I wanted to reuse the SPdbRefence abstract binding.
First I implemented the entry.organism.dbRefList, when it was working
fine. Now I created the entry.dbRefList binding and fails with the error
message shown at the bottom.
Thanks in advance! (And really sorry!)
Tamas
========================================================================
==
<!-- MAIN mapping -->
<mapping name="entry"...
<collection field="organismList">
<structure
map-as="org.biohegedus.biodb.bindings.SPorganism"></structure>
</collection>
<!--withouth the following collection is was working fine -->
<collection field="dbReferenceList">
<structure
type="org.biohegedus.biodb.bindings.SPdbReference"></structure>
</collection>
</mapping>
<!-- ORGANISM mapping -->
<mapping name="organism"
class="org.biohegedus.biodb.bindings.SPorganism">
<namespace uri="http://biohegedus.org/biodb/bindings"
default="elements"/>
...
<collection field="dbReferenceList">
<structure name="dbReference"
type="org.biohegedus.biodb.bindings.SPdbReference"></structure>
</collection>
...
</mapping>
<!-- SPdbReference mapping -->
<mapping class="org.biohegedus.biodb.bindings.SPdbReference"
abstract="true">
<namespace uri="http://biohegedus.org/biodb/bindings"
default="elements"/>
<collection field="propertyList">
<structure
map-as="org.biohegedus.biodb.bindings.SPproperty"></structure>
</collection>
<value name="type" field="type" usage="required"
style="attribute"/>
<value name="id" field="id" usage="required" style="attribute"/>
<value name="evidence" field="evidence" usage="optional"
style="attribute"/>
<value name="key" field="key" usage="required" style="attribute"/>
</mapping>
=====================================================
ERROR:
---------------------
[java] Error running binding compiler
[java] *** Error during code generation - please report this error
on the JiBX users list so that the condition can be caught during
validation ***
[java] java.lang.IllegalStateException: Internal error: Expected
org.biohegedus.biodb.bindings.SPdbReference on stack, found
java.util.ArrayList
[java] full stack:
[java] 0: java.util.ArrayList
[java] 1: java.util.ArrayList
[java] 2: org.jibx.runtime.impl.UnmarshallingContext
[java] at
org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.ja
va:393)
[java] at
org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.jav
a:495)
[java] at
org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.j
ava:852)
[java] at
org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:5
38)
[java] at
org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding
.java:793)
[java] at
org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.jav
a:905)
[java] at
org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProp
erty.java:191)
[java] at
org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroug
hComponent.java:111)
[java] at
org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollecti
on.java:143)
[java] at
org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding
.java:757)
[java] at
org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.jav
a:905)
[java] at
org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProp
erty.java:236)
[java] at
org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure
.java:156)
[java] at
org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding
.java:757)
[java] at
org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.jav
a:905)
[java] at
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.j
ava:272)
[java] at
org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.ja
va:565)
[java] at
org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.ja
va:604)
[java] at
org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.ja
va:611)
[java] at org.jibx.binding.Compile.compile(Compile.java:305)
[java] at org.jibx.binding.Compile.main(Compile.java:384)
--
Tamas Hegedus, PhD | phone: (1) 919-966 0329
UNC - Biochem & Biophys | fax: (1) 919-966 5178
5007A Thurston-Bowles Bldg | mailto:[EMAIL PROTECTED]
Chapel Hill, NC, 27599-7248 | http://biohegedus.org
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users