Using hibernate in Extension for Database Access?
Using hibernate in Extension for Database Access?
Hello,
i'm inventing an extension for OpenOffice and want to access to a database with hibernate. But if i try this, I get a hibernate Exception: /hibernate.cfg.xml not found.
I have the hibernate.cfg.xml file in the src path, but when i deploy the extension in OpenOffice, i get this error message. Any ideas, what can i do, to use hibernate in extension developement?
i'm inventing an extension for OpenOffice and want to access to a database with hibernate. But if i try this, I get a hibernate Exception: /hibernate.cfg.xml not found.
I have the hibernate.cfg.xml file in the src path, but when i deploy the extension in OpenOffice, i get this error message. Any ideas, what can i do, to use hibernate in extension developement?
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
No help, because not so much user use hiberbate.
I have no experience with hibernate eighter.
odb files not reachable from outside.
Only thing what you can do extract odb file with zipper, start hsqldb server with odb file scripts and data and use hibernate.
When you finished work repack back all files to odb file, which you can use later in OOo Base.
I have no experience with hibernate eighter.
odb files not reachable from outside.
Only thing what you can do extract odb file with zipper, start hsqldb server with odb file scripts and data and use hibernate.
When you finished work repack back all files to odb file, which you can use later in OOo Base.
Last edited by r4zoli on Fri Mar 18, 2011 9:57 pm, edited 1 time in total.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
Me neither, I think. I once wrote an OOo Java macro example which uses several JAR files (for example mail.jar and log4j-1.2.16.jar) and properties files (log4j.properties and mail.properties) and called that from OOo as a macro, as you can read here: http://user.services.openoffice.org/en/ ... =45&t=3813. Although I never used Hibernate in such an OOo Java macro, I suppose that configuring the classpath in the necessary parcel-descriptor.xml could be extended for a usage with Hibernate. But I never gave writing an extension a try so I think that my OOo Java macro knowledge cannot help you in your situation.raff_nix wrote:no help?
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
Re: Using hibernate in Extension for Database Access?
Hello,
i think the problem is, that i have to change the build-uno.xml or the ant script, but i dont't know how to add my hibernate.cfg.xml file to the extension, so that is linked into the OXT-File Extension...?
Hibernate isnt't the problem...
Any ideas?
i think the problem is, that i have to change the build-uno.xml or the ant script, but i dont't know how to add my hibernate.cfg.xml file to the extension, so that is linked into the OXT-File Extension...?
Any ideas?
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
The extensions genaral information, you could find in OOo wiki page:
http://wiki.services.openoffice.org/wiki/Extensions
But, extensions helps only in packaging your codes.
First you needs to know where to connect and how to connect into OOo, and how it works, where developer guide helps:
http://wiki.services.openoffice.org/wik ... n/DevGuide
http://wiki.services.openoffice.org/wiki/Extensions
But, extensions helps only in packaging your codes.
First you needs to know where to connect and how to connect into OOo, and how it works, where developer guide helps:
http://wiki.services.openoffice.org/wik ... n/DevGuide
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
I have looked but i havent't found the needed information. Nothing about using hibernate with openoffice... 
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
As I mentioned in my first post no such information.
Why do you you think that you could use hibernate with OOo?
What scenario you try to use such pair?
Why do you you think that you could use hibernate with OOo?
What scenario you try to use such pair?
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
I generate with my Plugin a pdf and xml file. And these generated files i want to store in an arbitrary database. Thats all 
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
Then use hibarnate with HSQLBD 2.1 in server mode to store data or links to data (no reason to store big files in database, only links).
You could connect later to external hsqldb server with OOo Base to create reports, etc.
You could connect later to external hsqldb server with OOo Base to create reports, etc.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
Yes, but it has nothing to do with my problem, which database i use.
My hibernate.cfg.xml -file wasn't found in my extension. If this works i can use arbitrary databases independent of an engine...
My hibernate.cfg.xml -file wasn't found in my extension. If this works i can use arbitrary databases independent of an engine...
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
Forget OOo and extensions.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
why? Because you don't understand my problem? 
OpenOffice 3.3 on Windows 7
Re: Using hibernate in Extension for Database Access?
No.
If I understand your problem correctly, you tried to use OOo and hibernate parallel, and reach database with hibernate, opened file within Base, without using OOo API is not possible, only with hibernate.
Otherwise no reason to talk about extensions at all.
If I understand your problem correctly, you tried to use OOo and hibernate parallel, and reach database with hibernate, opened file within Base, without using OOo API is not possible, only with hibernate.
Otherwise no reason to talk about extensions at all.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Using hibernate in Extension for Database Access?
Hm, okay this is the macro forum, not the Base forum. The extension might even be for Calc or Writer only.
The crucial point here is that hibernate is a framework or at least an application layer and OpenOffice with its UNO object is a Framework (although a very special one), as well. Please rethink about this constellation.
If pluggin in the hibernate framework/component into OOo doesn't work, you might well try it the other way round. Of course in that case it is surely not an extension anymore. And I would be another one who doesn't answer your question.
Next question: Are you sure that the "hibernate.cfg.xml" is part of hibernate? Sounds silly I know. Typically you say hibernate won't work without this file, so of course it is part of hibernate.
But still the xml file itself could be part of the application server in which hibernate is supposed to run. You get the point? If you replace the AS with OpenOffice it is not guaranteed that OpenOffice follows EJB3 (or whatever it is) standards.
The crucial point here is that hibernate is a framework or at least an application layer and OpenOffice with its UNO object is a Framework (although a very special one), as well. Please rethink about this constellation.
If pluggin in the hibernate framework/component into OOo doesn't work, you might well try it the other way round. Of course in that case it is surely not an extension anymore. And I would be another one who doesn't answer your question.
Next question: Are you sure that the "hibernate.cfg.xml" is part of hibernate? Sounds silly I know. Typically you say hibernate won't work without this file, so of course it is part of hibernate.
But still the xml file itself could be part of the application server in which hibernate is supposed to run. You get the point? If you replace the AS with OpenOffice it is not guaranteed that OpenOffice follows EJB3 (or whatever it is) standards.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.