Error in importing user-created jar file & cannot find symbol

Hello.
I try to import the jar file made from common classes in the previous project. by using NB 5.5.1.
The jar file is named as 'tpslib.jar'
The previoud package name is 'tps'.
I added tpslib.jar in the library, and removed the class files from the orginal project, because the class files exist in the tpslib.jar.
THe jar file has 8 class files inclduing the following class, ReservationData.
My question is why the follwoing fuction call try to the method in the previous package, tps instead of those of tpslib.jar.
If you have anyone to answer me, it will be very appreciated.
Tae
package tps;
import java.sql.*;
import java.util.*;
import java.io.*;
import tpslib.*;
public class tpsPWSImpl implements tpsPWSSEI {
public ReservationData reserve(ReservationData request) throws java.rmi.RemoteException {
request.print();
requestLocal.print();
if (!request.equalsCoreOf(requestLocal)){
cFlag = true;
System.out.println("reserve: WARNING ");
===================
9 Error Messages
====================
cannot find symbol
symbol : method print()
location: class tps.ReservationData
request.print();
cannot find symbol
symbol : constructor ReservationData(tps.ReservationData)
location: class tps.ReservationData
wr = new ReservationData(rr);
===========

Does your jar include:
/a/Main.classWith class Main defined in package, er, "a"?

Similar Messages

  • Error while importing user created packages

    Hi ,
    Complexity--- Novice
    Problem Description
    I am trying to run a simple package related program.
    The package file is perfectly compiled and stored in the required path.
    When I try to access this package from another file -- the import statement does not seem to be working.
    It reports an error. However If I use the <pacakage>.<classname> it works perfectly fine.
    I have the following files
    1) The package file : Get.java
    2) The package accessing file : Test.java
    ///////////////Get.java/////////////////////
    package get;
    public class Get
         public Get()
         public String iGet()
              return("Hello World!");
    /////////////////////Test.java/////////////////
    import get.*;
    class Test 
         public static void main(String[] args)
              Get g= new Get();     //Here instead I use get.Get g= new get.Get() it works fine
              System.out.println("Hello World!");
    ///////////////////End of Files////////////////
    /////// Compiling/////////////
    c:\packages>dir *.java    //These are the only 2 files in the directory
    10/05/2005  12:02 AM               147 Test.java
    10/04/2005  11:55 PM               125 Get.java
    c:\packages>javac -d . *.java
    .\Get.java:3: duplicate class: get.Get
    public class Get
           ^
    Test.java:7: cannot resolve symbol
    symbol  : constructor Get  ()
    location: class Get
                    Get g= new Get();
                           ^
    2 errorsI think the problem is clearly explained.
    Thanks in advance

    When the file Test.java is compiled all it needs is
    get/Get.class
    There is no need for the file Get.java to be in
    get/Get.javaI agree with these two statements and it is true that using -d will create the Get.class in the correct directory. However, it looks like you might have Get.java in the Classpath and you are using "import get.*;" in Test.java. You may be confusing the compiler because javac will automatically try to compile source code for dependent classes. I think it will work if you change the import to "import get.Get;"

  • Newbie question: cannot find symbol symbol: class STRING

    I've just decided to teach myself some java, and on my first try something's going wrong and I don't know what it is.
    I'm currently doing this tutorial: http://java.sun.com/docs/books/tutorial/uiswing/learn/example1.html
    and everything is good until I try to compile it and I get this error in the cmd
    HelloWorldSwing.java:30: cannot find symbol
    cannot find symbol
    symbol: class STRING
    everything has been written verbatim from the tutorial, including "import javax.swing.*;"
    What's wrong with it and how do I fix it?

    Hi,
    I saw the coding that You had given a link in your post. Change the following
        public static void main(String[] args) {bye for now
    sat

  • Java:3: cannot find symbol

    i'm learning java
    but when i do a java projram i got a error
    hare is that
    Test1.java:3: cannot find symbol
    symbol : variable Out
    location: class java.lang.System
    System.Out.Println("john");
    ^
    1 error
    i got this error. i see "." this symbol
    then what should i do ?

    Java is case-sensitive. Don't type "Out" and "Println" when you're supposed to type "out" and "println".
    Try this:
    System.out.println("john");

  • When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder". How can i fix this?

    When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder. How can i fix this problem?

    Anyone can help to advice how to solve this issue ?

  • I can't open my Itunes keep receiving error message- The iTunes Library.itl file cannot be found or created. The default location for this file is in the "i Tunes" folder in the "Music" folder

    I can't open my Itunes keep receiving error message- The iTunes Library.itl file  cannot be found or created. The default location for this file is in the "i Tunes" folder in the "Music" folder. I have even tried removing and reinstalling iTunes and it still does work because I continue to receive this error message. Please Help!

    Anyone can help to advice how to solve this issue ?

  • When re-installing JRE 1.2.2 I get an error "can't create JAR file"

    When I uninstalled Java Runtime 1.2.2 and reinstalling, at the end of the installation I get an error:
    "Error while creating JAR file.
    Check you have enough disk space.
    See c:\winnt\temp\uncrunch.log for details"
    Only trouble is I've got 14 GB open and the uncrunch.log file isn't even created.
    Any suggestions or help would be greatly appreciated!
    Johan

    I am also getting a similar error with JRE 1.3.1
    I actually get an uncrunch.log:
    Running uncrunch
    lpCmdLine = "C:\Program Files\JavaSoft\JRE\1.3.1\tmp\rt.out" "D:\\rt.jar"
    Crunching from C:\Program Files\JavaSoft\JRE\1.3.1\tmp\rt.out to D:\\rt.jar
    Temporary file = D:\\rt.tmp
    Couldn't open output file "D:\\rt.tmp"
    The only problem is that D: is a CD ROM drive. Don't know why it is trying to use D:
    Any one have any ideas?

  • CUP Error - User -Create Company address cannot be selected

    Dear Experts,
    We are on GRC SP9. We customized Company as one of the parameter in initiator for roles. Till now we are able to successfully provision roles to the user.
    A new user was created in SAP Back end system and we are facing the below error during provisioning:
    "Error Provisioning your request: Error details : Z System - User id - User Create - Company address cannot be selected"
    Can you please let us know the solution for the above error if anybody has faced earlier.
    Thanks and Best Regards,
    Srihari.K

    Dear All,
    Thanks for the SAP note and its very helpfule. I have one question here.
    When we maintian these Company name in R/3 system does the users needs to be assigned to that Company whenever they are created or even existing users?
    In GRC we have created Company based on different Countries and hence we would like to know if the users needs to be mapped to these Companies in backend system also.
    Thanks and Best Regards,
    Srihari.K

  • Jdeveloper 10.1.2 creating jar files in user's temporary director

    Hi all,
    McAfee uses 100% of my PC CPU every once in a while when jdevw.exe creates jar files in C:\Documents and Settings\wase\Local Settings\Temp. They get created at seemingly random times while I am running the embedded OC4J in debug mode (Struts, BC4J, ADF). McAfee is configured to ignore a few of my directories and I would like to direct those files into an unscanned directory. (No, The powers that be will NOT turn off on access scanning of archives. Sigh.) The files go away when I shut down JDeveloper.
    Thanks,
    --Amy Smith
    Here is a list of the files that were created.
    /cygdrive/c/Documents and Settings/wase/Local Settings/Temp\ $ ls *.jar
    BusinessCSCommon28154.jar commons-beanutils28174.jar javax-ssl-1_228194.jar ordhttp28213.jar
    BusinessCSMT28155.jar commons-collections28175.jar jdev-cm28195.jar ordim1128216.jar
    LW_PfjBean28156.jar commons-digester28176.jar jewt428196.jar ordim28215.jar
    adf-controller28157.jar commons-el28177.jar jmf28197.jar regexp28217.jar
    adfm28158.jar commons-fileupload28178.jar jsp-el-api28198.jar share28218.jar
    adfmtl28159.jar commons-lang-228179.jar jsse28199.jar standard28219.jar
    adfmweb28160.jar commons-lang28180.jar jssl-1_128200.jar struts-legacy28220.jar
    adftags28161.jar commons-logging28181.jar jssl-1_228201.jar struts28221.jar
    aurora_client28162.jar commons-validator28182.jar ldapjclnt1028202.jar struts28230.jar
    bc4jct28163.jar customizer28183.jar log28203.jar template28222.jar
    bc4jctejb28164.jar datatags28184.jar log4j-128204.jar uix228223.jar
    bc4jdomorcl28165.jar db2jcc28185.jar mediaplayer28205.jar uix2tags28224.jar
    bc4jimdomains28166.jar db2jcc_license_cisuz28186.jar mts28206.jar uixadfrt28225.jar
    bc4jmt28167.jar dms28187.jar multiplayer28207.jar xmlcomp28226.jar
    bc4jmtejb28168.jar dsv228188.jar nls_charset1228208.jar xmlparserv228227.jar
    bc4jutil28169.jar hawutil28189.jar ojmisc28209.jar xsqlserializers28228.jar
    bigraphbean28170.jar help428190.jar oracle-el28210.jar xsu1228229.jar
    classes1228171.jar inspect428191.jar oracle_ice28211.jar
    classes12dms28172.jar jakarta-oro28192.jar oraclexsql28212.jar
    collections28173.jar javax-ssl-1_128193.jar ordhttp1128214.jar

    Any suggestions for how I could pursue finding a resolution?
    Thanks,
    --Amy Smith                                                                                                                                                                           

  • How can i create  Jar file using Eclipse IDE.

    Hi Guys
    Am new to java. I want convert my project into executable jar file.
    In my project am using itext.jar.And some other folder.
    already i create jar file.But its not working.only its working 4 modules after that its say file cannot found exception.but the file path is correct.i dont know why its happen.
    This is my project folder strutre also
    Log:->
    src(folder)
    logs(folder)
    comments(folder)
    lib-->itext.jar.
    images-->1,gif
    properties-->catconfig.properties (file)
    now can i create jar file
    this code also show error when i run the jar file
    And this is my catconfig. properties file
    fileName=total_system_log.log
    DDSingle=DD_bysingleIP_comment.txt
    DDRange=DD_byrange_comment.txt
    NDPing=ping_comments.txt
    NDFPing=fping_comments.txt
    reportFileName=report.txt
    moduleFileName=Modules.txt
    propFileName=nameDetails.properties
    Choice=DDSingle
    logFileName=DDSingleIP_10.32.0.2.log
    finalReport=FinalReport.txt
    logFilePath=\logs\
    commentFilePath=\\Comments\\
    its very urgent for me . could u pls send my error  and u r ideas.
    thanks for u r Ansewering.
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.InputStream;
    import java.io.RandomAccessFile;
    import java.util.Properties;
    import java.util.ResourceBundle;
    import java.util.ArrayList;
    public class LogReader {  
        public void getValuesFromFilesOnly(String Choice,String logFileName)
              try {
                   ArrayList commentsList = new ArrayList();
                   ArrayList tempList = new ArrayList();
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String commentDir =ResourceBundle.getBundle("catconfig").getString(Choice);
                   String commentFilePath=ResourceBundle.getBundle("catconfig").getString("commentFilePath");
                   String currentdir1 =userdir+logFilePath+logFileName;
                   StringBuffer strBuff=new StringBuffer();
                   RandomAccessFile randomFile = null;
                   RandomAccessFile commentsFile = null;
                   String tempLine = null;
                   String commentLine = null;
                   String catVersion = null;
                   String finalReport=null;
                   int colon = 0;                    
                   int counter = 0;
                   boolean startFlag = false;
                   boolean endFlag = false;                    
                   boolean endOfFileFlag = false;          
                   System.out.println("Log file checked----->"+currentdir1);
                   System.out.println("comments file used--->"+commentDir);
                   try {
                        randomFile = new RandomAccessFile(currentdir1, "r");
                   } catch (Exception e) {
                        System.out.println("exception@getValuesFromFilesOnly@begin : "+e);
                   System.out.println("hi test1");
                   String commentDir1=userdir+commentFilePath+commentDir;
                   try{
                   System.out.println("Comment Dir:"+commentDir1);
                   commentsFile = new RandomAccessFile(commentDir1, "r");
                   catch (Exception e) {
                        System.out.println("exception@getValuesFromCommentDirOnly@begin : "+e);
                   while ((commentLine = commentsFile.readLine()) != null) {                         
                        String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                        String message = commentLine.substring(0,commentLine.indexOf("="));
                        commentsList.add(checkLine);
                   commentsFile.close();
                   String startComment = (String)commentsList.get(0);
                   String endComment = (String)commentsList.get(commentsList.size()-1);
                   strBuff.append("                          CAT LOG REPORT                           \n\n");
                   while ((tempLine = randomFile.readLine()) != null) {               
                        if(tempLine.contains("CAT version is :"))
                             colon = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(colon+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("Version : "+catVersion+"\n");
                             System.out.println("catVersion is :"+catVersion);
                        commentsFile = new RandomAccessFile(commentDir1, "r");
                        while ((commentLine = commentsFile.readLine()) != null) {
                             String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                             String message = commentLine.substring(0,commentLine.indexOf("="));
                             checkLine=checkLine.toLowerCase();
                             tempLine=tempLine.toLowerCase();
                             if(tempLine.contains(checkLine))
                                  colon = tempLine.indexOf("info -");
                                  catVersion = tempLine.substring(colon+7,tempLine.length());
                                  strBuff.append(message+" ==> "+catVersion+"\n");
                                  System.out.println(message+" ==> "+catVersion);
                                  tempList.add(message+" ==> "+catVersion);
                                  if (catVersion.contains(startComment)){
                                       startFlag = true;
                                       counter++;
                                       System.out.println("*******startFlag**********"+startFlag);
                                  if (catVersion.contains(endComment)){
                                       endFlag = true;
                                       System.out.println("*******endFlag**********"+endFlag);
                                  if (startFlag == true && endFlag == true){
                                       System.out.println("******************************************");
                                       System.out.println("-------------Successfull completion-------");
                                       System.out.println("******************************************");
                                       startFlag = false;
                                       endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                                  if (startFlag == true && endFlag == false && counter > 1){
                                       System.out.println("******************************************");
                                       System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                                       System.out.println("******************************************");
                                       //startFlag = false;
                                       //endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                        commentsFile.close();
                   endOfFileFlag = true;
                   if (startFlag == true && endFlag == false && endOfFileFlag == true){
                        System.out.println("******************************************");
                        System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                        System.out.println("******************************************");
                        startFlag = false;
                        endFlag = false;
                        counter = 0;
                        tempList.clear();
                   randomFile.close();
                 System.out.println("hi");
                   finalReport=ResourceBundle.getBundle("catconfig").getString("finalReport");
                   savereportFile(strBuff,finalReport);
                   System.out.println("Report Generated");
              } catch (Exception e){
                   System.out.println("Exception@getValuesFromFilesOnly : "+e);
        public void findDetails()
             String currentdir1 = ResourceBundle.getBundle("catconfig").getString("fileName");     
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
             RandomAccessFile randomFile = null;
             StringBuffer strBuff=new StringBuffer();
             StringBuffer strBuff1=new StringBuffer();
             StringBuffer strBuff2=new StringBuffer();
             String tempLine = null;     
              String catVersion = null;
              String timeStr=null;
              String nameStr=null;
              String startIP="";
              String endIP="";
              String tempStart="";
              String tempEnd="";
              String reportFileName="";
              String moduleFileName="";
              String propFileName="";
              int startPos=0;
              int endPos=0;
              int fromIndex=0;
              boolean versionFlag=false;
              boolean ndFlag=false;
              boolean ddFlag=false;
              try {
                   randomFile = new RandomAccessFile(userdir+logFilePath+currentdir1, "r");
                   while ((tempLine = randomFile.readLine()) != null) {
                        if(tempLine.contains("CAT version is :") && !versionFlag)
                             startPos = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(startPos+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("version : "+version+"\n");
                             versionFlag=true;
                             //System.out.println("version : "+version);
                        if(tempLine.contains("Inside NetworkDiscoverySlider.jsp"))
                             ndFlag=true;
                             strBuff.append("ND start : "+tempLine+"\n");                         
                        if(tempLine.contains("Inside NetworkDiscoveryDetails.jsp"))
                             strBuff.append("ND end : "+tempLine+"\n");
                             //System.out.println(" ND end : "+tempLine);
                        if(tempLine.contains("Given IPRange from"))
                             startPos = tempLine.indexOf("from");
                             catVersion = tempLine.substring(startPos+5,tempLine.length());
                             strBuff.append("NDRange : "+catVersion+"\n");     
                             //strBuff.append("NDRange : "+tempLine+"\n");                                             
                             //System.out.println("NDRange :"+catVersion);     
                             startPos=0;
                             fromIndex=tempLine.indexOf(":");
                             endPos= tempLine.indexOf(':', fromIndex+2);
                             //System.out.println("fromIndex : "+fromIndex+" endPos : "+endPos);
                             timeStr=tempLine.substring(startPos, endPos);
                             nameStr=catVersion.replaceAll(" ", "_");                         
                             strBuff2.append("ND_"+timeStr+" "+catVersion+" = "+"NDRange_"+nameStr+".log\n");
                        if(tempLine.contains("inside ByIpAddress.jsp"))
                             ddFlag=true;
                             strBuff.append("DD Start : "+tempLine+"\n");                                                  
                        if(tempLine.contains("start_IpAddress:"))
                             startPos = tempLine.indexOf("start_IpAddress:");
                             catVersion = tempLine.substring(startPos+16,tempLine.length());
                             startIP=catVersion;                         
                        if(tempLine.contains("end_IpAddress"))
                             startPos = tempLine.indexOf("end_IpAddress");
                             catVersion = tempLine.substring(startPos+13,tempLine.length());
                             endIP=catVersion;                         
                             if(endIP.length()==0)
                                  System.out.println("hi5");
                                  strBuff.append("DDSingleIP : "+startIP+"\n");
                                  //strBuff.append("DDSingleIP : "+tempLine+"\n");                              
                                  //System.out.println("DDSingleIP : "+startIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);     
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" = "+"DDSingleIP_"+startIP+".log\n");
                             else
                                  strBuff.append("DDRangeIP : "+startIP + " to "+ endIP+"\n");
                                  //strBuff.append("DDRangeIP : "+tempLine+"\n");                              
                                  //System.out.println("DDRangeIP : "+startIP + " to "+ endIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);                         
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" to "+endIP+" = "+"DDRangeIP_"+startIP +"_to_"+ endIP+".log\n");
                        if(tempLine.contains("set percentage completedCount: 100"))
                             System.out.println("hi...1");
                             strBuff.append("DD End : "+tempLine+"\n");
                             //System.out.println("DD End : "+tempLine);          
                   reportFileName=ResourceBundle.getBundle("catconfig").getString("reportFileName");
                   savereportFile(strBuff,reportFileName);
                   if(ndFlag)
                        strBuff1.append("Network Discovery\n");                    
                   if(ddFlag)
                        strBuff1.append("Device Discovery\n");
                   moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                   savereportFile(strBuff1,moduleFileName);
                   propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                   savereportFile(strBuff2,propFileName);
              } catch (Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@findDetails : "+e);
        public void savereportFile(StringBuffer strBuff,String targetFileName)
              try{
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String reportFile=userdir+logFilePath+targetFileName;     
                   String fileContent="";
                   fileContent=strBuff.toString();
                      //System.out.println("file content : "+fileContent);
                      FileWriter fileWriter = new FileWriter(reportFile);
                      if(fileContent!=null)
                           fileWriter.write(fileContent);
                      fileWriter.close();
              catch(Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@savereportFile : "+e);
        public ArrayList<String> getFileNames()
             String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
              RandomAccessFile repFile=null;
              String reportLine = null;
              int colon=0;
              int fromIndex=0;     
              int startPos=0;
              int endPos=0;
              String timeStr="";
              String fileName=null;          
              ArrayList<String> nameList=new ArrayList<String>();          
             try
                  reportFile=userdir+logFilePath+reportFile;
                  repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                    
                        if(reportLine.contains("NDRange"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="NDRange_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDSingleIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDSingleIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDRangeIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDRangeIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                  repFile.close();
             catch(Exception e)
                   System.out.println("Error@getFileNames : "+e);
             return nameList;
        public void writeFile(String oldLogName,String newLogName)
             try
                   FileOutputStream writeFile=null;               
                   String line = null;
                   String userdir = System.getProperty("user.dir");
                   String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");     
                   String newLogPath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   RandomAccessFile repFile=null;               
                   String reportLine = null;
                   String tempLine=null;
                   String prevLine=null;
                   String nextLine=null;
                   String target=null;
                   String tempStr=null;
                   String startStr=null;
                   String endStr=null;          
                   int pos=0;
                   boolean flag=false;
                   boolean writeFlag=false;
                   boolean versionFlag=false;               
                   //System.out.println("newLogName : "+newLogName);     
                   newLogPath=userdir+newLogPath;
                   System.out.println("newLogPath : "+newLogPath);     
                   BufferedReader buffRead = new BufferedReader(new FileReader(oldLogName));
                   writeFile = new FileOutputStream(newLogPath+newLogName+".log", false);//true-for append mode
                   DataOutputStream dout=new DataOutputStream(writeFile);               
                   tempStr=newLogName.replace("_", " ");
                   pos=tempStr.indexOf(" ");
                   startStr=tempStr.substring(0,pos);
                   endStr=tempStr.substring(pos+1, tempStr.length());
                   target=startStr+" : "+endStr;
                   System.out.println("target ===> "+target);               
                   reportFile=newLogPath+reportFile;
                   repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                   
                       if(reportLine.contains(target))
                            flag=true; 
                            prevLine=tempLine;
                            //System.out.println("prevLine *****: "+prevLine);
                       else
                            tempLine=reportLine;
                            if(flag==true)
                                 nextLine=reportLine;
                                 flag=false;
                                 //System.out.println("nextLine *******:"+nextLine);
                                 break;
                  repFile.close();     
                 if(prevLine!=null && prevLine.length()>0)
                       pos=prevLine.lastIndexOf(" : ");
                       prevLine=prevLine.substring(pos+3, prevLine.length());
                       //System.out.println("prevLine : "+prevLine);
                  else
                       System.out.println("Starting line not available for : "+target);
                  if(nextLine!=null && nextLine.length()>0)
                        pos=nextLine.lastIndexOf(" : ");
                        nextLine=nextLine.substring(pos+3, nextLine.length());
                        //System.out.println("nextLine : "+nextLine);
                  else
                       System.out.println("Ending line not available for : "+target);
                       nextLine=prevLine;
                   while ((line=buffRead.readLine()) != null) {     
                        if(line.contains("CAT version is :") && !versionFlag)
                             versionFlag=true;
                             dout.writeBytes(line+"\n");                         
                        if(line.contains(prevLine))
                             writeFlag=true;                         
                        if(line.contains(nextLine))
                             writeFlag=false;
                             break;
                        if(writeFlag)
                             dout.writeBytes(line+"\n");
                  dout.writeBytes(nextLine+"\n");
                   buffRead.close();     
                   System.out.println("done");
              catch(Exception e)
                   System.out.println("Exception@writeFile : "+e.getMessage());
        public String folderCheck(String foldName)
              File folder=null;
              File newFile=null;
              String[] folderContent=null;
              String tempFileName="";
              String newLogName="";
              int count=0;     
              String logFilePath="";     
              String fileName="";
              String feedBackMsg="";          
              String userdir = System.getProperty("user.dir");
              logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
              fileName=ResourceBundle.getBundle("catconfig").getString("fileName");
              folder=new File(foldName);
              if(folder.isDirectory())
                   newLogName=userdir+logFilePath+fileName;
                   //System.out.println("newLogName : "+newLogName);
                   newFile=new File(newLogName);
                   if(newFile.exists())
                        newFile.delete();
                   folderContent= folder.list();
                   if (folderContent != null && folderContent.length>0)
                        System.out.println("folder has files : "+folderContent.length);                    
                        for(int iterate=0;iterate < folderContent.length;iterate++){                         
                             if (folderContent[iterate].toLowerCase().contains("system"))
                                  count++;                              
                                  tempFileName=foldName+"/"+folderContent[iterate];     
                                  try
                                       FileOutputStream appendedFile=null;
                                       BufferedReader buffRead = new BufferedReader(new FileReader(tempFileName));
                                       appendedFile = new FileOutputStream(newLogName, true);//true-for append mode
                                        DataOutputStream dout=new DataOutputStream(appendedFile);
                                        String line = null;
                                       System.out.println("writting : "+tempFileName);
                                       while ((line=buffRead.readLine()) != null) {                                        
                                            dout.writeBytes(line+"\n");
                                       buffRead.close();          
                                       //System.out.println("done");
                                  catch(Exception e)
                                       System.out.println("Exception@folderCheck : "+e);
                        if(count==0)
                             feedBackMsg="syslognotavail";
                             //System.out.println("System Log(s) not available");
                        else
                             feedBackMsg="syslogavail";
                             //System.out.println(count +" System log(s) avail");
                   else
                        feedBackMsg="filesnotavail";
                        //System.out.println("Files are not in the folder");
              else
                   feedBackMsg="Dirnotavil";
                   //System.out.println("Directory not exists in the given name");
              return feedBackMsg;
        public ArrayList<String> loadFileContent(String selectedStr)
             //System.out.println("inside loadFileContent()");
             String logFilePath="";
             String propFileName="";
             String line="";
             String choice="";
             String tempStr="";
             int startPos=0;
             int endPos=0;
             ArrayList<String> timeList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));
                  if(selectedStr.equalsIgnoreCase("Device Discovery"))
                       choice="DD";
                  else if(selectedStr.equalsIgnoreCase("Network Discovery"))
                       choice="ND";
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(choice))
                             System.out.println(line);
                             startPos=line.indexOf("_");
                             endPos=line.indexOf(" =");
                             tempStr=line.substring(startPos+1, endPos);
                             System.out.println("tempStr : "+tempStr);
                             timeList.add(tempStr);
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return timeList;
        public String getFileName(String timeStr)
             System.out.println("inside getFileName");
             String logFilePath="";
             String propFileName="";
             String line="";
             String tempStr="";
             int startPos=0;
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;              
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));              
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(timeStr))
                             System.out.println(line);
                             startPos=line.indexOf(" = ");                         
                             tempStr=line.substring(startPos+3, line.length());
                             System.out.println("tempStr : "+tempStr);                         
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return tempStr;
        public ArrayList loadFile()
             String logFilePath="";
             String moduleFileName="";
             String line="";         
             ArrayList<String> moduleList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                  moduleFileName=userdir+logFilePath+moduleFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(moduleFileName));              
                  while ((line=buffRead.readLine()) != null) {     
                       moduleList.add(line);                    
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFile : "+e);
             return moduleList;
    public static void main(String[] args) {          
         System.out.println("Inside main");     
         //String userdir = System.getProperty("user.dir");
         //System.out.println("userdir : "+userdir);
         /*ArrayList<String> fileNameList=new ArrayList<String>();
         String Choice="";     
         String logFileName="";     
         String logFilePath="";     
         String totalLog="";     
         String newLog="";     
         String folderName="";
         Choice=ResourceBundle.getBundle("catconfig").getString("Choice");
         logFileName=ResourceBundle.getBundle("catconfig").getString("logFileName");     
         logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
         folderName=ResourceBundle.getBundle("catconfig").getString("folderName");
         totalLog=ResourceBundle.getBundle("catconfig").getString("fileName");     */
         /*try
              //to write the total log
              //folderCheck(folderName);
              //to find the details in the given log
              //findDetails();
              //to split the logs accordingly
              totalLog=logFilePath+totalLog;          
              fileNameList=getFileNames();;
              System.out.println("FileNameList size = "+fileNameList.size());
              for(int i=0;i<fileNameList.size();i++)
                   newLog=fileNameList.get(i).toString();
                   writeFile(totalLog,newLog);
              //to analyse the logs & to produce reports          
              //getValuesFromFilesOnly(Choice,logFileName);          
         }catch (Exception e)
              System.out.println(e.getMessage());
    }[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    JSP is used for server validation.
    So you need a an application server (like Tomcat or Jboss) to execute your jsp files.
    you can create the .war file of your simple jsp application and put it in the server.
    then you will have to access your page using a web browser.
    the URL will be
    http://<ComputerName or IP Address>:<PortNumber>/<WarFileName>/<MainJspPage>
    (eg: http://100.100.100.252:8080/SimpleApplication/mainPage.jsp)
    -Achyuth

  • Problem while creating JAR file for my swing application

    Hi...
    Using my swings application I am trying to Run different software�s .
    My program is Running fine from command prompt. If I create JAR file
    It is giving error like �Failed to load Main-Class manifest attribute from .jar�
    Can anybody help me to creating JAR file
    Thanks in advance
    Cheers
    Mallik

    hi,
    User following command
    jar-cmf textfile_name.txt Jarfile_name *
    here you have to make manifest file
    and making jar file you have reach there by command promt
    and manifest file have some constraint also as well as format
    format are
    Manifest-Version: 1.0
    Class-path: jar file name which are using in app separed by space
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Main-Class: Main class name
    and end of file is not have carriage return

  • Java.lang.Error: java.util.zip.ZipException: The system cannot find the fil

    I got maven 221 installed
    i got jdk 1.6 and 1.5 installed (have tested both)
    I have a strange error. All my co-workers can build but I cant. The only thing I can find is that I dont have installed BEA Weblogic but I dont want to have that installed. It should be able to run anyway.
    Could someone tell me what is wrong? If you need pom.xml I got that one as well.
    process-classes:
    [copy] Copying 4 files to C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-content
    [mkdir] Created dir: C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-jar
    [java] Creating an MJF from the contents of directory C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-content...
    [java] Compiling the files...
    [java] Creating the list.
    [java] Doing the compile.
    [java] WLMaker-SubProcess: : Exception in thread "main" java.lang.Error: java.util.zip.ZipException: The system cannot find the file specified
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.getManagementTempDir(BeanGenDriver.java:93)
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.main(BeanGenDriver.java:117)
    [java] WLMaker-SubProcess: : Caused by: java.util.zip.ZipException: The system cannot find the file specified
    [java] WLMaker-SubProcess: :      at java.util.zip.ZipFile.open(Native Method)
    [java] WLMaker-SubProcess: :      at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    [java] WLMaker-SubProcess: :      at java.util.jar.JarFile.<init>(JarFile.java:132)
    [java] WLMaker-SubProcess: :      at java.util.jar.JarFile.<init>(JarFile.java:97)
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.getManagementTempDir(BeanGenDriver.java:90)
    [java] WLMaker-SubProcess: :      ... 1 more
    [java] WLMaker-SubProcess: : Stopped draining WLMaker-SubProcess:
    [java] WLMaker-SubProcess: : Stopped draining WLMaker-SubProcess:
    [java] BeanGen code generation failed
    [HUDSON] Archiving C:\hudson\jobs\albpm_ip-identity-asserter_-Build\workspace\pom.xml to C:\hudson\jobs\albpmip-identity-asserter_-Build\modules\dk.skat.ip.integration.albpm$ip-identity-asserter\builds\2010-11-2213-41-28\archive\dk.skat.ip.integration.albpm\ip-identity-asserter\1.2\pom.xml
    [INFO] ------------------------------------------------------------------------

    from my experience, using weblogic jars can be a pain if the full install is not on the local box.
    Note that you dont have to 'install' it. Just copy the directory.
    Reason is that the jar files have manifests with relative classpaths.
    For an example of horror take a look at the weblogic.jar MANIFEST's classpath entry.
    -Fred

  • Importing open source jar files

    Hi
    I have written a program, a Java application (Prog 1), which uses some opensource jar files and it runs fine.
    Now I am trying to create an applet (another program in same project) which will show the output from Prog 1 on a webpage.
    But when I try to do this, the applet does not get loaded into the browser and shows me the (ClassNotFound) error that a class file which is in the open source jar file cannot be found.
    why is this happening and what can be done?
    Please help.

    ... and what JAR is the class in, which it reportsas
    The jar file is htmlparser.jar, but this file is
    already added in the project classpath
    No it isn't. The run-time "classpath" is specified by what you put in the <applet> tag. It has nothing to do with the classpath you specified at compile-time. You need to add htmlparser.jar to the "archive" entity.
    archive="YahooExt.jar,htmlparser.jar"
    (if I have the correct separator, which I believe is a comma, according to this resource: http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html)
    And of course htmlparser.jar needs to live on the web server, in the same directory as YahooExt.jar in the example above.

  • Invoke-IpamGpoProvisioning : Failed to import GPO. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    Hello Im trying to configure IPAM but im getting this error.
    PS C:\Users\Administrator.IPADE.MX> Invoke-IpamGpoProvisioning –Domain actdir.ipade.mx –GpoPrefixName IPAM –IpamServerFq
    dn minte.actdir.ipade.mx –DelegatedGpoUser Administrator -DomainController discovery.actdir.ipade.mx
    Invoke-IpamGpoProvisioning : Failed to import GPO. The system cannot find the file specified. (Exception from HRESULT:
    0x80070002)
    At line:1 char:1
    + Invoke-IpamGpoProvisioning –Domain actdir.ipade.mx –GpoPrefixName IPAM –IpamServ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Invoke-IpamGpoProvisioning], Exception
        + FullyQualifiedErrorId : InvalidOperation,Invoke-IpamGpoProvisioning
    In the event viewer  I founf this but I don't know what to do.
    Import of backup failed. Error [The system cannot find the file specified.
    Details -
         Backup
             Directory: The system cannot find the file specified.
             Instance : C:\Users\Administrator.IPADE.MX\AppData\Local\Temp\1\ipamprov
             Comment  : {09673450-4573-42E8-85D0-104144DF0BA3}
             Source GPO:
                 DisplayName: IPAMGPO_DNS
                 ID: IPAMGPO_DNS
                 Domain: {7F345996-1D92-4194-85BF-72BFB5298EDA}
         Destination GPO:
                 DisplayName: ipamtestsetup.com
                 ID: IPAM_DNS
                 Domain: {447E8380-91AF-4C2D-8DAA-2C090A6400E8}

    Hi,
    Before going further, what was name specified in the IPAM provisioning wizard while selecting Group Policy based provisioning method? The GPO prefix name specified in the
    PowerShell command must be same as the one specified in the IPAM provisioning wizard while selecting Group Policy based provisioning method.
    Regarding Invoke-IpamGpoProvisioning, the following article can be referred to as reference.
    Invoke-IpamGpoProvisioning
    http://technet.microsoft.com/en-us/library/jj553805.aspx
    Best regards,
    Frank Shen

  • WUT-123: The webutil.jar file cannot be found...

    Hello,
    I am having a problem using webutil to upload to a 9iAS using a mapped network drive. Here's the set up:
    MachineA
    9iAS
    Windows2000
    I simply mapped the drive (X:) to a folder on MachineA's
    local drive (d:\folder). I can upload files fine to the directory on the local drive (d:\folder). But if I try to upload to the mapped x:\, I get the error (from the webutil.log):
    "WUT-123: The webutil.jar file cannot be found on the Appliciation Server Classpath - Some file transfer functions will not work. x:\attach\VISIBLE-149.TXT java.io.FileNotFoundException: x:\attach\VISIBLE-149.TXT (The system cannot find the path specified)"
    I have no problems with uploading files if I upload to MachineA's local drive (d:\folder).
    When I was initially testing this out on 9iDS, this was working. Here's the set up:
    MachineB
    9iDS
    WindowsNT
    The 9iDS was on a different machine running WindowsNT and I had mapped X: to the same folder on MachineA. I could upload to the mapped drive without any problems.
    In both cases, I used the same client machine to test out uploading files.
    Any suggestions?
    Sandy

    I think that the opmn process starts with the credentials of the user who installed it (Local System) and not the credentials of the current user which launches it.
    I remember that when I tried to switch the user of the opmn service(from local system to a network user which is also a local admin) in the Windows services control panel,the OHS hasn't started at all.
    If you try to launch it from a DOS cmd window,then,you may try to map the hard drive in the dos command prompt,the service should know the drive name from this local context.
    If it works,can you ,please, post here,so we can all know the way?
    Thanks,
    Sandu

Maybe you are looking for

  • SBO - How to use two different Stock Account within the same Item Group

    Hi, I'm currently stuck within one of my implementation. I'm deploying the same solution worldwide which worked pretty well until now. All the items are connected to an item group, with a unique GL account, supposed to book at the same time the good

  • Linking data across PDF's in a portfolio

    Morning All, I am looking for a way to be able to copy data input into a form in one PDF in my portfolio and have it appear in mutliple other forms sharing the same fields. For example I have a portfolio full of forms to be filled by our clients, man

  • To remove check marks from the polist

    i am using 'BAPI_PO_CREATE1' to create a Purchase Order.The purchase order gets created but the problem is that when the purchse order list is displayed the "Goods Reciept" and "GR non-valuated" check boxes int the delivery tab are clicked which is n

  • Dynamic Line Graph

    I am interested in adding a dynamic line graph to a form I have. I attempted to use myChart with an array which pretty much went nowhere. I have read a little on the subject which entails lots of script, which is ok, however I am lost and in need of

  • ACS5.3 Backup failure...

    Hi, I have installed an ACS 5.3 (Version : 5.3.0.40.6) as standalone ACS in a customer setup. We had scheduled the backup to be  done daily at a particular time. It was working fine for few weeks and after that the backup did not happen.   When i had