incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cihan Çimen <ci...@srdc.com.tr>
Subject Clerezza JDBC Connection Problem
Date Thu, 24 Jun 2010 12:34:05 GMT
  Hi,

I am trying to create a jdbc connection in a bundle deployed on clerezza 
downloaded from 
https://repository.apache.org/content/repositories/snapshots/org/apache/clerezza/org.apache.clerezza.platform.launcher.sesame/0.5-incubating-SNAPSHOT/org.apache.clerezza.platform.launcher.sesame-0.5-incubating-20100604.150252-50.jar

<https://repository.apache.org/content/repositories/snapshots/org/apache/clerezza/org.apache.clerezza.platform.launcher.sesame/0.5-incubating-SNAPSHOT/org.apache.clerezza.platform.launcher.sesame-0.5-incubating-20100604.150252-50.jar>

I use the following command to start clerezza
"java -jar -Djava.security.policy=all.policy 
org.apache.clerezza.platform.launcher.sesame-0.5-incubating-20100604.150252-50.jar"
where policy file is:

grant all {
     permission java.net.SocketPermission "localhost:3306" "connect, 
resolve" ;
}


When called from a component activator jdbc connection is established 
successfully.
However when called from a rest resource on a path like "/jdbctest" I 
get the following error when trying to establish a connection: (Full 
stack trace at error.txt)

Driver.com.mysql.jdbc.CommunicationsException: Communications link 
failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.security.AccessControlException
MESSAGE: access denied (java.net.SocketPermission localhost resolve)

Attached please find a test case exported as two bundle jars . On 
activation of bundle "IKS FISE JDBC Test" no exception is thrown but on 
the path http://localhost:8080/jdbctest the connection cannot be 
established with the very same credentials and database url(Can be 
adjusted from Configuration tab of Apache Felix Web Console).

Best,

Cihan


Mime
View raw message