From borislav.popov at ontotext.com Fri Aug 27 04:41:26 2010 From: borislav.popov at ontotext.com (borislav popov) Date: Fri, 27 Aug 2010 11:41:26 +0300 Subject: [Kim-discussion] KIMService In-Reply-To: References: Message-ID: Hi Marcus this is for kim-discussion and this is where it is being forwarded. you will get an answer soon b On Aug 27, 2010, at 10:06 AM, Marcus Vin?cius de Lima wrote: > Hi, > > I'm trying to load the KIMSevice by RMI connection, but i'm getting > always the same error indicating that the kim_connection.properties > cannot bet read. > > Code below: > public class Main { > > /** > * @param args the command line arguments > */ > public static void main(String[] args) { > System.setSecurityManager(new java.rmi.RMISecurityManager()); > > try { > KIMService serviceKIM = GetService.from(); > System.out.println(serviceKIM.getVersion().toString()); > } > catch(Exception e) > { > System.out.println(e.getMessage()); > } > } > > } > > Exception below: > Exception in thread "main" java.lang.ExceptionInInitializerError > at kimee.Main.main(Main.java:23) > Caused by: java.security.AccessControlException: access denied > (java.io.FilePermission .\kim_connection.properties read) > at > java > .security > .AccessControlContext.checkPermission(AccessControlContext.java:323) > at > java.security.AccessController.checkPermission(AccessController.java: > 546) > at > java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.SecurityManager.checkRead(SecurityManager.java: > 871) > at java.io.File.exists(File.java:731) > at > com.ontotext.kim.client.GetService.(GetService.java:42) > ... 1 more > Java Result: 1 > > > -- > Att, > Marcus Lima > > > > -- > Att, > Marcus Lima -------------- next part -------------- An HTML attachment was scrubbed... URL: From marin.nozhchev at ontotext.com Mon Aug 30 07:27:03 2010 From: marin.nozhchev at ontotext.com (Marin Nozhchev) Date: Mon, 30 Aug 2010 14:27:03 +0300 Subject: [Kim-discussion] Kim-discussion Digest, Vol 18, Issue 1 In-Reply-To: References: Message-ID: <4C7B9587.7090203@ontotext.com> Dear Marcus, I believe the problem is in the security manager that you set: System.setSecurityManager(new java.rmi.RMISecurityManager()); It is not required and apparently not supported by the KIM RMI Client code. I tried putting that line in one of the KIM examples and got the same error. Note that the RMISecurityManager is used only for RMI application that need to download server classes. Your application won't need to do that if you have set up your classpath as described in the documentation: http://ontotext.com/kim/doc/KimDocs-3.0-EN/KIMJavaRMIAPI.html . Hope this helps, Marin > Today's Topics: > > 1. Re: KIMService (borislav popov) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 27 Aug 2010 11:41:26 +0300 > From: borislav popov > Subject: Re: [Kim-discussion] KIMService > To: Marcus Vin?cius de Lima > Cc: info at ontotext.com, kim-discussion > Message-ID: > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"; > DelSp="yes" > > Hi Marcus > this is for kim-discussion and this is where it is being forwarded. > you will get an answer soon > b > On Aug 27, 2010, at 10:06 AM, Marcus Vin?cius de Lima wrote: > >> Hi, >> >> I'm trying to load the KIMSevice by RMI connection, but i'm getting >> always the same error indicating that the kim_connection.properties >> cannot bet read. >> >> Code below: >> public class Main { >> >> /** >> * @param args the command line arguments >> */ >> public static void main(String[] args) { >> System.setSecurityManager(new java.rmi.RMISecurityManager()); >> >> try { >> KIMService serviceKIM = GetService.from(); >> System.out.println(serviceKIM.getVersion().toString()); >> } >> catch(Exception e) >> { >> System.out.println(e.getMessage()); >> } >> } >> >> } >> >> Exception below: >> Exception in thread "main" java.lang.ExceptionInInitializerError >> at kimee.Main.main(Main.java:23) >> Caused by: java.security.AccessControlException: access denied >> (java.io.FilePermission .\kim_connection.properties read) >> at >> java >> .security >> .AccessControlContext.checkPermission(AccessControlContext.java:323) >> at >> java.security.AccessController.checkPermission(AccessController.java: >> 546) >> at >> java.lang.SecurityManager.checkPermission(SecurityManager.java:532) >> at java.lang.SecurityManager.checkRead(SecurityManager.java: >> 871) >> at java.io.File.exists(File.java:731) >> at >> com.ontotext.kim.client.GetService.(GetService.java:42) >> ... 1 more >> Java Result: 1 >> >> >> -- >> Att, >> Marcus Lima >> >> >> >> -- >> Att, >> Marcus Lima > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > Kim-discussion mailing list > Kim-discussion at ontotext.com > http://ontotext.com/mailman/listinfo/kim-discussion > > > End of Kim-discussion Digest, Vol 18, Issue 1 > ********************************************* From marcvlima at gmail.com Mon Aug 30 09:10:45 2010 From: marcvlima at gmail.com (=?ISO-8859-1?Q?Marcus_Vin=EDcius_de_Lima?=) Date: Mon, 30 Aug 2010 10:10:45 -0300 Subject: [Kim-discussion] Kim-discussion Digest, Vol 18, Issue 1 In-Reply-To: <4C7B9587.7090203@ontotext.com> References: <4C7B9587.7090203@ontotext.com> Message-ID: Hey Marin, Thank you very much! I've just realized that with RMISecurityManager enabled it's not possible to load properties files. Marcus Lima Em 30/08/2010 08:27, "Marin Nozhchev" escreveu: Dear Marcus, I believe the problem is in the security manager that you set: System.setSecurityManager(new java.rmi.RMISecurityManager()); It is not required and apparently not supported by the KIM RMI Client code. I tried putting that line in one of the KIM examples and got the same error. Note that the RMISecurityManager is used only for RMI application that need to download server classes. Your application won't need to do that if you have set up your classpath as described in the documentation: http://ontotext.com/kim/doc/KimDocs-3.0-EN/KIMJavaRMIAPI.html . Hope this helps, Marin Today's Topics: > > 1. Re: KIMService (borislav popov) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 27 Aug 2010 11:41:26 +0300 > From: borislav popov > Subject: Re: [Kim-discussion] KIMService > To: Marcus Vin?cius de Lima > Cc: info at ontotext.com, kim-discussion > Message-ID: > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"; > DelSp="yes" > > Hi Marcus > this is for kim-discussion and this is where it is being forwarded. > you will get an answer soon > b > On Aug 27, 2010, at 10:06 AM, Marcus Vin?cius de Lima wrote: > > Hi, >> >> I'm trying to load the KIMSevice by RMI connection, but i'm getting >> always the same error indicating that the kim_connection.properties >> cannot bet read. >> >> Code below: >> public class Main { >> >> /** >> * @param args the command line arguments >> */ >> public static void main(String[] args) { >> System.setSecurityManager(new java.rmi.RMISecurityManager()); >> >> try { >> KIMService serviceKIM = GetService.from(); >> System.out.println(serviceKIM.getVersion().toString()); >> } >> catch(Exception e) >> { >> System.out.println(e.getMessage()); >> } >> } >> >> } >> >> Exception below: >> Exception in thread "main" java.lang.ExceptionInInitializerError >> at kimee.Main.main(Main.java:23) >> Caused by: java.security.AccessControlException: access denied >> (java.io.FilePermission .\kim_connection.properties read) >> at >> java >> .security >> .AccessControlContext.checkPermission(AccessControlContext.java:323) >> at >> java.security.AccessController.checkPermission(AccessController.java: >> 546) >> at >> java.lang.SecurityManager.checkPermission(SecurityManager.java:532) >> at java.lang.SecurityManager.checkRead(SecurityManager.java: >> 871) >> at java.io.File.exists(File.java:731) >> at >> com.ontotext.kim.client.GetService.(GetService.java:42) >> ... 1 more >> Java Result: 1 >> >> >> -- >> Att, >> Marcus Lima >> >> >> >> -- >> Att, >> Marcus Lima >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL:< > http://ontotext.com/pipermail/kim-discussion/attachments/20100827/35d6c270/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > Kim-discussion mailing list > Kim-discussion at ontotext.com > http://ontotext.com/mailman/listinfo/kim-discussion > > > End of Kim-discussion Digest, Vol 18, Issue 1 > ********************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: