Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

sonali rao

Ranch Hand
+ Follow
since Nov 03, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sonali rao

Hi
I want to check the jdbc connection using weblogic 7.0 and Oracle 9.0.1.
To verify this I wrote the following program.
import java.sql.*;
public class TestOracle
{
public static void main(String args[])throws SQLException
{
try
{
Class.forName("weblogic.jdbc.oci.Driver");
String url = "jdbc:weblogic racle racledb";
Connection con = DriverManager.getConnection(url,"scott", "tiger");
con.close();
}catch(Exception e){ System.out.println(e); }
}
}
I get the following run time error:
java.lang.ClassNotFoundException: weblogic.jdbc.oci.Driver
I am using windows XP and have set the following in Environment->System Variables.
CLASSPATH settings in system variable
C:\oracle\ora90\jdbc\lib\classes12.zip;C:\bea\weblogic700\server\lib\weblogic_sp.jar;C:\bea\weblogic700\server\lib\weblogic.jar;
PATH settings in system variable
C:\bea\weblogic700\server\bin\oci901_8;C:\j2sdk1.4.0_03\bin;C:\oracle\ora90\bin;
JAVA_HOME: C:\j2sdk1.4.0_03
Please let me know what has gone wrong.
16 years ago
Hi
can anyone plz., explain how can i connect to oracle9.0.1 database thru weblogic7.0 and EJB using a Oracle oci driver...plz., let me know if my classpath and path settings are correct. I checked TNSNAMES.ORA and LISTENER.ORA they seemed to be fine.
My SQL Plus runs fine.
When i give utils.dbping command I get the following error
LOGIN ERROR CODE:24327
java.sql.SQLException: ORA-24327: need explicit attach before authenticating a user - (SCOTT/*********@oracledb)
I am using windows XP
CLASSPATH settings in system variable
C:\oracle\ora90\jdbc\lib\classes12.zip;C:\bea\weblogic700\server\lib\weblogic_sp.jar;C:\bea\weblogic700\server\lib\weblogic.jar;
PATH settings in system variable
C:\bea\weblogic700\server\bin\oci901_8;C:\oracle\ora90\bin;
I have been trying to overcome this error since 1 week. I am a beginner and trying to learn weblogic. I dont know much about oracle too.
Thanks in advance
16 years ago
Hi
I am trying to implement the example given in the 1st chap of HF EJB book.
I compiled the Advice.java & AdviceBean.java successfully.
I am unable to compile AdviceHome.java. I get the following error.

Cannot resolve symbol
Symbol: class Advice
location: public Advice create() throws CreateException, RemoteException
The problem is it is unable to recognise Interface Advice though all the interfaces and classes are present in the same directory. I am using windows xp and trying to compile from MS-DOS prompt.
I tried all sorts of things like putting the dir which contains the classes in the classpath etc but it dint work out
Please let me know how to correct this problem.
Hi
I am using weblogic 7.0 for the first time. My OS is windows XP.
I am trying to establish a connection pool using Oracle 9.0.1 database and weblogic jdriver for oracle on a standalone machine.
I get the following error
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: ORA-24327: need explicit attach before authenticating a user - (SCOTT/********@@22.17.19.227:1521 racledb)
I am not sure of how to make and what entries to make in LISTENER.ORA and TNSNAMES.ORA.
It would be nice if somebody can show me the above files so that i will get an idea of how to make the entries.
Also let me know how to get over this error.
Thank you.
16 years ago
I tried placing struts.jar in the classpath but i still get the same error.
16 years ago
Hi
When I try to compile the Action class I get the following error.
package org.apache.struts.action does not exist
I have struts.jar in the lib dir. I do not have struts.jar set in the classpath.
Please let me know how can i rectify this error.
16 years ago
Hi
I am using textpad to compile my java programs.
They compile successfully but the .class file is not created.
If i try compiling the same java program from DOS prompt then the .class file is created.
Why am i having problem using java with textpad?
Please let me know.
16 years ago
Hi
I am using textpad to compile my java programs.
They compile successfully but the .class file is not created.
If i try compiling the same java program from DOS prompt then the .class file is created.
Why am i having problem using java with textpad?
Please let me know.
Yes LoginAction compiles and the class is in
WEB-INF/classes/coreappl/LoginAction.
16 years ago
Hi again
I am trying since 2 days to get rid of the ClassNotFoundException and implemented the advice which i got from a couple of people in this site but that dint solve my problem.
I have struts.jar placed in lib dir and not in classpath.
I am able to run successfully the examples which i get with struts documentation. does this mean that my classpath is set correctly and something is going wrong with the code in my application.
Following is the code of the appl which i am trying to run.
following is the partial code of web.xml
<web-app>
<display-name>Struts Blank Application</display-name>

<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
following is the code of struts-config.xml
<struts-config>
<action-mappings>
<action path="/register"
type="coreappl.LoginAction">
<forward name="success"
path="/result.jsp"/>
</action>
</action-mappings>
</struts-config>
following is the code of LoginAction.java
package coreappl;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class LoginAction extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return(mapping.findForward("success"));
}
}

following is the code of Login.jsp
<!DOCTYPE ...>
<HTML>
<HEAD><TITLE>New Account Registration</TITLE></HEAD>
<BODY BGCOLOR="#FDF5E6">
<CENTER>
<H1>New Account Registration</H1>
<FORM ACTION="register.do" METHOD="POST">
Email address: <INPUT TYPE="TEXT" NAME="email"><BR>

<INPUT TYPE="SUBMIT" VALUE="Sign Me Up!">
</FORM>
</CENTER>
</BODY></HTML>

following is the code of result.jsp
<html>
<head> </head>
<body>
<h1> Login Successful </h1>
</body>
</html>
I get the following error in tomcat
No action instance for path /register could be created
java.lang.ClassNotFoundException: coreappl.LoginAction
16 years ago
I modified my classpath by removing struts.jar and WEB-INF/classes from the classpath but it dint solve my problem. I still get the ClassNotFoundException.
16 years ago
Hi

Does a action class which extends Action belong to the category of Controller component in MVC architecture
OR is it considered as a Helper class which belongs to the Model component of MVC architecture.
16 years ago
To
Roger Garner
What you have said is incorrect.
struts-config.xml structure is something like this.
<action path="" type="">
<forward name="" path="" />
</action> ----->action tag ends here.
Anyways i am still stuck with my ClassNotFoundException. any idea?
16 years ago
Hi
Please go through my source code and let me know the what has gone wrong.
Following is struts-config.xml
<struts-config>
<action-mappings>
<action path="/register1"
type="coreservlets.RegisterAction1"
>
<forward name="success"
path="/result1.jsp"/>

</action>
</action-mappings>
<message-resources parameter="resources.application"
null="false"/>
</struts-config>

Following is register1.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<HTML>
<HEAD><TITLE>New Account Registration</TITLE></HEAD>
<BODY BGCOLOR="#FDF5E6">
<CENTER>
<H1>New Account Registration</H1>
<form action="register1.do" method="POST">
<bean:message key="form.email"/>
<input type="text" name="email"/><BR>
<bean:message key="form.password"/>
<input type="password" name="password"/><BR>
<input type="submit" value="Signup" />
</form>
</CENTER>
</BODY></HTML>
Following is RegisterAction1.java [ I kept it under classes/coreservlets dir]
package coreservlets;
import javax.servlet.http.*;
import org.apache.struts.action.*;

public class RegisterAction1 extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

return(mapping.findForward("success"));
}
}
Following is result1.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<HTML>
<HEAD><TITLE>Success</TITLE></HEAD>
<BODY BGCOLOR="#FDF5E6">
<CENTER>
<H1><bean:message key="form.register.successful"/></H1>
(Version 1)
</CENTER>
</BODY></HTML>
Following is what i set in the classpath.
.;C:\jakarta-tomcat-4.1.29\common\lib\servlet.jar;C:\jakarta-tomcat-4.1.29\webapps\myproject\WEB-INF\classes;C:\jakarta-struts-1.1\lib\struts.jar
I have struts.jar present in lib dir also.
I am getting the following error in the tomcat server.
No action instance for path /register1 could be created.
java.lang.ClassNotFoundException: coreservlets.RegisterAction1
I get the following message in the browser.
The server encountered an internal error (No action instance for path /register1 could be created) that prevented it from fulfilling this request.
[ March 30, 2004: Message edited by: sonali rao ]
[ March 30, 2004: Message edited by: sonali rao ]
16 years ago
Hi
I am SCJP, SCWCD and SCBCD. Masters Degree and 2 yrs of work exp on java web based appl. Have a good knowledge of Java, JSP, Servlets, Ant, DB2, Tomcat, HTML ,XML, EJB & Struts framework.
I have a work permit and do not require sponsorship.
I am ready to volunteer or take up a job in philadelphia, New Jersey or New York city. Available immediately.
Anybody who think I fit in their requirements can mail me at sukrutarao@yahoo.com.
Thank you.
[ March 22, 2004: Message edited by: sonali rao ]
16 years ago