shelly sharma

Ranch Hand
+ Follow
since Sep 17, 2003
Merit badge: grant badges
For More
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 shelly sharma

Hi,

Can anybody give me the links of tutorial for 'sun certified java programmer' in pdf format.
I had made a jsp document for deletion of department info. from the data base.But when i load this file on the server(tomcat), error is coming as given below. Here is the jsp file:
<HTML>
<HEAD>
<TITLE> Deletion of department info </TITLE>
</HEAD>
<BODY bgcolor=Whitesmoke>
<%@ page import="java.sql.*"%>
<%! int depID;%>
<!-- insert the heading-->
<TABLE WIDTH="100%" BORDER ="0" BGCOLOR="Blue">
<TR ALIGN="center">
<TD><FONT SIZE="6" COLOR="YELLOW">DELETION OF DEPARTMENT DETAILS</FONT></TD>
</TR>
</TABLE>
<CENTER>
<FONT SIZE="5" COLOR="NAVY">
Enter the DepartmentId :
</FONT>
</CENTER>
<TABLE WIDTH="100%" >
<TR>
<TD WIDTH="40%" VALIGN="right">Department ID:</TD>
<TD WIDTH="60%" VALIGN="right">
<INPUT TYPE="text" NAME="departmentid" VALUE="">
</TD>
</TR>
<TR>
<TD WIDTH="40%" VALIGN=RIGHT>
<INPUT TYPE="submit" NAME="btnSubmit" VALUE="Delete ">

</TD>
</TR>


<%
depID=Integer.valueOf(request.getParameter("departmentid")).intValue();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection conn=DriverManager.getConnection("jdbc dbc:employee1","","");
Statement st=conn.createStatement();
st.executeUpdate("delete from department where DEPARTMENTID=" + depID);
st.close();
conn.close();
%>
</TABLE>
</BODY>
</HTML>

The error coming is as follows:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: null
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

root cause
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:436)
at java.lang.Integer.valueOf(Integer.java:574)
at org.apache.jsp.Deptdel_jsp._jspService(Deptdel_jsp.java:80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
--------------------------------------------------------------------------------
Apache Tomcat/4.1.27
20 years ago
JSP
I am trying to update the table emp_details. I had written a html form for
taking the input from the user, a jsp file for forwarding the request to a bean and a bean for updating a record of the emp_details table. When i test them in the server no error is coming. But the database is not updating.Here is the bean . Is the sql query written for updation is not correct.If yes then how should i write this query.
package bean;
import java.sql.*;
public class EmployeeInfoBean{
private String employeename,temporaryaddress,permanentaddress,emailaddress;
private int employeeno,departmentid,designationid,telephoneno,skillsetid;

public void setEmployeename(String input)
{
employeename=input;
}
public String getEmployeename()
{
return employeename;
}
public void setTemporaryaddress(String input)
{
temporaryaddress=input;
}
public String getTemporaryaddress()
{
return temporaryaddress;
}
public void setPermanentaddress(String input)
{
permanentaddress=input;
}
public String getPermanentaddress()
{
return permanentaddress;
}
public void setEmailaddress(String input)
{
emailaddress=input;
}
public String getEmailaddress()
{
return emailaddress;
}
public void setTelephoneno(int input)
{
telephoneno=input;
}
public int getTelephoneno()
{
return telephoneno;
}
public void setEmployeeno(int input)
{
employeeno=input;
}
public int getEmployeeno()
{
return employeeno;
}
public void setDepartmentid(int input)
{
departmentid=input;
}
public int getDepartmentid()
{
return departmentid;
}
public void setDesignationid(int input)
{
designationid=input;
}
public int getDesignationid()
{
return designationid;
}
public void setSkillsetid(int input)
{
skillsetid=input;
}
public int getSkillsetid()
{
return skillsetid;
}
public void updateDatabase(){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection conn=
DriverManager.getConnection("jdbc dbc:employee1","","");
String sql ="UPDATE emp_details SET" + "employeename=?,temporaryaddress=?, permanentaddress=?,emailaddress=?, telephoneno=?, departmentid=?, designationid=?, skillsetid=? where employeeno=?";

PreparedStatement statement=conn.prepareStatement(sql);
statement.setInt(1, employeeno);
statement.setString(2, employeename);
statement.setString(3, temporaryaddress);
statement.setString(4, permanentaddress);
statement.setInt(5, telephoneno);
statement.setString(6, emailaddress);
statement.setInt(7, skillsetid);
statement.setInt(8, departmentid);
statement.setInt(9, designationid);


statement.executeQuery();

}
catch (Exception e){}
}
}
I had used the message signature as follows in the portfolio.java file:
public static Element[] portfolio(Vector xmlDocument) throws Exception
{
Document requestMessage =
((Element)xmlDocument.get(0)).getOwnerDocument();
Document responseMessage = (Document)requestMessage.cloneNode(true);
Element[] result = new Element[1];
result[0] = portfolio(requestMessage.getDocumentElement(),
responseMessage.getDocumentElement());
return result;
}
Is there any mistake in the syntax of the message signature.
20 years ago
I had compiled a portfolio web service. It is also deployed.But when i tried to test that service then the following error is coming:
Fault - ; nested exception is:
org.apache.axis.InternalException: java.lang.Exception: Method 'portfolio' does not match any of the valid signatures for message-style service methods
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.InternalException: java.lang.Exception: Method 'portfolio' does not match any of the valid signatures for message-style service methods
faultActor:
faultNode:
faultDetail:
can anybody could tell me that how can i correct this problem.
20 years ago
I am trying to register a business at IBM test registry.
For that i had compiled the RegisterBusiness.java file.Now when i tried to run the RegisterBusiness file to register a business the following error is coming.How can i correct this error so that i can register a business
C:\Beginning_JWS_Examples\Chp07\Register\classes>java com.wrox.jws.stockquote.RegisterBusiness
com.wrox.iws.stockquote.Register: Starting...
Getting authorization tokens...
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/AxisFault
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.uddi4j.transport.TransportFactory.getTransport(TransportFactory.java:59)
at org.uddi4j.client.UDDIProxy.send(UDDIProxy.java:1790)
at org.uddi4j.client.UDDIProxy.get_authToken(UDDIProxy.java:1469)
at com.wrox.jws.stockquote.RegisterBusiness.main(RegisterBusiness.java:62)
20 years ago
I am using tomcat 4.0,axis-1_1,IBM's ETTK(formerly wstk), j2sdk1.4.2 with net beans.I had put the files uddi4j.jar, xmlParserAPIs.jar in the classpath. And since i am using j2sdk1.4.2 i think i don't have to put ibmjsse.jar in the classpath. But after compiling RegisterBusiness.java file for registering a business, the following error is coming:
com\wrox\jws\stockquote\RegisterBusiness.java:35: package com.ibm.jsse does not exist
java.security.Security.addProvider(new com.ibm.jsse.JSSEProvider());
^
Note: com\wrox\jws\stockquote\RegisterBusiness.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
1 error
Even after this error i had put ibmjsse.jar in the classpath but still the same error is coming.How can i correct this error.
20 years ago
hi Jean,
Thanks for you suggestion. I did as you said and now my problem is solved.
20 years ago
I am using tomcat and axis . When i tried to run a example from samples i got the following error. How can it be corrected.
C:\axis-1_1>java org.apache.axis.client.AdminClient -lhttp://localhost:8010/axis
/services/AdminService samples/stock/deploy.wsdd
Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at org.apache.axis.utils.XMLUtils.getDOMFactory(XMLUtils.java:230)
at org.apache.axis.utils.XMLUtils.<clinit>(XMLUtils.java:110)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvid
er.java:209)
at org.apache.axis.AxisEngine.init(AxisEngine.java:187)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:172)
at org.apache.axis.client.AxisClient.<init>(AxisClient.java:88)
at org.apache.axis.client.Service.getAxisClient(Service.java:143)
at org.apache.axis.client.Service.<init>(Service.java:152)
at org.apache.axis.client.AdminClient.<init>(AdminClient.java:157)
at org.apache.axis.client.AdminClient.main(AdminClient.java:375)
20 years ago
Thanks for your reply. But can you tell me how can i set up web.xml to address axis servlets.I will be gratefull to you.
I am using tomcat4.0 and axis. I had done all the settings. I am able to view the happyaxis.jsp page. But when i click on Administer axis, then i got the following error.
1)
Apache Tomcat/4.0.6 - HTTP Status 404 - /axis/servlet/AdminServlet
--------------------------------------------------------------------------------
type Status report
message /axis/servlet/AdminServlet
description The requested resource (/axis/servlet/AdminServlet) is not available.
2) Also i am not able to view the list of deployed web services.
the following error is coming.
Apache Tomcat/4.0.6 - HTTP Status 404 - /axis/servlet/AxisServlet
--------------------------------------------------------------------------------
type Status report
message /axis/servlet/AxisServlet
description The requested resource (/axis/servlet/AxisServlet) is not available.
I still have the same error HTTP 404.
20 years ago
I am using tomcat4.0,axis and xerces-2_5_0 parser.I compiled a client code.It is compiled well.But when i run that client code then a error is coming:
INFO: Mapping Exception to AxisFault
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog.
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXParseException: Content is not allowed in pro
log.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)

org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:117)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:462)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
... 7 more
Caught an exception: org.xml.sax.SAXParseException: Content is not allowed in pr
olog.
How can i correct this error
Happyaxis.jsp is working, but admin servlet is not working, even after removing the commenting <!-- and -->.
20 years ago
Hi Balaji
I modified the web.xml file but nothing happens.Also i wanted to know that
i compiled a client code.It is compiled well.But when i run that client code then a error is coming:

INFO: Mapping Exception to AxisFault
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog.
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXParseException: Content is not allowed in pro
log.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)

org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:117)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:462)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
... 7 more
Caught an exception: org.xml.sax.SAXParseException: Content is not allowed in pr
olog.
How can i correct this error
20 years ago