What causes a JDBC Type 91 error? - jdbc

I have a web app hosted on BEA Weblogic 10.x with an Oracle 10g database backend.
It works perfectly with one database, but when we make a clone of it and try to use a different WebLogic and Oracle instance we are getting this error:
ERROR - Problem initializing invocation tracking - disabling
tracking xxxxclass.BadTableMappingException: Database column
xxxxPeriodEnding in database yyyyyyy, table zzzzzzz has an
unknown type: JDBC Type 91.
We get it every time we do a query that involves a column of type DATE. There was no ORA-XXXX code in the message.
I can access the database using SQL*Plus using the same access and do selects and updates on the same tables with no errors.
The answer to this question is not just a simple description of what a type 91 error is (although that will help) but what could be causing this given the circumstances described above.
I am using ojdbc14.jar for JDBC on both instances of weblogic.

I have no idea about the error, but have you considered the jdbc jar version and more importantly if the oracle DB needs to be updated.
I faced very weird problems with oracle, and struggled for a while to find at the end that installing some patches for oracle would solve the problem.

Set oracle.jdbc.V8Compatible=true.
This remaps the oracle DATE type to a DATETIME time in JDBC. This parameter was missing on the new Weblogic server.

Related

Getting following error while running oracle oracle apex 20.2 application-Forbidden The requested operation is not allowed

Forbidden
The requested operation is not allowed
I have created new application and getting above error while running app on local server
Old Question, but this might help others:
Seems like the friendly URL feature introduced in APEX 20.1 is causing this issue. A workaround for me is just disabling that in the Application Definition Atrributes.
I had the same problem after upgrading from Oracle Apex 19.2 to Oracle Apex 20.2. I tried everything and nothing happened. I found this:
https://docs.oracle.com/en/database/oracle/application-express/20.1/htmrn/index.html#HTMRN-GUID-175AC460-3BCB-4871-A14C-5A232EDF8CAD
I'm not sure if this is the case, but I can't find any other explanation - in section 2.1.1 Oracle Database Requirement it is said that version 20.2 is compatible with database version 11.2.0.4 and above. Mine is 11.2.0.3. Probably doesn't work for that. Check your version of the database and share if you are below the required one to know if I guess correctly. If so, and you want APEX 20.2, you may need to update your database version first, if a possible.
I hope I helped.

ORA-01036: illegal variable name/number with Oracle 18 and Oracle 19 Windows client

After upgrading from Oracle 11/12 to 18/19 I get this error: ORA-01036: illegal variable name/number.
The error occurred in a query like this:
SELECT * FROM (SELECT * FROM TABLE) MY_TABLE WHERE ROWNUM <= :P_ROWNUM
(Subquery + binding parameters)
The identical query works properly with the Oracle 11.2.0.4 or 12.1.0.2 client. It fails with the Oracle Client 18c or 19c.
PS: The Oracle Server is version 18c 64x for Windows.
I use Delphi 10.1.2 with ADO components (dbGO). I also tried with Delphi 13.3.3 but the behavior is the same.
It seems to be a problem in the Oracle OLE DB provider (ORAOLEDB).
If I don't use ADO but DevArt Unidac all worked as expected.
Someone can help me?
Max
Your query is fine. We ran into a similar issue when migrating from 12.1 to 19. In our case, we have a custom OLE DB provider that interfaces with OraOLEDB (and others) using the Microsoft OLE DB Provider Templates (ATL). When attempting to upgrade from 12.1.x to 19c we started seeing the strange and confusing "ORA-01036: illegal variable name/number" error for parameterized SELECT queries. The queries would succeed the first time they were executed but subsequent executions would fail when all we did was change the parameter value (the queries were executed sequentially). I went on a wild goose chase trying to diagnose the issue and finally decided it had to be an Oracle caching bug of some kind. Yesterday, I experimented with the cache-related connection string attributes and found that adding the MetaDataCacheSize attribute and setting its value to 0 (zero) resolved the issue for us. None of the current Oracle patches appear to address this issue, at least none of those that mention the ORA-01036 error.

Migrating data from Oracle to SQL Server error: The value is Null

I have been getting a strange error since today when trying to migrate data from an Oracle DB Server to SQL Server 2017 Express using the latest SQL Server Migration Assistant for Oracle v7.5
The error affects certain tables only and read simply: The value is Null
I don;t know how to trace the issue especially because it was working last week when I did the last import on an older version of SSMA. Just this morning the new version got installed.
I was using "Oracle Client Provider" to connect to Oracle and I was running into the same problem.
I switched to OLEDB Provider and TNSNAME mode just to test. That solved the problem for me!
This was a bug in SSMA v7.5, and has been fixed in version v7.6.

Setting connection info using XQJ with Oracle 11g

I am trying to submit XQuery queries to an Oracle 11g database through their XQJ API.
When I instantiate an oracle.xquery.xqj.OXQDataSource as explained in http://www.oracle.com/technetwork/articles/oem/xquery-jdbc-325944.html, I can submit queries fine except that I haven't found how I can set up the server connection (server name, port, username, password, ...) info:
This datasource claims that it doesn't support setting any property.
It doesn't implement the data source constructor which takes a JDBC connection.
I don't see any non standard method to set such info.
When I try to access some random collection like collection("oradb:/foo") I just get an empty result set even when no server is running, suggesting that the driver doesn't even try to connect.
What have I missed and how can I set the server connection info?
Thanks,
Eric
Thanks to Charles Foster I can answer to my own question: the XQJ implementation from Oracle is an old standalone version from January 2010 that is pretty useless and doesn't interact with Oracle databases.
Despite all the Oracle statements about XQJ, I haven't been able to find any client/server XQJ implementation (except one from DataDirect of course) and the way to submit XQuery queries to Oracle databases appears to be through JDBC, embedded in PL-SQL statements.
It is possible in 12.
XQJ to run queries in Java:
http://docs.oracle.com/database/121/ADXDK/adx_j_xqj.htm#ADXDK99930
XQJ to run queries against the database:
http://docs.oracle.com/database/121/ADXDK/adx_j_xqjxdb.htm#ADXDK136

SSMA (SQL Server Migration Assistant) for Oracle cannot find datatypes

I am trying to migrate my Oracle db to SqlServer 2008 using SSMA. I defined some type mappings for columns. When I synchronize after converting schema it gives errors like: "Cannot find datatype datetime" or bit. These datatypes are valid SQL Server datatypes.
Why I am getting these errors?
Just a guess, but it's quite hard to provide more than that before you give more details... (the code being synchronized to SQL Server, first of all).
Do you have case-sensitive collation on your SQL Server? I believe SSMA may have problems in this case. Try synchronizing to case-insensitive DB.
Also you may try running generated SQL Server (translated) code in the Management Studio and then find the problem with generated SQL or DB setup from that point. Again, it's most likely possible to figure out the problem solely by looking at your generated SQL if it's indeed corrupted due to some bug in SSMA.

Resources