[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xmlblaster-devel] DRIVER CJDBC - Problems (Urgent)



Hi Michelle,

	Thanks for your help and I already asked my college that takes
care of the database functionality to provide me with the necessary
information for this problem.

Best regards,
Eduardo
	

-----Original Message-----
From: owner-xmlblaster-devel at server.xmlBlaster.org
[mailto:owner-xmlblaster-devel at server.xmlBlaster.org] On Behalf Of
Michele Laghi
Sent: quinta-feira, 5 de Janeiro de 2006 21:07
To: xmlblaster-devel at server.xmlBlaster.org
Subject: Re: [xmlblaster-devel] DRIVER CJDBC - Problems (Urgent)

Hi Eduardo,
I spent quite a long time in trying to reproduce what you described but
unfortunately I got stucked in making CJDBC run for me.

Please provide me with a compilable simple example and with a short
description on how to start the CJDBC Server side (the controler and
whatelse is needed).

Also provide me with a functional xml file for the controler. I am using
oracle with the following data:

url: jdbc:oracle:thin: at localhost:1521:TEST
user: xmlblaster
password: xbl
connectionTestStatement: select count(*) from xb_entries


Without this I am not able to follow the problem since I am not able to
reproduce it.

Also it is not strange that it works when you comment out the code. I
believe (but until I can reproduce the error it is only a belief) that
the C-JDBC Driver feels responsible not only for his urls but also for
foreign urls as our hsqldb. It then answers calls which where supposed
to be answered by the hsqldb Driver.


Regards
Michele


Eduardo Catarino wrote:
> Hi Michele
> 
> 	I've been trying your suggestions, but the results were the
> same. Bellow I send the test code for this particular problem and the
> result.
> The strange thing is that if I comment the code for the driver loading
> the test runs fine.
> Could you take a look please? As you said I thins this could be a
> configuration problem, but I don't know where to start. 
> 
> PS: - I'm loading the CJDBC driver because the application uses it for
a
> mysql database connection that is not used for xmlblaster purposes. I
> just put that code in the test to see what the source of the problem
> was.
> 
> Best Regards,
> Eduardo Catarino
> 
> 
> 	public void testAllFunctions() 
> 	{
> 		
> 		Connection conn = null;
> 		
> 		final String DRIVER = new
> String("org.objectweb.cjdbc.driver.Driver");
> 		final String cs =
> "jdbc:cjdbc://localhost/clientDB;user=user;password=c-jdbc";
> 		
> 		try{
> 	
> 				Class.forName(DRIVER).newInstance();
> 				conn = DriverManager.getConnection(cs);
> 				conn.close();
> 				
> 				
> 		}catch (Exception e)
> 		{
> 				e.printStackTrace();
> 		}
> 		
> 		try
> 		{
> 			glob = new Global();
> 		String args[] = {"-session.name",""};
> 		String sessionName = "";
> 
> 		sessionName = "publisher_session/1";
> 
> 		if (sessionName != "")
> 		{
> 			args[1] = sessionName;
> 			glob.init(args);
> 		}
> 		con = glob.getXmlBlasterAccess();
> 		
> 		connectQos = new ConnectQos(glob);
> 
> 		pubAddress = new Address(glob);
> 		
> 		pubAddress.setDelay(500);
> 		pubAddress.setRetries(-1);
> 		pubAddress.setPingInterval(-1);
> 		pubAddress.setType("XMLRPC"); 
> 		pubAddress.setRawAddress("http://192.168.10.32:8085/";);
> 		
> 		
> 		propQueue = new ClientQueueProperty(glob,null);
> 		
> 		propQueue.setMaxEntries(1000);
> 		propQueue.setAddress(pubAddress);
> 		
> 		connectQos.addClientQueueProperty(propQueue);
> 		connectQos.addCallbackAddress(cbAddress);
> 		
> 		cbAddress = new CallbackAddress(glob);
> 		
> 		cbAddress.setDelay(500);
> 		cbAddress.setRetries(-1);
> 		cbAddress.setPingInterval(500);
> 		
> 		
> 		conListener = new XmlBlasterConnectionStateListener();
> 		con.registerConnectionListener(conListener);
> 		
> 		aDefaultCallBack = new DefaultCallBack();
> 		
> 			conRetQos =
> con.connect(connectQos,aDefaultCallBack);
> 
> 		
> 		} catch (Exception e)
> 		{
> 			e.printStackTrace();
> 		}
> 
> 
> 	}
> 
> 
> 
> RESULT:
> 
> Property: Loading xmlBlaster.properties from CLASSPATH
>
file:/C:/LIAISON/Geral/Desenvolvimento/WP5/WP5.1/WP5.1.5/WP5.1.5_A2/RCC/
>
LIAISON-RCC/WebContent/WEB-INF/lib/xmlBlasterClient.jar!/xmlBlaster.prop
> erties
> Property: No args array given.
> [2/Jan/2006 14:38:42 ERROR main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1]  connecting to
> DB, error code : '0 : No suitable driver' DB configuration details
> follow (check if the DB is running)
> Property: Added 1 property pairs
> [2/Jan/2006 14:38:42 INFO  main XmlBlasterAccess] Loaded security
> plugin=htpasswd version=1.0
> [2/Jan/2006 14:38:42 INFO  main JmxWrapper] JMX over RMI is switched
> off, for details see
>
http://www.xmlBlaster.org/xmlBlaster/doc/requirements/admin.jmx.html#jco
> nsole
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -url                 : 'jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1'
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -user                : 'sa'
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -password            : ''
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -max number of conn  : '10'
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -conn busy timeout   : '90000'
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -driver list         :
> 'org.hsqldb.jdbcDriver:org.objectweb.cjdbc.driver.Driver'
> [2/Jan/2006 14:38:42 INFO  main
> JdbcConnectionPool-jdbc:hsqldb:C:\Documents and
> Settings\eduardo.catarino\tmp\clientpublisher_session1] diagnostics:
> initialize -max. waiting Threads: '300'
> java.sql.SQLException: No suitable driver
> 	at java.sql.DriverManager.getConnection(Unknown Source)
> 	at java.sql.DriverManager.getConnection(Unknown Source)
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcConnectionPool.connect(JdbcConnection
> Pool.java:235)
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcConnectionPool.initialize(JdbcConnect
> ionPool.java:423)
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin.getJdbcQueueMa
> nagerCommonTable(JdbcQueueCommonTablePlugin.java:160)
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin.initialize(Jdb
> cQueueCommonTablePlugin.java:222)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:83)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:59)
> 	at
>
org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin.initialize(C
> acheQueueInterceptorPlugin.java:282)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:83)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:73)
> 	at
>
org.xmlBlaster.client.XmlBlasterAccess.connect(XmlBlasterAccess.java:271
> )
> 	at
>
RCC.XmlBlasterTests.testQueryADriverTest.testAllFunctions(testQueryADriv
> erTest.java:147)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
> stRunner.java:478)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
> ner.java:344)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
> nner.java:196)
> [2/Jan/2006 14:38:42 ERROR main
>
org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin-connection:c
> lient/publisher_session/1] Could not initialize the persistent queue
> 'connection:client/publisher_session/1'. Is the JDBC Driver jar file
in
> the CLASSPATH ? Is the DB up and running ? We continue RAM based
> ...XmlBlasterException errorCode=[resource.db.unavailable]
> serverSideException=false
>
location=[org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin-conn
> ection:client/publisher_session/1/type 'JDBC' version '1.0']
> message=[#1.0.7 getJdbcCommonTableQueueManager: sql exception when
> initializing the connection pool : java.sql.SQLException: No suitable
> driver] [See URL
>
http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.l
> isting.html#resource.db.unavailable] The propery settings are:
>  <queue relating='connection' maxEntries='1000'
maxEntriesCache='1000'>
>   <address type='XMLRPC' pingInterval='0' retries='-1' delay='500'
> dispatchPlugin='undef'>
>    http://192.168.10.32:8085/
>   </address>
>  </queue>
> errorCode=resource.db.unavailable message=#1.0.7
> getJdbcCommonTableQueueManager: sql exception when initializing the
> connection pool : java.sql.SQLException: No suitable driver
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin.getJdbcQueueMa
> nagerCommonTable(JdbcQueueCommonTablePlugin.java:184)
> 	at
>
org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin.initialize(Jdb
> cQueueCommonTablePlugin.java:222)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:83)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:59)
> 	at
>
org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin.initialize(C
> acheQueueInterceptorPlugin.java:282)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:83)
> 	at
>
org.xmlBlaster.util.queue.QueuePluginManager.getPlugin(QueuePluginManage
> r.java:73)
> 	at
>
org.xmlBlaster.client.XmlBlasterAccess.connect(XmlBlasterAccess.java:271
> )
> 	at
>
RCC.XmlBlasterTests.testQueryADriverTest.testAllFunctions(testQueryADriv
> erTest.java:147)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
> stRunner.java:478)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
> ner.java:344)
> 	at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
> nner.java:196)
> [2/Jan/2006 14:38:42 INFO  main XmlRpcConnection] Created 'XMLRPC'
> protocol plugin to connect to xmlBlaster server
> [2/Jan/2006 14:38:42 INFO  main XmlRpcConnection] Created XmlRpc
client
> to http://192.168.10.32:8085/
> [2/Jan/2006 14:38:42 INFO  main
> DispatchConnection-connection:client/publisher_session/1] Connection
> 'XMLRPC' transition UNDEF -> ALIVE: Success,
> connection:client/publisher_session/1 connected.
> [2/Jan/2006 14:38:43 INFO  main
> DispatchManager-connection:client/publisher_session/1] Switched to
> synchronous message delivery
> [configuration loaded from classpath resource
>
jar:file:/C:/LIAISON/Geral/Desenvolvimento/WP5/WP5.1/WP5.1.5/WP5.1.5_A2/
>
RCC/LIAISON-RCC/WebContent/WEB-INF/lib/xmlBlasterClient.jar!/jacorb.prop
> erties]
> [2/Jan/2006 14:38:43 INFO  main CorbaCallbackServer-publisher_session]
> Success, created CORBA callback server
> [2/Jan/2006 14:38:43 INFO  main
> XmlBlasterAccess-client/publisher_session/1] Callback settings:
> type=CACHE onOverflow=deadMessage onFailure=deadMessage
maxEntries=1000
> type=IOR oneway=false dispatcherActive=true burstMode.collectTime=0
> 
>  Reached Alive.....
> [2/Jan/2006 14:38:44 INFO  main
> XmlBlasterAccess-client/publisher_session/1] 1.0.7: Successful XMLRPC
> login as
/node/xmlBlaster_192_168_10_32_3412/client/publisher_session/1
> 
> 
> 
> 
>