On 15-04-15 15:47, Dmitry Baranov wrote:
> Hi everyone,
>
> According Bert experience 
> (https://www.linkedin.com/groups/Choice-OpenEHR-persistence-layer-144276.S.208531138),
>  one must not try to adopt OpenEHR model to relational storage since almost 
> all popular database engines able to process native XML.
>
> So I'm experimenting with Oracle XML DB for almost two weeks, and I'm in 
> despair and kindly ask you for help.
>
> Here is a Github repository where I've collected few files - 
> https://github.com/da-baranov/openehr-ora :
> 1) EHR.xsd - flattened OpenEHR XML schema
> 2) regschema.sql - a script that creates an Oracle directory where test files 
> should be copied to, registers XML schema and creates a table with 
> XML-schema-based column that matches global "version" element
> 3) composition_1191_0.xml, composition_1322_0.xml and composition_1531_0.xml 
> are test instance files which I borrowed from Pablo Pazos github 
> (https://github.com/ppazos/cabolabs-emrapp)
> 4) I'm using Oracle 11.2.0.2.0 Express (for some reasons can't use 12c). The 
> key problem is that Oracle rejects all the instance files producing the 
> following error:
>
> insert into versions(x)
> values(
>    xmltype(
>      bfilename('OPENEHR', 'composition_1531_0.xml'),
>      NLS_CHARSET_ID('AL32UTF8')
>    )
> )
> -------------
> ORA-31079: unable to resolve reference to type "COMPOSITION"
> -------------
>
> 5) In other cases I faced same error also related to abstract XML type 
> resolution with xsi:type: "ORA-31079: unable to resolve reference to type 
> "xsd:string"". Although all XML schema namespaces were OK and Visual Studio 
> schema validator gives no errors.
>
> Where am I wrong?
>
>
Looks like a namespace-problem. I cannot judge that without seeing your 
XML Schema and XML-file.
And I am not going to look at them. Sorry for sounding harsh, but I am 
not an Oracle specialist.

I use Oracle 12c, so I cannot advise you with your Oracle-version.
You should use 12c, it cannot be an hardware issue.
I have run Oracle 12c on a cheap netbook, with 4G memory.
So, my advise, buy another machine, a cheap one, let it be dedicated for 
Oracle. For developing purpose I have an old Lenovo desktop-machine, I 
bought for 100 Euro as Oracle server.
For demo purpose, as explained, that netbook, runs like hell on both.
For production, of course you need something else.

Install Oracle Linux, Oracle fits best on Oracle Linux.

Just do it, and then it should run fine, although you have to change the 
XML-Schemas (a bit) before registering them to Oracle. I already 
explained to you before what and why.

Anyway, your error-situation may become less ambiguous.

Bert



Reply via email to