Database Adapter: cannot access table with complex record type as columns
Hi all,
I cannot perform any operations on a table that has columns with complex record type.
I have created a table to store purchase order details.
Sample script:
CREATE type XX_CUST_INFO_TYP as object
ssn VARCHAR2(20),
rating NUMBER(15)
CREATE type XX_ITEM_TYP as object
item_name VARCHAR2(20),
unit_price NUMBER(15),
quantity NUMBER(15)
CREATE table XX_PORDER (cust XX_CUST_INFO_TYP, porder XX_ITEM_TYP);
When i try to access the table X_PORDER in jdev through a database Adapter, i receive the error as
"some tables contains columns that are not recognized by the database adpter"
1.) so in this case, how to include such tables that have complex types?
Also, check out this scenario also..
1. add a table through a database adapter
2. drop the table in backend
3. i can still see the table and its structure in the database adapter wizard even after restarting Jdeveloper.. How is it possible?
These are some really interesting scenarios to experiment. Please suggest your ideas on this..
Thanks All!
Hi Hem,
for a select you could select against a view. And for inserts you could create a stored procedure. They support complex types since 10.1.2. Complex types support in tables/views was added for 11 (next major release).
You might be able to use PureSQL as a workaround too, i.e.
insert into XX_PORDER values (XX_CUST_INFO_TYP(?,?), XX_ITEM_TYP(?, ?, ?))
As for your other problem, in 10.1.2/10.1.3 the DBAdapter wizard sits on top of the Jdev Offline Tables and TopLink Mapping Workbench components. When you remove a table in the wizard it won't delete the Offline DB component. It was added by the wizard, but afterwards it is public to the entire Jdev project. You must remove it from Jdev yourself. This has been improved for the next major release too, no artifacts from underlying components are created.
To remove it select:
Offline DB Objects -> <schema> -> <table> and try File.. Erase From Disk.
Thanks
Steve
Similar Messages
-
Database adapter not importing table having data type as WF_EVENT_T
Hi All,
I have a requirement to import a table in the Database adapter. That table is having a column of data type “WF_EVENT_T”.
When I tried to import the table in database adapter I got the error as "The following tables are not supported in the Database Adapter and were not imported".
Then I modified the table by adding one more column with some other data type and tried to import that table.
It got imported successfully but I was not able to see the column with data type WF_EVENT_T in the table.
Any pointers to this would be of great help.
Thanks.Hi Harish
Thanks for your response.
I can create the table with the data type 'String'. However, the problem is when I try to update the table from a program in SE38 or a Function Module in SE37.
When I try to activate the PROGRAM or FUCNTION, I GET A MESSAGE THAT I MENTIONED EARLIER.
Here is the simple program that I have created that I am not able to activate
==========================================
REPORT ZTEST_STRING1.
tables: ztest.
ztest-zid = 2.
ztest-zstring1 = 'ABC'.
insert ztest.
===========================================
ztest has two fields
zid which is NUMC type
and zstring1 which is STRING type.
When I try to activate I get an error message as follows:
'ztest' must be a flat structure. You cannot use internal tables,
strings, references, or structures as components.
Edited by: Ram Prasad on Mar 20, 2008 6:08 PM -
Ldapbind to database adapter users in OVD with email
Hi!
Can anyone tell me howto ldapbind to database adapter users in OVD with email or uid?
Ldapbind with full DN work just fine.
Thanks!>
Also I can bind to users in database CRM OVD-DB table using
ldapbind -h ovd.mydomain.com -p 6501 -D "cn=extcustomername,cn=customers,cn=users,dc=mydoamin,dc=com" -w %custpwd%
But I getting "ldap_bind: Invalid credentials" error trying to bind with:
ldapbind -h ovd.mydomain.com -p 6501 -D cn=extcustomername -w %custpwd%You can bind with UPN to AD because AD is special.
You won't be able to bind with cn=extcustomername using out of the box adapter. If you write your own plugin that will look up the DN based on cn=extcustomername, then have the plugin do the bind with the DN for you, it'll work. Then you would have to make sure this plugin will work with the database adapter, I haven't tried it so I don't know.
If you're trying to make this bind with cn=extcustomername work for OAM to OVD, then you don't need to do it. Leave the adapter as is (bind with full DN). External users will login to OAM-protected application with their username or whatever is the value of cn. OAM will then look up the DN based on the cn or any other attribute, this is configured in authentication scheme in credential_mapping plugin. Take a look at the OBE example: http://www.oracle.com/technology/obe/fusion_middleware/im1014/ovd-oam/index.htm -
Problem with database adapter on plsql procedure with in/out parameters
running BPEL 10.1.3.1 and using the database adapter on a plsql procedure with in/out parameters I get errors
the plsql procedure:
create or replace procedure proc_with_clob_inout_parameter(
p_string in varchar2,
p_clob in out clob)
is
begin
p_clob := p_string;
end proc_with_clob_inout_parameter;
In BPEL I call this procedure. When I only assign a value to the p_string parameters (in a BPEL assign) all is well. When I also assign a value to the p_clob parameter the error occurs:
<part name="summary">
<summary>
file:/ora1/app/oracle/as101.3/bpel/domains/digitaaldossier/tmp/.bpel_janb_inout_1.0_f6908ccf864581b7265c362444e88075.tmp/twee.wsdl
[ twee_ptt::twee(InputParameters,OutputParameters) ] - WSIF JCA Execute of
operation 'twee' failed due to: Error while trying to prepare and execute
an API.
An error occurred while preparing and executing the
JANB.PROC_WITH_CLOB_PARAMETER2 API. Cause: java.sql.SQLException: Parameter
Type Conflict [Caused by: Parameter Type Conflict]
; nested exception is:
ORABPEL-11811
Error while trying to prepare and execute an API.
An error occurred while preparing and executing the
JANB.PROC_WITH_CLOB_INOUT_PARAMETER API. Cause: java.sql.SQLException: Parameter
Type Conflict [Caused by: Parameter Type Conflict]
Check to ensure that the API is defined in the database and that the
parameters match the signature of the API. Contact oracle support if error
is not fixable.
</summary>
</part>
In BPEL 10.1.2.0 this isn't a problem. I tested it against a 10.2.0.1 and a 10.2.0.2 database and in both situations I get the error with BPEL 10.1.3.1 and no error with BPEL 10.1.2.0
it appears to be a problem in the database adapter...
anyone with the same problems and/or a solution?Not of any use to you, but we had exactly the same problem on Friday when we applied AS 10.1.2.2 Patchset on top of BPEL 10.1.2.0.2.
The clob in our pl/sql proc wan't declared as in/out but for some reasons JDeveloper had created a clob on the Output Parameter type in the db partner link xsd. I removed this and it worked. This code had been untouched , and working fine, for months.
I'll be raising an SR today.
Rob J -
I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY QUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM .I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ?? HOW IT IS ??
Hi Kishore,
First identify deleted records by selecting "Detect deleted rows from comparison table" feature in Table Comparison
Then Use Map Operation with Input row type as "delete" and output row type as "delete" to delete records from target table. -
Select max date from a table with multiple records
I need help writing an SQL to select max date from a table with multiple records.
Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
0000651005 BASE 15-AUG-07 YES
0000651005 BASE 13-NOV-09 NO
0010973671 BASE 20-MAR-08 YES
0010973671 BASE 18-JUN-10 NOHi,
Welcome to the forum!
Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
For example:
CREATE TABLE table_x
( sa_id NUMBER (10)
, char_type VARCHAR2 (10)
, effdt DATE
, char_val VARCHAR2 (10)
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
` SA_ID LAST_EFFD
651005 13-NOV-09
10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
Here's how to get those results:
SELECT sa_id
, MAX (effdt) AS last_effdt
FROM table_x
GROUP BY sa_id
; -
How to spool in excel sheet of table with 1561828 records
how to spool in excel sheet of table with 1561828 records
i think excel got only 65l limit?
COUNT(*)
1561828
i am using windows box...any suggestions?Raman wrote:
means excel 2007 can hold 15,61,828 records ? can i give like spool filename.xls?You can name the spool file anything you want, but surely you realize that naming it 'filename.xls' doesn't make it an xls file. A name is just a name. There are industry standards on certain names indicating certain file formats, but the name doesn't make it that format. -
i cannot accessing itunes with windows i removed itunes the same order it said on support and reinstall it again but still i cannot accessing itunes
Is it hanging while saying "Accessing iTunes Store"?
-
Creating Web service for PL/SQL Procedure with Complex Data Types
I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?
Hello,
When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
You can find more information in the:
- Developing Web Services that Expose Database Resources
chapter of the Web Service Developer's guide.
Regards
Tugdual Grall -
ORA-19007 when coping a table with an xml type in it to a new schema in the
ORA-19007 when coping a table with an xml type in it to a new schema in the same database.
Hi all,
When I copy a table with an xml type in it to a new schema in the same database I get an ora-19009.
The setup is as follows I have a schema a with table TABLE_WITH_XMLTYPE where data is:
CREATE
TABLE TABLE_WITH_XMLTYPE
FOLDER_ID NUMBER (10, 0) NOT NULL,
SEARCH_PROPERTIES XMLTYPE ,
CONSTRAINT TABLE_WITH_XMLTYPE PK PRIMARY KEY (FOLDERID) USING INDEX
XMLTYPE COLUMN SEARCH_PROPERTIES XMLSCHEMA
"http://xxxxxxx.net/FolderProperties.xsd" element "FolderProperties"
VARRAY SEARCH_PROPERTIES."XMLDATA"."PROPERTIES"."PROPERTY" STORE AS TABLE
PROPERTY_TABLE
(PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX)) ORGANIZATION INDEX OVERFLOW
Both schemas have the following xml schema registered as a local xml schema
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://xxxxxxx.net/FolderProperties.xsd',
SCHEMADOC =>
'<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"
xdb:storeVarrayAsTable="true">
<xs:element name="FolderProperties"
type="FolderPropertiesType"
xdb:defaultTable="FOLDER_SEARCH_PROPERTIES" />
<xs:complexType name="FolderPropertiesType" xdb:SQLType="FOLDERPROPERTIES_T">
<xs:sequence>
<xs:element name="FolderID" type="FolderIDType" minOccurs="1" xdb:SQLName="FOLDER_ID"/>
<xs:element name="Properties" type="PropertiesType" xdb:SQLName="PROPERTIES"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PropertiesType" xdb:SQLType="PROPERTIES_T">
<xs:sequence>
<xs:element name="Property" type="PropertyType" maxOccurs="unbounded"
xdb:SQLName="PROPERTY" xdb:SQLCollType="PROPERTY_V"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PropertyType" xdb:SQLType="PROPERTY_T">
<xs:sequence>
<xs:element name="DateValue" type="DateType" xdb:SQLName="DATE_VALUE"/>
<xs:element name="NumValue" type="NumType" xdb:SQLName="NUM_VALUE"/>
<xs:element name="StringValue" type="StringType" xdb:SQLName="STRING_VALUE"/>
</xs:sequence>
<xs:attribute name="Name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="FolderIDType">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="DateType">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:simpleType name="NumType">
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
<xs:simpleType name="StringType">
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:schema>',
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => FALSE);
END;
when I try to do the following insert:
insert into schemaB.TABLE_WITH_XMLTYPE ( FOLDER_ID, SEARCH_PROPERTIES)
select FOLDER_ID, SEARCH_PROPERTIES from schemaB.TABLE_WITH_XMLTYPE;
I’ll get an ora-19007.
Can some one point me in the right direction how to solve this error.
Thanks Roelof.Who did you create the second table, in other words, how did you COPY the table as you said...
If you created the second table via a CTAS (create table as select) then you will have created a table that is not the same as the original one. AFAIK I have once created an enhancement request for this after discovering that JDeveloper, for example, creates a "copy" via a CTAS which creates the wrong structure. Double check via package DBMS_METADATA.
SQL> set long 1000000
SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaA') from dual;
SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaB') from dual;If you have got two different tables, than Mark's solution should help.
M.
Edited by: Marco Gralike on Feb 15, 2009 11:16 AM -
Spatial index creation for table with more than one geometry columns?
I have table with more than one geometry columns.
I'v added in user_sdo_geom_metadata table record for every column in the table.
When I try to create spatial indexes over geometry columns in the table - i get error message:
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13203: failed to read USER_SDO_GEOM_METADATA table
ORA-13203: failed to read USER_SDO_GEOM_METADATA table
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 8
ORA-06512: at line 1
What is the the solution?I'v got errors in my user_sdo_geom_metadata.
The problem does not exists! -
Call a method with complex data type from a DLL file
Hi,
I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
The name of this method is this: const std::vector< BlackfinInterfaces::Count > Counts ()
where Count is a structure defined as below:
struct Count
Count() : countTime(0) {}
std::vector<unsigned long> countLines;
time_t countTime;
It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?You cannot configure Call Library Function Node to call this function. LabVIEW has no way to pass a C++ class such as vector to a DLL.
-
Reading fixed length file with different record types
Hi,
I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
How we need to read such files.
Thanks
Ravdeephi ,
u cannot use the default wzard for this
use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm -
Working with complex data types in web services ...
Hi All,
I have created a webservice and created an interface for that in ADF. Now as my web service returns a complex data type, i followed the steps given in this article "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" and it works fine, my results also get displayed. But only issue is i get a warning "JBO-25009: Cannot create an object of type:java.util.calendar with value:2008-09-23T23:51:30.000+05:30" and if i replace all the java.util.Date with oracle.jbo.domain.Date then i get a warning "JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:2008-09-23T23:51:30.000+05:30". Now i am unable to understand this although i believe it is a data type mapping issue, but not sure how to rectify it.
Anybody knows the wayout?
Regards
LokeshAndre,
Thanks for youe response. I also tried makeing data type as string in place of date in data control.xml and it worked fine. So it confirms that i am facing with exactly similar issue as yours.
I tried solution 2 mentioned in Frank's mail but its not helping[in fact i am already using web proxy as i am delaing with complex data types]. I created a web proxy and in java bean i placed break points to check the control flow[in order to check the root cause] but control never reaches the java bean!! I am not sure about the cause for it...control should pass through java bean isn't it??
I am quite new to SOA...so can somebody just elaborate on how to rectify this using web proxy. I have been using this rl "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" to work with web proxies" to work with proxies.
Regards
Lokesh -
Flat File with multiple record types (OWB 10.2.0.2)
Hi!
I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
Type Value Record Name
======== ===========
T TRAILER
0 DETAILS
1 DETAILS
2 DETAILS
When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
INTO TABLE TRAILER
TRUNCATE
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = 'T'
INTO TABLE DETAILS
APPEND
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = '0,1,2'
The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
Could this be a bug or am I doing something wrong?
Thanks a lot for your help,
YorgosWe`re using two target tables, one for the trailer record and the other for the details records.
We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
Your help is greatly appreciated Jean-Pierre.
Regards,
Yorgos
Maybe you are looking for
-
IMac CD drive failed - now trying to get iMac to recognize external usb CD drive
Hello, as best as I can tell, I'm having the same trouble with both internal drive, and now external added drive, neither one working. I posted onto what looked like older, similar posts last week, but got no reply. Hoping a fresh posting might get
-
Unable to print with Adobe Acrobat Pro - latest version 10.1.10
Hi, I have installed Adobe Acrobat Pro on my mac book air version 10.9.2. but am unable to print. When I print a PDF, it shows up in the printer icon as complete but when I go to the printer, nothing is there? Can someone help?
-
When I convert a Word doc to PDF, some of the page numbers are missing.
I'm using Word 2003 and Acrobat Pro 7.0. When I print out the Word doc all the page numbers are there, but when I concert to PDF most of them are missing. Any suggestions?
-
Watching a tv program while it's still recording
Hi is it possible to watch a tv programe while it's recording. For example if the progame starts at 9.00pm and finishes at 10.00pm and I get in about 9.30pm can I start watching the program or do I need to wait for the show to finish before I can sta
-
I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2. Anyone can help? Thanks!