JDBC Order By Causing a 00933
I am having a problem with a query that I am executing as a Prepared Statement... I am using ? and PreparedStatement.setXXX to bind all non-constant variables in the query. Everything executes fine until I put an order by clause at the end. When I add the order by clause, I get a java.sql.SQLException: ORA-00933: SQL command not properly ended.
The strange thing is, when I output the query to the screen and replace the ? with the correct values and run the query in Toad, the query runs correctly... This query also contains an ANSI outer join clause... However, when I removed the outer join syntax, the query still fails to execute with the order by... I have verified that the correct number of variables are being bound to the PreparedStatement...
Any ideas on where to proceed from here?
Thanks!
may be its easier to check an debug if you put the select into a db-function, that you reference in your Order property.
Similar Messages
-
9i jdbc driver change causes problems
Hello all,
I was wondering if anyone had any problems with jdbc when migrating to oracle 9i. We are using timestamps from java which were mapped to dates. In oracle there is a function which takes a date. Now this won't work anymore as the mapping changed. Question is, did anyone use the V8Compatibility flag before? I tried it and it doesn't seem to work. When looking at the jdbc implementation it seems to me that something is not implemented yet.
Any feedback?
Thanks in advance,
Rein9i jdbc driver change causes problems
-
Urgent help please. Inner Join caused ora-00933 error
I ran this one , works fine:
SELECT DISTINCT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'),
TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
left outer join
( SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID ) alarmed_datus
inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE
) LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE
) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID
inner join TT_DATU_LRN_MAP LRNS on EXP.EXP_ID = LRNS.EXP_ID AND TRIM(LRNS.LRN) LIKE p_LRN
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE NOT EXISTS (SELECT SATELLITE_EXP_ID FROM TT_HOST_SATELLITE WHERE EXP.EXP_ID = SATELLITE_EXP_ID)
AND EXP.IS_PRIMARY_ADDRESS LIKE p_isPrimary;
ELSE
OPEN v_cursor FOR
SELECT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'), TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
left outer join (
SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM (SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID ) alarmed_datus
inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE )
LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID ORDER BY EXP.DATU_EXP_CLLI
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE NOT EXISTS (SELECT SATELLITE_EXP_ID FROM TT_HOST_SATELLITE WHERE EXP.EXP_ID = SATELLITE_EXP_ID) AND EXP.IS_PRIMARY_ADDRESS like
p_isPrimary;
However this one:
SELECT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'),
TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
left outer join
SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID) alarmed_datus
inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE ) LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
left outer join
( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID ORDER BY EXP.DATU_EXP_CLLI
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS like p_isPrimary;
this one not work kept giving me errors:
[ ORA-00933: SQL command not properly ended
Any guru can help? I need to have this resolved end of today.
Thanks in advance.Hi,
Never write, let alone post, unformatted code.
Indent the code so that it's easy to set the scope of sub-queries, and the majoc clauses (SELECT, FROM, WHERE, ORDER BY, ...) in each.
When posting any formatted text on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
If you do that to the code you posted, you'll see that it ends like this:... inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID
AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID
ORDER BY EXP.DATU_EXP_CLLI
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS like p_isPrimary
You can't put an ORDER BY clause in the middle of the FROM clause.
The ORDER BY clause always goes after the WHERE clause, like this:... inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID
AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS like p_isPrimary
ORDER BY EXP.DATU_EXP_CLLI -
275645.1 jdbc 10G patch causes dcm error
Just a note, instead of opening a TAR, but the patch note
275645.1
That instructs on how to patch 10G app server to use the 10G thin drivers causes the dcm daemon to fail to start or connect to a database metatdata repository. After patching up, the dcm_daemon component will not start, and a dcmctl geterror retrieves the following stack trace and error (reverting back allows dcm to come back up):
[oracle@northfork oraias]$ dcmctl geterror
ADMN-100999
See base exception for details.
Base Exception:
java.lang.NoSuchFieldError:TDU
See base exception for details.
java.lang.NoSuchFieldError: TDU
at oracle.net.resolver.NavDescription.navigate(Unknown Source)
at oracle.net.resolver.NavServiceAlias.navigate(Unknown Source)
at oracle.net.resolver.AddrResolution.resolveAddrTree(Unknown Source)
at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
at oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
at oracle.net.ns.NSProtocol.connect(Unknown Source)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:707)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:218)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:411)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:147)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:553)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:215)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:108)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:76)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:58)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:506)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:381)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:305)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:285)
at oracle.ias.sysmgmt.persistence.DBPersistence.getConnection(Unknown Source)
at oracle.ias.sysmgmt.persistence.DBTopology.instances(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.getPersistenceInstance(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.getPersistenceInstance(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.getPersistenceInstance(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.create(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.<init>(Unknown Source)
at oracle.ias.sysmgmt.persistence.PersistenceManager.<init>(Unknown Source)
at oracle.ias.sysmgmt.task.TaskMaster.initRepository(Unknown Source)
at oracle.ias.sysmgmt.task.TaskMaster.<init>(Unknown Source)
at oracle.ias.sysmgmt.task.InstanceManager.sysInit(Unknown Source)
at oracle.ias.sysmgmt.task.InstanceManager.init(Unknown Source)
at oracle.ias.sysmgmt.cmdline.DcmCmdLine.checkInit(Unknown Source)
at oracle.ias.sysmgmt.cmdline.DcmCmdLine.execute(Unknown Source)
at oracle.ias.sysmgmt.cmdline.DcmCmdLine.main(Unknown Source)
[oracle@northfork oraias]$Mike - we have the same problem. I recently opened a TAR on this and was told by support that an "unpublished comment" on that note indicates that the driver upgrade is not compatible with non-standalone OC4J containers.
This is despite the note being titled as for OracleAS and it being referenced in 277516 - OracleAS 10g Patchset 1 (9.0.4.1) Post-Release Note.
Would be interested if anyone has overcome this particular error and successfully upgraded their JDBC drivers. -
Custom Purchase Order template causes Error while generating PDF
The standard XSLFO works, my custom one errors:
History of the world:
1) I downloaded the XML Publisher thing for Word, installed it no problems
2) Downloaded the XML data definition for the Standard Purchase Order from XML Publisher Administrator
3) Created a blank word document and created the purchase order layout from scratch using the XML Publisher plug-in
4) Previewed it as a PDF in word - it looked fine (well, it was a start)
5) Exported the XSLFO
6) In XML Publisher created a new template and uploaded the XSLFO
7) Assigned the new template to the document in Purchasing
All good... the new template is defintately the one being used by the PO Output for Communication program. The problem of course is that it throws a useless error message :) - namely:
PoPrintingUtil.getBlobPDF(input,input) - After initializing the FOProcessor
PoPrintingUtil.getBlobPDF(input,input) - After setting the i/o stream and output format
PoPrintingUtil.getBlobPDF(input,input) - Error while generating the PDForacle.apps.xdo.XDOException
genDoc() : Exceptionjava.lang.Exception: Error while generating PDF :null
java.lang.Exception: Error while generating PDF :null
java.lang.Exception: Error while generating PDF :null
at oracle.apps.po.communicate.PoGenerateDocument.genDoc(PoGenerateDocument.java:2011)
at oracle.apps.po.communicate.PoGenerateDocumentCP.runProgram(PoGenerateDocumentCP.java:421)
at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
When I run POXPOPDF in Debug I get:
getArchiveOn(): APPROVE
After calling genDocThu May 18 12:50:05 EST 2006
Adding the blob to vector
java.lang.NullPointerException
java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
at oracle.apps.po.communicate.PoGenerateDocumentCP.runProgram(PoGenerateDocumentCP.java:304)
at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
I know no one can magically fix this for me (I wish!) but does anyone have any suggestions on what to do next? I have no conditional formatting or any other more complex functionality, just a really boring PO layout with a logo.
Any suggestions welcome, in the meantime I will keep trawling through Metalink in search of a clue ;)
Thanks
JoHi Jo,
The first version for which the Template Builder was released is 5.0
Well, I guess I am one of the few who has a backported 4.5 version of the template builder. I did that for testing exactly your case. I just replaced our xdocore.jar file with the 4.5 version and it worked. The core.jar is not easily available. The files are part of the 4.5 patch, but I think it is too much work to get them out.
However, I would strongly recommend to upgrade to a later version of XML Publisher. We made huge improvements, since 4.5 - performance, translation, RTF template capabilities....
I just checked the process of converting an RTF template to FO and uploading it to EBS with 5.6.2 and it still worked. So it seems you can go straight to the latest version.
Hope that helps,
Klaus -
Limit Order Creation Causes Free Issue Block to Be Checked
Hello,
We have a vendor who we have assigned to a Plant and Customer Master. When we use this Vendor on a Limit Purchase (Item Category B) Order and the Plant on the PO is within the same Company Code as the Vendor's Plant, the Free Issue Box is being checked. Is there a way to prevent the checking of the Free Issue box?
Thanks for any and all help,
JoeHello,
We have a vendor who we have assigned to a Plant and Customer Master. When we use this Vendor on a Limit Purchase (Item Category B) Order and the Plant on the PO is within the same Company Code as the Vendor's Plant, the Free Issue Box is being checked. Is there a way to prevent the checking of the Free Issue box?
Thanks for any and all help,
Joe -
Union Order by causing issue in SetWhereClause
Hi,
I am extending a CO and adding new query to the VO query.
I added where clause to the VO query. Also added Union. The Union is the same VO query with another where condition. VO query default had a Order by clause.
Now the total query looks like this.
select * from
(select a, b
from x, y) QRSLT
where ...
UNION
select * from
(select a, b
from x, y) QRSLT1
where ...
order by upper(a)
"Order by" is getting added since it is there in the original VO query.
Now I am getting the error as "java.sql.SQLException: ORA-01785: ORDER BY item must be the number of a SELECT-list expression"
The above query without the order by is working good. What is the best way to fix this?
Thanks,
HCThe problem is that you're using a UNION. The ORDER BY clause has to refer to a column in the query as a whole rather than just the second part of the UNION. In that situation, Oracle expects either a column position or the name of one of the selected columns.
Thanks
--Anil
http://oracleanil.blogspot.com/ -
Oracle.jdbc.driver.T4CPreparedStatement causing out of memory exception
I am using oracle spatial 11.2.0.3 g.
I am getting out of memory exception on a process.
I analyzed the heap dump using OOMemory analyzer and figured out oracle.jdbc.driver.T4CPreparedStatement keeping 73% of the heap space.
Is oracle expanding the SPARQL queries in java side or keeping the results in cache.
How to solve it ?Hi,
We will need a re-producible test case (preferably small) to figure out why you are getting out of memory. You can send it to Oracle Support or email me at alan dot wu at oracle dot com.
Jena Adapter does not cache SPARQL query results on the Java side. The T4CPreparedStatement is not even in Jena Adapter's
code path or RDF's code path.
Thanks,
Zhe Wu -
Dear all,
I have a simple query to join two tables. Table schema are as follows
==============================================
Table A
id number,
name varchar(32)
Table B
account_id reference Table A(id)
login varchar(32),
password varchar(32)
==============================================
In CGI, my run these test queries.
No order statement and select 3 columns.
1. Select a.name, b.login,b.password
From TableA a, TableB b
Where a.id=b.account_id;
====>OK
With order statement and select 3 columns, 2 from table B.
2. Select a.name,b.login,b.password
From TableA a, TableB b
Where a.id=b.account_id
Order by a.name;
==>BAD, CGI never returns.
With order statement and select 2 columns, 1 from table B.
3. Select a.name,b.login
From TableA a, TableB b
Where a.id=b.account_id
Order by a.name;
==>OK
With order statement and select 3 columns, 2 from table A.
4. Select a.id, a.name,b.login
From TableA a, TableB b
Where a.id=b.account_id
Order by a.name;
==>BAD. CGI never returns.
Without order statement and select 3 columns, 2 from table A.
4. Select a.id, a.name,b.login
From TableA a, TableB b
Where a.id=b.account_id;
==>BAD. CGI never returns
======================================================
It appears to me that if i use more system resources by selecting more columns or use order statement, query will not return.
Can someone help?
ThanksCheck execution plan of your query.
if query id joined in hash join then provide hint for nested loop
if query is joined in sort merge join the create index on respective columns
if both of methods are not working then
check you init.ora paremeter sort_area size and sort_area_retain size. if they are less then increase the size.
u can select above parameter from V$PARAMETER dynamic view
select * from v$parameter where name like 'sort%'
Regards
Juned -
Fixed Order Qty Cause for Blank MOQ
Hi
i set MOQ =5400
and FOQ = 1260
The need is to split the Planned order to our lines of 1260 while repecting MOQ
The result was that Planning engine blank the MOQ to null and egnore MOQ
has anyone face this issue and can exaplin why this is behave
is this a bug ?
will appricate your advise
Thanks
ShlomiI think what want is 5 planned orders of 1260 each so that the total is greater than 5400.
Planning engine applies the order modifier to each planned order.
It does NOT apply them across a group of planned orders.
So what you want cannot be done out of the box.
Hope this answers your question
Sandeep Gandhi
Omkar Technologies Inc.
Independent Techno-functional Consultant -
Incorrect JDBC package name causes bad performance
The data-sources.xml specifies oracle.jdbc.driver.OracleDriver as connection-driver. But the package oracle.jdbc.driver is deprecated since 9i (see http://otn.oracle.com/tech/java/sqlj_jdbc/pdf/a96654.pdf page 1-5) and oracle.jdbc.OracleDriver should be used.
We saw a performance increase from 18min to 10min when changing this value.
Is there a reason why the config still uses oracle.jdbc.driver.OracleDriver and that I don't know about?
Regards,
JohanJohan,
The "data-sources.xml" file is really just a template, similar to the "init.ora" configuration file used by the Oracle database engine. The values are very general default values. I guess no-one at Oracle has gotten around to changing the "data-sources.xml" file that gets shipped with OC4J.
In any case, from what I can gather, the "oracle.jdbc.OracleDriver" class is just a thin wrapper around the "oracle.jdbc.driver.OracleDriver" class, anyway.
Good Luck,
Avi. -
Delivery address on item level in Sales Order causes delivery split
Hi all,
I have an issue where our customer is sending in EDI-orders with delivery address on item level. This generates different SAP addresses for each line in the Sales Order later causing a delivery split in VL01n. Normally a SO contains 20 items where 10 needs to go to one physical address and the other 10 to another. What I would like is to only split on the physical address and not on each SAP address. E.g. 2 deliveries created instead of 20.
Its ECC 5.0.
Anyone has experience to share on this issue?
Thanks
BR
PeterWe had similar issue , there will be confirmed quantity but the requirement will not transfer to MRP , We used Item category configuration ( Copied new item category assignment and it should behave as Inquiry item category)
Check OVZ7 T code for customizing the u201CDelivery Blocku201D in your sales document to block Confirmation block
Check the customizing OVZ8: if the flag Transfer of Requirement
Transfer of requirements of the requirement class should be ON.
In the sales order the requirement type is determined by the combination sales order item + MRP type.
Refer SAP Help URL below
[Setting a Delivery Block |http://help.sap.com/saphelp_470/helpdata/en/93/744bf2546011d1a7020000e829fd11/content.htm] -
I want may be to recovery all my apps als OSX Mountain Lion, OSX Lion, Archipad, Viapad, and so on , so on
Who can hepls me toget them back even all the order history cause many others apps I don't remember at all. Please help me
-
Re: WebLogic RDB jdbc problem
Hi Joe,
I tried the two things you asked:
1. Setting the initial and max capacity of the Connection Pool to 1 does not make
any further difference, the reselt set is still sometimes empty.
2. If I use the code from the stand-alone application (thus if I get the connection
directly from the driver) than I get a good result: the retrieved result set is,
as far as I can see, always correctly filled.
In addition I tried to cast the Connection to WLConnection and then get the vendor
connection from it, and than to proceed with this connection further on, but this
did not make it any better.
Almir.
Joe Weinstein <[email protected]> wrote:
>
>
Almir wrote:
Hi Joe,
thanks for your quick answer to my questions. I red your sugestionsand tried
them out but unfortunately it did not make me come any further in searchfor answer
to this odd problem. Setting the statement cache size to 0 (I've alreadytried
this before your response) did not make any difference at all. Refreshingthe
statement before reuse neighter.
I also tried to make the stand-alone application to go wrong. But nomatter whether
I reuse connection and/or statement or whether I instantiate the newones every
time, the execution of the statement always comes back with a validand filled
ResultSet.
Interesting thing to mention aboout executing the statement withinthe server
is that if I put it in a loop of let say 100 repeats, it succeeds orit fails
all 100 times. Next time i execute this bean method where the loopis situated
it will again succeed or fail all 100 times. It remains consequentwithin the
same loop/bean method. Even if I get the data source and the connectionevery
time again (100 times) it remains consequent. Thi is maybe interestingfinding
but it does not say anything to me. Perhaps you can make some conclusionsout
of it.
Best regards,
Almir.Hmmmmm.... Interesting. The only other thing I can suspect is that the
driver
is not threadsafe... Would you try these two experiments?
1 - Alter the weblogic server to define the pool to have only one connection,
ie: initial capacity = 1 and max capacity = 1. Let me know if the
problem
is still there.
2 - Alter the application code you run in the server to get a connection
directly
from the driver, just like the standalone code.
Let me know...
Joe
Joe Weinstein <[email protected]> wrote:
Hi Almir.
I highly suspect the RDB driver of a bug where re-using a given Prepared
Statement
will sometimes produce an empty result set. Weblogic will cache your
prepared statements
so when you call prepareStatement() we may transparently return you
a
previously-used
statement for the same SQL and arguments.
To prove my theory, please do these two things:
1 - Define your pool's statement cache to be of size zero. This should
make the problem
go away.
2 - In a standalone program, you can create a given PreparedStatement,
and rerun it in
a loop, and see if it ever returns an empty result set. I will showyou
how to include
the code we do to refresh the statement before reuse:
try
Class.forName ("oracle.rdb.jdbc.rdbThin.Driver");
Connection conn = DriverManager.getConnection("jdbc:rdbThin://<database_name>","<user>",
"<pass>");
String sqlStatement = "SELECT TABEL1.COLUMN1, TABEL1.COLUMN2,
TABEL2.COLUMN1
FROM TABEL1, TABEL2 WHERE (TABEL2.COLUMN2= TABEL1.COLUMN3) AND (TABEL2.COLUMN1
= ?)ORDER BY TABEL1.COLUMN1";
PreparedStatement ps = conn.prepareStatement(sqlStatement,
ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
for (int i = 0; i < 100; i++)
ps.setObject(1, new Integer(1));
boolean result = ps.execute();
ResultSet rs = ps.getResultSet();
// check result set here
rs.close();
cleanUpStatementForReUse(ps);
ps.close();
conn.close();
catch (Exception ex)
System.out.println(ex);
private void cleanUpStatementForReUse(PreparedStatement p)
try { p.clearParameters(); p.clearBatch(); } catch (Throwable ignore)
try { p.setEscapeProcessing(true); } catch (Throwable ignore) {}
try
if (p.getFetchDirection() != ResultSet.FETCH_FORWARD)
p.setFetchDirection(ResultSet.FETCH_FORWARD);
} catch (Throwable ignore) {}
try
if (p.getFetchSize() != 0)
p.setFetchSize(0);
} catch (Throwable ignore) {}
try
if (p.getMaxFieldSize() != 0)
p.setMaxFieldSize(0);
catch (Throwable ignore) {}
try
if (p.getMaxRows() != 0)
p.setMaxRows(0);
catch (Throwable ignore) {}
try
if (p.getQueryTimeout() != 0)
p.setQueryTimeout(0);
catch (Throwable ignore) {}
try
p.clearWarnings();
catch (Throwable ignore) {}
Almir wrote:
Hello everybody,
we are developing an application for Bea WebLogic Application Server8.1. This
application uses data from an existing database. This is an OracleRDB 7-1.220
database. Because the WebLogic AS does not include a JDBC driver forthis type
of database we got one from Oracle: RDBJDBC71. I installed this driverand tested
it by using a standalone Java application which executes a number
of
SQL statemens.
This test was satisfying, no problems occured.
Then, in order to use it within the application server, I defined
a
JDBC Connection
Pool in WebLogic with corresponding Data Source. And it worked, ourapplication
could connect with the database and execute the needed transactions.
But after a while we noticed a realy strange problem. When a particularSELECT
SQL stament is executed we expect a list of 6 records as result. Butsometimes
the returned resultset is just empty. I tried this hundreds of times.No error
or exception occurs but sometimes the response is correct and sometimesnot.
In the first place we thought that the JDBC driver was causing thisproblem but
then I executed the same SQL Select statement within a Java stand-aloneapplication
(and not using the Application Server) and the result was correct.Repeating this
hundreds of times did not change the outcome, the given resultset
was
always correct.
I tried reconfigurating the Connection Pool in different ways but
it
did not make
any difference: sometimes it worked and sometimes it didn't.
Here below you can see the code samples of both implementations.
Stand-alone:
try
Class.forName ("oracle.rdb.jdbc.rdbThin.Driver");
Connection conn = DriverManager.getConnection("jdbc:rdbThin://<database_name>","<user>",
"<pass>");
String sqlStatement = "SELECT TABEL1.COLUMN1, TABEL1.COLUMN2,TABEL2.COLUMN1
FROM TABEL1, TABEL2 WHERE (TABEL2.COLUMN2= TABEL1.COLUMN3) AND (TABEL2.COLUMN1
= ?)ORDER BY TABEL1.COLUMN1";
PreparedStatement ps = conn.prepareStatement(sqlStatement,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ps.setObject(1, new Integer(1));
boolean result = ps.execute();
ResultSet rs = ps.getResultSet();
// Result set is here always filled!!!!
rs.close();
ps.close();
conn.close();
catch (Exception ex)
System.out.println(ex);
Application server:
try
Context ctx = new InitialContext();
Object object = ctx.lookup(data_store_name);
DataStore ds = (DataStore)object;
Connection conn = ds.getConnection();
String sqlStatement = "SELECT TABEL1.COLUMN1, TABEL1.COLUMN2,TABEL2.COLUMN1
FROM TABEL1, TABEL2 WHERE (TABEL2.COLUMN2= TABEL1.COLUMN3) AND (TABEL2.COLUMN1
= ?)ORDER BY TABEL1.COLUMN1";
PreparedStatement ps = (PreparedStatement)conn.prepareStatement(sqlStatement,
ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ps.setObject(1, new Integer(1));
boolean result = ps.execute();
ResultSet rs = ps.getResultSet();
// Result set is here sometimes empty !!!!
rs.close();
ps.close();
conn.close();
catch (Exception ex)
System.out.println(ex);
Any sugestions are welcome.
Thanks.
Almir.I have had the same problem as you with sporadic results for queries with RDB Drivers. Were you able to solve it and if so how?
Sam Opoku-Boadu -
There is an error in the order submission.
Hi,
While placing order in iStore(11.5.7 vis) i got the following error."Error messages from Order Management. The item specified is invalid or does not exist in the warehouse you specified. Please Enter a valid item- warehouse combination. Invalid unit of measure for this item. There is an error in the order submission."
The item was created only in the master inv org (V1) and not in M1.The error appeared only when placing order in istore and not in OM since warehouse was explicitly chosen. After assigning the item to M1 the order was placed without any error in istore.
Would like to know why istore picks up item particularly from M1.Is there any profile option or setting?
Thanks & Regards,
Nithyasymptom: The item specified is invalid or does not exist in the warehouse
you specified.
Please enter a valid item-warehouse combination
change: Note Role : Navigation -> Order management -> Order return -&
gt; Import order -> Correction.
cause: Internal ordered enabled flag not checked for the item
fix:
Check the internal order Enabled flag for the Item
Thanks
Naveen
Maybe you are looking for
-
I currently run Solaris 2.5.1 on my SS5, does anyone think I will have problems running Solaris 8 on a SS5? Thanks! Matt
-
Exporting PDFs from Quark 6.1 under Leopard
Hello, Recently installed Leopard. Using Quark 6.1 and need to export PDF. Previously, I'd use the handy "Export Layout as PDF" command found under the File menu. No longer seems to work since Leopard came along. I now get a message"Unable to create
-
Hi Help me to solve this issue.Iam trying to do stock palcement for a material whose Base UOM is Each and Odering UOM is "CAR", CAR=12 EA.Iam trying to place the material intially in the fixed bin ,if the fixed bin is full place in the rack area. Iam
-
Making a folder for site files
In Windows 8, I created a folder on my desktop so it looks like C:\SJA Website and all my site files are there. When I go to the Dreamweaver Manage Sites and browse to that location by selecting it from the folder icon, the only thing I see are files
-
Restricting Authorization for movement types for Storage Location
Hi Xperts I have a requirement that 313 & 315 material movements should not have any BBD/SLED check.However , 314 & 316 should have BBD/SLED check. Suppose there are two storage locations : A(Good Stock) & B(Blocked Stock). I want one User-ID should