From: Lars H. <he...@se...> - 2006-02-17 17:57:07
|
Hi Lars, > I would like to create a new topicmap with TMAPI and then save this topicmap > in an XTM File. So I use the XTMSerializer from tmapi-utils in Version 0.6. > As TMAPI Implementation I use tm4j in Version 0.9.8. > If I create a topic with a variant for a basename everything looks fine. > Even when I create a topic with a scope for a basename, but when I use both > scope and variant I get an error using the XTMSerializer. > java.lang.ClassCastException: org.tm4j.topicmap.memory.TopicImpl > at org.tmapiutils.impexp.xtm.XTMSerializer.writeScope(Unknown Source) [...] Class cast exception points to a failure in TM4J, I guess. %) You're doing something like the following? Topic t = tm.createTopic(); Topic scopingTopic = tm.createTopic(); TopicName tn = t.createTopicName("Hello", null); Variant var = tn.createVariant("World", null); var.addScopingTopic(scopingTopic); serialize(tm); // BOOOOM! Best regards, Lars -- http://semagia.com |