cancel
Showing results for 
Search instead for 
Did you mean: 

Using Hibernate in SAP Customer Checkout plugin

ricardo_renteria2
Participant
0 Kudos

Hi all,

I want to use Hibernate in my plugin in order to have a better management of my own tables in SCCO. I tried to use it but I get a message that says "Another instance of Derby may have already booted the database".

How can I solve it?

Accepted Solutions (0)

Answers (4)

Answers (4)

ricardo_renteria2
Participant
0 Kudos

Ok, for now I will continue managing it myself

Thank you rzieschang

R_Zieschang
Contributor
0 Kudos

Hi ricardo.renteria2,

I think you need to manage it yourself.
As I said all the scanning and stuff happens way before your plugin is even loaded and I dont think there is a good and convenient solution for this.

Maybe there is a "hacky" way to achieve this... Maybe encapsulate the whole thing in another jar (which is using a dedicated database), provide an api to save/update/read/delete your entities and load this jar in the startup method of your plugin.

hth

Robert

ricardo_renteria2
Participant
0 Kudos

Thank you rzieschang

So, we could use EclipseLink? Or we must manage our own tables as the examples provided in the workshops?

Regards.

R_Zieschang
Contributor
0 Kudos

Hi ricardo.renteria2,

I dont think this is possible because of

1) Apache Derby only allows one connection. CCO has already opened this connection so hibernate cant open another one.

2) Hibernate scans your classes in the class path for any hibernate annotations. Because CCO loads your plugin in a another way than your classic spring application, hibernate will never get the chance to scan your classes and create the hibernate proxy classes etc.

3) CCO uses EclipseLink as JPA Implementation and I would not recommened even share a thought about mixing these two.

Regards

Robert