hannesN / tmcl-validator

Automatically exported from code.google.com/p/tmcl-validator
0 stars 0 forks source link

Missing dependency? #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I tried to use tmcl-validator with Ontopia to validate some topic maps I 
have, but always get the same error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/
retrotranslator/runtime/java/lang/Iterable_
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:698)
    at java.security.SecureClassLoader.defineClass
(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    at 
de.topicmapslab.tmclvalidator.tmapi.TMAPIFactory.getConstraintValidators
(TMAPIFactory.java:36)
    at de.topicmapslab.tmclvalidator.TMCLValidator.validate
(TMCLValidator.java:83)
    at OntopiaValidate.main(OntopiaValidate.java:41)
Caused by: java.lang.ClassNotFoundException: 
net.sf.retrotranslator.runtime.java.lang.Iterable_
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    ... 15 more

Looking at the source code I see that it requires GNU trove (which is not 
listed in the documentation). I do have GNU trove on my classpath, so I'm 
not sure what's really the problem here.

Original issue reported on code.google.com by lar...@gmail.com on 21 Mar 2010 at 11:13

GoogleCodeExporter commented 9 years ago
Hi,

I have currently no idea what causes this problem. Can you please provide me 
your 
application source, the topic map and the schema so that I can try to reproduce 
the 
error. 

Original comment by eadgh...@googlemail.com on 22 Mar 2010 at 8:29

GoogleCodeExporter commented 9 years ago
Application source is attached to issue 2.

Any topic map file will do for argument one. As the schema, just use schema.ctm 
from 
the TMCL spec. I'm attaching a trivial CTM file I used for validation.

Original comment by lar...@gmail.com on 22 Mar 2010 at 9:16

Attachments:

GoogleCodeExporter commented 9 years ago
I've tried to reproduce the problem using your code but I have some issues 
reading 
the schema with ontopia. I've already changed the include path to the 
template.ctm 
in the schema file (is anyone aware that this is wrong?) but I still get this 
exception:

Exception in thread "main" java.lang.ClassCastException: 
net.ontopia.topicmaps.utils.ctm.VariableTopicGenerator cannot be cast to 
net.ontopia.topicmaps.utils.ctm.TopicIdentityVariableGenerat
or
    at net.ontopia.topicmaps.utils.ctm.Template.getTopicIdentityVariable
(Template.java:93)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.topic_identity
(CTMParser.java:1000)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.topic(CTMParser.java:385)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.template_def(CTMParser.java:506)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.topicmap(CTMParser.java:274)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.include(CTMParser.java:857)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.directive(CTMParser.java:367)
    at net.ontopia.topicmaps.utils.ctm.CTMParser.topicmap(CTMParser.java:269)
    at net.ontopia.topicmaps.utils.ctm.CTMTopicMapReader.read
(CTMTopicMapReader.java:140)
    at net.ontopia.topicmaps.impl.utils.AbstractTopicMapReader.read
(AbstractTopicMapReader.java:101)
    at test.main(test.java:31)

Can you give me a hint what might be wrong? I never used the ontopia reader 
before.

Original comment by eadgh...@googlemail.com on 22 Mar 2010 at 9:43

GoogleCodeExporter commented 9 years ago
Don't use Ontopia 5.0.2, but build from source instead.

Original comment by lar...@gmail.com on 22 Mar 2010 at 9:47

GoogleCodeExporter commented 9 years ago
Ok, I've rebuilded ontopia from source but the the CTMReader still can't read 
the 
schema.ctm:

Exception in thread "main" java.io.IOException: Lexical error at file:/home/ch/
workspace/java/test-ontopia-validator/src/main/resources/schema.ctm:101:0: 
expecting 
EOF, found 'tmdm:subject'
    at net.ontopia.topicmaps.utils.ctm.CTMTopicMapReader.read
(CTMTopicMapReader.java:145)
    at net.ontopia.topicmaps.impl.utils.AbstractTopicMapReader.read
(AbstractTopicMapReader.java:101)
    at test.main(test.java:29)

I don't know why the reader expects an EOF at this position, the file looks 
valid to 
me. Do you use the schema.ctm from http://www.isotopicmaps.org/tmcl/ or do you 
have 
a modified version?

Original comment by eadgh...@googlemail.com on 22 Mar 2010 at 10:30

GoogleCodeExporter commented 9 years ago
I close the ticket since there is no more response.

Original comment by eadgh...@googlemail.com on 5 Apr 2011 at 1:07