Weblogic Prepared State but application is running fine
One of our current production managed servers is in a 'Prepared' state, but the application is running fine. We have kept it up for consecutive nights without restarting to experiment with how long it will run. How can it be in a 'Prepared' state and still be running? Will this prevent it from starting properly the next time we restart the server?
Hi,
Thanks. Tried finding any similar bug for WLS 9.2 but didn't get.
there is a bug in WLS 10.3 but the scenario was different .
Can it be application specific? because other applications on same managed server are showing state ACTIVE?
I used a WLST command to check the state of applications (using getCurrentState() function )
It gives the correct state as ACTIVE.
Any Pointers will be appreciated.
Thanks in Advance.
Similar Messages
-
Cannot load windows xp but windows 98 runs fine with KM4M-V
Why wont windows xp load into my new motherboard when windows 98 runs fine.
AMD Athlon 2400+
256 mb ram
80 gb Seagate baracudaAs I first said I cannot load windows xp but windows 98 runs fine.
I have formated the drive into ntsc and fat 32 but as soon as the setup process has finished in xp and it wants to load the system posts the Blue Screen of death.
Why does windows 98 run without any problems .I have checked memory ,ram,pro and hdd but all are fine.This one puzzles me!!!.
I understand from other feeds it could be the power supply not beefy enough but if that was the case why does windows 98 run so well??
Amd Athlon 2400+
Seagate Baracuda 80gb
Seimens 2100 ddr total 768 on two sticks
DVD rw-
dvd rom drive
FSB Power supply 250watt
3.3v - 16a
5v - 25a
12v - 13a -
How to use prepared statement by Application Module on ADF?
Hello
i am using a prepared statement on the view side of my project,
this is my code, i'm not sure about using this code.
AppModuleGFTImpl am = (AppModuleGFTImpl) Configuration.createRootApplicationModule(amDef,config);
try {
ps =am.getDBTransaction().createPreparedStatement("Select * from XXXXXX where kullanici_id=? and sifre=?",0);
ps.setString(1, kullanici);
ps.setString(2, sifre);
rs = ps.executeQuery();
if (rs.next()) {
girebilir = true;
} else {
girebilir = false;
ps.close();
rs.close();
//am.getDBTransaction().closeTransaction(); ? I'm not Sure
//Configuration.releaseRootApplicationModule(am, true); ? I'm not Sure
Is it True? How we use this code on the project view side? Must we close Transaction, or release application Module.
thanks for interest.
sorry my english.Hello, for the SP you can use something like this in your application module
private static final String BULKSTAMMENN =
"begin IVA_OWNER.IVA_UI_ALGEMEEN_PCK.USM_SNELLE_INVOER_GUI( P_RLE_ID => :1, P_AANTAL => :2, P_OJR_JAAR => :3, P_RAS_ID => :4, P_TOELICHTING => :5, P_SUCCES => :6 ); end;";
public void bulkStamen ( int rasId, int telerId, int jaar, int aantal, String toelichting ) {
CallableStatement bulkStamenSP = null;
try {
bulkStamenSP = getDBTransaction().createCallableStatement( BULKSTAMMENN, 0 );
bulkStamenSP.setInt( 1, telerId );
bulkStamenSP.setInt( 2, aantal );
bulkStamenSP.setInt( 3, jaar );
bulkStamenSP.setInt( 4, rasId );
bulkStamenSP.setString( 5, toelichting );
bulkStamenSP.registerOutParameter( 6, Types.VARCHAR );
bulkStamenSP.executeUpdate();
} catch ( Exception e ) {
log.warning( "Aanroep naar " + BULKSTAMMENN + " gefaald, " + e.getMessage() );
} finally {
if ( bulkStamenSP != null ) {
try {
bulkStamenSP.close();
} catch ( Exception e ) {
log.warning( e.getMessage() );
log.info( "Stammen bulk uitgevoerd voor " + rasId + " " + telerId + " " + jaar + " " + aantal + " " +
toelichting );
}You can then drag this method onto your page or right into your task flow if your using JDev 11.
Also you can access it from a backing bean although the methods above are preferred
-Anton -
Data missing in InfoView report but Crystal Report runs fine on my PC
I have created a Crystal Report (XI) which combines data from 2 datasources. Firstly from a postgres db (connected to by ODBC) and second from an Informix db (connected to by ODBC).
The report runs fine on my PC but when I publish the report into Business Objects XI and run the report in InfoView, the report runs successfully but displays no details rows. The title, page headers, group headers all display but no data detail rows are shown. There is no conditional suppression on the details section of the report.
The ODBC drivers install ed on the Business Objects XI Enterprise server are the same as the ones on my PC.
If the report is adapted to only use just one of the datasources then it displays the data fine in Business Objects. So it is just when the datasources are compbined in one report that the data is not displayed.
Any Ideas?
Keith.Post your question to the Business Objects Forum
-
Hello All,
The FIM 2010 R2 application is running, but the error logs on server shows sharpoint error.
The error log is attached. Please reply if someone has faced this . Event id - 2424Which SharePoint version is it?
I have seen something similar here:
http://blog.ronnypot.nl/?p=288
but it was SBS-related, not FIM-related.
If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer. -
Photoshop CS5 lags, but other programs run fine
I installed the CS5 Creative Suites onto my eMachines E525 latpop. It came with 2 GB of RAM but I upgraded it to 4 GB.
Harddrive is at 165GB free of 220GB.
Processor is Intel Celeron CPU 900 @ 2.20 GHz, 2194Mhz, 1 Core, 1 Logical Processor
All the other programs in the suite run fine. The only problem I'm having is with Photoshop. Whenever I use a tool, it lags. If I use any of the shape tool, as I drag it out, it lags. Same goes for the brush tool and any other tool that I use. Efficiency is at 100% whenever I have a document open, but the tools still drag. Even on a blank 500x500 document at 72 dpi lags.
I've looked through the Optimize Photoshop Perfomance page, and I've done all that I know I can do, and it still lags.
I turned off OpenGL Drawing, Let Photoshop use 2385MB (70%). I've changed it to let it use more, but that doesn't help.
I installed Photoshop, InDesign, Illustrator, Dreamweaver, and Flash Catalyst from the Suite.
I also have Norton 360.
Is Norton causing Photoshop to be slow or is it something else?
Is there anything I can do to fix the lag or do I need to make more upgrades to my laptop?What display interface is in that laptop (e.g., a nVidia model, Intel model, etc.)?
The OpenGL implementation in the video driver can have a drastic effect on the performance. Have you tried the following as a diagnostic?
Edit - Preferences - Performance.
Uncheck [ ] Enable OpenGL Drawing.
Close and restart Photoshop.
If after doing the above you see the lag problem eliminated, you might want to check with your laptop maker (or in rare cases the video interface maker) to see if any updated display drivers have been released. Many OpenGL problems have been corrected in recent driver releases.
Make sure you re-enable OpenGL after changing drivers to see if the highest performance is now available to you.
You could also try keeping OpenGL enabled but going into the [Advanced Settings...] and changing to Basic mode.
-Noel -
Lion won't restart, but Windows 7 runs fine
I recently installed Windows 7 on my macbook pro with bootcamp, and so far it has been working great. As of right now though, i can't boot in to the mac side, only windows. When I try to boot into the mac side it stops at the startup screen with the apple logo and it has the circle of rotating lines under it. It stays there and doesn't go any further. I'm not sure what to do, and need to know a solution asap.
Thanks for the help.Try a safe boot, hold the shift key as soon as you hear the chime (not before), keep it depressed until you see the Apple Logo and the spinning gear. Post back.
-
Hi
For some reason, my application 'portal' does not run on weblogic 6.1 sp2,
It used to run fine on 6.1 sp1 .
I am attaching the weblogic.log file with this msg.
Thanks,
Regards,
Lalitha
[weblogic6.1sp2logs.txt]Tobin is right, my apoplication is called "portal", I am not using WLPortal. Anyway,
I managed to resolve my problem,I had sax2 , xp and xt parsers placed in the WEB-INF\lib
directory of my application in addition to my own jar file. I removed the parsers
, and now my application is running fine.
It is strange though, since my application used to load and work flawlessly on
weblogic 6 as well as weblogic 6.1 sp1 with the parsers in the lib directory....
Anyhow, thanks a lot for the help.
Regards,
Lalitha
"Tobin Paterson" <[email protected]> wrote:
>
Having applied WLS 6.1 sp2 upgrade today I am seeing the same fault.
I am not using
WL Portal. Also I think the original poster's application just happens
to be called
"portal" and is not using WL Portal.
cheers,
Tobin.
"BEA Support" <[email protected]> wrote:
Hello,
Only WLCS and/or WLPS 3.5 sp 2 support WLS 6.1 sp 2
WL Portal 4.0 support only WLS 6.1 sp 1.
Regards,
Developer Relations Engineer
BEA Support
"Lalitha" <[email protected]> a écrit dans le message de news:
[email protected]..
Hi
For some reason, my application 'portal' does not run on weblogic
6.1
sp2,
It used to run fine on 6.1 sp1 .
I am attaching the weblogic.log file with this msg.
Thanks,
Regards,
Lalitha -
Hi,
I am migrating my ejb application from weblogic to oracle 9i application server.What changes are needed to be made in code and what configuration changes are required.
In my application i use a couple of session beans wherin a session bean calls the method of the other session bean which acceses the database.I am using a jdbc thin driver for the database connection. is it possible for a session bean to call a method of another session bean which access the database??This concept works well in weblogic where the current application is running.
The problem is that while migrating the application to the orion server, it gives an OrionCMTException ...
memory leak..etc.
Could any one clarify.
Thanks in advance!!!Hi Avi and Harrison,
Cease Fire avi!!!!.First of all let me clear the issue of posting the same problem twice.Well, when i mentioned the problem the first time , i found the title session bean deployment was not right and few people would look into it as it was a common problem so i thought it would be appropriate if i mentioned the title correctly , so i posted the query again with the change in title.
Now coming to the answer for ur questions.
The platform used is MS Windows NT.
The (OC4J) version is 1.0.2.2.1.
I am not using JDeveloper.
The database is oracle 8i and i am using the thin driver.
The beans to be deployed are stateless session beans.
The client involved is a web client i.e a jsp application.
The first session bean is as follows.
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.sql.Timestamp;
import java.rmi.RemoteException;
import java.util.Date;
import javax.ejb.*;
import javax.naming.*;
import initcontext;
import PrintMessage;
import JB_B2B_ERROR_PARSER;
* @stereotype SessionBean
* @homeInterface DB_UTILITYHome
* @remoteInterface DB_UTILITYRemote
public class DB_UTILITY implements SessionBean
private SessionContext context;
private ResultSet rs = null;
private Statement stmt = null;
private Connection con = null;
private PrintMessage print = null;
public DB_UTILITY()
rs = null;
stmt = null;
con = null;
print = new PrintMessage();
public Connection getConnection()throws RemoteException
InitialContext initctx = null;
Connection con = null;
try
initctx = initcontext.getContext();
javax.sql.DataSource ds =
(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
con = ds.getConnection();
//(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
catch(NamingException namingexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", namingexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("AppError",
"Epool-10001", "DB_UTILITY.getConnection"));
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception),
"DB_UTILITY.getConnection"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("EpoolError",
"Epool10005", "DB_UTILITY.getConnection"));
return con;
public String getDate()throws RemoteException
String Date=null;
try
con=getConnection();
stmt=con.createStatement();
rs=stmt.executeQuery("SELECT
TO_CHAR(SYSDATE,'YYYY-MM-DD HH:MI:SS') FROM DUAL");
while(rs.next())
Date=rs.getString(1);
stmt.close();
con.close();
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception), "DB_UTILITY.getDate"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("epoolError",
"Epool10005", "DB_UTILITY.getDate"));
finally
try
if(con != null && !con.isClosed())
con.close();
catch(Exception exception2)
stmt = null;
con = null;
return Date;
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
Also the xml files are as follows.
web.xml
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- A friendly name for this web application, this name can be used in visual development environments, for instance -->
<display-name>AddressBook Web Application</display-name>
<!-- A human-readable description of this web application -->
<description>Web module that contains an HTML welcome page, and 4 JSP's.</description>
<!-- The file(s) to show when no file is specified, i.e. only the directory is specified. -->
<welcome-file-list>
<welcome-file>B2B_COUNTRY_CODE.jsp</welcome-file>
</welcome-file-list>
<ejb-ref>
<ejb-ref-name>SB_B2B_COUNTRY_CODEHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>SB_B2B_COUNTRY_CODEHome</home
<remote>SB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref></web-app>
Application.xml
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>Country Code</display-name>
<module>
<ejb>epool_CountryCode-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>epool_CountryCode-web.war</web-uri>
<context-root>/epool_CountryCode-web</context-root>
</web>
</module>
</application>
ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<description>epool_CountryCode</description>
<enterprise-beans>
<session>
<display-name>CountryCode Session
Bean</display-name>
<ejb-name>SB_B2B_COUNTRY_CODERemote</ejb-name>
<home>SB_B2B_COUNTRY_CODEHome</home>
<remote>SB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>SB_B2B_COUNTRY_CODE</ejb-class>
<session-type>Stateless</session-type>
<ejb-ref>
<description>EJB Epool DButility</description>
<ejb-ref-name>DB_UTILITYRemote</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
</ejb-ref>
<ejb-ref>
<description>EJB Entity Bean</description>
<ejb-ref-name>EB_B2B_COUNTRY_CODERemote</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref>
</session>
<session>
<display-name>DbUtility Session Bean</display-name>
<ejb-name>DB_UTILITYRemote</ejb-name>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
<ejb-class>DB_UTILITY</ejb-class>
<session-type>Stateless</session-type>
</session>
<entity>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>EB_B2B_COUNTRY_CODE</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>EB_B2B_COUNTRY_CODEPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>country_code_desc</field-name>
</cmp-field>
<cmp-field>
<field-name>phone_format_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_code</field-name>
</cmp-field>
<cmp-field>
<field-name>active_date</field-name>
</cmp-field>
<cmp-field>
<field-name>date_created</field-name>
</cmp-field>
<cmp-field>
<field-name>active_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_phone_code</field-name>
</cmp-field>
<cmp-field>
<field-name>country_tax_percent</field-name>
</cmp-field>
<cmp-field>
<field-name>sort_order</field-name>
</cmp-field>
<cmp-field>
<field-name>date_modified</field-name>
</cmp-field>
<cmp-field>
<field-name>user_created</field-name>
</cmp-field>
<cmp-field>
<field-name>user_modified</field-name>
</cmp-field>
<resource-ref>
<description></description>
<res-ref-name>jdbc/ePool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<security-role>
<description>Users</description>
<role-name>users</role-name>
</security-role>
</assembly-descriptor>
</ejb-jar>
The session bean which uses the above session bean is as follows.
import javax.ejb.SessionContext;
import javax.ejb.SessionBean;
import java.sql.*;
import javax.naming.Context;
import java.sql.Timestamp;
import java.util.Vector;
import initcontext;
import DB_UTILITYHome;
import DB_UTILITYRemote;
import EB_B2B_COUNTRY_CODEHome;
import EB_B2B_COUNTRY_CODERemote;
import EB_B2B_COUNTRY_CODEPK;
* @stereotype SessionBean
* @homeInterface SB_B2B_COUNTRY_CODEHome
* @remoteInterface SB_B2B_COUNTRY_CODERemote
public class SB_B2B_COUNTRY_CODE implements SessionBean
private SessionContext context;
* Sets the context of the bean
* @param context The Bean's Context
public Vector selectCountryCode(String query,String
countquery, String pagenos) throws Exception
Context ctx = initcontext.getContext();
Connection con=null;
Vector records=new Vector();
int pageno=Integer.parseInt(pagenos);
int min=(pageno-1)*10;
int max=pageno*10;
int counter=0;
boolean recordsfound=false;
try
DB_UTILITYHome home =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote remote =
(DB_UTILITYRemote)home.create();
con=remote.getConnection();
Statement stmt = con.createStatement();
ResultSet rscount =
stmt.executeQuery(countquery);
while(rscount.next())
int temp=rscount.getInt(1);
int pagecount=temp;
pagecount=pagecount/10;
if((temp%10)>0)
pagecount=pagecount+1;
records.addElement(""+pagecount);
ResultSet rs = stmt.executeQuery(query);
while(rs.next())
counter++;
if(counter>min && counter<=max)
String row[]=new String[8];
recordsfound=true;
row[0]=rs.getString(1);
row[1]=rs.getString(2);
row[2]=rs.getString(3);
row[3]=rs.getString(4);
row[4]=rs.getString(5);
row[5]=rs.getString(6);
row[6]=rs.getString(7);
row[7]=rs.getString(8);
records.addElement(row);
con.close();
catch(Exception e)
System.out.println("Error in selecting Country
Code "+e);
throw new Exception("Error in selecting Country
Code "+e);
return(records);
public void insertCountryCode(String country_code, String
country_code_desc, String country_phone_code, String
phone_format_flag,String active_flag, String sort_order,String
country_tax_percent)throws Exception
Context ctx = initcontext.getContext();
Double Sort_Order=null;
Double cntry_tax_prct=null;
if(sort_order!=null && sort_order.length()>0)
Sort_Order=new Double(sort_order);
if(country_tax_percent!=null &&
country_tax_percent.length()>0)
cntry_tax_prct=new Double(country_tax_percent);
String user_created=null;
Timestamp date_created=null;
Timestamp active_date=null;
String user_modified=null;
Timestamp date_modified=null;
try
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote =
(DB_UTILITYRemote)dbhome.create();
user_created=dbremote.getUser();
date_created=Timestamp.valueOf(dbremote.getDate());
active_date=date_created;
EB_B2B_COUNTRY_CODEHome home =
(EB_B2B_COUNTRY_CODEHome)ctx.lookup("java:comp/env/EB_B2B_COUNTRY_CODER
emote");
EB_B2B_COUNTRY_CODERemote remote =
(EB_B2B_COUNTRY_CODERemote)home.create(country_code, country_code_desc,
country_phone_code,active_flag, phone_format_flag,user_created,
date_created, active_date, Sort_Order, user_modified,
date_modified,cntry_tax_prct);
catch(Exception e)
System.out.println("Error in Creating COUNTRY
Code "+e);
throw new Exception("Error in Creating COUNTRY
Code "+e);
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
The jsp client which acces the beans is as follows.
<BODY >
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="initcontext" %>
<%@ page import = "java.util.*" %>
<%@ page import="DB_UTILITYHome"%>
<%@ page import="DB_UTILITYRemote"%>
<%@ page import="javax.naming.*"%>
<%Connection con=null; %>
<script src="search_getvalues.js">
</script>
<form name=frm1>
<%! int intCount,intI,intRowCount,intJ;
String strtname=new String();
String strhidden=new String("txthdn");
Statement st;
ResultSet rs;
ResultSetMetaData rmeta;
....%>
<%
try
Context ctx = initcontext.getContext();
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote = (DB_UTILITYRemote)dbhome.create();
con=dbremote.getConnection();
st=con.createStatement();
rs=st.executeQuery(strsqlquery);
rmeta=rs.getMetaData();
intCount=rmeta.getColumnCount();
....... %>
</form>
</BODY>
</HTML>
The resulting exception generated is as follows:
D:\oc4j\j2ee\home>java -jar orion.jar
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... done.
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e\epool_CountryCode-web.war... done.
Auto-deploying epool_CountryCode (New server version detected)...
Auto-deploying epool_CountryCode-ejb.jar (No previous deployment
found)... done.
Error deploying
file:/D:/oc4j/j2ee/home/demo/messagelogger/messagelogger-ejb.jar homes:
No javax.jms.Destination found a
t the specified destination-location (jms/theTopic) for
MessageDrivenBean com.evermind.logger.MessageLogger
Oracle9iAS (1.0.2.2.1) Containers for J2EE initialized
Auto-deploying epool countryCode example (New server version
detected)...
************************1
************************2
COUNT QUERY :SELECT COUNT(COUNTRY_CODE) FROM BAP_COUNTRY_CODE
QUERY :SELECT
COUNTRY_CODE,COUNTRY_CODE_DESC,COUNTRY_PHONE_CODE,PHONE_FORMAT_FLAG,COU
NTRY_TAX_PERCENT ,SORT_ORDER,ACTIVE
FLAG,ACTIVEDATE FROM BAP_COUNTRY_CODE order by COUNTRY_CODE
Error in selecting Country Code java.rmi.RemoteException: Error
(de-)serializing object: com.evermind.sql.OrionCMTConnec
tion; nested exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
JB:Error in selecting country cd java.lang.Exception: Error in
selecting Country Code java.rmi.RemoteException: Error (d
e-)serializing object: com.evermind.sql.OrionCMTConnection; nested
exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
Error in Selecting Records
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked
connection was created)
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... Error unpacking: IO Error:
The system cannot find the path specified
Error updating application epool_CountryCode: Unable to find/read
assembly info for D:\oc4j\j2ee\home\applications\epool_C
ountryCode\build\epool_CountryCode (META-INF/application.xml)
But if the DBUTILITY session bean is changed to a simple bean and accessed the code works fine and i am able to retrieve the data.Is the problem there because u one session bean cannot access a database connection method from another one or could it be because of the driver???
I hope i am clear.Please revert back in case any more references are needed.
Thanks in advance!!!!!! -
Problem with Prepared Statement & MS Access
Hi
I have tried to find some info about this but can't see anything specific to what I think the problem may be. Hopefully someone can point me in the right direction.I am trying to get information out of an MS Access database using a Prepared Statement but I am getting strange results.
When I run the query in the database it gives me the correct totals (�51) for 4 records. When I run the Prepared Statement ,I get 81. Has it got anything to do with the data type I am using( sorry if this is a really basic question). here is my code- the connection etc is elsewhere.
private void getReportMoneyTotal() throws SQLException
Calendar todayTotal =Calendar.getInstance() ;
SimpleDateFormat reportDateFormat = new SimpleDateFormat("dd MM yyyy");
PreparedStatement preparedT =context.getConnection().prepareStatement(
"SELECT Sum(tblSession.Fee) AS Total, Count(tblBooking.BookingID) AS CountOfBookingID FROM tblSession INNER JOIN "+
"(tblBooking INNER JOIN tblCustomer_Booking ON tblBooking.BookingID = tblCustomer_Booking.BookingID) ON tblSession.SessionID = tblBooking.SessionID "+
"WHERE (((tblBooking.EventDate)>DateAdd('m',-1,#"+reportDateFormat.format(todayTotal.getTime())+"#)) AND ((tblSession.Session)='Morning' Or (tblSession.Session)='Evening')) OR (((tblSession.Session)='Afternoon') AND ((tblBooking.Extension)=Yes))"
ResultSet resultTotal =preparedT.executeQuery();
resultTotal.next();
Double total =resultTotal.getDouble("Total");
Locale locale = new Locale("GBP");
NumberFormat gbpFormat = NumberFormat.getCurrencyInstance(locale);
System.out.println(gbpFormat.format(total));
preparedT.close();
}I do realise that my code probably isn't very elegant but I'm only learning!Hi Matt--
I am not clear if you are saving the url with the # # around
the text or if
the
data already contains the # marks.
When you insert a link, you want to make sure you insert is
insert into table ( link1) values ( <cfqueryparam
cfsqltype="cf_sql_varchar"
value='#linkvaluehere#'> )
remember to
1) enclose your data's value inside quotes (some databases
are picky about
single v. double quotes).
2) if it IS in quotes, swap doubles for singles and see if
that helps.
3) make sure your data being saved is NOT double hashed like
'##linkvalueher##'. Double ##'s tell
Coldfusion not to treat it as a variable.
hope his helps,
tami
"Mattastic" <[email protected]> wrote in
message
news:f9c7h0$8ub$[email protected]..
| Hi Folks,
|
| I'm storing a link in a nvarchar field in SQL server,
www.foo.co.uk, it
looks
| and works fine in SQL server. Problem occurs when I setup
an ADP in Access
and
| insert links. Certain links have a hash symbol around them.
so
|
http://www.foo.co.uk, would be #
http://www.foo.co.uk# which is
causing
problems.
|
| Can anyone tell me why this is happening? and how to stop
it?
|
| Thankyou
| -
Weblogic 6.1 sp1 Application Server MDB does not consume messages
I have the following situation:
WebLogic Application Server 6.1 sp1. A deployed mdb does nothing - just sits idle
even when the JMS queue it points to has many messages waiting to be consumed.
When the application server is bounced (i.e., shutdown and restarted), the mdb
starts processing the messages. JMS server has a JDBC backing store.
Any ideas?
Thanks,
PrakashTobin is right, my apoplication is called "portal", I am not using WLPortal. Anyway,
I managed to resolve my problem,I had sax2 , xp and xt parsers placed in the WEB-INF\lib
directory of my application in addition to my own jar file. I removed the parsers
, and now my application is running fine.
It is strange though, since my application used to load and work flawlessly on
weblogic 6 as well as weblogic 6.1 sp1 with the parsers in the lib directory....
Anyhow, thanks a lot for the help.
Regards,
Lalitha
"Tobin Paterson" <[email protected]> wrote:
>
Having applied WLS 6.1 sp2 upgrade today I am seeing the same fault.
I am not using
WL Portal. Also I think the original poster's application just happens
to be called
"portal" and is not using WL Portal.
cheers,
Tobin.
"BEA Support" <[email protected]> wrote:
Hello,
Only WLCS and/or WLPS 3.5 sp 2 support WLS 6.1 sp 2
WL Portal 4.0 support only WLS 6.1 sp 1.
Regards,
Developer Relations Engineer
BEA Support
"Lalitha" <[email protected]> a écrit dans le message de news:
[email protected]..
Hi
For some reason, my application 'portal' does not run on weblogic
6.1
sp2,
It used to run fine on 6.1 sp1 .
I am attaching the weblogic.log file with this msg.
Thanks,
Regards,
Lalitha -
Problems with Prepared Statement
Hi,
I am developing an Java Bean that reads from a database of Entertainments of my home city of Glasgow and displays that info to a text area. I want the User to input the type of Entertainment they want e.g. Bars or Clubs, and the name of the place they want to go and then the Java Bean displays the info of the specified place.
The program works fine if I set the Query to display the data from the database but I want the User to define the query by thier input.
So I used Prepared Statements, but I have error messages saying that
Syntax Error in FROM Clause
my code to query the database is shown below
String query ="SELECT * FROM ? WHERE Name=?";
PreparedStatement PresStatement=con.prepareStatement(query);
//my input to test Database.will change to variable
PreStatement.setString(1,"Pubs");
PreStatement.setString(2,"Admiral");
ResultSet rs=PreStatement.executeQuery();The Problem seems to the placholder after the FROM clause but I can't seem to fix it.
Any Help would be greatly appreciated.
Regards
Brianjust a guess here, but I'd imagine it's because of the way PreparedStatement handles Strings. Obviously, if you're using a String as part of your SQL query, you're going to want single quotes around the entire thing. Thus, the first setString() is probably trying to put single quotes around the table name, which could be causing problems.
You don't really lose anything if you just work around this by changing your code to..
tableName = "Pubs"; //or this is probably coming from your user
String query ="SELECT * FROM "+tableName+" WHERE Name=?";
PreparedStatement PresStatement=con.prepareStatement(query);
//my input to test Database.will change to variable
PreStatement.setString(1,"Admiral");
ResultSet rs=PreStatement.executeQuery(); -
Hi Friends,
Need your help to fix this prolonging problem in one of our applications. We observe that the following queries are declared as prepared statements but have dynamic value ROWID in each.
SELECT ROWID, C. * FROM Table1 C WHERE C.VENDORLOGINID = ? AND C.VENDORTYPE = ? AND (ROWID = _ ROWID100)
SELECT ROWID, C. * FROM Table2 C WHERE C.VENDORIDCH = ? AND (ROWID = _ ROWID114)
SELECT ROWID, C. * FROM Table1 C WHERE C.VENDORLOGINIDBASE = ? AND C.VENDORTYPE = ? AND (ROWID = _ ROWID58)
This results in a FLOOD of prepared statements (over 3000) as it is an application with a very large DB.
We found out that a newer version of Ojdbc14.jar (10.2.0.3.0) is available (At present we are shipping the product with 10.2.0.1.0). We tested with this newer jar and found out bind variables are not treated as dynamic variables with this jar file. SQL queries are getting cached as expected.
This new jar file did fix the problem when our DB was 10g for the application (another), but for this current application we are using Oracle 9i.
The same jar file does not seem to be fixing the issue.
Has anybody faced similar issue before?
Ideally the 10g jar file should eb backward compatible but for some reason it is not for this particular problem.
Please can somebody help to get a solution for this problem. Do let me know if you need more information.
Thanks.Poornima wrote:
Is the prepared statement cache common to all the Connection objects in the Connection Pool or is there a separate cache for each statement in the Connection Pool?There is a separate statement cache for each connection in the pool.
Joe -
Database prepared statements Flooding
Hi Friends,
Need your help to fix this prolonging problem in one of our applications. We observe that the following queries are declared as prepared statements but have dynamic value ROWID in each.
SELECT ROWID, C. * FROM Table1 C WHERE C.VENDORLOGINID = ? AND C.VENDORTYPE = ? AND (ROWID = _ ROWID100)
SELECT ROWID, C. * FROM Table2 C WHERE C.VENDORIDCH = ? AND (ROWID = _ ROWID114)
SELECT ROWID, C. * FROM Table1 C WHERE C.VENDORLOGINIDBASE = ? AND C.VENDORTYPE = ? AND (ROWID = _ ROWID58)
This results in a FLOOD of prepared statements (over 3000) as it is an application with a very large DB.
We found out that a newer version of Ojdbc14.jar (10.2.0.3.0) is available (At present we are shipping the product with 10.2.0.1.0). We tested with this newer jar and found out bind variables are not treated as dynamic variables with this jar file. SQL queries are getting cached as expected.
This new jar file did fix the problem when our DB was 10g for the application (another), but for this current application we are using Oracle 9i.
The same jar file does not seem to be fixing the issue.
Has anybody faced similar issue before?
Ideally the 10g jar file should eb backward compatible but for some reason it is not for this particular problem.
Please can somebody help to get a solution for this problem. Do let me know if you need more information.
Thanks.This thread is old and undiscussed since first post.
Don't understand why but i got some ideas.
1. First of all, i doubt that this is JDBC issue. JDBC PreparedStatement caching has nothing to do with sharability of SQL statements in Oracle.
If this is JDBC issue, what a silly bug it is... But silly things happen quite often :(
2. I think some cursor-related views like V$SQL_SHARED_CURSOR, V$SQL and V$SQLAREA should be investigated. The notorious bind mismatch can cause unwanted unshareable SQL statements which look exactly same each other. -
Escape Characters - simulate the setString from Prepared Statements
I would like to see what the value of setString() is for a given prepared statement call.
Because of reasons that would take me to long to explain that I cannot use preparedstatements with their parameters - I need a way to execute a query like the following:
String query = "insert into blahtable (somestring) values (\"asdfds\'\s sdsfdasfd \"\& ...\");
PreparedStatement stmt = connection.prepareStatement(query);
I know prepared statements can take care of this, but I want to know and write the query as above without the need of prepared statements help for string.
Below is an example with prepared statement - but not what I want to do
For example:
String oddstringwithunusalcharacters = "...";
String query = "insert into blahtable (somestring) values (?)";
PreparedStatement stmt = connection.prepareStatement(query);
stmt.setString(1, oddstringwithunusalcharacters);
I would like to see what the actual query looks like and what the actual string was passed:
--> insert into blahtable (something) values ("asdfds\'\s sdsfdasfd \"\& .... ")
It is not sufficient enough for me to escape quotes and apostrophes because there maybe other unusual characters that I do not know of since the string is passed by an unknown source.
Thank you in advancePreparedStatements actually doesn't escape quotes. It basically precompiles statements in the DB and only passes the values to the DB.
But if you're using a plain vanilla SQL statement where you quote the string with a single quote ' then you need to escape all occurrences of exactly the same single quote ' in the actual String value. If you for example quote the string with an apostrophe ` then you just need to escape all occurrences of exactly the same apostrophe ` in the actual String value. And so on. It is nothing more than logical, is it?
Maybe you are looking for
-
How to change the width of a switch control?
If I set long on&off texts, they can't be fully displayed. How to change the width of this sap.m.switch control? P.S., "width" attribute doesn't work here.
-
Why are the fonts so ugly?
When I'm using the Adobe Acrobat Reader plugin (10.1.8.24) in Firefox (25.0.1 in this case) I'm getting terriby ugly fonts from domcuments I'm invoking from sites. In MSIE 11.0.9600 the fonts look fine and anti-aliased. Not so in FF. Example (ugly ca
-
Songs arent showing on ipod but are on computer
Ive recently synced my ipod & ripped 6 cd's which was fine! The next time i ripped 10 cd's & these dont show on my ipod but they are showing up on my computer! How do i get them from my computer to my ipod?
-
Bridge CS5 Windows not showing folders with "Move to" command?
Hi, folks. I have a bunch of files on an external, USB-attached drive. When I right-click on an image in Bridge and select the "Move to" command, Bridge only gives me the option of selecting a folder that's on my Desktop (specifically, only my usern
-
Please help! i cant do any of the QuickTime player 7 pro functions yet it accepted my registration