From: Martin S. <hu...@we...> - 2002-03-28 22:06:04
|
Hello, i tried to import a topic-map file from the disk to the TopicMapProvider, but I allways get the error: Error while opening topic map: TopicMapProviderException. Caused by: . Cause: Cannot convert base URL : file:/home/martin/Java/tm4j/music-xtm.xml to URI Locator This is the code to create the provider: String providerClassName = "org.tm4j.topicmap.memory.TopicMapProviderFactoryImpl"; try { providerClass = Class.forName(providerClassName); } catch(java.lang.ClassNotFoundException ex) { System.out.println("Class not found"); }; // Create a new instance of that class // Note that this requires the implementation to // provide a no-argument constructor try { tmFactory = (TopicMapProviderFactory)providerClass.newInstance(); } catch (Exception ex) { System.out.println("no Instantiation possible"); } Properties props = new Properties(); props.put("TOPIC_MAP0", "file:///home/martin/Java/tm4j/music-xtm.xml"); TopicMapProvider provider = tmFactory.createTopicMapProvider(props); ^^^^ Here the error occurs. What am I doing wrong? I tried it with file:/home/... and file:///home/... Thank You Martin Stockhammer |
From: Martin S. <hu...@we...> - 2002-03-30 19:49:15
|
Hi, I solved it. I forgot some libs in the CLASSPATH. Bye Martin Martin Stockhammer wrote: > Hello, > > i tried to import a topic-map file from the disk to the TopicMapProvider, > but I allways get the error: > Error while opening topic map: TopicMapProviderException. Caused by: . > Cause: Cannot convert base URL : > file:/home/martin/Java/tm4j/music-xtm.xml to URI Locator > > This is the code to create the provider: > > String providerClassName = > "org.tm4j.topicmap.memory.TopicMapProviderFactoryImpl"; > > try { > providerClass = Class.forName(providerClassName); > } > catch(java.lang.ClassNotFoundException ex) { > System.out.println("Class not found"); > }; > > // Create a new instance of that class > // Note that this requires the implementation to > // provide a no-argument constructor > try { > tmFactory = > (TopicMapProviderFactory)providerClass.newInstance(); > > } > catch (Exception ex) { > System.out.println("no Instantiation possible"); > } > > > Properties props = new Properties(); > props.put("TOPIC_MAP0", > "file:///home/martin/Java/tm4j/music-xtm.xml"); > > TopicMapProvider provider = > tmFactory.createTopicMapProvider(props); > > ^^^^ > Here the error occurs. > > What am I doing wrong? I tried it with file:/home/... and file:///home/... > > > Thank You > > Martin Stockhammer > > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users |
From: Kal A. <ka...@te...> - 2002-04-01 11:44:47
|
Hi Martin, I'm glad you managed to fix your problem - but the error messages wasn't really very helpful, was it ? ;-) If you could let me know which libs were missing, perhaps I can track down where the bad error message gets generated and try and improve things. Cheers, Kal At 20:58 30/03/2002 +0100, Martin Stockhammer wrote: >Hi, > >I solved it. I forgot some libs in the CLASSPATH. > >Bye > >Martin > >Martin Stockhammer wrote: >>Hello, >>i tried to import a topic-map file from the disk to the TopicMapProvider, >>but I allways get the error: >>Error while opening topic map: TopicMapProviderException. Caused by: . >>Cause: Cannot convert base URL : >>file:/home/martin/Java/tm4j/music-xtm.xml to URI Locator >>This is the code to create the provider: >> String providerClassName = >> "org.tm4j.topicmap.memory.TopicMapProviderFactoryImpl"; >> try { >> providerClass = Class.forName(providerClassName); >> } >> catch(java.lang.ClassNotFoundException ex) { >> System.out.println("Class not found"); >> }; >> // Create a new instance of that class >> // Note that this requires the implementation to >> // provide a no-argument constructor >> try { >> tmFactory = >> (TopicMapProviderFactory)providerClass.newInstance(); >> } >> catch (Exception ex) { >> System.out.println("no Instantiation possible"); >> } >> >> Properties props = new Properties(); >> props.put("TOPIC_MAP0", >> "file:///home/martin/Java/tm4j/music-xtm.xml"); >> TopicMapProvider provider = tmFactory.createTopicMapProvider(props); >>^^^^ >>Here the error occurs. >>What am I doing wrong? I tried it with file:/home/... and file:///home/... >> >>Thank You >>Martin Stockhammer >> >>_______________________________________________ >>Tm4j-users mailing list >>Tm4...@li... >>https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > >_______________________________________________ >Tm4j-users mailing list >Tm4...@li... >https://lists.sourceforge.net/lists/listinfo/tm4j-users > |