urgent database PreparedStatement problem
i have tried the following codes for many many times but it still cant work does anyone know why? please help, thank you.
codes segment:
PreparedStatement update = connection.prepareStatement(
"UPDATE OutgoingQueue SET statusEmulator = ? and dateOut = ? WHERE receiverContact = ? and receiverLocation='?' and dateProcessed= ?");
update.setBoolean(1,msg.getStatus());
update.setTimestamp(2,dateSent);
update.setInt(3,contact);
update.setString(4,location);
update.setTimestamp(5,dateProcessed);
update.executeUpdate();
stacktrace:
java.lang.ArrayIndexOutOfBoundsException
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1026)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setTimestamp(JdbcOdbcPreparedStatement.java:908)
at DBOutgoingQueue.updateStatus(DBOutgoingQueue.java:124)
at DBOutgoingQueue.main(DBOutgoingQueue.java:191)
Hi,
First of all the SQL query it self is wrong.
You have given
"UPDATE OutgoingQueue SET statusEmulator = ? and dateOut = ? WHERE receiverContact = ? and receiverLocation='?' and dateProcessed= ?");
For Update query you need to give the values camma seperated and not to use "and".
"UPDATE OutgoingQueue SET statusEmulator = ?,dateOut = ? WHERE receiverContact = ? and receiverLocation='?' and dateProcessed= ?"
Simillarly before executing the query from java try to executed the same query with values from Oracle.
Regards,
DARMA
Similar Messages
-
Database Connection problem please help
Hi,
I have a servlet that basically connects to the database if the userid and password is correct.
I have a "login.html" page where the user enters the "userid" and "password".The servlet does the checking and grants access to the user.
My question is as follows.As soon as I startup tomcat type in the url login.html,then press the submit button,(both the fields are blank) the servlet says "ok" this is this information is present in the database.It should say "not ok".Hope I question is clear.The code for the servlet is given below.
package package1.structure;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
public class AuthenticateServlet2 extends HttpServlet {
private String user="";
private String pass="";
private String username="";
private String password="";
private String message1="";
public void init() {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Driver loaded successfully");
}//close try
catch (ClassNotFoundException e) {
System.out.println(e.toString());
}//close catch
}//close init() method
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
} //close doGet
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws ServletException, IOException
user = request.getParameter("username").trim();
pass = request.getParameter("password").trim();
System.out.println("*"+user+"*");
System.out.println("*"+pass+"*");
String message = null;
try{
Connection con= DriverManager.getConnection("jdbc:odbc:MyDS");
System.out.println("Successfully connected to database");
PreparedStatement pstmt;
pstmt = con.prepareStatement("SELECT username,password FROM users" + " WHERE username ='" + user + "'" +
" AND password='" + pass + "'");
ResultSet rs = pstmt.executeQuery();
if(rs.next())
username = rs.getString(1);
password = rs.getString(2);
if (username != null && password != null && user.equals(username) && pass.equals(password) ){
message ="ok";
PrintWriter out = response.getWriter();
out.print("<B>" + message + "</B>");
//response.sendRedirect ("http://localhost:8080/thankyou.html");
}//closes the if statement
else {
message="not ok";
PrintWriter out = response.getWriter();
out.print("<B>" + message + "</B>");
//response.sendRedirect ("http://localhost:8080/sampleapp/login.html");
}//close else statement
}//closes 2ndtry
catch (SQLException e) {
System.out.println(e.toString());
}//closes 2ndcatch
}//close doPost
}//close classKindly let me know ASAP.
Regarding the database.The fields in the database are "username" and "password" and it has one tuple
"xyz" and "xyz"
Hope that my question is rightly put.
Thanking you
ASActually, I think the servlet is doing the right thing
by printing "ok". A quick glance at your code tells
me that username and password are both members of your
servlet class and initialized to "". Neither is null,
and both are blank.
If your HTML page sends user and pass as blank
strings, you'll do a database query for those values.
If they don't appear in the database, your ResultSet
will have no rows and the username and password data
members will not be updated.
When you get to your if test, neither username nor
password is null and both are equal to the values
passed in from the HTML. Hence the "ok".
If you initialize your username and password members
to null this might still work.
Be sure to set them back to null when you finish the
test.
If you take all that JDBC code out of the servlet and
isolate it into its own class, you can test it out by
feeding it valid and invalid username and password
combinations. Once you've got that working perfectly,
you can just have the servlet instantiate your
database object and call its methods. If you have any
problems after that point, you know they're due to the
servlet and not the database interactions.
Right now the database and servlet are confounded.
Separate them out and you might make faster progress.
- MODHello,
Thanks for the reply.Will consider your points for a proper coding.Will keep posting.
AS -
Hi every body ..plz help me on this..
We are facing database termination problem in ECC6 production syste.
Database: Oracle 10.2, O/S: Windows 2003. Spam :27, SP level 13.
Error is:
Errors in file f:\oracle\p02\saptrace\background\p02_ckpt_6520.trc:
ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF'
ORA-27072: File I/O error
OSD-04008: WriteFile() failure, unable to write to file
O/S-Error: (OS 33) The process cannot access the file because another process has locked a portion of the file.
When we are performing backup then data base termination occuring freequently.
Give right solution as early as possible.
Thanks,
Nani.Hi,
Have a look at below snote which actually speaks about the oracle error codes
Snote : 546006
within the Snote it says :-
" If you cannot access a database file (for instance a data file, control file or RedoLog) for whatever reason, an ORA-270xx appears. The actual cause comes from additional error messages (usually in the operating system) that occur on ORA-270xx. "
And as per your last update
" ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF' "
i think there is problem accessing the database control file. Hence you are facing the above problem.
I think if you recreate your control file i think, it should resolve the problem.
Hope it will be helpful to resolve your problem.
Rgds
Radhakrishna D S -
Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem
Hi,
I failed to connect Tomcat 5.0.24 with Postgresql
7.4.2. The files created by me and the changes i had
made in the existing files are rates.jsp,
conversionDAO.java, web.xml and server.xml. The error
message on the top of the rest of it was "The value of
useBean class attribute converter.conversionDAO is
invalid". So far I found out that the coding for
database connectivity purpose in conversionDAO.java
cause the error. Another thing is Postgresql jdbc
driver is required to set in the CLASSPATH for the
java file to access the Postgresql database. I don't
know where should I put it in Tomcat for web
application. Anyway, I put it in
$CATALINA_HOME/shared/lib according the book i
refered. I do the database connectivity coding refer
to the Tomcat Kick Start book from Sams Publishing.
Below are the coding involved, please show me the
mistake i had made. Thank you.
----server.xml----
<Context path="/database"
docBase="${catalina.home}/webapps/database" debug="0"
reload="true">
<ResourceParams name="jdbc/conversion">
<parameter>
<name>username</name>
<value>myusername</value>
</parameter>
<parameter>
<name>password</name>
<value>mypassword</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:postgresql://localhost/conversion</value>
</parameter>
</ResourceParams>
</Context>
----web.xml----
<servlet>
<servlet-name>conversionDAO</servlet-name>
<servlet-class>converters.conversionDAO</servlet-class>
</servlet>
<resource-ref>
<res-ref-name>jdbc/conversion</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
----conversionDAO.java----
public conversionDAO() throws SQLException,
NamingException
Context init = new InitialContext();
Context ctx = (Context)
init.lookup("java:comp/env");
DataSource ds = (DataSource)
ctx.lookup("jdbc/conversion");
con = ds.getConnection();
select = con.prepareStatement(
"SELECT rate FROM Exchange WHERE src= ? AND dst =Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
Errors log
2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
----more---- -
Database configuring problem in setup of managed systems in SMD
Hello,
i'm doing the setup of a CRM 5.0 in SMD Abap+Java and the setup results returns following:
"Database configuration problem" with the exception:
java.lang.NullPointerException
at com.sap.smd.server.manager.SMDPluginProperties.setProperty(SMDPluginProperties.java:114)
at com.sap.smd.agent.plugins.database.ConfigurationTask.configureCustomProperties(ConfigurationTask.java:242)
at com.sap.smd.agent.plugins.database.ConfigurationTask.configureProperties(ConfigurationTask.java:370)
at com.sap.smd.agent.plugins.database.ConfigurationTask.execute(ConfigurationTask.java:124)
at com.sap.sup.admin.setup.AppCfgTasks.configureDbApp(AppCfgTasks.java:115)
at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:202)
at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:217)
at com.sap.sup.admin.setup.SapCluster.setup(SapCluster.java:461)
at com.sap.sup.admin.setup.SapCluster.access$000(SapCluster.java:26)
at com.sap.sup.admin.setup.SapCluster$SetupRunner.run(SapCluster.java:669)
at java.lang.Thread.run(Thread.java:534)
Anybody knows which can be the problem?
Thanks a lot
CarlosHi Shriraj,
ensure that the installation path is correct. I only put /urs/sap/<SID> and you must put /usr/sap/<SID>/DV***/.
In my case with that the setup returns all in green.
I hope it helps you
Regards
Carlos -
SIMPLE Database Design Problem !
Mapping is a big problem for many complex applications.
So what happens if we put all the tables into one table called ENTITY?
I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
Definition of the table
ENTITY
EntityID > uniqueidentifier
EntityType > Tells the entityTypeName
Name >
LastName >
CompanyName > 300 attributeTypes
OppurtunityPeriod >
PS:There is also another table called RELATION that points the relations between entities.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
check the coloumn with WHERE _entityType='PERSON'
as there is is clustered index on entityType...there
is NO performance decrease.
there is also a clustered index on RELATION table on
relationType
when we say WHERE _entityType ='PERSON' or
WHERE relationType='CONTACTMECHANISM'.
it scans the clustered index first.it acts like a
table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
WHERE _entityType ='PERSON'
AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Have you ever thought of using constraints in your
modell? How would you realize those?
...in fact we did.We have arranged the generic object
model in an object database.The knowledge information
is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
But the data schema is held in the RDBMS with code
generation that creates a schema to hold data.If you think that this approach makes sense, why not.
But in able to have a efficent mapping and a good
performance we have thought about building only one
table.The problem is we know we are losing some space
but the thing is harddisk is much cheaper than RAM
and CPU.So our trade off concerated on the storage
cost.But I still wonder if there is a point that I
have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
PS: it is not wise effective using generic object
models also in object databases as CPU cost is a lot
when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
PS2: RDBMS is a value based system where object
databases are identity based.we are trying to be in
the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
C. -
Database connection problem when i try store the values in JTable
Hi Sir,
I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
"Invalid Cursor State".I need to solve this problem.pls. do help me.
I will provide u with the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.sql.*;
public class DataBaseVector extends JPanel
//Container contentPane=getContentPane();
JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
Image i1;
String url="jdbc:odbc:Ananth";
Vector col=new Vector();
Vector rows=new Vector();
Vector rdata=new Vector();
Connection conn;
public DataBaseVector()
//super("JTable With ScrollBars");
this.setLayout(new BorderLayout());
UIManager.put("ScrollBar.track",Color.red);
UIManager.put("ScrollBar.thumb",Color.blue);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection(url); // Is there any problem here?
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("Select * from AccountMaster");
// rs is the result set obtained
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
}catch(Exception e)
System.out.println("The Error Message was:"+e.getMessage());
JTable jt=new JTable(rows,col);
int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
JScrollPane jsp=new JScrollPane(jt,v,h);
this.add(jsp,BorderLayout.CENTER);
this.add(jsb, BorderLayout.SOUTH);
this.add(jsb1, BorderLayout.EAST);
public static void main(String args[])
JFrame jf=new JFrame();
JPanel frame=new DataBaseVector();
jf.getContentPane().add(frame);
jf.setSize(800,600);
jf.setVisible(true);
Thanx,
m.ananthuThe problem is ResultSet.next() is not called.
Try this and modify the table creation as you need.
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
while(rs.next()) {
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
Hope this helps -
WLI 7.0 samples database setup problem
I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
- provided valid database properties for oracle. Completed successfully - config.xml
for samples is updated.
2. Ran RunSamples script - Gives database connect problems and database is not created.
The user/pwd/machine name/SID are all correct.
I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
is "switchdb oracle"). This resets the database properties in config.xml to the defaults
- so obviously this is causing the connection problem.
Pls let me know what is going wrong here?
ThanksGarf,
You are correct in your analysis. When you run the 'RunSamples' script,
it will call switchdb and this causes the 'defaults' to be set in
config.xml. Running the wliconfig utility is the customer experience
BEA would like to have with regard to setting up the database. However,
the RunSamples script has not been updated to correctly reflect that the
customer would have already performed this step. When RunSamples calls
switchdb, it is getting the defaults from the following location:
<USER_DEFINED_DOMAIN>/dbInfo/<DATABASE>/setDBVars and setDBVarsExt files
So for example, if you accepted the default user directory and your
BEA_HOME is C:/bea and you were using the EAI Domain template calling
your domain eaidomain and your are using Oracle, you should update the
following files:
C:\bea\user_projects\eaidomain\dbInfo\oracle\setDBVars.cmd and
setDBVarsExt.cmd
Edit these files to reflect your DB connection properties.
When RunSamples calls switchdb, these properties will be used to update
the wliPool in config.xml. I hope this helps and sorry for the
inconvenience.
Cheers,
Chris
Garf wrote:
I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
- provided valid database properties for oracle. Completed successfully - config.xml
for samples is updated.
2. Ran RunSamples script - Gives database connect problems and database is not created.
The user/pwd/machine name/SID are all correct.
I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
is "switchdb oracle"). This resets the database properties in config.xml to the defaults
- so obviously this is causing the connection problem.
Pls let me know what is going wrong here?
Thanks -
Oracle Database Starting Problem
Hi all,
i am having database startup problems.
my database is working fine but when i try to connect as sysdba then i get the following error
Connected to an idle instance.
SQL> select status from v$instance;
select status from v$instance
ERROR at line 1:
ORA-01034: ORACLE not available
i have also checked the listener and it is also working fine.
Instance "orcl", status READY, has 3 handler(s) for this service...
The process is also shown by the pmon command, check through operating system command
ps -aef |grep pmon
oracle 3235 2816 0 18:08:15 pts/3 0:00 grep pmon
oracle 22425 1 0 12:01:57 ? 0:08 ora_pmon_orcl
Please let me know what to do.
regards,
Imran RazaHi Laura,
Please find below
bash-3.00$ echo $ORACLE_SID
orcl
bash-3.00$ ./lsnrctl status
LSNRCTL for Solaris: Version 10.1.0.5.0 - Production on 17-FEB-2009 18:58:55
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=silverApp0)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.1.0.5.0 - Production
Start Date 17-FEB-2009 11:51:42
Uptime 0 days 7 hr. 7 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/dba/OraHome1/network/admin/listener.ora
Listener Log File /oracle/dba/OraHome1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=silverApp0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl.silverapp0.com" has 1 instance(s).
Instance "orcl", status READY, has 3 handler(s) for this service...
The command completed successfully -
Urgent Help is Needed for Database Installation Problems
How can we resolve the following database problems in Windows XP? Originally, we had Oracle 10.1.0.4.2, and we wanted to upgrade it to Oracle 10.2.0.1. We uninstalled Oracle Home ORAH1_DEV and then got the following problems while installing Oracle 10.2.0.1. How can we resolve all these errors so database configuration assistants can work successfully? Please help us with these ASAP. Thank you very much for your help and time in advance.
-Oy
These are the popup message we got.
POPUP 1. This appears 3 times, then ignore
Error in writing to file 'C:\OraHomes\ORAH1_DEV\jdk\jre\bin\awt.dll'.[C:\OraHomes\ORAH1_DEV\jdk\jre\bin\awt.dll(The process cannot access the file because it is being used by another process)]
Click 'Help' for more information
Click 'Retry' to try again
Click 'Ignore' to ignore this error and go on.
Click 'Cancel' to stop this installation
buttons Help Retry Ignore Cancel
POPUP 2. Error in writing to file 'C:\OraHomes\ORAH_DEV\jdk\bin\java.exe'. [C:\OraHomes\ORAH1_DEV\jdk\jre\bin\java.exe (The process cannot access the file because it is being used by another process)]
Click 'Help' for more information
Click 'Retry' to try again
Click 'Ignore' to ignore this error and go on.
Click 'Cancel' to stop this installation
buttons Help Retry Ignore Cancel
POPUP 3. Erro in writing to file 'C:\OraHomes\ORAH1_DEV\bin\orancrypt10.dll'. [C:\OraHomes\ORAH1_DEV\bin\orancrypt10.dll (The process cannot access the file because it is being used by another process)]
Click 'Help' for more information
Click 'Retry' to try again
Click 'Ignore' to ignore this error and go on.
Click 'Cancel' to stop this installation
buttons Help Retry Ignore Cancel
POPUP 4. Error in writing to file 'C:\OraHomes\ORAH1_DEV\bin\oravsn10.dll'. [C:\OraHomes\ORAH1_DEV\bin\oravsn10.dll (The process cannot access the file because it is being used by another process)]
Click 'Help' for more information
Click 'Retry' to try again
Click 'Ignore' to ignore this error and go on.
Click 'Cancel' to stop this installation
buttons Help Retry Ignore Cancel
POPUP 5. Error in writing to 'c:\OraHomes\ORAH1_DEV\opmn\mesg\ensus.msb'. [C:\OraHomes\ORAH1_DEV\opmn\mesg\ensus.msb (The process cannot access the file because it is being used by another process)]
Click 'Help' for more information
Click 'Retry' to try again
Click 'Ignore' to ignore this error and go on.
Click 'Cancel' to stop this installation
buttons Help Retry Ignore CancelGrace wrote:
Yes, I have it installed in the same Oracle Home. Is it possible to create it there? Or I must create a new Oracle Home for the new installation? Please reply as soon as possible. Thank you very much for your help.
-OyA specific ORACLE_HOME holds the binaries for a specific version of Oracle. You don't upgrade by simply installing a newer version of Oracle into the ORACLE_HOME of an older version. If you tried to do that you have probably irreversibly corrupted the original installation.
And there is no URGENT or ASAP here. We are all volunteers with regular jobs. If you have "urgent" support issues you need to open a Service Request with Oracle Support. -
Database logic problems.. very urgent
HI im having problems doing something that is quite possibly very easy..
i have written a few queries using JDBC
anyway the problem is hwo can i see if no records have been returned? using the ResultSet...
i have tried if Resultset == null
but it doesnt work
please help meTHNx alot it werks perfectly.... i guess i should read my API's more carefully ni teh future
thnx foir teh help -
PreparedStatement problem in Oracle OTD(JCAPS 5.1.3)
Hi,
I encountered a problem with Oracle-eway-generated PreparedStatements when trying to build a project in enterprise designer . I know that without using any prepraredstatement, my project builds fine. Below is the text on the error pop-up window:
java.lang.NullPointerException
at com.stc.codegen.OTDImpl.model.OTDCodeletFactory$ArtifactKey.hashCode(OTDCodeletFactory.java:136)
at java.util.HashMap.hash(HashMap.java:261)
at java.util.HashMap.containsKey(HashMap.java:339)
at com.stc.codegen.OTDImpl.model.OTDCodeletFactory.getOtdFromBuisnessProcess(OTDCodeletFactory.java:207)
at com.stc.codegen.OTDImpl.model.OTDCodeletFactory.createCodelets(OTDCodeletFactory.java:285)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:382)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
at org.openide.util.Task.run(Task.java:136)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)In order to isolate the problem, I have created a simplified project which just reads a text message and writes the message into the Oracle database with the help of a PreparedStatement. I had an error as well;
"Oracle eway code generation error(ERROR_CODEGEN_BPEL_CODELET_GENERAL)"
Caused by: com.stc.codegen.framwork.model.CodeGenException: Error when generating OTD code ...Exception: Invalid parameter type: Class: [TEST] Object: [Param1] Param Type: [VARCHAR].(ERROR_CODEGEN_DB)(ERROR_CREATE_OTD)I think that there is a conflict between the parameters in Oracle and the parameters in the code. Somehow, Oracle eway cannot get the parameter type from database correctly.
Is there a solution for this? I couldn't find any patches/updates for Enterprise designer or eway. Can you point me to right direction if there is any.
Thanks in advance,
MeteHi there,
(I think) I have found the solution. When designing OTD, I have mapped VARCHAR2 column as CHAR. Somehow, JCAPS throws a code generation exception if the field is not mapped as a CHAR for a VARCHAR2 database column. -
hi experts,
i have this simple bean for inserting data into the database...........................
// EmployeeDataBaseBean.java
package wh;
import java.lang.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class EmployeeDatabaseBean
String email = "";
String empname = "";
String extno = "";
String cellno = "";
String remarks = "";
HttpServletRequest request = null;
Connection dbConn = null;
* Set the request object. This is used for getting parameters.
public void setRequest(HttpServletRequest request)
this.request = request;
}//public void setRequest(HttpRequest request)
* Connect to the database.
public void connectToDatabase()
throws Exception
/* Use JDBC to connect to the SAMPLE database.*/
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
String url = "jdbc:db2:one";
String dbUser = "";
String dbPass = "";
Connection dbConn = DriverManager.getConnection(url);
/* If the connection fails, throw an Exception.*/
if(dbConn == null)
throw new Exception("The database connection failed.");
System.out.println("called connect inside connnecttodatabase");
* Run the SELECT statement query to return a single EMPLOYEE record.
public void runQuery()
throws Exception
/* Connect to the database.*/
connectToDatabase();
/* Get the EMPNO parameter from the request object.*/
String empmailParam = request.getParameter("EMAIL");
/* Build a SQL SELECT statement.*/
String sql = "SELECT EMAIL, EMP_NAME, EXT_NO, CELL_NO, REMARKS " +
"FROM CONTACT WHERE EMAIL = ?";
/* Prepare the SELECT statement.*/
PreparedStatement statement = dbConn.prepareStatement(sql);
/* Set the parameter in the SELECT statement and run it.*/
statement.setObject (1, empmailParam);
ResultSet result = statement.executeQuery();
/* Get the result row.*/
while(result.next())
email = result.getString("EMAIL");
empname = result.getString("EMP_NAME");
extno = result.getString("EXT_NO");
cellno = result.getString("CELL_NO");
remarks = result.getString("REMARKS");
/* Close the connection.*/
dbConn.close();
* Insert a record to the database.
public void insertEmployee()
throws Exception
/* Connect to the database.*/
connectToDatabase();
System.out.println("connected to db2 through insertemployee");
/* Get all the parameters from the calling HTML form.*/
String mailParam = request.getParameter("EMAIL");
System.out.println("the email is " + request.getParameter("EMAIL"));
String nameParam = request.getParameter("EMPNAME");
System.out.println("the name is " + request.getParameter("EMPNAME"));
int extnoParam = Integer.parseInt(request.getParameter("EXTNO"));
System.out.println("the extension number is " + request.getParameter("EXTNO"));
int cellnoParam = Integer.parseInt(request.getParameter("CELLNO"));
System.out.println("the cellno is " + request.getParameter("CELLNO"));
String remarksParam = request.getParameter("REMARKS");
System.out.println("the remark is " + request.getParameter("REMARKS"));
System.out.println("building sql query");
/* Build a SQL INSER statement.*/
String sql = "INSERT INTO CONTACT " + "(EMAIL, EMP_NAME, EXT_NO, CELL_NO, REMARKS) " + " VALUES " + "(?,?,?,?,?)";
System.out.println("executed sql statement");
/* Prepare the SELECT statement.*/
PreparedStatement statement = dbConn.prepareStatement(sql);
System.out.println("using preparedstatement");
/* Set the parameters for the INSERT run it.*/
statement.setString(1, mailParam);
statement.setString(2, nameParam);
statement.setInt(3, extnoParam);
statement.setInt(4, cellnoParam);
statement.setString(5, remarksParam);
boolean returnValue = statement.execute();
/* Close the connection.*/
dbConn.close();
System.out.println("query executed");
}//public void insertEmployee()
* Return the empNo.
public String getemail()
return email;
* Return the firstNme.
public String getempname()
return empname;
* Return the midInit.
public String getextno()
return extno;
* Return the lastName.
public String getcellno()
return cellno;
* Return the edLevel.
public String getremarks()
return remarks;
//and the html page calling the jsp page which inturn uses the bean.
//EmployeeInput.html
<HTML>
<HEAD>
<TITLE>
Employee Input
</TITLE>
</HEAD>
<BODY BGCOLOR="#f0f0ff">
<H2>Insert An Employee:</H2>
<BR><FORM NAME="employeeForm" ACTION="EmployeeDisplay.jsp">
<table border=2>
<tr>
<td>EMail:</td>
<td><INPUT NAME="EMAIL" VALUE="" TYPE="text"></td>
</tr>
<tr>
<td>Employee Name:</td>
<td><INPUT NAME="EMPNAME" VALUE="" TYPE="text"></td>
</tr>
<tr>
<td>Extension Number:</td>
<td><INPUT NAME="EXTNO" VALUE="" TYPE="text" LENGTH="6"></td>
</tr>
<tr>
<td>Cell Number:</td>
<td><INPUT NAME="CELLNO" VALUE="" TYPE="text"></td>
</tr>
<tr>
<td>Remarks:</td>
<td><INPUT NAME="REMARKS" VALUE="" TYPE="text"></td>
</tr>
<tr>
<td><center><INPUT NAME="submitButton" VALUE="Insert" TYPE="submit"></center></td>
</tr>
</FORM>
</BODY>
</HTML>
// the jsp page that uses the bean.
//EmployeeDisplay.jsp
<jsp:useBean id="employeeDatabaseBean" class="wh.EmployeeDatabaseBean" scope="request"/>
<!-- Perform the actions on the bean. -->
<%
try
/* Set the request object.*/
/* The request object is implicitly available in the JSP page.*/
employeeDatabaseBean.setRequest(request);
/* Insert the employee data into the database.*/
employeeDatabaseBean.insertEmployee();
/* Run the query to retrieve the employee data from the database.*/
//employeeDatabaseBean.runQuery();
catch (Exception e)
System.out.println(e.getMessage());
%>
<HTML>
<HEAD>
<TITLE>
Employee Display
</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>Employee Record:</H2>
<BR><FORM NAME="employeeDisplayForm" >
<BR>Employee No: <INPUT NAME="EMPNO" VALUE="<%= employeeDatabaseBean.getemail() %>" TYPE="text">
<BR>First Name: <INPUT NAME="FIRSTNME" VALUE="<%= employeeDatabaseBean.getempname() %>" TYPE="text">
<BR>Mid: <INPUT NAME="MIDINIT" VALUE="<%= employeeDatabaseBean.getextno() %>" TYPE="text" LENGTH="4">
<BR>Last Name: <INPUT NAME="LASTNAME" VALUE="<%= employeeDatabaseBean.getcellno() %>" TYPE="text">
<BR>Education Level: <INPUT NAME="EDLEVEL" VALUE="<%= employeeDatabaseBean.getremarks() %>" TYPE="text">
</FORM>
</BODY>
</HTML>
my problem is that the file runs perfectly on the browser. The issue arises here that the data doesnt gets inserted into the database...................also that the console does not show any error either........what i feel is that the prepared statement isnt functioning properly.......the control doesnt moves beyond the prepared statement
plz helpHello hermione,
Try to insert a space after end of string in the SQL-statement, just before the qoutes, then it hopefully works, as bellow.
String sql = "INSERT INTO CONTACT " + "(EMAIL, EMP_NAME, EXT_NO, CELL_NO, REMARKS) " + " VALUES " + "(?,?,?,?,?)";
//javanalle -
Database Initialization Problem in Linux
Hi
This is the first time I am using oracle in linux.Over here we have installed Oracle 9.2.0.1.0 in RedHat linux 9 with a RAM of 512 MB and a hard disk of 80 GB.The problem is that when we start sqlplus as sysdba .I am saying "startup" to initialise the DB ....The process of starting was slow ...and finally I was getting "end-of-file communication" error ...I read somewhere in the Alert Log that we need to give atleast half the RAM size in the shmmax ...I did that and restarted the server ....Now when I follow the same procedure I am getting a different error in the SQL prompt
ORA-01092: ORACLE instance terminated. Disconnection forced
in the LOG file I am getting the lines
Errors in file /usr1/app/oracle/product/9.2.0.1.0/rdbms/log/tsh1_ora_1140.trc:
ORA-01403: no data found
Error 1403 happened during db open, shutting down database
USER: terminating instance due to error 1403
Instance terminated by USER, pid = 1140
ORA-1092 signalled during: ALTER DATABASE OPEN...
Please help me in this regard ..as this is urgent ...ThanxThere are the latest entries in the file alert_%^$%^.log
I am getting a EINVAL problem here as I reverted back to the original value of my shmmax ...for previous entries where my shmmax was half the size of my 512MB ram I dint get that problem
Fri May 13 16:36:40 2005
Starting ORACLE instance (normal)
Fri May 13 16:36:40 2005
WARNING: EINVAL creating segment of size 0x0000000003000000
fix shm parameters in /etc/system or equivalent
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 2
Using log_archive_dest parameter default value
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 9.2.0.1.0.
System parameters with non-default values:
processes = 50
shared_pool_size = 4194304
control_files = /usr1/app/oracle/oradata/TSH1/control/ora_control1, /usr1/app/oracle/oradata/TSH1/control/ora_control2
db_block_buffers = 100
log_buffer = 32768
log_checkpoint_interval = 10000
db_files = 80
db_file_multiblock_read_count= 8
global_names = TRUE
parallel_max_servers = 5
max_dump_file_size = 10240
db_name = TSH1
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
Fri May 13 16:36:43 2005
ALTER DATABASE MOUNT
Fri May 13 16:36:47 2005
Successful mount of redo thread 1, with mount id 1076997467.
Fri May 13 16:36:47 2005
Database mounted in Exclusive Mode.
Completed: ALTER DATABASE MOUNTFri May 13 16:36:47 2005
ALTER DATABASE OPEN
Fri May 13 16:36:47 2005
Beginning crash recovery of 1 threads
Fri May 13 16:36:47 2005
Started first pass scan
Fri May 13 16:36:47 2005
Completed first pass scan
8 redo blocks read, 5 data blocks need recovery
Fri May 13 16:36:47 2005
Started recovery at
Thread 1: logseq 51, block 3, scn 0.511026
Recovery of Online Redo Log: Thread 1 Group 1 Seq 51 Reading mem 0
Mem# 0 errs 0: /usr1/app/oracle/product/9.2.0.1.0/dbs/log1TSH1.dbf
Fri May 13 16:36:48 2005
Ended recovery at
Thread 1: logseq 51, block 11, scn 0.531072
5 data blocks read, 5 data blocks written, 8 redo blocks read
Crash recovery completed successfully
Fri May 13 16:36:48 2005
Thread 1 advanced to log sequence 52
Thread 1 opened at log sequence 52
Current log# 2 seq# 52 mem# 0: /usr1/app/oracle/product/9.2.0.1.0/dbs/log2TSH1.dbf
Successful open of redo thread 1.
Fri May 13 16:36:48 2005
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri May 13 16:36:48 2005
SMON: enabling cache recovery
SMON: enabling tx recovery
Fri May 13 16:36:48 2005
Database Characterset is US7ASCII
Updating 7.0.0.0.0 NLS parameters in sys.props$
-- adding 9.2.0.1.0 NLS parameters.
Fri May 13 16:36:49 2005
Errors in file /usr1/app/oracle/product/9.2.0.1.0/rdbms/log/tsh1_ora_1107.trc:
ORA-01403: no data found
Error 1403 happened during db open, shutting down database
USER: terminating instance due to error 1403
Instance terminated by USER, pid = 1107
ORA-1092 signalled during: ALTER DATABASE OPEN... -
Urgent Database Down - alert log file
Hi Guru's
this is the alert log file - today morning production database went down - any one can you please let me know the problem area!
Thread 1 advanced to log sequence 17563
Current log# 4 seq# 17563 mem# 0: E:\ORACLE\ORADATA\PNLDB\REDO04.LOG
Thu Jan 26 08:12:56 2006
KCF: write/open error block=0x7f0bc online=1
file=12 F:\ORACLE\ORADATA\PNLDB\USERS02.DBF
error=27069 txt: 'OSD-04026: Invalid parameter passed. (OS 520380)'
Thu Jan 26 08:12:57 2006
Errors in file f:\oracle\admin\pnldb\udump\pnldb_ora_1420.trc:
ORA-01115: IO error reading block from file 12 (block # 517514)
ORA-01110: data file 12: 'F:\ORACLE\ORADATA\PNLDB\USERS02.DBF'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 517513)
ORA-01115: IO error reading block from file 12 (block # 132287)
ORA-01110: data file 12: 'F:\ORACLE\ORADATA\PNLDB\USERS02.DBF'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 132286)
Thu Jan 26 08:12:57 2006
Errors in file f:\oracle\admin\pnldb\bdump\pnldb_dbw0_956.trc:
ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
ORA-01114: IO error writing block to file 12 (block # 520380)
ORA-01110: data file 12: 'F:\ORACLE\ORADATA\PNLDB\USERS02.DBF'
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 520380)
DBW0: terminating instance due to error 1242
Thu Jan 26 08:12:59 2006
Errors in file f:\oracle\admin\pnldb\udump\pnldb_ora_1420.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-01115: IO error reading block from file 12 (block # 517514)
ORA-01110: data file 12: 'F:\ORACLE\ORADATA\PNLDB\USERS02.DBF'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 517513)
ORA-01115: IO error reading block from file 12 (block # 132287)
ORA-01110: data file 12: 'F:\ORACLE\ORADATA\PNLDB\USERS02.DBF'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 132286)
Thu Jan 26 08:12:59 2006
Errors in file f:\oracle\admin\pnldb\bdump\pnldb_pmon_3804.trc:
ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
Instance terminated by DBW0, pid = 956
Thanks
RaviYou are having problems on disks E\ and F\ - possibly hardware problems.
(Hopefully these disks are not network drives. If they are, your problem might be network contention. Network mounted drives are never a good idea for databases.)
If this is truly urgent, then I encourage you to use your Oracle Support contract to open a service request for assistance.
Maybe you are looking for
-
Does anyone know of a report that details items in any given storage location on a line by line basis ( not purely the balance ) Please advise, ta
-
I keep getting this error every time i try to create a queue table exec sys.dbms_aqadm.create_queue_table('call_mqtab','call_t'); at line 1: 4068: existing state of packages has been discarded 4063: package body "SYS.DBMS_AQADM" has errors 6508: PL/S
-
Hi everyone, I have created several PDF files (Acrobat 6.0 Professional) from Word 2003 documents. In some of them colours used in headlines (blue, red, yellow, green) look dull (kind of dirty yellow or dark blue, etc.) while in other PDFs they look
-
Object States panel not working in CS6, please help!
I have InDesign CS6 installed (same license) on my work computer and home computer. The Object States panel works just fine at home. But at work the panel shows up, but it is always blank even though I have an object selected that has a State applied
-
Chaining of test script giving error
hi, I have created 2 test scripts - 1) sales order creation 2) sales order change. in sales order creation test script i have maintained sales order number as export parameter. for this i have made VBAK_VBELN as export parameter. I have done - MESSA