Uploaded image for project: 'Tupelo'
  1. Tupelo
  2. TUP-214

Trying to load wrong bean

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Kernel
    • None

      Will attach test case.

      MapA (Foaf.PERSON -> ClassA)
      MapB(Foaf.PERSON -> ClassB)

      Use beansession with ONLY mapA to register a bean and save the beansession. Now use triples generated with a new beansession with ONLY mapB and following exception is thrown

      Exception in thread "main" org.tupeloproject.kernel.OperatorException: Error:
      at org.tupeloproject.kernel.BeanSession.fetchBean(BeanSession.java:468)
      at MultiMap.read(MultiMap.java:51)
      at MultiMap.main(MultiMap.java:60)
      Caused by: java.lang.IllegalArgumentException: unkown rdf type for bean"MultiMap$BeanA"
      at org.tupeloproject.kernel.BeanSession.register(BeanSession.java:632)
      at org.tupeloproject.kernel.beans.AbstractBeanCodec.fetchBean(AbstractBeanCodec.java:241)
      at org.tupeloproject.kernel.beans.AbstractBeanCodec.fetchBean(AbstractBeanCodec.java:176)
      at org.tupeloproject.kernel.beans.BeanCodecManager.fetchBean(BeanCodecManager.java:115)
      at org.tupeloproject.kernel.BeanSession.fetchBean(BeanSession.java:490)
      at org.tupeloproject.kernel.BeanSession.fetchBean(BeanSession.java:466)
      ... 2 more

      This is list of triples:
      <tag:tupeloproject.org,2006:ba8cdf2896878f85a2cb8056270ce65519506c3b> <tag:tupeloproject.org,2006:/2.0/beans/2.0/propertyImplementationRdfType> <http://xmlns.com/foaf/0.1/Person> .
      <tag:tupeloproject.org,2006:ba8cdf2896878f85a2cb8056270ce65519506c3b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
      <tag:tupeloproject.org,2006:ba8cdf2896878f85a2cb8056270ce65519506c3b> <tag:tupeloproject.org,2006:/2.0/beans/2.0/propertyValueImplementationClassName> "MultiMap$BeanA" .
      <tag:tupeloproject.org,2006:ba8cdf2896878f85a2cb8056270ce65519506c3b> <http://xmlns.com/foaf/0.1/name> "Hello" .
      <tag:tupeloproject.org,2006:ba8cdf2896878f85a2cb8056270ce65519506c3b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <tag:tupeloproject.org,2006:/2.0/beans/2.0/storageTypeBeanEntry> .

              jgaynor Jeffrey Gaynor
              kooper Rob Kooper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: