Statement not in an executed state. ?
Hi All,
I am getting the following error:
Exception: verifyPassword=java.sql.SQLException: [Microsoft][SQLServer 2000 Driv
er for JDBC]Invalid operation. Statement not in an executed state.What could be the problem ?
Thanks
Harish Pathak
Sorry I forgot to place the code..
here is the code..
public boolean verifyPassword(String username, String password) {
String originalPassword=null;
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://sqlserver:1433","harish","harish");
PreparedStatement pstmt = con.prepareStatement("select password from registration where username='"+username+"'");
ResultSet rs = pstmt.getResultSet();
if(rs.next()) {
originalPassword=rs.getString(1);
pstmt.close();
if(originalPassword.equals(password)) {
return true;
} else {
return false;
} catch (Exception e){
System.out.println("Exception: verifyPassword="+e);
return false;
}Please reply soon.
Similar Messages
-
How to find invalid statements(not syntax error) executed using v$ views
Hi
I want find invalid statements(not syntax error statements) that executed, when some of the applications runs in the server,
for eg: permissions denied, table/view doesn't exit .. etc
I could not able to find it in v$sql views. is there any other view that gives this information?V$ views only contain parsed statements, not incorrect ones.
Max -
Rollover state not working on active state
Hi, I have a problem with menu states. When a menu item is in its active state the rollover state isn't working. Is this supposed to happen or is there a solution to this?
Thanks.Hello,
This is working as designed. Active state suppresses changing to any other state on mouse interaction and other states only work on links that are currently in Normal state.
Also refer: https://forums.adobe.com/thread/1136562
Cheers,
Vikas -
CASE not found while executing CASE statement on Submit Form
Hi to all APEX users and developers.
I have several APEX applications and they are all working well, but recently I got one strange exception when I try to submit page:
Session: Fetch session header information
...metadata, fetch page info
...Validate item page affinity.
...Validate hidden_protected items.
Add error onto error stack
...Error data:
......message: Error processing request.
......additional_info: ORA-06592: CASE not found while executing CASE statement
......display_location: ON_ERROR_PAGE
......is_internal_error: true
......apex_error_code: APEX.UNHANDLED_ERROR
......ora_sqlcode: -6592
......ora_sqlerrm: ORA-06592: CASE not found while executing CASE statement
.....error_backtrace: ORA-06512: at "APEX_040100.WWV_FLOW", line 9273
......component.type: APEX_APPLICATION_AUTH
......component.id: 41350431648668800
......component.name: MNRFR
...Show Error on Error Page
......Performing rollback
Processes - point: AFTER_ERROR_HEADER
Processes - point: BEFORE_ERROR_FOOTER
End Page Processinga
Page has more than 120 items (most of them are hidden), so my first thought is that page has problem with posting so many items, but APEX error message doesn't hel me at all. Any help would be very appreciated :)
AlmirHi Almir,
actually it is the 100 page item limit. See (http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/limits.htm)
I also had a look into the source code and the code at the position where the error gets raised only supports 100 page items.
Can you have a look into the generated HTML code and look if you have a page items which is mapped to p_t101 or a higher number ?
I will file a bug to show a better error message.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
I've seen some similar questions, but want to make sure I can get an answer quickly and how to fix.
Thanks,
Paul
spid24s Error: 28005, Severity: 16, State: 2
spid24s An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated,
or you do not have permission.Hi Paul,
I also had the same error on one of my servers, and it was because the user that created the database no longer worked for the company.
So when his AD account got deleted, the database had NULL as owner
Using the following query I asked for the owners of the databases:
select name, suser_sname(sid) from master.dbo.sysdatabases
So changing the owner of the databases that had a NULL owner solved the issue for me.
use <databasesname>
go
exec sp_changedbowner 'sa'
Thanks for triggering the solution.
Peter -
Avoid JDBC sender error: Execute statement did not return a result set
Hi!
My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
I do not see how to change the stored procedure to avoid this error.
Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
Thanks for any input!
Regards,
Oeystein EmhjellenHi Oeystein Emhjellen.
The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
Like a SELECT Statement:
If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
Ask to your database team.
I hope it helps you.
Bruno. -
Oracle Error - statement handle not executed state
Hello,
A BCA scheduled job has failed and returned with the following error. Does anyone have an idea to fix this error.
Connection or SQL sentence error: (DA0005): [Exception: DBD, ORA-24338: statement handle not executed State: N/A] The following data providers have not been successfully refreshed
Thanks
-GopiPlease provide more information on what Crystal Reports or Business Objects product you are using. The more details you can provide, the quicker the resolution...
Ludek -
Customizing the code inspector with check for two executable statements in same line
Hi Everyone,
I have a reuirement to customize the code inspector.I need to create a check 'Two executable statements should not be in the same line'.
While doing so i am facing one problem as in internal table it is capturing the report as word by word with same row number nd different line number.
If anyone have worked on this before then help me out.
I am using CL_CI_TEST_SCAN as superclass and making the changes in the run method.
Regards,
KhushbooIn the source code you will have this in comment right, use the "#EC ENHOK.
-
Error when executing statement for table/stored proc
Hi All,
I am getting this error when executing IDOC to JDBC (Stored Procedure) Scenario.
In my stored procedure I have three insert statements to insert rows in to 3 tables.
This stored procedure is working fine for two insert statements i.e,
For this I have created data type for stored procedure with 10 elements and executed the scenario and was successfully running.
when I added 3rd insert statement to stored procedure ie., when i added 5 more elements to the datatype (totally 15 elements) it starts giving the bellow error in Message Monitoring.
<i><b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
<i><b>Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
Note:- I have run the stored procedure with three insert statements in Sql Server, and also by calling an external program also, and was working fine.
<i><b> Note : Is there any structure needs to be follow when working with IDOC to Stored procedure.</b></i>
I am struck up with the error, can any body resolve this issue.
Thanks in Advance,
MurthyHi narasimha,
This seems to be any error due to incorrect query formation.In your receiver jdbc channel set the parameter logSQLstatement = true.you can find this parameter in the advanced mode. Using this parameter you will be able to see the sql query which is generated at runtime in the audit log in RWB.
Regards,
Pragati -
Hello all,
We have configured JDBC Sender Adapter which fetches around 10K records with poll interval 1hr from DB2 System .
It was working fine,suddenly it started throwing an exception in Adapter Monitoring :
Error during conversion of query result to XML: java.sql.SQLException: Cursor state not valid.
It is not fetching any records.
Without changing any configurations when we tried to fetch to around 1000 records it's working fine.
For 10K records same exception persists
What could be the reason ?How to resolve this issue?
regards
GangaPrasadHello Christophe ,
Trace in VA :::
Date : 05/09/2008
Time : 11:45:57:750
Message : Unexpected error converting database resultset to XML, reason: java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Severity : Error
Category : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
Location : com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(ResultSet, ResultSetMetaData)
Application :
Thread : XI JDBC2XI[JDBC_SND_DB2_VehicleReceiving/DB2PRD00/]_170
Datasource : 12428950:/usr/sap/PXI/DVEBMGS01/j2ee/cluster/server0/log/applications/com.sap.xi/xi.log
Message ID : 00145E742794005E0014980B000000BE00044CC763766C4F
Source Name : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
Argument Objs : java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Arguments : java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Dsr Component :
Dsr Transaction : d1f629d01d9b11dd984200145e742794
Dsr User :
Indent : 0
Level : 0
Message Code :
Message Type : 1
Relatives : com.sap.aii.adapter.jdbc.JDBC2XI
Resource Bundlename :
Session : 0
Source : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
ThreadObject : XI JDBC2XI[JDBC_SND_DB2_VehicleReceiving/DB2PRD00/]_170
Transaction : SAP J2EE Engine JTA Transaction : [0ffffffbdffffffa6ffffff960086]
User : J2EE_GUEST
Regards
Ganga Prasad -
hi to all,
I am trying to write use inner joining . here is code
DATA:tabname LIKE dd02L-tabname,
table_disc LIKE dd02t-ddtext.
SELECT dd02ltabname dd02tddtext INTO (tabname,table_disc)
FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
AND dd02L~tabname = 'ZANKI*'.
endselect.
write : tabname.
I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank youHi,
I executed the ur inner join conditin by commenting 'z*' it's working fine.
I think where condition is not getting satisfied so u r not getting any data.
Please conform in where condition you need * 'AND'* or OR
I change decalration as below.
DATA:tabname type TABNAME,
table_disc type AS4TEXT.
SELECT dd02l~tabname
dd02t~ddtext INTO (tabname, table_disc)
FROM dd02l INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
WHERE dd02t~ddlanguage = 'E' AND
dd02l~tabclass = 'TRANSP'AND
dd02L~tabname = 'ZANKI*'.
endselect.
write : tabname.
Regards,
Pravin -
I am using the sender jdbc sender adapter.
I had given the SQL Query:
EXECUTE xyz;
i am getting SQL Exception.
SQL Statement not allowed in adapter monitoring.
GauravHi,
Which database you are using ?
Are you executing the Stored Procedure ?
check out this for the syntax etc-
http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
Moorthy -
Sql statement takes long to execute even with index
Hi
I have the following sql statement.
Its explain plan states its "TABLE ACCESS FULL".
But upon creation of index for table PWRKF2MV, using
IDX(pafidt,ppdept,prodno,ppname) and IDX2(pmfaci,prodno), it uses both indexes
but time taken to execute is still the same as when there is no indexes.
Why is that so? Appreciate any help. Thank you.
Pls take note that the PWRKF2MV is a materialized view and MITBALC0 is a synonym.
SQL statement: -
select a.ppdept dept, rtrim(b.mbsttx) prod, to_char(to_date(a.pafidt,'YYYYMMDD'),'Y')||to_char(to_date(a.pafidt,'YYYYMMDD'),'WW') as yrweek, sum(pmoqty) moqty
from pwrkf2mv a, mitbalc0 b
where a.pafidt between :p_startdate and :p_enddate
and a.ppdept = nvl(:p_dept,a.ppdept)
and a.prodno = nvl(:p_prodno,a.prodno)
and a.ppname like '%'||:p_proddesc||'%'
and rtrim(a.prefno) is not null
and rtrim(b.mbsttx) is not null
and a.pmfaci = b.mbwhlo
and a.prodno = b.mbitno
group by a.ppdept, b.mbsttx, to_char(to_date(a.pafidt,'YYYYMMDD'),'Y')||to_char(to_date(a.pafidt,'YYYYMMDD'),'WW')
order by a.ppdept, yrweek, b.mbsttx;
SitiHi Siti,
Is your table goes through frequent update and delete statements? if YES=>
Free blocks created during this operation may dgrade the performance during full
Tbale scan.
If you are using Oracle 10g, you can shrink the segments. But first enable the row movement
sql> alter table emp enable row movement;
http://www.oracle.com/technology/oramag/oracle/05-may/o35tuning.html
JAI HIND
Darshan -
Prepared statement not releasing from access db
Hello all,
I have several prepared statements like the following:
public void storeUpdate(String userId,String ws,String wm,String wl,String wx,String wxx,String bs,String bm,String bl,String bx,String bxx, String tq, String tp,Timestamp ts)
String updatePurchase = "UPDATE store SET smallWhite=?,medWhite=?,lrgWhite=?,xlrgWhite=?,xxlrgWhite=?,smallBlue=?,medBlue=?,lrgBlue=?,xlrgBlue=?,xxlrgBlue=?,totalQty=?,totalPrice=?,ot=? WHERE playerNo='"+userId+"'";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
objConn = java.sql.DriverManager.getConnection("jdbc:odbc:myDB","","");
PreparedStatement ps = objConn.prepareStatement(updatePurchase);
ps.setString(1, ws);
ps.setString(2, wm);
ps.setString(3, wl);
ps.setString(4, wx);
ps.setString(5, wxx);
ps.setString(6, bs);
ps.setString(7, bm);
ps.setString(8, bl);
ps.setString(9, bx);
ps.setString(10, bxx);
ps.setString(11, tq);
ps.setString(12, tp);
ps.setTimestamp(13,ts);
ps.executeUpdate();
ps.close();
objConn.close();
catch (SQLException s)
System.err.println("DataBase PROBLEM");
s.printStackTrace();
catch (Exception e)
System.err.println("Error in updateStore method");
e.printStackTrace();
} The prepared stmts seem to be "hanging on to" the access(dont laugh)table that the prepared stmt just updated. The reason I know this is because when I try to look at the table in access's design view I get a message saying:
"Microsoft access
You cant open the table 'store' for modification.
A query or form bound to the table is open, you may not have permission to open this table in design view, or another user has the table open.
If you have opened a query or form bound to this table, close it, and then try again to open the table in design view."
The only way to open the table in design view is to shut down tomcat and restart.
Should I be worried about this?
Am i forgetting to close something in my ps?
TIA!!I use PreparedStatement all the time with Access and never have a problem. The only thing I noticed about your code is that if an exception gets thrown in your method, the close statements won't get executed. This might leave the tables locked. You might want to try moving the close statements into a finally block. That way your statement and connection will get closed if an exception gets thrown or not.
-
Teradata SQL multiple statements (not multistmt) in Knowledge Module Step??
In a Knowledge Module Step using Teradata Technology, I have the following statements
statement 1 ;
statement 2 ;
statement 3 ;
Since the semicolons are at the end of each statement, I expect that these statements will be executed in sequential order
and not in parallel as in a multistatement. Can someone confirm this ?
I ask this question, because I observe that if statement 2 fails (say for e.g because it is an insert statement and there is no space on the database) then statement 1
is not commited either (or perhaps it is rolled back ). This behaviour is expected in multistatements (i.e. where statements run in parallel).
Thanking you all in great anticipation
Amer (Newbie!)Hi Amer,
This is obvious that in one step you have included
statement 1 ;
statement 2 ;
statement 3 ;
So any of the statement fails means this step is not going to work unless until you use AUTOCOMMIT STATMENT (drop or truncate).
If your 1st statement will be " drop table xyz"
2nd statement will be " truncate table abc""
3rd statement will be " delete from def"
if 3rd statement fails , then 1st two are auto committed and will be reflected in your database. But if 1st statement fails means its the end for this step.
If your requirement is like to do this in step of a KM better use one procedure.
Hope its helps.
Thanks
Maybe you are looking for
-
Installation ProBleM with Adobe Reader on WinDows 8.1
I've been trying for some Time to install Adobe Reader on 2 different Windows 8.1 computers, using Internet Explorer and Chrome, and haven't succeeded. The "Adobe Reader Installer" opens up, but the screen remains grey. Nothing seems to be happening.
-
Photos added to icloud drive from my imac do not sync to my iphone
Hello and thank you in advance for any help you may be able to give. The following three paragraphs are a detailed description, as is the last paragraph, which is just a summary. The rest is a rant, because I have become a very frustrated consumer w
-
Date From In infobject query BW
Hi, I have a time dependant attribute, I want to show in my query (from the infobject) the date_from attributes, is this possible? Or I have to create other time dependant attribute - date?? Thanks Victoria
-
Hello, When running one of my html and javascript files, some output lines in the Safari inspector come with a white number on the left of the output (on a gray oval). Does anybody know what they mean?
-
A popular problem; Can't install the new Creative Cloud Tool
Sorry to bore everbody to death with this but after mauling my way thru literally piles of bits of threads and so forth off google, the end result is lots of confusion. My situation: Running win 7 64 bit (uptodate) I've been running Creative cloud t