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)

Similar Messages

  • Code won't compile!  (cannot resolve symbol)

    I'm having trouble compiling some code. Do any of you guys know why this won't work?
    * Simulation of one die (now modified for multiple with inheritance)
    * @author Kristian Hermansen
    * @version 3/14/2004 (Section 2 honors)
    public class Experiment1 extends DiceExperiment
    // instance variables
    int numSides = 6;
    int numDice = 1;
    int lowCombo = 1;
    Object[] obj;
    int[] array;
    public Experiment1()
    obj = new Object[lowCombo];
    array = new int[(numSides * numDice) + 1];
    for(int i=0; i < obj.length; i++)
    obj[i] = new Die();
    // this constructor takes arguments for number of number of dice, die sides,
    // and number of lowest side. Trying to be as generic as possible to permit
    // inheritance. We assume that all dice are the same for this application.
    public Experiment1(int dice, int sides, int low)
    numSides = sides;
    numDice = dice;
    lowCombo = numDice * low;
    obj = new Object[lowCombo];
    array = new int[(numSides * numDice) + 1];
    for(int i=0; i < obj.length; i++)
    obj[i] = new Die();
    // throws one die 2000 times and saves all the results in an int array
    public void runExperiment()
    int tally = 0;
    for(int i=0; i < 2000; i++)
    // this puts the counter for outcome k in the array indexed by k
    for(int j=0; j < obj.length; j++)
    tally += obj[j].roll();
    array[tally]++;
    makeBarGraph(array, lowCombo);
    The problem is in this line:
    tally += obj[j].roll();
    but it should work since I have the roll() method defined in the Die() class...
    * This class simulates a 6-sided die
    * @author Kristian Hermansen
    * @version 3/14/2004 (Section 2 Honors)
    import java.util.Random;
    public class Die
    // instance variables
    private static Random generator = new Random();
    private int num;
    * Constructor for objects of class Die
    public Die()
    // initialise instance variables
    num = roll();
    * This method simulates a roll
    public int roll()
    return (generator.nextInt(6) + 1);
    public String toString()
    return num + "";

    Bizarro World Error Message Theory: Error messages, whether from the compiler or the runtime, are not your enemy. They are the friend you know will always be honest with you, even when it hurts. They're telling you something's going wrong. Don't panic. It can be fixed.
    The error message will tell you exactly what it can't recognize.

  • 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

  • Code won't compile

    I have recently installed Java SDK 1.4 on my pc and am trying to run a program that I have created on a linux system. When I run it on my home pc, I get the error, cannot resolve symbol, at every instance where there is use of the SerialPort and similar methods. I think that the problem has to do with a missing folder that contains those methods. Any Ideas?
    Thanks

    You are probably correct, most likely you have classes or jar-files on you classpath on the Linux machine that you don't have at your home pc.
    Check your Linux classpath and see where this SerialPort class is coming from.

  • 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.

  • 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

  • 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.

  • 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);
    }

  • 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

  • Problem with shuffle() code, will not compile

    Hi,
    Below is some code designed to shuffle a set of integers in the file editET.txt. Basically:
    5
    2
    4 say:
    just shuffle these randomly around, however, the code will not compile, any advice or solutions would be great
    import java.io.*;
    import java.util.*;
    public class Shuffle3 {
    public static void main (String [] args) {
    if (args.length<2){
    System.out.println("Usage: java Shuffle3 <input file> <output file>");
    System.exit(-1);
    ShuffleStringList sl = new ShuffleStringList(args[0]);
    sl.shuffle();
    sl.save(args[1]);
    class ShuffleStringList extends StringList {
    public ShuffleStringList(String "editET.txt") {
         super(fileName);
    public void shuffle() {
    Collections.shuffle(this);
    public void save (String "Shuffledok"){
         PrintWriter out = null;
         try {
         out = new PrintWriter(new FileOutputStream("Shuffledok"), true);
    for (int i=0; i < size(); i++){
              out.println((String)get(i));
    catch(IOException e) {
    e.printStackTrace();
    finally {
         if(out !=null) {out.close();}
    class StringList extends ArrayList{
    public StringList(){
         super();
    public StringList(String "editET.txt") {
         this();
    String line = null;
    BufferedReader in = null;
         try {
         in = new BufferedReader(new FileReader("editET.txt"));
         while((line = in.readLine()) !=null) {
              add(line);
    catch(IOException e){
         e.printStackTrace();
    public void save (String "Shuffledok") {
    FileWriter out = null;
    try {
         out = new FileWriter("Shuffledok");
         for(int i =0; i < size(); i++){
         out.write((String)get(i));
    catch(IOException e){
         e.printStackTrace();
    finally {
         try{out.close();} catch (IOException e) {e.printStackTrace();}
    public void shuffle() {
    Collections.shuffle(this);

    import java.io.*;
    import java.util.*;
    public class Shuffle3 {
    public static void main (String [] args) {
    ShuffleStringList sl = new ShuffleStringList("editET.txt");
    sl.shuffle();
    sl.save("Shuffledok");
    class ShuffleStringList extends StringList {
    public ShuffleStringList(String fileName) {
    super(fileName);
    public void shuffle() {
    Collections.shuffle(this);
    public void save (String target){
    PrintWriter out = null;
    try {
    out = new PrintWriter(new FileOutputStream(target), true);
    for (int i=0; i < size(); i++){
    out.println((String)get(i));
    catch(IOException e) {
    e.printStackTrace();
    finally {
    if(out !=null) {out.close();}
    class StringList extends ArrayList{
    public StringList(){
    super();
    public StringList(String fileName) {
    this();
    String line = null;
    BufferedReader in = null;
    try {
    in = new BufferedReader(new FileReader(fileName));
    while((line = in.readLine()) !=null) {
    add(line);
    catch(IOException e){
    e.printStackTrace();
    public void save (String target) {
    FileWriter out = null;
    try {
    out = new FileWriter(target);
    for(int i =0; i < size(); i++){
    out.write((String)get(i));
    catch(IOException e){
    e.printStackTrace();
    finally {
    try{out.close();} catch (IOException e) {e.printStackTrace();}
    public void shuffle() {
    Collections.shuffle(this);
    }

  • 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.

  • How to read XI Data type in Java code and populate as array list, using UDF

    Hi,
    How to read XI Data type in Java code and populate as array list, using UDF?
    Is there any API using which  the XI data types can be read?
    Kindly reply.
    Richa

    Input Structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:CustomerCreateResp xmlns:ns0="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
       <CUSTOMER>
          <item>
             <CUSTOMERNO/>
             <MDMCUSTOMER/>
             <CREATE_DATE/>
             <RETURN>
                <TYPE/>
                <MESSAGE/>
             </RETURN>
             <PT_CONTPART_RETURN>
                <item>
                   <MDM_CONTACT/>
                   <CONTACT/>
                </item>
             </PT_CONTPART_RETURN>
             <PARTNERS>
                <item>
                   <CUSTOMERNO/>
                   <PARTNER_FUNCTION/>
                   <PARTNER_NUMBER/>
                   <DEFAULT_PARTNER/>
                </item>
             </PARTNERS>
          </item>
       </CUSTOMER>
    </ns0:CustomerCreateResp>
    Output structure
    (Sample output structure.This actually needs to be mapped and generated using UDF)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:updateCustomer xmlns:ns1="urn:xiSericeVi"><ns1:customer><ns2:ArrayList xmlns:ns2="java:sap/standard">[]</ns2:ArrayList></ns1:customer><ns1:name>2344566</ns1:name></ns1:updateCustomer>

  • 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 have an MX722, with error code 6000. Have powered down and unplugged. code won't clear. what now?

    I have an MX722, with error code 6000. Have powered down and unplugged. code won't clear. what now?

    Hi jactoday,
    To try and resolve the issue, you will want to ensure that there are no obstructions in the printer that may be causing the error. To do this, please follow the steps located here.  If you still receive the error, the printer will require servicing.  Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

Maybe you are looking for

  • LCD fading to black

    Hi all, My first post here wanted to ask if anyone has had the same issue I have a new Macbook Pro less than 1 month old it was fine for the first 3 weeks now I am noticing that to the left of my screen it is darker than my right? it's very strange s

  • How to retrieve Font info using JDK

    Hello there: I am wondering how I can find as much info about a font as I can using JDK. I can use GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); to retrieve the Font object, and get its name, family, that's pretty much of it. There

  • Requirement class through the Controlling

    Hi experts, Can anyone let me know about the requirement class through the controlling area. Our client process is MTO 3rd party. I am looking for the following path... spro>controlling>prod.cost controlling>cost obj.control>prod cost by sales order>

  • Can't install Illustrator CS5

    Illustrator CS5 fails on installation (Design Premium). All other apps install and work just great. Here's the error: Exit Code: 7 -------------------------------------- Summary -------------------------------------- - 1 fatal error(s), 3 error(s), 4

  • ORA-01850: hour must be between 0 and 23

    Hi techies, We have created a procedure for our daily report.its running fine for two location.when we run for a location we end up with this error.our current NLS_DATE_FORMAT is HH24:MI:SS.but its running successfully when we set nls_date_format='DD