PLZ Help!! Im getting an error in a small code
when i compile this i get an error saying
"variable tax might not have been initialized" for the line that says system.out.printin...........
PLZ HELP!!
THANKS
class A1Q2
public static void main (String[] args)
double income ;
System.out.println ("Please enter yearly income: ");
income = ITI1120.readDouble( );
char tax;
if (income <= 37885) {
tax = 'A';
} else if ( (income > 37885) && (income <= 75769) ) {
tax = 'B';
} else if ( (income > 75769) && (income <= 123184) ) {
tax = 'C';
} else if (income > 123184) {
tax = 'D';
System.out.println("Tax = " + tax);
}
Hello slvr99,
Firstly, can you please use the CODE button to format your code when you post? It just makes it a lot easier for us to read.
As for your error, it really is quite literal.
variable tax might not have been initialized
means that the variable you have called "tax" may not have been initialized, you just need to set it:
char tax = '';
Similar Messages
-
Why Do I keep getting an error message telling me "Code redemption is temporarily unavailable. Please try again later." whenever I try to redeem my digital copy code for "Oz The Great and Powerful"?
I had the same problem so I decided to try going to website on the back. (DisneyOzMovieandOffers.com). It will take you to a page that says to redeem code, enter the code that is given to you and click enter. It will give you options of where you would like to download it from. Click iTunes and it will give you the correct code to download the movie from iTunes.
-
Plz help me from the error - "org.apache.jasper.jasperException"
I am getting error with this code ,plz help me out ,i wanna correct this urgently
I've set the Environment variables JAVA_HOME and
CATALINA_HOME and here is my coding and error report
hello.html
<head><title>Database</title></head>
<body>
<form method="get" action="add.jsp">
<pre>
<center>Enter ur Name :<input type="text" name="nam" >
<br><input type="submit" value=" Add ">
</center></pre>
</form>
</body>
</html>
add.jsp
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<html>
<head><title>JSP</title></head>
<%! String name;
Connection con=null;
Statement st=null;
%>
<body>
<% name=request.getParameter("nam");
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//I have created a User DSN sjp
con = DriverManager.getConnection("jdbc:odbc:sjp");
st = con.createStatement();
st.executeUpdate("insert into detail values('"+name+"')");
catch(Exception e)
con.close();
st.close();
%>
<h1> Name Added</h1>
</body>
</html>
Error
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
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NullPointerException at org.apache.jsp.add_jsp._jspService(add_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Apache Tomcat/4.1.31hi,
when i use the code
if(st != null)st.close();
if(con != null ) con.close();
that works good ,the old error has been corrected.
but it's now throwing an SQLException[b] "datasource name not found and default driver not specified" why this occurs and also can u give me the explanation for the old error????
I am sure that i have created an user DSN, i am 100% sure about it .even though there is an error.
Deepak.
Deepak.C -
Plz help to solve this error in out.println statement
Hi All,
I am pretty new to weblogic8.1.I am Getting a error if i try to concatenate a object to the string in out.println
statement.
For your kind reference progam and error pattern is enclosed.
public class Test extends HttpServlet
PrintWriter out;
public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
out=res.getWriter();
String aaa="Google";
out.println("Hai"+aaa);
ERROR IS:
Error 500--Internal Server Error
java.lang.NoClassDefFoundError: java/lang/StringBuilder
at Test.doGet(Test.java:15)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
If i use the statement like;
out.println("Hai");
out.println(aaa); ...It works fine
Plz, help me out there.Thanks All.
PrithMy guess is this is a classpath issue. Read weblogic's documentation on how to install the software thoroghly, then re-install it. Double check that JAVA_HOME is set properly, and that you are using a fairly recent Sun Java VM, versus an old MS Java VM...
-
Help, i get the 'error downloading purchased music.' what do i do?
i can download music and podcast fine but when i try to purchase a tv show i get the error message "there was an error downloading purchased music. the disk could not be read from or written to" i went to the purchases command in the advanced menu several times with no luck. i have purchased three seperate shows and get the same message. i'm tired of wasting money and would like some help.
thanksHmm... I've never seen a issue exactly like this before personally, but usually you get the "Disk Locked" error when installing iTUnes or adding anything, songs or videos to iTunes folder. go here and follow the instructions http://docs.info.apple.com/article.html?artnum=302398
You may have to uninstall/reinstall iTunes AND quicktime if this does not work. Uninstlling iTunes DOES NOT delete any music, playlist, ratings ect ect -
hello plz help me wat i can do for this error and plz also tell me where to place the POI api in tomcat directory.........
The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:13: ';' expected
import org.a
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:8: package org.apache.poi.poifs.filesystem does not exist
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:9: package org.apache.poi.hssf.record does not exist
import org.apache.poi
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:11: package org.apache.poi.hssf.model does not exist
import org.apache.poi.hssf.model.*;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:12: package org.apache.poi.hssf.usermodel does not exist
import org.apache.poi.hssf.usermodel.*;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:13: cannot resolve symbol
symbol : class a
location: package org
import org.a
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:74: cannot resolve symbol
symbol : class POIFSFileSystem
location: class org.apache.jsp.HSSFExample_jsp
POIFSFileSystem fs =
^
An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:75: cannot resolve symbol
symbol : class POIFSFileSystem
location: class org.apache.jsp.HSSFExample_jsp
new POIFSFileSystem(new FileInputStream(filename));
^
An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:76: cannot resolve symbol
symbol : class HSSFWorkbook
location: class org.apache.jsp.HSSFExample_jsp
HSSFWorkbook wb = new HSSFWorkbook(fs);
^
An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:76: cannot resolve symbol
symbol : class HSSFWorkbook
location: class org.apache.jsp.HSSFExample_jsp
HSSFWorkbook wb = new HSSFWorkbook(fs);
^
An error occurred at line: 35 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:89: cannot resolve symbol
symbol : class HSSFSheet
location: class org.apache.jsp.HSSFExample_jsp
HSSFSheet sheet = wb.getSheetAt(k);
^
An error occurred at line: 35 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:94: cannot resolve symbol
symbol : class HSSFRow
location: class org.apache.jsp.HSSFExample_jsp
HSSFRow row = sheet.getRow(r);
^
An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:108: cannot resolve symbol
symbol : class HSSFCell
location: class org.apache.jsp.HSSFExample_jsp
HSSFCell cell = row.getCell(c);
^
An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:115: cannot resolve symbol
symbol : variable HSSFCell
location: class org.apache.jsp.HSSFExample_jsp
case HSSFCell.CELL_TYPE_FORMULA :
^
An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:119: cannot resolve symbol
symbol : variable HSSFCell
location: class org.apache.jsp.HSSFExample_jsp
case HSSFCell.CELL_TYPE_NUMERIC :
^
An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:125: cannot resolve symbol
symbol : variable HSSFCell
location: class org.apache.jsp.HSSFExample_jsp
case HSSFCell.CELL_TYPE_STRING :
^
16 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:445)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:536)You can put the POI jar file in the WEB-INF/lib directory of your application, or if you want to use it in multiple applications you can put it in the tomcat 4.1/shared/lib directory.
-
Plz help to get the tag of html file
hi
I wants to convert the HTML file into PDF file dynamically.
So first i wants to get the tag of html file when we pass the path of html file.
so how i do this plz help me.Plz Tell me how I get the HTML Tag through the java code.
-
Hello all,
I have been having a problem installing encore cs5 into my Dell xps studio 8100. the machine is literally three days old and aside from the os, there's nothing else installed in it.
I was able to run the installation for CS5 without any issues until it got to encore. everything else installed without an issue but it refuses to install encore. I have installed the same master collection on another machine, a little older than the new dell, and it installed flawlessly. But on the new machine, no dice.
I have posted below the error msg logs i received from the install. Any help would be much appreciated please.
Exit Code: 6
-------------------------------------- Summary --------------------------------------
- 1 fatal error(s), 3 error(s), 8 warning(s)
WARNING: OS requirements not met for {33A3F995-8333-4676-8D6F-AB7674BB52EA}
WARNING: OS requirements not met for {565DE707-5798-4FC3-8DF6-0F58A348A9B0}
WARNING: OS requirements not met for {5DDABB74-A879-4BE7-A4C6-FD41793942DB}
WARNING: OS requirements not met for {694213D7-1E0E-4C8F-B822-E2E3680C0FCE}
WARNING: OS requirements not met for {7816FDDE-40D4-482D-AD7D-97858985DB3E}
WARNING: OS requirements not met for {AAE6F374-91CB-45FB-9282-4CFA0DED2088}
WARNING: OS requirements not met for {B8D286BC-A68D-4E74-9F68-8756A49896D8}
WARNING: Payload cannot be installed due to dependent operation failure
ERROR: The following payload errors were found during install:
ERROR: - Adobe Encore CS5_AdobeEncore5en_USLanguagePack: Install failed
ERROR: - Adobe Encore CS5: Failed due to Language Pack installation failure
FATAL ERROR: Cannot create extract assets at 'C:\Program Files (x86)\Common Files\Adobe\Installers\adobeTemp\{D8465547-5D5B-4856-A93A-8AC0A05C5D4D}' from zip file 'D:\Adobe CS5\payloads\AdobeEncore5AllRetail\Assets1_1.zip'. Error 23 Data error (cyclic redundancy check).Hmm... My CS5/AVCHD 1st Impressions http://forums.adobe.com/thread/652694?tstart=0 includes a link to the computer I built
My CS5 install went with no problems at all, so I'm pretty much out of ideas, other than a note I saved
Install Checklist http://forums.adobe.com/thread/569663?tstart=0 -
Help! Getting an error msg
I'm trying to publish my iMovie and am getting this error msg: The operation could not be completed because there is not enough space on the destination disk.
What is missing is the required method
main(String[] args)
which is the first method called by the runtime. Your application MUST have this method in order for the computer to know where to start executing your code
your code should look something like
public class Clock{
public Clock(){
//default constructor, add anything required
public void main(String[] args){
//================================
// programm execution starts here
//================================
Clock main = new Clock(); // creates the clock object -
Getting two errors on sending mail (code included)
I receive an authentication failed exception when I run it like this.
When I connect without an authenticator, I get a "relaying error".
I got it to send a message a few weeks ago, and now come back to it and seem to be getting these errors. Any help would be appreciated. Thanks
String server = "smtp.ksu.edu";
String from = "*****";
String to = "********";
String name = "*****";
String password = "********"
Properties props = System.getProperties();
props.put( "mail.transport.protocol", "smtp");
props.put("mail.smtp.host", server);
props.put("mail.smtp.auth", "true");
Authenticator auth = new MyAuthenticator();
Session session = Session.getDefaultInstance(props, auth);
//Session session = Session.getDefaultInstance(props, null);
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
InternetAddress[] addressTo = new InternetAddress[1];
addressTo[0] = new InternetAddress(to);
message.setRecipients(Message.RecipientType.TO, addressTo);
message.setSubject(ml.getLastMoveText());
message.setText(ml.getMoveListText());
message.saveChanges();
Transport transport = session.getTransport("smtp");
//username = JOptionPane.showInputDialog(null,"Please enter your e-mail username");
//password = JOptionPane.showInputDialog(null, "Please enter your password");
//transport.connect("smtp.ksu.edu", "*****", "******");
transport.connect();
transport.sendMessage(message, message.getAllRecipients());
transport.close();
public class MyAuthenticator extends Authenticator
String username;
String password;
public MyAuthenticator()
super();
public PasswordAuthentication getPassWordAuthentication()
// username = JOptionPane.showInputDialog(null,"Enter username");
//password = JOptionPane.showInputDialog(null,"Enter password");
return new PasswordAuthentication("kborn","tlnb120!");
}If you look toward the middle, you will see that it denies who I am sending it to saying there is not proper authentication, but I have tried sending to both people inside and outside the network, and have a working authentication (works with gmail as well). Any help appreciated, thanks
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_03\lib\javamail.providers (The system cannot find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_03\lib\javamail.address.map (The system cannot find the file specified)
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.ksu.edu", port 25, isSSL false
220 smtp1.cc.ksu.edu ESMTP Sendmail 8.13.6/8.13.6; Mon, 5 Jun 2006 17:20:21 -0500 (CDT); Unsolicited Commercial Email (spam) is UNWELCOME
DEBUG SMTP: connected to host "smtp.ksu.edu", port: 25
EHLO LLAMA
250-smtp1.cc.ksu.edu Hello 70-169-101-194-wip.wcht.ks.pixius.net [70.169.101.194], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 10485760
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg "10485760"
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "DELIVERBY", arg ""
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
RCPT TO:<[email protected]>
550 5.7.1 <[email protected]>... Relaying denied. Proper authentication required.
DEBUG SMTP: Invalid Addresses
DEBUG SMTP: [email protected]
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Reset state
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <[email protected]>... Relaying denied. Proper authentication required.
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at emailChess.controller.Game.sendMove(Game.java:177)
at emailChess.gui.ResumeFrame.actionPerformed(ResumeFrame.java:324)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <[email protected]>... Relaying denied. Proper authentication required.
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 29 more
QUIT
221 Closing connection. Good bye. -
I've tried to update but I get that error. But the thing is that the version i´'m uploading is 4.0.0.0
Any help?Digital Publishing SuiteThe version code needs be be much higher than 6. Make it 20000007 or something like that.
Digital Publishing Suite Help | Setting version numbers in Web DPS App Builder -
What do I do when I get repeated error message with redemption code?
When I go to adobe.com/go/getserial to get my serial number, I get an error message repeatedly when I put in my redemption code. I purchased Adobe Premiere Elements at Best Buy and they scanned the package to activate.
Burbankhensley10 what error message are you receiving? Have you tried using a different web browser or adjusting your security settings?
-
Plz help in resolving the error
hai experts,
i just craeted a demo webdynpro application and when i run it i got the following error.
can someone help me in sorting out this one.
the error is as follows:
The following error text was processed in the system ECD : An exception occurred that was not caught.
The error occurred on the application server haasdevecc_ECD_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE of program CX_WD_GENERAL=================CP
Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Module: %_HTTP_START of program SAPMHTTP
thanks,
madhuHi Madhu,
There could be various reasons for this kind of error.
Please goto ST22 and check out for the exact line number.
RABAX_STATE is very common error and generally the error is due to wrong
declarations or wrong use of OO(Object oriented) ABAP.
Check out for everything and I think you will get the exact error.
Or else put the code so that I can get clear picture.
Cheers,
Darshna. -
My iTunes has been working fine until this afternoon and now when I go to download music I am getting error code 11503 or (-50) Help, please!
Here's a possible fix for Error 11503 and for error 50.
It worked for me and hopefully it will work for you.
I believe this error is caused by the incomplete downloading of either an update to an app, or perhaps a big music file. In my case it was caused by closing the lid on my laptop when I was downloading app updates on a very slow internet connection in a hotel.
Anyway, here is what I did that fixed it completely.
Close iTunes.
Go to this folder : /iTunes/Mobile Applications/Downloads
You'll find tmp files there. Drag them out of this folder to a temporary folder on your desktop. The Downloads folder should now be empty.
Restart iTunes.
All should be fine.
If it's not, then I can't help further, but that's what worked for me. -
Plz help to resolve this error during installation of EBS 11i
plz any one can help me to resolve this mentioned issued on last two lines......
error--- RW-50010: Error: - script has returned an error: 2
running command : OSPatchCheck.checkPatch()
OS = Windows XP OSVersion = 5.1
No Patch Information available for this Platform
System Utilities Check
command : cmd.exe /c G:\DISK1\RAPIDWIZ\bin\adchkutl.cmd c:\MKSTOOL\mksnt c:\MSVC\VC98
G:\DISK1\RAPIDWIZ>echo off
Setting environment for using Microsoft Visual C++ tools.
C:\WINDOWS\system32/cmd.exe
'which' command is available.
C:\WINDOWS\system32/gnumake.exe
'gnumake' is available.
c:\MKSTOOL\mksnt/cc.exe
'cc' is available.
C:\MSVC\VC98\BIN/link.exe
'link' is available.
ERRORCODE = 0 ERRORCODE_END
System Utilities Availability test has succeeded
DoInstallPanel - Summary Text
The Rapid Install Wizard will now install the following:
DoInstallPanel - User continued install at warning dialog.
Starting from CD area G:\DISK1
There was an error while running the command - cmd /c rmdir /S /Q C:\WINDOWS\TEMP\rapidinstall
The system cannot find the file specified.
RW-50010: Error: - script has returned an error: 2
Returning - 0Only one log file created. File entries attached below
++++
Disk space on system acceptable:
Database System File Directory = E:\oracle\VIS\db\apps_st\data
required = 16780.0
actual = 377201.943359375
Disk space on system acceptable:
Database Log File Directory = E:\oracle\VIS\db\apps_st\data
required = 3086.0
actual = 360421.943359375
Disk space on system acceptable:
Database Transaction File Directory = E:\oracle\VIS\db\apps_st\data
required = 64649.0
actual = 357335.943359375
Disk space on system acceptable:
Database Archive File Directory = E:\oracle\VIS\db\apps_st\data
required = 44142.0
actual = 292686.943359375
</p>
<p>
-- apps node space checks --
</p>
<hr />
<p>
Disk space on system acceptable:
APPL_TOP = E:\oracle\VIS\apps\apps_st\appl
required = 5232.0
actual = 248544.943359375
Disk space on system acceptable:
APPL_TOP mount 2 = E:\oracle\VIS\apps\apps_st\appl
required = 2362.0
actual = 243312.943359375
Disk space on system acceptable:
APPL_TOP mount 3 = E:\oracle\VIS\apps\apps_st\appl
required = 7988.0
actual = 240950.943359375
Disk space on system acceptable:
APPL_TOP mount 4 = E:\oracle\VIS\apps\apps_st\appl
required = 2736.0
actual = 232962.943359375
Disk space on system acceptable:
COMMON_TOP = E:\oracle\VIS\apps\apps_st\comn
required = 2328.0
actual = 230226.943359375
Disk space on system acceptable:
Apps ORACLE_HOME = E:\oracle\VIS\apps\tech_st\10.1.3
required = 1069.0
actual = 227898.943359375
Disk space on system acceptable:
Tools ORACLE_HOME = E:\oracle\VIS\apps\tech_st\10.1.2
required = 926.0
actual = 226829.943359375
Host/Domain
</p>
<hr />
<p>
command: ping -n 1 leon
</p>
<p>
</p>
<p>
Pinging Leon.apxm.com http://10.10.10.10 with 32 bytes of data:
</p>
<p>
Reply from 10.10.10.10: bytes=32 time<1ms TTL=128
</p>
<p>
Ping statistics for 10.10.10.10:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
</p>
<p>
host ping has succeeded
command: ping -n 1 leon.apxm.com
</p>
<p>
</p>
<p>
Pinging Leon.apxm.com http://10.10.10.10 with 32 bytes of data:
</p>
<p>
Reply from 10.10.10.10: bytes=32 time<1ms TTL=128
</p>
<p>
Ping statistics for 10.10.10.10:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
</p>
<p>
host.domain ping has succeeded
System Utilities
</p>
<hr />
<p>
command: cmd.exe /c C:\Stage12\startCD\Disk1\rapidwiz\bin\adchkutl.cmd C:\cygwin\bin C:\MSVS8\MSVC\bin
</p>
<p>
C:\Stage12\startCD\Disk1\rapidwiz>echo off
/cygdrive/c/WINDOWS/system32/cmd
'which' command is available.
/usr/bin/gnumake
'gnumake' is available.
/usr/bin/cl
'cc' is available.
/usr/bin/link
'link' is available.
ERRORCODE = 0 ERRORCODE_ENDThe system cannot find the path specified.
</p>
<p>
System Utilities Availability test has succeeded
AllNodesPanel
</p>
<hr />
Service Name: leon
Node Name: _leon<br />
Operating System: _Windows (32-bit)<br />
Service Name: leon
Node Name: _leon<br />
Operating System: _Windows (32-bit)<br />
<strong>DoInstallPanel - Summary Text</strong>
<strong>The Rapid Install Wizard will now install the following:</strong>
<p>
<strong>DoInstallPanel - User continued install at warning dialog.</strong>
<strong>-----------------------------------------</strong>
<strong>Starting from CD area C:\Stage12\startCD\Disk1</strong>
<strong>RW-50010: Error: - script has returned an error: 2</strong>
<strong>Returning - 0</strong>
+++++++
</p>
Maybe you are looking for
-
SAVE Layout Option in ALV list Report
Hi Experts, Is it possible to SAVE the layout option for Block ALV list Reports? Thanks in Advance, Sivak.
-
How do I create a toggle (hide/show) button in Captivate 5?
What is the best method to create a button that will hide / show a particular caption? I looked into using an advanced action, but have not been successful in indicating the correct variable / control statement to make it work. Anyone have a button w
-
Hello! How can I define constants in a value object? I need constants that should be used in a value object both by server and client. From Java language perspective, I can define static final constants in either value object itself or in separate cl
-
When I log into mobilme and post something in the calendar at 11 am, when I sync it with my Iphone the calendar shows it to be at 1 pm. How do i correct the time difference in mobilme
-
Hi, I have an issue with excel, letters of a particular column covert into numbers, once i save the excel and then reboot the system.