Case Decode - invalid column name error
select Workweek, max( decode( Type, T34, prct, null ) ) Bad,
max( decode( Type, T35, prct, null ) ) Repair,
max( decode( Type, T36, prct, null ) ) Good
FROM
(select Workweek, Type, round(ratio_to_report(sum(Testtime_in_Minutes)) over(partition by Workweek)*100,3) prct
FROM
(select ts.lot as Lot, ts.wafer_id as Wafer, dt.SORT_X as X, dt.SORT_Y as Y, ts.devrevstep as PRODUCT, ts.operation as OPERATION, dt.INTERFACE_BIN as INTERFACE_BIN, (dt.TEST_TIME)/60.0 as Testtime_in_Minutes,
ts.TEST_END_DATE_TIME as Test_End_Time, ts.Program_Name, ts.test_end_work_week as Workweek,
(CASE
WHEN (dt.INTERFACE_BIN > 9 AND dt.INTERFACE_BIN < 15) THEN 'T34'
WHEN (dt.INTERFACE_BIN =30 OR dt.INTERFACE_BIN =31 OR dt.INTERFACE_BIN = 32 OR dt.INTERFACE_BIN = 33) THEN 'T35'
ELSE 'T36'
END ) Type
from a_testing_session ts, a_device_testing dt
where ts.test_end_work_week >= 200715
and (ts.devrevstep like '9600%')
and dt.lao_start_ww = ts.test_end_work_week
and dt.ts_id = ts.ts_id)
GROUP BY Workweek, Type)
This sql query above does not run properly, gives invalid column name error. However, the entire select statement surrounded by the () works. There must be an error in the first 4 lines someplace, but I do not see it.
Assuming type is a string, I assume you meant
MAX( DECODE( type, 'T34', prct, NULL )) Badwhere T34 is a string literal. Otherwise, you'd need to have columns named T34, T35, and T36 in your inner select.
One note, though, it's probably a bad idea to have a column named Type. While it's legal to do so, TYPE is a keyword in SQL, so that name will at a minimum be confusing.
Justin
Similar Messages
-
Oracle Invalid Column Name Error in JSP
I was wondering if anyone could provide some help. I am new to JSP, Beans and Oracle and I am getting a java.sql.SQLException: ORA-00904: invalid column name error when I run the JSP below. The Java Bean's code it is referencing is also included and this bean is just storing information from the server from a previous login page.
Eventually I need to display more columns from the database using this JSP, but since I can even get this one working, I am at a loss!
PLEASE HELP!!!!
I have even tried to replace the beans reference in the sql with just a login and password I know exists in the database! Same error... Help!
I am running Tomcat and Oracle 9i!
<!--
Assign-->
<html>
<head>
<title>Student Signon on page</title>
</head>
<body bgcolor="#FDF5E6">
<h1 align="center">>Student Signon on page</h1>
<%@ page import="java.sql.*" %>
<%@ page import="BeanAs2.Bean5b" %>
<%
String driverClassString = "oracle.jdbc.driver.OracleDriver";
String driverConnectString;
driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
String user = "system";
String passwd = "manager";
%>
<jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
<jsp getProperty id = "Bean5b" property = "login" />
<jsp getProperty id = "Bean5b" property = "pswd" />
<%
Connection connection = null;
try {
Class.forName(driverClassString);
connection = DriverManager.getConnection(driverConnectString, user, passwd);
catch (Exception e) {
out.println("Cannot close connect to database!"+e);
if (connection != null) {
String login =Bean5b.getpassword();
String pswd =Bean5b.getStudentlogin();
String sql = "SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='login' AND studentinfo.password='pswd';";
try { // execute the query
//SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='s40079703' AND studentinfo.password='p4007swd'
Statement stmt = connection.createStatement();
ResultSet rst;
rst = stmt.executeQuery(sql);
// Fetch the query result, and dispaly them in a table
while (rst.next()) {
%>
<tr>
<td> <%= rst.getString("system.teaching.code") %> </td>
</tr>
<%
stmt.close();
connection.close();
} catch(Exception e) {
out.println("Cannot fetch data from database!"+e);
%>
</body></html>
package BeanAs2;
import java.util.*;
public class Bean5b {
// all variables must not be public in a bean
private String Studentlogin;
private String password;
public String getStudentlogin() {
return this.Studentlogin;
public String getpassword() {
return this.password;
public void setStudentlogin(String login) {
this.Studentlogin = login;
public void setpassword(String pswd) {
this.password = pswd;Hi
Thanks for your reply, I should of looked at my code before I copied over. The field should of been "studentinfo.familyname" which I was calling, I have just been changing so much code in this to try and see what the problem is, I didnt fix this before I copied this over.... trust me, I have tried everything........ Hence when I correctly called the "concatination the login name and password to the query properly" as you pointed out, I got rid of the error, BUT now it returning NO DATA????? (the table is populated - I have checked this!!!!)
The table I am trying to get information from sits under a schema called system. It has the following columns;
STUDENTID NUMBER 8
FAMILYNAME VARHCAR 60
GIVENNAME VARCHAR 60
USERNAME VARCHAR 9
PASSWORD VHARCHAR 60
The database is called globaldb. My computer is called Midas2
Whats more, the query works in Oracle sql*plus!!! Returning the relevent data!!!
Actually here is the code for the JSP, with all the changes and none of the mistakes of my previous post...........,
Pleaes help!!!
<html>
<head>
<title>Student Signon on page</title>
</head>
<body bgcolor="#FDF5E6">
<h1 align="center">>Student Signon on page</h1>
<%@ page import="java.sql.*" %>
<%@ page import="BeanAs2.Bean5b" %>
<%
String driverClassString = "oracle.jdbc.driver.OracleDriver";
String driverConnectString;
driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
String user = "system";
String passwd = "manager";
%>
<jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
<jsp getProperty id = "Bean5b" property = "login" />
<jsp getProperty id = "Bean5b" property = "pswd" />
<%
Connection connection = null;
try {
Class.forName(driverClassString);
connection = DriverManager.getConnection(driverConnectString, user, passwd);
catch (Exception e) {
out.println("Cannot close connect to database!"+e);
if (connection != null) {
String login =Bean5b.getpassword();
String pswd =Bean5b.getStudentlogin();
String sqlQuery;
sqlQuery = ("SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='" + login + "' AND studentinfo.password='" + pswd + "'"); %>
<% try { // execute the query
Statement stmt = connection.createStatement();
ResultSet rst;
rst = stmt.executeQuery(sqlQuery);
// Fetch the query result, and dispaly them in a table
while (rst.next()) {
%>
<tr>
<td> <%= rst.getString("studentinfo.familyname") %> </td>
</tr>
<%
stmt.close();
connection.close();
} catch(Exception e) {
out.println("Cannot fetch data from database!"+e);
%>
</body></html> -
Sybase JDBC driver & Invalid column name error
I submitted a note a year ago concerning JDBC-ODBC bridge and SQL Server db. Same Invalid column name error. The resolution was a bug in the XSU code.
This time the error is with a jconnect5 JDBC driver from Sybase to a Sybase ASA db. ASA is Adaptive Server Anywhere.
<ERROR xsql-timing="140">oracle.xml.sql.OracleXMLSQLException: S0022: Invalid column name 'name'.</ERROR>
However if I use a Sybase JDBC driver from INet Software of Germany, I get the desired result of my query.
Below are sample XSQLConfig.xml definitions.
INet Software Sybase JDBC driver definition:
- <connection name="deasa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:inetsyb:LEMKAU:2638?database=asademo</dburl>
<driver>com.inet.syb.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
Sybase jconnect5 Sybase JDBC driver definition:
- <connection name="asa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:sybase:Tds:lemkau:2638?ServiceName=asademo</dburl>
<driver>com.sybase.jdbc.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
I believe the bug has to do with the numeric codes that the drivers use to determine data types are not properly interpreted.
See XML General note title "insert-request, xsu 2.1.0 beta & SQL Server" for reference.
Steve.Thanks for the notification. We will look into this issue...
-
Jpub invalid column name error
I try to create a Wrapper for a PL/SQL Package in a Oracle8i database with jpublisher.
I created Packages and Object Types with the SQl script Rational.sql. \oracle\ora81\sqlj\demo\jpub\Rational.sql
jpub failed to produce any sqlj or java files, but produces a "invalid column name" error. This happened with all packages I have tested. Object Types are wrapped without problems.
jpub -sql=RationalP -user=scott/tiger -url=jdbc:oracle:oci8:@xx
SCOTT.RATIONALP
ORA-00904: invalid column name
JPub: Java Object Type Publisher, version 8.1.7.0.0 Production
Thanks for Help, KonradThe database that your are running against is 8.1.6 or earlier.
You are seeing an issue where JPublisher is not backwards compatible. It looks up system tables to determine the signatures of SQL types and of PL/SQL packages. A change happened with the 8.1.7 release in the representation for packages, but JPublisher did not keep backward compatibility. You can do one of the following:
(1) Use the JPublisher version that came with your database. (Use the runtime.zip/translator.zip libraries under [Oracle Home]/sqlj/lib.)
(2) Use the JPublisher from Oracle 9.0.1 or later. It also provides backward compatibility to 8i databases.
Let us know if you have any further questions. -
Help on Merge Statement ,I got 'ORA-00904: invalid column name' Error
Pls help
In Oracle 9i i implement the following qry
MERGE INTO jobs A
USING (select order_no,jOB_SEQ_NO from jobs_dlt) B
ON (A.ORDER_NO = B.ORDER_NO and A.JOB_SEQ_NO =B.JOB_SEQ_NO )
WHEN MATCHED THEN
UPDATE SET
A.ORDER_NO= B.ORDER_NO ,
A.JOB_SEQ_NO= B.JOB_SEQ_NO
WHEN NOT MATCHED THEN
INSERT (
A.JOB_SEQ_NO ,
A.ORDER_NO
VALUES (
B.JOB_SEQ_NO ,
B.ORDER_NO
but i got 'ORA-00904: invalid column name' Error
JOBS table Contain the above Column
how i implement the Merge Statment
Thanks in advance
By
SekarI seem to recall this error being spuriously (well unhelpfully) thrown if you tried to UPDATE a key that you used in the ON clause, but I could be mistaken.
For us to recreate this you would need to supply the exact version and scripts to create the tables in question. -
After 8.8 Upgrade Invalid Column Name error on UDF in Sales Order
I have upgraded a dtaabase from 2005A to 8.8 SP00 PL15.
I encountered a UDF/UDT warning (Note 1360832) in the Pre-Upgrade CHeck but proceeded in any case.
After the upgrade as soon as I enter the BP in a Sales Order, I get the following error.
[Microsoft] [SQL Server Native Client 10.0] [SQL Server] [Invalid Column Name U_CampPB1.2)
[Microsoft] [SQL Server Native Client 10.0] [SQL Server] Statement 'Withholding Tax' (OWHT) could not be prepared.
This UDF was one of many reported in the Upgrade Wizard Log File as having an incorrect Type.
" Type is different; Should be A, Is M".
There are hundreds of instances of this message in the log.
I don't know whether the error is related to the Type is different warning.
I don't get the error when I add an AR Invoice.
In addition I cannot find any documentation on the different UDF Type codes.Hi,
should you have any errors before or after upgrade, log a message to a support. That's the best solution.
JimM -
when i run the following query i getbthe error invalid column name .My db oracle 8i,NT.
rs8 = stmt2.executeQuery("select a.c_x12n_position_cd, a.c_x12n_sequence_cd, a.c_x12n_composite_id, " +
"a.c_x12n_table_area_cd, a.c_x12n_requirement_cd, a.c_x12n_reference_designator, " +
"a.c_x12n_loop_level_nb, b.c_dg_type_code, b.c_dg_usage_cd, b.c_dg_max_occurrences_nb, " +
"b.c_dg_min_occurrences_nb from T_x12n_supplement a, T_Data_Group_Format b, " +
"T_Message_Node_Directory c " +
"where (a.c_dgc_ik = c.c_dgc_ik) " +
"and (a.c_dgc_ik = b.c_dgc_ik) " +
"and (a.c_dg_ik = c.c_dg_ik) " +
"and (a.c_dg_ik = b.c_dg_ik)");Run the query in SQL*Plus. It will give you more information about which column it doesn't like.
-
Invalid column name error in JDBC adapter
Hi all,
My scenario is Proxy->XI->JDBC.
I get the following error in receiver JDBC adapter.
Unable to execute statement for table or stored procedure. 'Account_Master' (Structure 'STATEMENT') due to com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'A7'.
There is no column by name A7 in the table nor there is a field by that name in the data type.
Can anyone provide any helpHi Swatantra,
compare your message-type with the database table!
There must be difference!
Regards Mario -
Having an interesting problem with a site I'm fixing. I'm
sure I'm looking past the obvious, so maybe some of you can help:
ASP Pages display results from recordset based on a session
variable (memberID) that is created during user login.
Recordset looks like this:
<%
Dim rs__MMColParam
rs__MMColParam = "%"
If (Session("memberID") <> "") Then
rs__MMColParam = Session("memberID")
End If
%>
<%
set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_cnConnection_STRING
rs.Source = "SELECT id, adminusername, anotherone1,
anotherone2, anotherone3 FROM dbo.basic1 WHERE adminusername = '" +
Replace(rs__MMColParam, "'", "''") + "'"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 3
rs.Open()
rs_numRows = 0
%>
Seems correct to me, unles I'm overlooking something obvious.
Unfortunately I keep getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column
name 'SESSIONVAR'.
(Note: in this error above, SESSIONVAR is the name of the
session variable memberID)
Strange thing is, as long as the session variable is a #,
everything works. If it's a word, it won't work. So it appears the
session variables are being defined and passed to the next page.
As for the database, it's a SQL Database
column 'adminusername' is a NVARCHAR with a 4000 char limit
Thanks in advance for any help.Are you sure the query is the same? It looks like the one you posted has a syntax error
SELECT e.emp_id, e.dep_id
FROM emp e, loc ct, dep dt
WHERE[b] c.dep_id[/b] IN (SELECT dt.dep_idYou've aliased the LOC table to CT in the FROM clause, but you're using the alias C in the WHERE clause. You use the correct alias CT in the query in your IN clause.
Justin -
We are migrating a web app from JDK 1.2 environment to a JDK 1.5 server enviroment. Previously the web app used the classes12.zip package, now we are using ojdbc14.jar for the new server environment.
Now this particular app uses Oracle7 Server Release 7.3.3.6.0. to retrieve data. I would run a query and get the result set explicitly using the column name.
sql_query = " SELECT DISTINCT(INSIDE_SALES_TEAM_NAME) AS D_INSIDE_SALES_TEAM_NAME FROM AGED_INVENTORY" ;
rset.getString("D_INSIDE_SALES_TEAM_NAME");
However, after migration to ojdc14.jar (using Oracle JDBC driver 9.2.0.8.0) I can't retrieve the resultset in the above-mentioned fashion. I will always get
java.sql.SQLException: Invalid column name
If I use the following, then I do not get any error in retrieving data from the resultset.
rset.getString(1);
Any cause for this scenario?
Thanks,
TAYes of course. I just the posted code snippet. This code used to work in old web server environment. Now we have to modify the resultset line to make it work when using ojdc14.jar.
-
INSERT INTO with SELECT invalid column name error
I have a problem where I wish to update a table with only records that have changed or insert into a table with only new records. The Source table is queried using OPENQUERY as we have no staging db for this.
I have the following code (adapted from a working example):
INSERT INTO dbo.Contact
SELECT contactID, lastUpdatedDateTime
FROM
MERGE INTO dbo.Contact AS DT
USING (SELECT * FROM OPENQUERY(LINKED_SERVER,'SELECT contactID, lastUpdatedDateTime FROM Contact')) AS DS
ON (DT.ContactID = DS.ContactID)
WHEN NOT MATCHED THEN
INSERT VALUES (DS.contactID, DS.lastUpdatedDateTime)
WHEN MATCHED AND (DT.lastUpdatedDateTime <> DS.lastUpdatedDateTime) THEN
UPDATE SET DT.contactID = DS.contactID, DT.lastUpdatedDateTime = DS.lastUpdatedDateTime
OUTPUT $Action Action_Out
AS MERGE_OUT
WHERE MERGE_OUT.Action_Out = 'UPDATE';
GO
When I run this query I am getting the following errors referring to the columns in the SELECT:
Msg 207, Level 16, State 1, Line 2
Invalid column name 'contactID'.
Msg 207, Level 16, State 1, Line 2
Invalid column name 'lastUpdatedDateTime'.
Am I missing something obvious as I can't quite work out why? The Target and source definitely exist with the specified columns present in both...Hello,
The issue is because you are not outputting those values from the inner merge statement. All you are currently outputting is the action, so the error is correct as those columns do not exist.
Change your output portion to be:
OUTPUT inserted.contactID, inserted.lastUpdatedDateTime, $Action Action_Out
Then it should work.
Sean Gallardy | Blog | Microsoft Certified Master -
Crystal Reports XI: Invalid column name error
Hello!
I have a crystal report using a SQL command that is getting the following error (occasionally):
Failed to retrieve data from the database.
Details: ADO Error Code: 0x80040e14
Source: Microsoft OLE DB Provider for SQL Server
Description: Invalid column name 'IPCSKUGroup'.
SQL State: 42S22
Native Error: 207 [Database Vendor Code: 207]
I say occasionally because if i go to Database>> Log on or Log off server and log off the target server and then rerun the report, it will work. If i refresh the report with different parameters, i get the error.
I'm running Crystal Reports XI version 11.0.0.1282 on Windows XP SP2 32-bit. The data is in a SQL Server 2000 database.
This is the portion of the query causing the problem:
(drop/clear temp tables and initiallize a few variables with parameters)
(...other queries putting together the temp table #WorkingTotals) - This part works fine because the report runs if i remove the following portion.
select wtt.QtrMax,QuarterName,Year,wtt.IPCSKUGroup as IPCSKUNum,ServicePriceSuggested,PcsBilled,BilledRevenue,PriceIndex,StdRevenue,
(select sum(TT.BilledRevenue) from
(select Top 4 wt2.BilledRevenue
from #WorkingTotals2 wt2
where wt2.IPCSKUGroup = wtt.IPCSKUGroup and wt2.QtrMax <= wtt.QtrMax order by wt2.QtrMax desc)as TT)
as M12Revenue
from #WorkingTotals wtt
The entire query works fine when I run it in SQL Query Analyzer. But Crystal has an issue with the way i'm figuring the M12Revenue field. The M12Revenue is a moving 12 month revenue which is the sum of the revenue for the past 4 quarters for each quarter.
This is what i've tried thus far:
Putting the entire query into a stored procedure
Storing what gets stored in #WorkingTotals into a database table rather than a temp one
Renaming columns to various different things.
Each of those still resulted in the error.
Thanks for the help!!!
WesHi Wes,
What does SQL Profiler show you when the error happens?
Try using ODBC to see if it also errors, may be an issue in MS's MDAC and the OLE DB driver. MS usually updates MDAC with all Patches but you may want to verify you are using the latest version.
Thank you
Don -
Use of NOT IN leads to an invalid column name error
The query works just fine when placed directly into sql plus
The query works, called from a Java using an Oracle Statement, ONLY IF I remove the NOT.
However, with NOT it chokes, and gives me this:
selQ=select lenum, zeugn from stock_rpt where lenum NOT in ('X12345', 'X23456')
Could Select or Read Selected data
java.sql.SQLException: Invalid column name
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3319)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1926)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at ecspack.StockRpt.selRecsByQ(StockRpt.java:172)
at ecspack.StockRpt.selByDiff(StockRpt.java:261)
at teste.main(teste.java:40)
The column does have an index.
The above is my simplified test query, I am using to narrow down the problem.
SelQ is the value of the Select String.
Really I want to do something like this:
select x1, x2 from tableX where x1 NOT IN (select y1 from tableY)
I know I can just compare records one at a time, but I would rather not, if there is a way to make NOT IN work.
Thank youHi Eileen Keeney ,
may be you can use prepared statement but beware of sql injection
selQ=select lenum, zeugn from stock_rpt where lenum NOT in ('X12345', 'X23456')
Try :
selQ=select lenum, zeugn from stock_rpt where lenum NOT in (?, ?)
Then try running it with this fixed parameter binding:
prest.setString(1, "X12345");
prest.setString(2, "X23456"); -
Invalid column name in WLS 6.1 sp4
We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
we migrated to sp4 and get a invalid column name exception while updating records.
For select queries there is no error. The SQL generated by toplink is -
UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
, REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
to fix it
The exception stack trace is -
2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
- Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
STACK:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
INTERNAL EXCEPTION STACK:
java.sql.SQLException: ORA-00904: invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904 - with nested exception:
[EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
com.pws.framework.exception.GeneralException: There was an unexpected error. Please
contact your system administrator.
at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)We have changed default thin driver to 920 from 817 in 610sp4. If you are using 817/901 dbserver, please put 817/901 classes12.zip in your
classpath before weblogic.jar and you will be ok.
Mitesh
vivek wrote:
We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
we migrated to sp4 and get a invalid column name exception while updating records.
For select queries there is no error. The SQL generated by toplink is -
UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
, REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
to fix it
The exception stack trace is -
2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
- Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
STACK:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
INTERNAL EXCEPTION STACK:
java.sql.SQLException: ORA-00904: invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904 - with nested exception:
[EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
com.pws.framework.exception.GeneralException: There was an unexpected error. Please
contact your system administrator.
at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) -
Invalid column name in query string - using Format function
In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
& "HOME_REGION FROM CCC2.CASE_EPRP " _
& "WHERE (HOME_REGION = 'NCR') AND " _
"(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
& "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
In the Access Query tool I can include this field
Format(CALL_DATE,'mmm-yy')
and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
Format(CALL_DATE,'mmm-yy')
in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
Thanks again,
RichThank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
"date format not recognized"
when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
Thanks again for your help.
Rich
Maybe you are looking for
-
This spring we changed from IE to Mozilla after upgrading to Win 7. Everything has been fine with Firefox until yesterday when it crashed when I attempted to open an email. Since then the bookmarks (or favorites as my husband calls them) have not bee
-
How to handle large number of Threads !!?
hello friends, i done a program that is digging all files and folders for finding given filename in this logic i created one thread per directory and and that thread list out all sub files and directory and matches the search filename string , in tha
-
Computer crash? Can't get past the setup assistant
I recently added leopard to my Power PC dual g5 and it has run terribly, so added memory today, worked ok for about 5 minutes then froze, manually shut off - which I have had to do several times since installing Leopard. When I turned it back on the
-
Advice needed on Key Commands presets in Logic
Hi, just upgraded to Snow Leopard and Logic 9 and very happy. Now I'm planning to work more with key commands. While watching many Logic 9 tutorial video's on youtube etc. I find different Logic users seem to work with different (default) key command
-
Hello: I have kind of a silly question. We bought a copy of Excelsius 2008 last year and installed it on my laptop. I am getting ready to swap out for a new laptop and the disk(s) have gone missing (probably during the last move). Is there a way t