cancel
Showing results for 
Search instead for 
Did you mean: 

dbe2 - error connecting to database

Former Member
0 Kudos

Hello all,

I'm having problems using the db2e database. I'm using MI 7.0 and DB2 Everyplace 8.2.4.7 in a SmartSync application. I have confirmed that the tables do have correct data.

This is the error i get:

"[SQLException] SQLState: HYT00, Message: [SQLState:HYT00, error code:-80108], Error Code: -80108"

when performing the following instructions:

.....

String url = "jdbc:db2e:/MI/data/";

//String url ="jdbc:db2e:%d";

Utilities.print("aqui");

try {

Connection con = null;;

try { Utilities.print("aqui1");

Class bla = Class.forName("com.ibm.db2e.jdbc.DB2eDriver");

-> con = DriverManager.getConnection(url);

......

I have seen that this error means that there is allready another connection to the database, this is the only place where i establish a connection, and i'm not running CLP.

I belive that might be the MI that have allready establish a connection on the startup as it is showned in the trace.log:

If this is the problem how can i reuse the same connection?

Regards!

[20060219 07:31:49:136] I [MI/API/Logging ] ***** LOG / TRACE SWITCHED ON

[20060219 07:31:49:136] I [MI/API/Logging ] ***** Mobile Infrastructure version: MI 70 SP 12 Patch 0 Build 200705080758

[20060219 07:31:49:136] I [MI/API/Logging ] ***** Current timezone: GMT[20060219 07:31:49:136] I [MI/API/Logging ] ***** Current Trace Level: 1000

[20060219 07:31:49:172] I [MI/API/Runtime/AWT ] Trace severity: All (1000)

[20060219 07:31:49:276] D [MI/PIOS ] No implementations found. Error Code:(3)

[20060219 07:31:51:190] I [MI/API/Runtime/AWT ] start application MOTIVOAT

[20060219 07:31:51:374] P [MI/Core ] Start application MOTIVOAT

[20060219 07:31:51:635] D [MI/Core ] call init application

[20060219 07:31:51:653] D [MI/API/Services ] MEResourceBundle:Constructor: Create MEResourceBundle(mobile.properties.inventory, pt_PT, (null))

[20060219 07:31:51:658] D [MI/API/Services ] MEResourceBundle:Constructor: Use classloader (null)

[20060219 07:31:51:681] D [MI/API/Services ] CREATED MEPropertyResourceBundle com.sap.ip.me.api.services.MEResourceBundle$MEPropertyResourceBundle@52318 for bundleName: mobile.properties.inventory without any locale!

[20060219 07:31:51:771] D [MI/Core ] Set current application to 'MOTIVOAT'

[20060219 07:31:51:778] P [MI/Core ] Activate application MOTIVOAT

[20060219 07:31:51:911] D [MI/Smartsync ] Created new shared Context: com.sap.ip.me.smartsync.core.Context: [ sepereatedConvId=DD2684D11AD7AEF1B6EE00505680741A, sharedConvId=DD2684D11AD7AEF1B6EE00505680741A, isSmartSyncRelavant=true, isApplicationErrResolve=false sharedDataVisible=false]

[20060219 07:31:51:918] D [MI/Smartsync ] Created new Context: com.sap.ip.me.smartsync.core.Context: [ sepereatedConvId=DD2684D11AD7ADF1B6EE00505680741A, sharedConvId=DD2684D11AD7AEF1B6EE00505680741A, isSmartSyncRelavant=true, isApplicationErrResolve=false sharedDataVisible=false]

[20060219 07:31:51:925] D [MI/Smartsync ] Smart Sync framework: entering new context :DD2684D11AD7ADF1B6EE00505680741A - DD2684D11AD7AEF1B6EE00505680741A

[20060219 07:31:52:161] I [MI/Persistence ] IPersistenceManager requested over SPI for convId: DD2684D11AD7AEF1B6EE00505680741A

[20060219 07:31:52:221] D [MI/Persistence ] beginTransaction() called with doWait=false for instance 386491

[20060219 07:31:52:636] D [MI/Persistence ] DB connection property "ENABLE_IO_WRITETHROUGH" set to value " false"

[20060219 07:31:53:664] I [MI/Persistence ] Connected to Database: DB2 Everyplace 8.2.4.7 BUILD 2007-10-23 / JDBC DRIVER 8.2

[20060219 07:31:53:672] D [MI/Persistence ] Statement closed

[20060219 07:31:54:083] D [MI/Persistence ] 21 tables re-orged

[20060219 07:31:54:104] D [MI/Persistence ] Statement created

[20060219 07:31:54:111] D [MI/Persistence ] SELECT * FROM MI_TABMAP WHERE CONVID = 'DD2684D11AD7AEF1B6EE00505680741A'

[20060219 07:31:54:208] D [MI/Persistence ] SELECT MAX(INCNO) FROM MI_TABMAP

[20060219 07:31:54:278] D [MI/Persistence ] select * from M23_meta_topRow ORDER BY "downloadOrder" ASC

[20060219 07:31:54:656] D [MI/Persistence ] select * from M25_meta_childRow ORDER BY "key" ASC

[20060219 07:31:54:739] D [MI/Persistence ] select * from M24_meta_field ORDER BY "fieldNumber" ASC

[20060219 07:31:55:586] D [MI/Persistence ] SELECT * FROM M26_meta_relation

[20060219 07:31:55:711] D [MI/Persistence ] select * from M27_meta_fieldGrou ORDER BY "rowKey" DESC, "groupName" DESC

[20060219 07:31:55:760] D [MI/Smartsync ] Loaded 1 SyncBoDescriptors from database.

[20060219 07:31:55:767] D [MI/Persistence ] commit() called on instance 386491

[20060219 07:31:55:772] D [MI/Persistence ] commit() skipped due to no changes

[20060219 07:31:55:777] I [MI/Persistence ] IPersistenceManager requested over SPI for convId: DD2684D11AD7ADF1B6EE00505680741A

[20060219 07:31:55:783] D [MI/Persistence ] beginTransaction() called with doWait=false for instance 639445

[20060219 07:31:55:963] D [MI/Persistence ] SELECT * FROM MI_TABMAP WHERE CONVID = 'DD2684D11AD7ADF1B6EE00505680741A'

[20060219 07:31:55:978] D [MI/Persistence ] SELECT MAX(INCNO) FROM MI_TABMAP

[20060219 07:31:55:987] D [MI/Persistence ] SELECT * FROM M28_PROPERTIES

[20060219 07:31:56:002] D [MI/Persistence ] commit() called on instance 639445

[20060219 07:31:56:006] D [MI/Persistence ] commit() skipped due to no changes

[20060219 07:31:56:082] I [MI/Persistence ] IPersistenceManager requested over SPI for convId: DD2684D11AD7ADF1B6EE00505680741A

[20060219 07:31:56:087] D [MI/Persistence ] beginTransaction() called with doWait=false for instance 640109

[20060219 07:31:56:170] D [MI/Smartsync ] Created 1 new DeltaRequest objects.

[20060219 07:31:56:177] D [MI/Persistence ] commit() called on instance 640109

[20060219 07:31:56:184] D [MI/Persistence ] commit() skipped due to no changes

[20060219 07:31:56:863] P [MI/Core ] activateApplication() mobile.MotivoServletAT[panel0,0,0,0x0,invalid,layout=java.awt.BorderLayout]

[20060219 07:31:56:871] D [MI/Core ] Set current application to 'MOTIVOAT'

[20060219 07:32:14:986] D [AppLog/MotivoAT ] aqui

[20060219 07:32:14:990] D [AppLog/MotivoAT ] aqui1

[20060219 07:32:15:088] D [AppLog/MotivoAT ] aqui7

[20060219 07:32:15:095] D [AppLog/MotivoAT ] [SQLException] SQLState: HYT00, Message: [SQLState:HYT00, error code:-80108], Error Code: -80108

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

It did help,

Thx

Former Member
0 Kudos

Hi,

well, you have already an open connection - cause you are using MI

In your case I am not exactly sure what you want to do. If you are running MI, then there is no need to access DB2e directly. this is done by MI framework and you need to develop against the MI framework to access the DB2e persistence. Direct access to DB2e is not recommended from inside MI - cause MI allows you to use FileIO or DB2e seemlessly and handles all necessary connections, Encrypting,.....

So I guess in your case it is worth to tell why you think you need to access DB2e directly and if it is to persist data form R/3 - then do it like the following:

1.) Have a look into the MDK examples

2.) Create a SyncBO Datastructure in the Bakcend and the Middleware

3.) Develop against this SyncBO persistence.

If you do this, MI takes care of Sync, Persistence, stability.

If you would access DB2e directly - MI for example has no glue about changed items,......

Hope that helps!

Regards,

Oliver