I am trying to create an auditing driver which dumps out the whole XDS
into a SYS.XMLTYPE field in Oracle.

However the JDBC Driver doesn't seem to like either the " or the < tag
in the INSERT operation.

I am manually creating a XDS document and making a destCommandProcessor
with the full XDS.

This is the XDS I am creating:

<nds><input xmlns:jdbc="urn:dirxml:jdbc"><jdbc:statement
jdbc:type="update"><jdbc:sql>INSERT INTO ADM.AUDIT VALUES
(1,2,3,4,<TEST/>)</jdbc:sql></jdbc:statement></input></nds>

I have tried with double quotes ie (1,2,3,4,"<TEST/>") as well as with
single quotes, all with the same result.

This is what I get in the trace:

10:59:37 A7 Drvrs: Device Audit ST: Submitting document to subscriber
shim:
10:59:37 A7 Drvrs: Device Audit ST:
<nds>
<input xmlns:jdbc="urn:dirxml:jdbc">
<jdbc:statement event-id="0" jdbc:type="update">
<jdbc:sql>INSERT INTO METAADM.EIDAUDIT VALUES
(1,2,3,4,<TEST/>)</jdbc:sql>
</jdbc:statement>
</input>
</nds>
10:59:37 A7 Drvrs: Device Audit ST: Connecting to database...
10:59:37 A7 Drvrs: Device Audit ST: BEGIN Open connection
'dedicated0'.
10:59:37 A7 Drvrs: Device Audit ST: END Open connection.
10:59:37 A7 Drvrs: Device Audit ST: Connected to database.
10:59:37 A7 Drvrs: Device Audit ST: Retrieving database metadata
10:59:37 A7 Drvrs: Device Audit ST: BEGIN Get database properties.
10:59:37 A7 Drvrs: Device Audit ST: Database name: Oracle
10:59:37 A7 Drvrs: Device Audit ST: Database version: Oracle Database
10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
10:59:37 A7 Drvrs: Device Audit ST: JDBC driver name: Oracle JDBC
driver
10:59:37 A7 Drvrs: Device Audit ST: JDBC driver version: 10.2.0.4.0
10:59:37 A7 Drvrs: Device Audit ST: JDBC driver major version: 10
10:59:37 A7 Drvrs: Device Audit ST: JDBC driver minor version: 2
10:59:37 A7 Drvrs: Device Audit ST: Case sensitive: false
10:59:37 A7 Drvrs: Device Audit ST: Stored case: upper
10:59:37 A7 Drvrs: Device Audit ST: Association case: upper
10:59:37 A7 Drvrs: Device Audit ST: Username: 'ADM'
10:59:37 A7 Drvrs: Device Audit ST: Supported table types: ["SYNONYM",
"TABLE"]
10:59:37 A7 Drvrs: Device Audit ST: Supported view types: ["SYNONYM",
"VIEW"]
10:59:37 A7 Drvrs: Device Audit ST: Supports views: true
10:59:37 A7 Drvrs: Device Audit ST: Maximum number of columns in select
statement: unknown/unlimited
10:59:37 A7 Drvrs: Device Audit ST: Maximum number of connections:
unknown/unlimited
10:59:37 A7 Drvrs: Device Audit ST: Maximum number of open statements:
unknown/unlimited
10:59:37 A7 Drvrs: Device Audit ST: Supports transactions: true
10:59:37 A7 Drvrs: Device Audit ST: Supports multiple transactions over
multiple connections: true
10:59:37 A7 Drvrs: Device Audit ST: Supports mixed DML And DDL
transactions: true
10:59:37 A7 Drvrs: Device Audit ST: Supports only DML transactions:
true
10:59:37 A7 Drvrs: Device Audit ST: DDL statement in transaction forces
commit: true
10:59:37 A7 Drvrs: Device Audit ST: DDL statement ignored in
transactions: false
10:59:37 A7 Drvrs: Device Audit ST: Supports schema qualifiers in DML
statements: true
10:59:37 A7 Drvrs: Device Audit ST: Supports schema qualifiers in
procedure calls: true
10:59:37 A7 Drvrs: Device Audit ST: Supports LIKE escape clauses: true
10:59:37 A7 Drvrs: Device Audit ST: Wildcard escape character: //
10:59:37 A7 Drvrs: Device Audit ST: Supports batch updates: true
10:59:37 A7 Drvrs: Device Audit ST: Supports retrieval of
auto-generated keys: true
10:59:37 A7 Drvrs: Device Audit ST: Supports limited outer joins: true
10:59:37 A7 Drvrs: Device Audit ST: Supports column aliasing: true
10:59:37 A7 Drvrs: Device Audit ST: Database major version: 10
10:59:37 A7 Drvrs: Device Audit ST: Database minor version: 2
10:59:37 A7 Drvrs: Device Audit ST: Searching for database descriptor
file matching the runtime database.
10:59:37 A7 Drvrs: Device Audit ST: Loading database descriptor file
'_oracle.xml'.
10:59:37 A7 Drvrs: Device Audit ST: Applying imports to driver
descriptor '_oracle_jdbc.xml'.
10:59:37 A7 Drvrs: Device Audit ST: Applying import '_oracle.xml'.
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'reuse-statements'
Value: true
10:59:37 A7 Drvrs: Device Audit ST: Parameter:
'left-outer-join-operator' Value: '(+)'
10:59:37 A7 Drvrs: Device Audit ST: Parameter:
'add-default-values-on-view-insert' Value: false
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'current-timestamp-stmt'
Value: 'SELECT (SYSDATE) FROM SYS.DUAL'
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'include-table-filter'
Value: '.*'
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'exclude-table-filter'
Value: 'BIN\$.{22}==\$0'
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'function-return-method'
Value: 'dynamic'
10:59:37 A7 Drvrs: Device Audit ST: Parameter:
'use-manual-transactions' Value: true
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'minimal-metadata'
Value: false
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'handle-stmt-results'
Value: 'single'
10:59:37 A7 Drvrs: Device Audit ST: Parameter:
'transaction-isolation-level' Value: 'read committed'
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'use-single-connection'
Value: false
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'time-translator-class'
Value: 'public
com.novell.nds.dirxml.driver.jdbc.db.DBTimestamp(j ava.lang.String,java.lang.String,java.lang.String, java.lang.String)'
10:59:37 A7 Drvrs: Device Audit ST: Parameter:
'supports-schemas-in-metadata-retrieval' Value: true
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'lock-generator-class'
Value: 'class
com.novell.nds.dirxml.driver.jdbc.db.lock.OraLockG enerator'
10:59:37 A7 Drvrs: Device Audit ST: Parameter: 'connection-properties'
Value: ''
10:59:37 A7 Drvrs: Device Audit ST: END Get database properties.
10:59:37 A7 Drvrs: Device Audit ST: Retrieved database metadata.
10:59:37 A7 Drvrs: Device Audit ST: BEGIN Set transaction isolation
level.
10:59:37 A7 Drvrs: Device Audit ST: END Set transaction isolation
level.
10:59:37 A7 Drvrs: Device Audit ST: INSERT INTO ADM.AUDIT VALUES
(1,2,3,4,
10:59:37 A7 Drvrs: Device Audit ST: ROLLBACK
10:59:37 A7 Drvrs: Device Audit ST: SubscriptionShim.execute()
returned:
10:59:37 A7 Drvrs: Device Audit ST:
<nds dtdversion="2.0" ndsversion="8.x" xmlns:jdbc="urn:dirxml:jdbc">
<source>
<product build="20070918_0743" instance="Device Audit"
version="3.5.2">DirXML Driver for JDBC</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="error" type="app-general">
<description>An error occurred executing statement "INSERT INTO
ADM.AUDIT VALUES (1,2,3,4,".</description>
<jdbc:exception jdbc:class="java.sql.SQLException"
jdbc:error-code="936" jdbc:sql-state="42000">
<jdbc:message>ORA-00936: missing expression
</jdbc:message>
</jdbc:exception>
<jdbc:document xml:space="preserve"><nds>
<input xmlns:jdbc="urn:dirxml:jdbc">
<jdbc:statement event-id="0" jdbc:type="update">
<jdbc:sql>INSERT INTO ADM.AUDIT VALUES
(1,2,3,4,<TEST/>)</jdbc:sql>
</jdbc:statement>
</input>
</nds></jdbc:document>
</status>
</output>
</nds>


Any suggestions what I am doing wrong?


--
plambrechtsen
------------------------------------------------------------------------
plambrechtsen's Profile: http://forums.novell.com/member.php?userid=13537
View this thread: http://forums.novell.com/showthread.php?t=370986