Why my ExceptionDemo won't compile??

public class ExceptionDemo{
public static void error(int i) throws FirstException, SecondException{
     if (i==1)
     throw new FirstException();
     if(i==2)
     throw new SecondException();
     else
     System.out.println("no exception!");
public static void main(String[] s){
try{
error(1);
catch (FirstException f){
System.out.println(f.getMessage());
//System.out.println(s.getMessage());
class FirstException extends Exception{
FirstException(){
  super("FirstExeption");
class SecondException extends Exception{
public SecondException(){
super("SecondException");
}the compiler complains:
unreported exception Second Exception; must be caught or declared to be thrown.
line 22, which is the bold italic line.
Any help?
thanks

oh sorry. I now what the compiler means.
but my solution turns out to be more error.
I change my catch block into this:
catch(FirstException e, SecondException e1){
if (e!=null)
System.out.println(e);
else
System.out.println(e1);
}so what is the correct solution?

Similar Messages

  • Help! Don't know why this source won't compile!

    Hey guys, i'm new to the java scene. I just picked up a book about a week ago ("Sam's Teach Yourself Java 2") I'm on the 6th lesson of the book, learning about "Packages" (ie. java.awt).
    The book contains compilable source code on a disk that comes with the book.
    I'm stumped with the example i'm currently working on, and i've tried everything in my limited knowledge of java to solve the problem, but I can't. The example involves 2 seperate java text files.
    package org.cadenhead.ecommerce;
    import java.util.*;
    public class Item implements Comparable {
        private String id;
        private String name;
        private double retail;
        private int quantity;
        private double price;
        Item(String idIn, String nameIn, String retailIn, String quanIn) {
            id = idIn;
            name = nameIn;
            retail = Double.parseDouble(retailIn);
            quantity = Integer.parseInt(quanIn);
            if (quantity > 400)
                price = retail * .5D;
            else if (quantity > 200)
                price = retail * .6D;
            else
                price = retail * .7D;
            price = Math.floor( price * 100 + .5 ) / 100;
        public int compareTo(Object obj) {
            Item temp = (Item)obj;
            if (this.price < temp.price)
                return 1;
            else if (this.price > temp.price)
                return -1;
            return 0;
        public String getId() {
            return id;
        public String getName() {
            return name;
        public double getRetail() {
            return retail;
        public int getQuantity() {
            return quantity;
        public double getPrice() {
            return price;
    and this one..
    package org.cadenhead.ecommerce;
    import java.util.*;
    public class Storefront {
        private LinkedList catalog = new LinkedList();
        public void addItem(String id, String name, String price,
            String quant) {
            Item it = new Item(id, name, price, quant);
            catalog.add(it);
        public Item getItem(int i) {
            return (Item)catalog.get(i);
        public int getSize() {
            return catalog.size();
        public void sort() {
            Collections.sort(catalog);
    Now the example has to do with creating a package "org.cadenhead.ecommerce"
    So I placed both source files in a folder in what I believe is my classpath. (C:\program files\java\jdk1.5.0_05\ lib\org\cadenhead\ecommerce)
    The Item class compiles, but the Storefront won't. Every class i've made this far has had no problems compiling, and I doubt that there is an error in the code since it is straight from the book. When I try to compile, i get 4 errors, all of which look similar to this:
    Storefront.java:15: cannot find symbol
    symbol : class Item
    location : class.org.cadenhead.ecommerce.Storefront
    public Item getItem(int i) {
    ^
    Can anyone help me out and figure out what's wrong here? I'm really confused about why it doesn't seem to be able to find the Item class. I'm kind of stuck in the book since I can't figure this out and I wanted to make sure everything was configured right. I set the classpath in the "Enviroment Variables" folder (windows XP) to .;C:\Program Files\Java\jdk1.5.0_05\lib\tools.jar
    but to no avail...
    Thanks to anyone who reads my thread and helps me!!!

    You don't say what your folder structure is. The statement
    package org.cadenhead.ecommerceimplies that your classpath contains a folder
    org/cadenhead/ecommerceand that the class files reside in the ecommerce folder.
    "org" is relative, it is contained in one of the classpath folders.
    I created a project in Eclipse 3.1 name org.cadenhead. Created a package ecommerce. I cut and pasted your code into two java files in the ecommerce package. The only change I made was to change
    package org.cadenhead.ecommerceto
    package ecommerceCode compiles without error. So I think either your classpath does not contain org.cadenhead.ecommerce or the Item class is not in org.cadenhead.ecommerce.
    Good luck

  • Can't figure out why FPGA code won't compile, says files are missing

    Hey guys, I get the following error, sorry for the big vomit of error code. As near as I can tell from reading that, it thinks a number of the files it requires to run some of the subvi's I'm calling are missing. I don't understand how to fix this when these are LabView native files, for example, the high-throughput rectangular to polar converter?
    Help much appreciated.
    Error code follows:
    Error 7 occurred at Open VI Reference in nirviOpenVIRefByNameOrPath.vi->niFpgaRemapObjsAndListIfUnderXNode.vi->niFpgaRemapObjsHandleXNodeSubErrors.vi->nirviMassageErrorList.vi->nirviParseAndMassageErrors.vi->nirviReloadErrorList.vi->nirviGenerateErrors.vi
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.
    =========================
    NI-488:  Nonexistent GPIB interface.
    VI Path:
    All text parsed:
    <CodeGenErr>
    <ErrorCode>-61160</ErrorCode>
    <DynamicText><TreeLineInfo><LineInfo><DiagramObject><VIPath>C:\NIFPGA2009\clntTmp\FPGAImagi~2C_FPGATarg~A7_2Tap8bit~6A_nagEfsCz~08\MungedForFPGA\NI.Munge.2 Tap 8 bit RT Image Processing Initial.vi_FPGACompileCopy00000001.vi</VIPath>
    <UID>5485</UID>
    <ObjectName>High Throughput Rectangular To Polar</ObjectName>
    </DiagramObject>
    </LineInfo>
    </TreeLineInfo>
    </DynamicText>
    </CodeGenErr>
    <CodeGenErr>
    <ErrorCode>-61101</ErrorCode>
    <DynamicText><TreeLineInfo><TreeInfo><TreeID>1</TreeID>
    </TreeInfo>
    <LineInfo><DiagramObject><VIPath>C:\NIFPGA2009\clntTmp\FPGAImagi~2C_FPGATarg~A7_2Tap8bit~6A_nagEfsCz~08\MungedForFPGA\NI.Munge.2 Tap 8 bit RT Image Processing Initial.vi_FPGACompileCopy00000001.vi</VIPath>
    <UID>5036</UID>
    <ObjectName>SubVI: &apos;Butterworth Filter&apos;</ObjectName>
    </DiagramObject>
    </LineInfo>
    </TreeLineInfo>
    </DynamicText>
    </CodeGenErr>
    <CodeGenErr>
    <ErrorCode>-61101</ErrorCode>
    <DynamicText><TreeLineInfo><TreeInfo><TreeID>1</TreeID>
    </TreeInfo>
    <LineInfo><DiagramObject><VIPath>C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\rvi\Analysis\utilities\niFPGA I32xI32 Dot Product - 3 elements I64.vi</VIPath>
    <UID>63</UID>
    <ObjectName>Timed Loop</ObjectName>
    </DiagramObject>
    </LineInfo>
    </TreeLineInfo>
    </DynamicText>
    </CodeGenErr>
    <CodeGenErr>
    <ErrorCode>-61101</ErrorCode>
    <DynamicText><TreeLineInfo><TreeInfo><TreeID>1</TreeID>
    </TreeInfo>
    <LineInfo><DiagramObject><VIPath>C:\NIFPGA2009\clntTmp\FPGAImagi~2C_FPGATarg~A7_2Tap8bit~6A_nagEfsCz~08\MungedForFPGA\NI.Munge.2 Tap 8 bit RT Image Processing Initial.vi_FPGACompileCopy00000001.vi</VIPath>
    <UID>5036</UID>
    <ObjectName>SubVI: &apos;Butterworth Filter&apos;</ObjectName>
    </DiagramObject>
    </LineInfo>
    </TreeLineInfo>
    </DynamicText>
    </CodeGenErr>
    <CodeGenErr>
    <ErrorCode>-61101</ErrorCode>
    <DynamicText><TreeLineInfo><TreeInfo><TreeID>1</TreeID>
    </TreeInfo>
    <LineInfo><DiagramObject><VIPath>C:\NIFPGA2009\clntTmp\FPGAImagi~2C_FPGATarg~A7_2Tap8bit~6A_nagEfsCz~08\MungedForFPGA\NI.Munge.2 Tap 8 bit RT Image Processing Initial.vi_FPGACompileCopy00000001.vi</VIPath>
    <UID>5036</UID>
    <ObjectName>SubVI: &apos;Butterworth Filter&apos;</ObjectName>
    </DiagramObject>
    </LineInfo>
    </TreeLineInfo>
    </DynamicText>
    </CodeGenErr>

    GotRobotFriends,
    Hello! First of all, can I get the following information from you? 
    1.) LabVIEW and LabVIEW FPGA Versions
    2.) FPGA Target you are trying to compile code for.
    Typically errors 61101 and 61160 are thrown when a Single Cycle Timed Loop (SCTL) has elements within it that won't allow it to finish it's execution in 1 clock cycle.
    Looking through the error codes below, do you have any of the following items in a Single Cycle Timed Loop?
    High Throughput Rectangular To Polar 
    Butterworth Filter
    Also, are you using xnodes? Problems have been seen when items that would normally return an error when placed in a SCTL do not return errors if they are used with xnodes.
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • SQL query won't compile based on DB role privileges

    Can someone give me an explanation why the SQL query in a report won't compile if an object is owned by another schema and the parsing schema is given privileges to the table via a role grant?
    Or to phrase it another way, why do we have to make direct grants on tables to the parsing schema for reports based on SQL queries that access tables in other schemas?
    Thanks in advance,
    Paul

    Paul - In Oracle, roles are not enabled during the execution of definer's rights stored procedures which is the environment in which all Application Express application code is parsed/executed. There are scads of posts about this topic in this forum.
    Scott

  • [SOLVED] ruby-panelapplet2 won't compile (i686 & x86_64)

    Hi!
    I already wrote forum post in 64 bit section, but today I got to i686 machine and the error is the same, that damned package won't compile
    Can anyone help getting this compiled? Any hints?
    Errors are as follows:
    Package 'glipper' has no Name: field
    checking for GCC... yes
    checking for rb_define_alloc_func() in ruby.h... yes
    checking for rb_block_proc() in ruby.h... yes
    checking for new allocation framework... yes
    checking for attribute assignment... no
    checking for libpanelapplet-2.0 version (>= 2.6.0)... yes
    checking for G_PLATFORM_WIN32... no
    creating rbpanelappletversion.h
    creating Makefile
    creating Makefile
    /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/glib/src/lib/pkg-config.rb:85:in `name': undefined method `[]' for nil:NilClass (NoMethodError)
        from /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/glib/src/lib/mkmf-gnome2.rb:165:in `create_pkg_config_file'
        from /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/panel-applet/extconf.rb:30:in `<main>'
    extconf.rb: Leaving directory 'panel-applet'
    That is driving me crazy, coz I can't get SSHMenu work properly and that is one of the tools I use all the time
    If someone has that package in x86_64, please send that to me (edzis123[@]inbox.lv). Please remove all numbers and brackets from there
    If the package is not available, alternate way is sending the files in the package, I suppose these should be like this (I took sample from i686):
    /usr/lib/ruby/site_ruby/1.9.1/panelapplet2.rb
    /usr/lib/ruby/site_ruby/1.9.1/x86_64-linux/panelapplet2_main.so
    /usr/lib/ruby/site_ruby/1.9.1/x86_64-linux/panelapplet2.so
    Thanx in advance.
    Last edited by Kirurgs (2010-02-21 21:32:26)

    Hi!
    After spending quite a lot of time on this, I found the error why I couldn't compile almost any of ruby packages including ruby-gnomepanel2.
    To my big surprise, pacman -R glipper fixed the issue and I'm now using sshmenu w/o any issues.
    Ruby seems to broke if some additional (possibly incorrect) packages are installed, which it shouldn't!! Uff...
    regards
    Kirurgs
    Last edited by Kirurgs (2010-02-21 21:32:57)

  • Msg.addRecipient(Message.RecipientType.TO,to) - won't compile in program

    I have had success in one of my servlets using JavaMail. I was able to send an email to my inbox to test it out. I proceeded to create another servlet based on that 1st one, and for reasons I can't explain, the servlet won't compile.
    I get this error.
    cannot resolve symbol :
             variable : RecipientType
             location : java.lang.String
                           msg.setRecipient(Message.RecipientType.TO, to); I get the same error when I switch out setRecipient for addRecipient.
    However, through further testing, I've found that not only does my 1st servlet still compile, but I'm also able to run the code from the 2nd servlet, successfully in a JSP page. This is driving me nuts...how could there be a problem compiling? There's no reason why one servlet compiles (with similar if not almost exactly the same code) and the other won't. Plus this runs fine in a JSP page...what's going on??? I've spent hours on this and I can't figure it out...please help, any input is appreciated.
    Here is the JSP page that runs successfully :
    <%@page import="java.io.*"%>
    <%@page import="java.util.Properties"%>
    <%@page import="javax.mail.*"%>
    <%@page import="javax.mail.Message.RecipientType"%>
    <%@page import="javax.mail.internet.*"%>
    <%@page import="javax.servlet.*"%>
    <%@page import="javax.servlet.http.*"%>
    <%@page import="javax.naming.*"%>
    <%@page import="javax.sql.*"%>
    <%@page import="java.sql.*"%>
    <%                         
               Connection conn = null;
               Statement stmt = null;
               ResultSet rs = null;
                  try {                              
                   Context ctx = new InitialContext();
                         if(ctx == null )
                     throw new Exception("Boom - No Context");
                           DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/myDB");     
                      conn = ds.getConnection();
                      stmt = conn.createStatement();                   
                      //get the POP3 and SMTP property values from db
                            rs = stmt.executeQuery("Select Tech_Support_Email, POP3, SMTP from sitewide_info");                                               
                            String hostemailaddress = "";
                            String POP3 = "";  //mail.smtp.host, this one 1st
                            String SMTP = ""; //smtp.stratos.net, this one 2nd
                            if(rs.next()) {
                               hostemailaddress = rs.getString(1);
                               POP3 = rs.getString(2);
                               SMTP = rs.getString(3);
                  // Specify the SMTP Host
                 Properties props = new Properties();                                           
                  //POP3 = mail.smtp.host & SMTP = smtp.stratos.net - must be in this order
                  props.put(POP3, SMTP);
                  // Create a mail session
                  Session ssn = Session.getDefaultInstance(props, null);
                  ssn.setDebug(true);                                            
                  String subject = "Testing out Email";
                  String body = "hello";
                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  rs = stmt.executeQuery("Select Customer_Name, Email_Address from customer_profiles where "
                                                           +"Customer_Number=1111");
                             String fromName = "";
                             String fromEmail = "";
                             if(rs.next()) {
                                fromName = rs.getString(1);
                                fromEmail = rs.getString(2);
                  InternetAddress from = new InternetAddress(fromEmail,fromName);                                
                  String toName = "Bob";          
                  InternetAddress to = new InternetAddress(hostemailaddress,toName);             
                      // Create the message
                      Message msg = new MimeMessage(ssn);
                      msg.setFrom(from);
                      msg.addRecipient(Message.RecipientType.TO, to);
                      msg.setSubject(subject);
                      msg.setContent(body, "text/html");
                      Transport.send(msg);             
                  }//try
                   catch (MessagingException mex) {                     
                          mex.printStackTrace(); }
                   catch(Exception e) {}
            finally {         
                try {
                  if (rs!=null) rs.close();
                     catch(SQLException e){}             
                  try {
                  if (stmt!=null) stmt.close();
                     catch(SQLException e){}
                  try {
                  if (conn!=null) conn.close();
                     catch(SQLException e){}
            }//finally          
    %>                           
    Here's the servlet that won't compile :
    package testing.servlets.email;
    import java.io.*;
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.Message.RecipientType;
    import javax.mail.internet.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
         public class MessageCenterServlet extends HttpServlet {
              public Connection conn = null;
              public Statement stmt = null;
              public Statement stmt2 = null;
              public ResultSet rs = null;
              public ResultSet rss = null;
              public PrintWriter out = null;
              public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                   doPost(req,res);
              public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                  try {               
                        out = res.getWriter();
                        Context ctx = new InitialContext();
                         if(ctx == null )
                     throw new Exception("Boom - No Context");
                           DataSource ds =
                     (DataSource)ctx.lookup(
                        "java:comp/env/jdbc/myDB");     
                      conn = ds.getConnection();
                      stmt = conn.createStatement(); 
                      stmt2 = conn.createStatement();                 
                      HttpSession session = req.getSession();                                                             
                         String Subject = (String)session.getAttribute("Subject");
                         String Message = (String)session.getAttribute("Message");
                         sendAnEmail(rs,stmt,Subject,Message,res);                                     
                        }//try
                      catch (Exception e) { }
                      finally { cleanup(rs,rss,stmt,stmt2,conn); }
              }//post       
             public void cleanup(ResultSet r, ResultSet rs, Statement s, Statement s2, Connection c){
                try {
                  if (r!=null) r.close();
                     catch(SQLException e){}
                  try {
                  if (rs!=null) rs.close();
                     catch(SQLException e){}
                  try {
                  if (s!=null) s.close();
                     catch(SQLException e){}
                  try {
                  if (s2!=null) s2.close();
                     catch(SQLException e){}
                  try {
                  if (c!=null) c.close();
                     catch(SQLException e){}
            }//cleanUp          
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                
            public void sendAnEmail(ResultSet rs, Statement stmt, String Subject,String Message, HttpServletResponse res) {          
                 try {               
                      //get the POP3 and SMTP property values from db
                            rs = stmt.executeQuery("Select Tech_Support_Email, POP3, SMTP from sitewide_info");                                               
                            String hostemailaddress = "";
                            String POP3 = "";
                            String SMTP = "";
                            if(rs.next()) {
                               hostemailaddress = rs.getString(1);
                               POP3 = rs.getString(2);
                               SMTP = rs.getString(3);
                  // Specify the SMTP Host
                 Properties props = new Properties();                                                         
                  props.put(POP3, SMTP);
                  // Create a mail session
                  Session ssn = Session.getDefaultInstance(props, null);
                  ssn.setDebug(true);                                            
                  String subject = "Testing out Email";
                  String body = "hello";
                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  rs = stmt.executeQuery("Select Customer_Name, Email_Address from customer_profiles where "
                                                           +"Customer_Number=1111");
                             String fromName = "";
                             String fromEmail = "";
                             if(rs.next()) {
                                fromName = rs.getString(1);
                                fromEmail = rs.getString(2);
                  InternetAddress from = new InternetAddress(fromDealerEmail,fromDealerName);                    
                String toName = "Bob";                            
                InternetAddress to = new InternetAddress(hostemailaddress,toName);
                      // Create the message
                      Message msg = new MimeMessage(ssn);
                      msg.setFrom(from);
                      msg.setRecipient(Message.RecipientType.TO, to);
                      msg.setSubject(subject);
                      msg.setContent(body, "text/html");
                      Transport.send(msg);             
                  }//try
                   catch (MessagingException mex) {                     
                          mex.printStackTrace(); }
                   catch(Exception e) {}
                 }//end
    }//class              -Love2Java
    Edited by: Love2Java on Mar 11, 2008 9:15 PM

    I have similar problem
    I have the below code in Eclipse and I was able to compile and run it and everything works fine...
    but I have code over in Oracle Jdev and jdev is complaining that "Message.RecipientType.TO" is not found....
    I do have all the jars in the class path.... can't figure out what's wrong
    can some one plz help me out.
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.mail.util.ByteArrayDataSource;
    public void postMail( String recipients, String subject,
    String message , String from) throws MessagingException
    boolean debug = false;
    //Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "server");
    props.put("mail.smtp.auth", "true");
    Authenticator auth = new SMTPAuthenticator();
    Session session = Session.getDefaultInstance(props, auth);
    session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress(from);
    msg.setFrom(addressFrom);
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(recipients, false));
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(message, "text/plain");
    Transport.send(msg);
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username ="user";
    String password = "pass";
    return new PasswordAuthentication(username, password);
    }

  • Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hey lozza567,
    Thanks for the question. I understand that you are experiencing issues sending MMS messages. The following resource may provide a solution:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Issues with sending and receiving MMS
    You will need these to send and receive MMS:
    - An iPhone 3G or later.
    - iOS 3.1 or later.
    - A cellular data connection. MMS isn't available if you are using only Wi-Fi.
    - A domestic MMS plan from your cellular provider. You may need an international messaging plan to send MMS to an international contact. Contact your carrier for more information.
    - A roaming MMS when using a cellular provider's network different from your billing cellular provider's network. Learn more about roaming and contact your carrier for more information.
    To resolve issues with sending and receiving MMS, follow these steps first
    1. Go to Settings and turn airplane mode off.
    2. Go to Settings > Messages and turn MMS Messaging on.
    3. Go to Settings > Cellular and turn Cellular Data on.
    4. Go to Settings > Cellular and turn Data Roaming on if you are roaming on a cellular provider network different from your billing provider's network.
    5. Verify that you have a cellular data connection in the status bar at the top left of your iPhone.
    6. Go to Settings and turn Wi-Fi off. Open Safari and navigate to www.apple.com to verify that you have a data connection. Turn Wi-Fi back on to continue using Wi-Fi for other features. If your cellular data connection isn't available, follow these steps.
    7. Verify that you can send and receive SMS. If you are unable to send and receive SMS, see the "Issues with sending and receiving SMS" section, above.
    8. MMS may not be available while on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn more about which network your phone supports.
    9. Restart your iPhone.
    10. Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    11. Reseat your SIM card.
    If you are still unable to send or receive MMS, follow these steps
    1. Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    2. Go to Settings > Messages and turn on group messaging if you are sending a group message.
    3. Make sure that you are using the area code with the contact's phone number. When sending messages internationally, you also need the contact's international code.
    4. Verify a "Pay as you go" MMS plan has enough available balance. Contact your carrier if unsure of your MMS plan or available balance.
    5. If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    6. If the issue occurs with a specific contact or contacts, delete and re-create the contact from the Contacts application. Create a new message to the newly created contact and try again.
    7. Back up and restore your iPhone as new.
    8. If your carrier has recently ported your phone number, the porting process may not be complete. Contact your carrier to confirm that the porting process is complete.
    9. Contact your carrier to verify that you are provisioned to send SMS and are in an area with cellular coverage.
    10. Contact your carrier to verify that there are no blocks or filters placed on your wireless account preventing you from sending SMS.
    11. Your carrier may require APN settings to be modified to use MMS. Learn more about when you should adjust APN settings.
    Thanks,
    Matt M.

  • Code won't compile - array

    This is my first in depth attempt to understand the code for enabling arrays. I THINK I have a fairly simple problem, but the code won't compile and NetBeans is telling me I'm missing a symbol &/or class, which I just don't get. Here is the code for the Inventory1 module as well as the main module - what am I not seeing?
    Inventory1 module
    import java.util.Scanner;
    import static java.lang.System.out;
    public class Inventory1
      //declare and initialize variables
      int[] itemNumber = new int [5];
      String[] productName = new String[5];
      int[] stockAmount = new int[5];
      double[] productCost = new double[5];
      double[] totalValue = new double[5];
      int i;
      //int i = 0;
      //initialize scanner
      Scanner sc = new Scanner(System.in);
      Inventory1 info = new Inventory1
    public void inventoryInput()
      while (int i = 0; i < 5; i++)
         out.println("Please enter item number: "); //prompt - item number
         info.itemNumber[i] = sc.nextInt(); // input
         out.println( "Enter product name/description: "); //prompt - product name
         info.productName[i] = sc.nextLine(); // input
         out.println("Quantity in stock: "); // prompt - quantity
         int temp = sc.nextInt(); // capture temp number to verify
         if( temp <=0 )
         { // ensure stock amount is positive number
             out.println( "Inventory numbers must be positive. Please" +
                 "enter a correct value." ); // prompt for correct #
             temp = sc.nextInt(); // exit if statement
         else info.stockAmount[i] = temp; // input
         out.println("What is the product cost for each unit? "); // prompt - cost
         double temp2 = sc.nextDouble();
         if( temp <=0 )
             out.println( "Product cost must be a positive dollar " +
                  "amount. Please enter correct product cost." );
             temp2 = sc.nextDouble();
         else info.productCost[i] = temp2;
      out.println( "We hope this inventory program was helpful. Thank you for " +
          "using our program." );
      } // end method inventoryInput   
    }main module
    public class Main {
      public static void main(String[] args) { //start main method
            Inventory1 currentInventory = new Inventory1(); //call Inventory class
            currentInventory.inventoryInput();
    }

    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\build\classes
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:28: '(' or '[' expected
    public void inventoryInput()
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: '.class' expected
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: illegal start of type
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: not a statement
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: ';' expected
    while (int i = 0; i < 5; i++)
    5 errors
    BUILD FAILED (total time: 0 seconds)

  • Migrate Application Jdeveloper 11.1.1.0.2 to 11.1.2.2.0 - won´t compile

    Hi,
    I'm trying to migrate my application from JDev 11.1.1.0.2 to 11.1.2.2.0 but even after Jdev migrate to new version, the application won't compile correct. Seems that some classes wont recognize dependecies from other package. If i have a class in Web that import a class from Model, in compile time the console give me this kind a error: "package 'xxx.yyy.www' does not exist". If i open any class that gave me this error there isn't any warning or red line showing errors, in the line of the import i can use Ctrl + right click and go to the class without problems. The dependecies between projects (web, model and ejb) are correct. I dont know what is, any help will be appreciated.
    Thanks in advance,
    Alexandre Rocco.

    Hi
    I am facing the same problem when migrating from JDev 11.1.1.4.0 to JDev 11.1.2.2.0. Any idea?
    Regards,
    Ferez

  • JDeveloper 10.1.2.1 won't compile my code?

    Hi,
    I'm pretty new to JDeveloper, and Java in general.
    I've just downloaded and tried to run JDeveloper 10g (10.1.2.1.0, Build 1913) and I've having problems.
    When the application loads, I get a dialog message titled "Java Virtual Machine Launcher", with the message "Could not find the main class. Program will exit"
    JDeveloper then finishes loading.
    I've knocked up a quick JSP page, but it won't compile. I get the message "Internal compilation error, terminated with a fatal exception."
    Also, I've notived that if I go to Project Properties and try to look at Profiles->Development->Libraries, JDeveloper throws a NullPointerException.
    I've got JDeveloper 10.1.3 on my machine, and it has none of these problems?
    After looking around on the web, I'm thinking it might be a CLASS_PATH problem, but how can I confirm this, and how can I fix it?
    Any ideas on what is wrong would be appreciated?
    Thanks
    Thom

    Thanks thahn.
    That fixed the "Java Virtual Machine Launcher" error - I would never have thought spaces in the directory name could have caused this problem!
    The other problems remain though, so I still can't compile any code.

  • DG4ODBC MSSQL query works in sql, but won't compile in PL/SQL.

    I'm using DG4ODBC from 11g to query a SQL Server database. The query I'm using works in a SQL DEveloper SQL worksheet and sqlplus, but won't compile in a PL/SQL procedure.
    The query is
      INSERT
      INTO crm_labels
          accountid,
          label_name,
          cir_labelcode,
          cir_knownasname,
          cir_countryidname,
          parentaccountidname,
          cir_customertypecode1,
          cir_customertypecode2,
          cir_dealstatus
      SELECT "AccountId",
        REPLACE("Name",chr(0)) label_name,
        REPLACE("Cir_labelcode",chr(0)) ,
        REPLACE("Cir_knownasname",chr(0)),
        REPLACE("cir_countryidName",chr(0)),
        REPLACE("ParentAccountIdName",chr(0)),
        "Cir_customertypecode1",
        "Cir_customertypecode2",
        "Cir_dealstatus"
      FROM "dbo"."Account"@crmsvc
      WHERE "Cir_labelcode" IS NOT NULL;The error message is
    Error(1): ORA-04052: error occurred when looking up remote object dbo.Account@CRMSVC ORA-01948: identifier's name length (34) exceeds maximum (30)I'm guessing that it is attempting to describe additional columns in the Account table.
    If I remove the dbo,
      FROM "Account"@crmsvcI get
    Error(1): ORA-04052: error occurred when looking up remote object PUBLIC.Account@CRMSVC ORA-00604: error occurred at recursive SQL level 1 ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Microsoft][ODBC SQL Server Driver][SQL Serve which is less than helpful. However, if I try to use the same query to create a materialized view, I get.
    SQL Error: ORA-04052: error occurred when looking up remote object PUBLIC.Account@CRMSVC
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address1_TimeZoneRuleVersionNu'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address1_UTCConversionTimeZone'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address2_TimeZoneRuleVersionNu'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address2_UTCConversionTimeZone'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Pias_NewLabelInDealNotificatio'. {42S22,NativeErr = 207}
    ORA-02063: preceding 2 lines from CRMSVCwhich seems to confim that in some circumstance, oracle will attempt to parse more than was asked for.
    Any work arounds?
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    DG4ODBC is also 11.2.0.3

    The gateway claims about this column "Address1_TimeZoneRuleVersionNu" which is not listed in your select list.
    When a gateway connection is established it first checks out all columns of the table you want to select to determine the data types and then it fetches the data for the columns you want to select. But there's also an exception - when you use functions the gateway is not able to translate into the syntax of the foreign database. in this case ALL columns will be fetched into the Oracle database and the result is processed locally (post processing).
    You're using replace function which won't be mapped to the foreign database equivalent using DG4ODBC so it will post process the result and fetch from all columns all the data into the Oracle database. Your table contains a column which exceeds the 30 character limitation of Oracle, hence the select will fail.
    The only work around is to create a view on the foreign database side which reduces the column name length to 30 characters or less.

  • Robohelp for Word won't compile

     Hi,I've been trying to get one of my projects to work in Robohelp for Word. But the minute I create a second topic the compiled doen't work. there are no errors. the compilation just never starts. This also happens when I rename the first topic to something else.
    I have the following configurations:
    Robphelp for Word 7 build 145
    MS Office Work 2007
    windows XP professional with service pack 3
    I have deleted and started the project from scratch several times without any success. Any help would be highly appreciated
    Thanks
    Edna

    Hi,
    Thanks for your reply. The problem is there even with tutorial files and dummy projects.
    It seems that there is a problem with saving the document. If I don’t add anything the projects will compile problery. But the minute I change something it won't compile. When I want to close the word document I get a meesage saying if I would like Robohelp to save the document. If I press on "yes" nothing happens. If I press on "yes to all" nothing happens. Pressing on "no" closes the document.
    I have setup my word 2007 in a way so it will save .doc formats instead of .docx. But either way it makes no different the problem is with both file formats.

  • Flash builder 3 won't compile

    I have a flash builder 3 project  but I done something but it won't compile now. How can I resolve this. Tried clean project and no luck

    what are the compile errors u r getting ?

  • I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    What is the problem that you are having ? If you are getting an error message then what does it say ?

  • FtpClient client.delete("file") won't compile?

    Hello Fine People,
    I have this ftp program that is working, except for the delete command:
    import sun.net.ftp.*;
    import sun.net.*;
    String server = "192.168.0.0";
    String user = "me";
    String passwd = "mypassword";
    FtpClient client = new FtpClient();
    client.openServer(server);
    client.login(user, passwd);
    TelnetInputStream tis = null;
    client.binary();
    client.cd("Composites");
    tis = client.list();
    client.get("filename");
    client.delete("filename");
    This is roughly how it is. Without the last line, it compiles and runs fine. But when I add the client.delete line, it won't compile and gives this error:
    ImageTransfer.java:229: cannot resolve symbol
    symbol : method delete (java.lang.String)
    location: class sun.net.ftp.FtpClient
    client.delete("filename");
    Please help!
    - Logan

    Yes. The class you should be importing is, obviously, FTPClient. But don't waste your time trying to compile what is clearly just a code fragment example. The article lists several sources of FTP client software. Once you have chosen one package to evaluate, write your test program using the actual classes from that package, using its API documentation for guidance.

Maybe you are looking for

  • How can I change the order of html form data submitted to me via email?

    I am having customers contact me via an html form posted on my website using the "sendtoemail" command. When I receive the data in an e-mail it  is not presented in the order it appears on the web page and I can't seem to find out what dictates the o

  • Satellite 2430 DVD drive issue

    Hello there, my Satellite 2430 has got a strange DVD problem and can't figure out what is all about. All started when I tried to do a full recovery. The unit wasn't able to boot from DVD. I've checked the DVD drive with different bootable disks but s

  • TEXT AREA - Not able to display contents more than length 4000

    We use textarea item to display contents of xml . But if the content is of size more than 4000 , we are not able to display it in text area. Any suggession / workaround for this .. please help.

  • About what can i do for building exchange server

    hi , i want to know any thing about building new exchange server in my comapny and i want to know some issues about this  - if i build this server in my company and buy server hardware how much of the exchange licence that support 50000 users  and al

  • IDOC processing error

    Hello, First I would like to apologize for the title, maybe it is not as descriptive as it should, but I have no idea how to explain my issue in such a short place. I have created a new relationship for OM, called Z53, as a copy of standard relations