Queries related to Oracle 9i Application server
I have some queries related to JDBC and oracle 9i Applcation
server.
1. Does JDBC Driver supporting VAX/VMS comes with the Oracle 9i
App
Server?
2. What JDBC Driver is supported for Oracle 9i Application
Server?
3. Is the JDBC Driver Platform Independent?
4. Can we separate OC4J Servlet engine(Web Container) from
Oracle 9i Application
server and put it on a different machine?
5. What other Servlet engine is compatible with Oracle 9i
Application server?
and finally ...
we are developing application with Oracle database in Sun
Solaris 2.8 OS
and after development we have planned to change the oracle
database to
VAX/VMS OS , Will there be any deployment issue because of OS
inconsistency.
Please reply me asap.It will be greatful to you.We are looking
for answers for a very long time.
Thanks
Anand
Dillip,
You can find some documentation (EJB/Servlet Developers Guide) at http://otn.oracle.com/tech/java/oc4j/content.html. We will be posting Oc4J users guide and services guide very soon.
regards
Debu Panda
Oracle
Similar Messages
-
Deployment of class file in oracle 10g Application Server
Hi,
I have a class file
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType ("text/html");
PrintWriter out = res.getWriter();
out.println("<HTML>");
out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
out.println("<BODY>");
out.println("<BIG>Hello World</BIG>");
out.println("</BODY></HTML>");
now I like to deploy(in oracle 10g Application Server) and run this file.
please help me.Hi
You have to deploy Servlet as a WAR File. I hope you already have web.xml file which u can get automatically in eclsipse during creation of servelet. I am not sure what ide u r using here. If u have created servlet in eclipse then I would suggest create a project dynamic webproject if u have not where IDE create all required files autmatiicaly and even you can deploy application from there itself.
If you wanted to deploy manually then follow below steps (if u have war file)
I am assuming you already created a Weblogic Domain and have admin username/password. Start your domain. Login into weblogic console like http://host:port/console and use admin username/password. Then from Deployments section, deploy the above WAR file. In Weblogic you can deploy JAR (EJBs, java files), WAR (web jsp, html, webservices, servlets) or EAR (JAR + WAR). In your case its just a WAR file.
Thanks
Sujit Singh -
Error while installing Oracle 9i Application server
Hi All,
I am trying to install oracle 9i Application Server 9.0.2.0.0 Enterprise Edition on Windows 2000.
The installation gets stuck up after 40 percent , while trying to copy a file named 'PGPUS.MSB' .
There is no update in the Install Actions Log File also.
While I tried to install oracle 9i Application Server 1.0.2.1.0 for Windows NT and Windows 2000, installation goes OK till 100 percent, after which it encounters Errors in JRE.Exe
Pls help ! Its urgent
thanks in advance
rgds..
SubhasApp Server forum is here:
Oracle Application Server - General (<=== repost question there -
Urgent: problem running reports in Oracle 10g application server
Hi all,
our problem is that we deployed a jsp report as Ear file in Oracle 10g application server in infrastructure node.deployment says successfull.when we try to run that report it says 401 unauthorised.while sending request we are passing the database username,password &sid is this correct or any configuration setting to be done to make it run.
one morething normal jsp works fine.when we run reports jsp it gives the above mentioned 401 error.hello,
when you deploy reports JSPs they still require the reports specific componentes (e.g. TLD file, classes, ...) etc be available. i doubt that's the case in your ear file.
thanks,
ph. -
In Oracle 9 Application Server can we create multiple instances???
Hi I need one help this is regarding to the oracle 9 application server in this can we create the multiple instances??
my application was already developed and currently it is working with one instance for this i need to create the another one more instance which is same as existing and my application is web application developed in Forms6i and the db is oracle 9i my requirement is to create one more instance what are all the configuration files need to be modified and please give this info ASAP....It is still not very clear. What do you mean by creating "one more instance of the same application in the same application server"? By "application" do you mean another instance of OC4J in same Application Server Instance? If yes, you can do that. I mean you can create another OC4J component in same Application Server Instance without doing another installation. Refer this for details:
http://download.oracle.com/docs/cd/A97329_03/core.902/a92171/config.htm#1010793
If you are looking to create another Application Server Instance out of same installation/binaries (i.e. Oracle Home) than the answer is no. You can not create multiple Application Server Instances out of one Oracle Home. You will have to do another installation in a different Oracle Home and that's how you will get another Application Server Instance.
Hope this helps.
Thanks
Shail -
Installation of Oracle 10g Application Server in custom port or 1522
I want to install Oracle 10g Application Server in Port 1522 or some other port as in port 1521 Oracle 10g database server is already installed.
But every time I try to install Oracle 10g Application Server it give the warning about 1521 port and then start installing on same 1521 port automatically.
What should I do if I want to install in some other port ?
Please help
ThanxAs a method, to install an OAS on a custom port,
1) make a file called staticports.ini and define your components/ports there.
2) on the Specify Port Configuration Options screen, select Manual and specify this file.
Follow this link for details for 10g.
http://download.oracle.com/docs/cd/B14099_19/win.1012/install.1012/install/reqs.htm#CHDJACIG
However, there are ways to use the same port for OAS and DB depending upon the version of your listener. Check the version of your DB Listener, and if it is 10.1.0.2 or higher then you are just good to go with automatic port assignments.
AMN -
Oracle 9i Application Server+Oracle 8i EE+ Forms on the web Very urgent
Hi,
I have correctly install Oracle 9i Application Server and Oracle 8i Entreprise Edition on Windows 2000. What are the following steps to follow in order to run a form on the web. example: test.fmx?
Thanks in advance.
nullIf your web server is working and the forms server is running type:
http://ip addr:port/dev60html/runform.htm
You need to put the ip address or name of your server in and the port number apache is running on (leave blank if this is 80).
This gives you the Oracle Forms start screen.
cheers
tony -
Deploying Oracle Retail Applications in Oracle 10g Application Server
Hi All..
Can anyone help me to know:
How to Deploy Oracle Retail Applications(like RMS,ReIM,RIB) in Oracle 10g Application Server.
Regards.Hi Ahmed,
It sounds you have not yet had the chance to lay eyes on the installation guides - they are not perfect but should point you in the right direction.
Please start at http://www.oracle.com/technetwork/documentation/oracle-retail-100266.html and check out the install guide per application module.
Best regards,
Erik -
Auditing in oracle 10g database and oracle 10g application server
Dear friends,
We have oracle 10g application server and oracle 10g database server in place.My criteria is to audit users connected using oracle application user credentials to the database.
Can you please tell me how can i do it.
Thanks & regards,Its the database connection you want to track. The session audit will show where it came from.
Auditing is turned using this command:
alter system set audit_trail = DB scope=spfile;
Note: The use of spfile will require a DB bounce before audit starts
To audit Sessions:
audit create session;
Query by Audit Type:
SELECT A.USERNAME,
OS_USERNAME,
A.TIMESTAMP,
A.RETURNCODE,
TERMINAL,
USERHOST
FROM DBA_AUDIT_SESSION A
WHERE USERHOST = <replace with iAS servername> ;
By User
SELECT USERNAME,OBJ_NAME,ACTION_NAME , TIMESTAMP
FROM DBA_AUDIT_TRAIL WHERE USERNAME = 'SCOTT';
Check for users sharing database accounts
select count(distinct(terminal)),username
from dba_audit_session
having count(distinct(terminal))>1
group by username;
Attempts to access the database at unusual hours
SELECT username, terminal, action_name, returncode,
TO_CHAR (TIMESTAMP, 'DD-MON-YYYY HH24:MI:SS'),
TO_CHAR (logoff_time, 'DD-MON-YYYY HH24:MI:SS')
FROM dba_audit_session
WHERE TO_DATE (TO_CHAR (TIMESTAMP, 'HH24:MI:SS'), 'HH24:MI:SS') <
TO_DATE ('08:00:00', 'HH24:MI:SS')
OR TO_DATE (TO_CHAR (TIMESTAMP, 'HH24:MI:SS'), 'HH24:MI:SS') >
TO_DATE ('19:30:00', 'HH24:MI:SS');
Attempts to access the database with non-existent users
SELECT username, terminal, TO_CHAR (TIMESTAMP, 'DD-MON-YYYY HH24:MI:SS')
FROM dba_audit_session
WHERE returncode <> 0
AND NOT EXISTS (SELECT 'x'
FROM dba_users
WHERE dba_users.username = dba_audit_session.username);
Other audits you might consider:
audit grant any object privilege;
audit alter user;
audit create user;
audit drop user;
audit drop tablespace;
audit grant any role;
audit grant any privilege;
audit alter system;
audit alter session;
audit delete on AUD$ by access;
audit insert on AUD$ by access;
audit update on AUD$ by access;
audit delete table;
audit create tablespace;
audit alter database;
audit create role;
audit create table;
audit alter any procedure;
audit create view;
audit drop any procedure;
audit drop profile;
audit alter profile;
audit alter any table;
audit create public database link;
Best Regards
mseberg -
Setting of ICONS in Oracle 10G Application Server
Hi...
I'm facing a problem of Icons which are not displayed at run time.
I'm using Oracle 10G Application Server.
plz tell what setting should i do.
its urgent.
Thanks & Regards
Sanjeev Kumar1 did u put the icon file in the forms folder in IAS?
2 Are you able to access the icon if u directly enter the icon value ?
http://www.Alexyscorp.com/myicon.gif
if its not port 80 enter the port
3 In the httpd.conf file whats the root directory ? Try putting the icon there
Best Regards
Rajesh Alex
Message was edited by: Rajesh Alex
Alex(AlexysCorp) -
Deploying Forms with Forms6i/Oracle Internet Application Server 8i - need help!
Hi Gurus!
I am trying to setup the Oracle Internet Application Server 8i (Release 1.0)and deploy the forms to the web. The server is on Solaris. I have installed and configured the application server. I used the 'runform.htm'and 'test.fmx' to test the installation of the application server on the Server machine. In that case it works fine and shows the message 'Application Server is up and running'. Where as if I tried to access the same 'runform.htm'and 'test.fmx' from another client machines through a web browser it is not executing the 'test.fmx' and throws the following error:
" FRM-92060:Failed to connect to the Server. Bad machine specification:'hostname':9001"
Details...
oracle.forms.engine.RunformException:FRM-92060: Failed to connect to the Server.
I am using the default port#9001 to run the Forms server (i tried using another port and i got the same error). The web server is listnening on the port 7777.
I am not sure what needs to be fixed. Can someone please through some light on this?
Thanks!
nullThe Oracle 8i jvm component (formerly known as JSERVER) was designed to support server side java.
This component was initially developed and included in the Oracle 8i rdbms 8.1.5.
Enhancements continued to be implemented with the 8.1.6 and 8.1.7 releases
IAS uses the same oracle 8i JVM from the rdbms to support java code on the middle tier.
Here's how the IAS version and the RDBMS version match up on the Oracle 8i jvm's features.
RDBMS 8.1.6 with IAS 1.0.0 (unix) / 1.0.1(NT)
RDBMS 8.1.7 with IAS 1.0.2 (new name IAS 9i)
8.1.6 / IAS 1.0.0 / IAS 1.0.1 supports :
session EJB's(1.0 spec), corba objects and java stored procedures
8.1.7 / IAS 1.0.2 (aka IAS 9i) supports :
The 8.1.7 implementation will support the 8.1.6 features listed above plus the ejb 1.1 spec (entity ejb's -- see below), servlets and java server pages.
note : in another thread Mr. Devin clarified the current status of the EJB 1.1 spec (entity beans)in the 8.1.7 solaris release and the future win nt release.
If I remember correctly, Mr. Devin reported a last minute issue has delayed the support for the entity bean feature but ejb spec 1.0 / 1.1 session beans are in place.
When the entity bean issue is resolved, a software patch needed to support the entity bean feature will be provided in a rdbms patch.
for additional technical info, please review :
http://otn.oracle.com/products/oracle8i/pdf/8iR3_nfs.pdf
http://otn.oracle.com/products/ias/listing.htm#tech
i hope this helps ... -
Oracle 9i Application server installation problem(MSG:Fully qualified domain name)
I have installed Oracle 9i database.Now downloaded application server 9iAs,when i am installing I have got this error message(J2ee and web cache)
Message begin
Installation has detected that a fully qualified hostname has not been specified for this host.Oracle 9i application server requires a default domain name to be specified for each host where it is installed .Please consult your OS instructions for details on assigning a default domain name If u are not using DNS server then the file d:\windows\system32\drivers\etc hostsmust also include a line of a form
<IP_ADDRESS><FULLY_QUALIFIED_HOST_NAME><ALIESES>
Message End
Could some one suggest the procedure to follow.
Pl ,mailme to [email protected]
I appriciate your help
Tahnq
RaviSearch this forum for answers and discussions.
Basically, your machine will need a "fully qualified hostname" e.g. myhostname.mydomain.com, only myhostname is not enough.
Also, AS does not allow the IP to change after install e.g. no DHCP (dynamically allocated IP) allowed!
Hth,
Fredrik -
Oracle 9i Application Server installtion problem
hi,
I am instsalling Oracle 9i Application server 9.0.2 on Red Hat Linux 8.0 During installation , While
creating clone database i am getting an error
Create Controlfile failed.
After this when i open the file cloneDBcreation.log
in /home/admin/iasdb/create directory there i
can see the following error
Create control file failed
Error opening password file "/home/oracle/dbs/orapw"
Unable to obtained file status
Linux error 2 : no such file or directory.
moreover when i open the file customScripts.log in same directory i can see the message
Unable to open file "/home/oracle/assistants/dbca/admin/autoExtend.sql"
and there is no such file autoExtend.sql
after this i ignore all the errors of clone database creation and continued the installation.
Now while starting up the database i received an error
ora 7212 : sltln : Environment variable can not be
evaluated.
slcpu : times error,unable to get CPU time.
Pl help me. How should i proceed.
Thanks.
RajIf you are installing into Windows 2000, one workaround recommendation by Oracle for this problem is:
Install the latest Windows* 2000 Service Pack patch: http://www.microsoft.com/windows2000/downloads/
Create a temporary directory on your Intel Pentium® 4 processor server (e.g. \TEMP).
Copy the contents of the Oracle* Server CD to the temporary directory created in step 2.
Search the directory structure created in step 2 for the existence of the filename SYMCJIT.DLL.
Rename each copy of the SYMCJIT.DLL to SYMCJIT.OLD.
Run the SETUP.EXE from the \TEMP\install\win32 directory and install Oracle 8.1.x.
If you have any other questions on this work around, please contact Oracle. -
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!!!!!! -
Can i use oracle 8i for oracle 9ias application server for developijsp applicationes?
hi,
can i use oracle 8i database for oracle 9ias application server for developing jsp applicationes?
can any one give suggetion?
jpullareddyIf you are using OLite, you should use the OLite .NET provider:
http://download-west.oracle.com/docs/cd/B14156_01/doc/B13788/html/toc.htm
Look at Chapter 6 and 11, which cover ADO.NET data access.
Maybe you are looking for
-
E72- Unable to send e-mail from work mailbox
I am unable to send e-mails from my work e-mail through my E72 although it receives perfectly. I have been in contact with Nokia via e-mail for the last 2 weeks and they have sent several suggestions to solve the issue but nothing is working. I have
-
Stuck on grey screen screen at start up...apparent Qmaster bug.
So I found what appears to be a bug. At least for me...and at least in 10.6. Not sure if this effects other OS versions. I was having an issue with start up getting stuck on grey screen. Symptom is eventually start-up circle segments would stop spinn
-
Hello, 1) In order to set Data protection mode, do I need to set anything on standby? 2) My database is in Maximum Performance mode. I set up following entry on init.ora: LOG_ARCHIVE_DEST_2='service=standby LGWR ASYNC'. I want to change data guard pr
-
I need to uninstall Logic Pro 9 from my Macbook Pro. Heard it was difficult to do, What's involved in the process??
-
Import from Excel - Lookup column
Hi all, I would like to import an Excel spreadsheet to SharePoint list. One column in that spreadsheet should be lookup column which points to a column in another list in SharePoint. How could I do it? Thanks,