Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Problem with connect to Oracle

What can I do if I want to connect to Oracle Database?? In my project I must read table in database and take rows to GS.. I try to change project <gs_home>\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\readme.txt but it's not working, because it use HSQL :/ Sorry for my grammar :/ Thank you for help.

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2124]{quote}

asked 2007-06-15 03:59:04 -0500

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

you will need to modify the space-config.persistent.DataBaseName property at the following file to have the Oracle JDBC conention URL:
\GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\config\jdbcspace.properties - if you use the Space API
or
\GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\config\jdbcmap.properties - if you use the Map API

Shay

answered 2007-06-15 20:14:02 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

I don't think so... Look at GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\bin\mydb.properties In this file are properities to HSQL!! This file are start in startAllSpaceAPI file: @start "HSQL mydb" java -cp ............\lib\jdbc\hsqldb.jar org.hsqldb.Server -database mydb -port 9003 Are anyone here, who try connect to Oracle?? I try for few day and nothig :/ PLZ help.

laczupacabra gravatar imagelaczupacabra ( 2007-06-18 13:58:00 -0500 )edit

Ignore the mydb.properties. This is for the HSQL. The JDBC connection string you need to have to allow the the CacheLoader/Store implementation to connect to Oracle exists within the jdbcspace.properties/jdbcmap.properties files.

Shay

shay hassidim gravatar imageshay hassidim ( 2007-06-18 14:36:03 -0500 )edit

I change: - GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\config\jdbcspace.properties {quote} space-config.persistent.enabled=true space-config.persistent.CacheLoaderClass=com.j_spaces.examples.jdbccachestore.spaceapi.CacheStoreImpl space-config.persistent.StorageAdapterClass=com.j_spaces.sadapter.cache.CacheAdapter space-config.persistent.DataBaseName=jdbc:oracle:thin:@localhost:1521:orcl space-config.engine.cache_policy=0 space-config.engine.cache_size=2000 {quote} - GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCacheStore\src\com\j_spaces\examples\jdbccachestore\spaceapi\CacheStoreImpl.java {quote} (...) pool = new JDCConnectionDriver("oracle.jdbc.driver.OracleDriver ", dbURL, "system", "orcl"); (...) {quote} - GigaSpacesEE5.2\GenericJDBCProperties\OracleProperties\jdbc.properties {quote} driverClass=oracle.jdbc.driver.OracleDriver connectionUrl=jdbc:oracle:thin:@localhost:1521:orcl userName=system password=orcl {quote}

And it still doesn't work :/

laczupacabra gravatar imagelaczupacabra ( 2007-06-18 14:52:02 -0500 )edit

This is much better...

GigaSpacesEE5.2\GenericJDBCProperties\OracleProperties\jdbc.properties is irlevant for this example.

Can you send the exception you are getting when constructing the JDCConnectionDriver?

Shay

shay hassidim gravatar imageshay hassidim ( 2007-06-18 15:50:00 -0500 )edit

This is all exceptions: {quote} C:\GS\GigaSpacesEE5.2\examples\Advanced\Data_Grid\Database-Integration\JDBCCache Store\bin>run_SpaceAPIApplication.bat JAVA_HOME environment variable is set to c:\GS\jdk1.5 in "<gigaspaces root="">\bin\ setenv.bat" Environment set successfully from C:\GS\GigaSpacesEE5.2\bin\.. java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)

Welcome to JDBC CacheStore Implementation using Space API Example! Trying to Connect to Space rmi://localhost/./Jdbc_cacheStoreSpace ... CONFIG: Sets the system property ${com.gs.home} with value: C:\GS\GigaSpacesEE5. 2\ com.j_spaces.core.client.FinderException: Failed to find: rmi://localhost/./Jdbc _cacheStoreSpace?schema=default at com.j_spaces.core.client.SpaceFinder._find(SourceFile:505) at com.j_spaces.core.client.SpaceFinder.internalFind(SourceFile:313) at com.j_spaces.core.client.SpaceFinder.internalFind(SourceFile:303) at com.j_spaces.core.client.SpaceFinder.find(SourceFile:374) at com.j_spaces.examples.jdbccachestore.spaceapi.CacheStoreSpaceApi.main (CacheStoreSpaceApi.java:31) Caused by: javax.naming.NameNotFoundException: GigaSpaces;Jdbc_cacheStoreSpace_c ontainer;Jdbc_cacheStoreSpace at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java :95) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java :103) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.j_spaces.core.client.SpaceFinder.a(SourceFile:939) at com.j_spaces.core.client.SpaceFinder._find(SourceFile:479) ... 4 more {quote}

I must add, that when I start basic example (with HSQL database) everything start and execute OK!!

laczupacabra gravatar imagelaczupacabra ( 2007-06-18 16:07:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2007-06-15 03:59:04 -0500

Seen: 53 times

Last updated: Jun 15 '07