Hi. I get "No suitable driver" sql exception on win2k when trying to get a
pooled connection inside a mediator.
However it works fine on ubuntu. Do you know what might be wrong ?
This is the content of my synapse.properties for pooled connection:
synapse.datasources=sampleds
synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
synapse.datasources.providerUrl=rmi://localhost:2199
synapse.datasources.providerPort=2199
synapse.datasources.sampleds.type=PerUserPoolDataSource
synapse.datasources.sampleds.cpdsadapter.factory=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
synapse.datasources.sampleds.cpdsadapter.className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
synapse.datasources.sampleds.cpdsadapter.name=cpds
synapse.datasources.sampleds.dsName=sample
synapse.datasources.sampleds.driverClassName=org.apache.derby.jdbc.ClientDriver
synapse.datasources.sampleds.url=jdbc:derby://localhost:1527/esbdb;create=false
synapse.datasources.sampleds.username=esb
synapse.datasources.sampleds.password=esb
synapse.datasources.sampleds.maxActive=100
synapse.datasources.sampleds.maxIdle=20
synapse.datasources.sampleds.maxWait=10000
having the following initializer in the custom mediator:
public DBHandler() throws SynapseException {
try {
System.out
.println("\n *** INITIALIZING DATABASE
CONTEXT ***\n");
InitialContext initCtx = createContext();
String jndiName = "sample";
dataSource = (PerUserPoolDataSource)
initCtx.lookup(jndiName);
} catch (Exception e) {
throw new SynapseException(e.getMessage());
}
}
private InitialContext createContext() throws NamingException {
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.rmi.registry.RegistryContextFactory");
env.put(Context.PROVIDER_URL, "rmi://localhost:2199");
InitialContext context = new InitialContext(env);
return context;
}
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user