File Problem

Could anyone help me please, it is very urgent, when i run the below code i got a nullException in main method ???
Input.txt
12.36 52.36
23.23 56.52
24.63 60.25
30.2 65.23
32.3 68.33
35.26 70.52
40 75.23
42.12 80.54
45.36 85.52
FileRecord.java
package com.bhaidar.machinery.struct;
import java.io.Serializable;
public class FileRecord implements Serializable {
private double thickness;
private double angle;
public FileRecord()
this(0.0, 0.0);
public FileRecord( double thick, double degree )
setThickness( thick );
setAngle( degree );
public void setThickness( double thick )
thickness = thick;
public double getThickness() { return thickness; }
public void setAngle( double degree )
angle = degree;
public double getAngle() { return angle; }
ReadFile.java
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
import javax.swing.*;
import com.bhaidar.machinery.struct.FileRecord;
public class ReadFile extends JFrame {
private ObjectInputStream input1;
private JButton readb;
private JTextArea output;
private JScrollPane scroller = new JScrollPane( output );
private String outfile = " ";
private File file1, file2;
private FileInputStream fileInput1, fileInput2;
private double arraythick[], arraydegree[];
public ReadFile () {
super("Reading from a file");
getContentPane().setLayout( new BorderLayout() );
output = new JTextArea(10,5);
readb = new JButton("Read the File");
readb.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e)
readIt();
getContentPane().add(readb,BorderLayout.SOUTH);
readb.setEnabled( false );
outfile += "Thickness\tAngle\n";
for(int j=0; j<arraythick.length; j++)
outfile += arraythick[j] + "\t" + arraydegree[j] + "\n";
output.setText( outfile );
getContentPane().add(scroller,BorderLayout.CENTER);
private void openFile( )
file1 = new File("input.txt");
if ( file1 == null ||
file1.getName().equals( "" ) )
JOptionPane.showMessageDialog( this,"Invalid File Name",
"Invalid File Name",JOptionPane.ERROR_MESSAGE );
else {
// Open the file
try {
// close file from previous operation
if ( input1 != null )
input1.close();
fileInput1 = new FileInputStream( file1 );
input1 = new ObjectInputStream( fileInput1 );
catch ( IOException e ) {
JOptionPane.showMessageDialog( this,
"File does not exist",
"Invalid File Name",
JOptionPane.ERROR_MESSAGE );
private void closeFile()
try {
input1.close();
catch ( IOException ioe ) {
JOptionPane.showMessageDialog( this,
"Error closing file",
"Error", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
private void readIt() {
FileRecord record;
openFile();
try {
// input the values from the file
int index = 0;
while ( true ) {
record =
( FileRecord ) input1.readObject();
arraythick[index+1] = record.getThickness();
arraydegree[index+1] = record.getAngle();
catch ( EOFException eof ) {
closeFile();
catch ( ClassNotFoundException cnfex ) {
JOptionPane.showMessageDialog( this,
"Unable to create object",
"Class Not Found", JOptionPane.ERROR_MESSAGE );
catch ( IOException e ) {
JOptionPane.showMessageDialog( this,
"Error reading from file",
"Error", JOptionPane.ERROR_MESSAGE );
public static void main( String args[] )
final ReadFile app = new ReadFile();
app.setSize(300, 300);
app.addWindowListener(
new WindowAdapter() {
public void windowClosing( WindowEvent e )
app.closeFile();
System.exit( 0 );
app.show();
haidar, bilal

thank you for the hint you were right, but i am still getting an exception when i click the button to start reading from the text file, can you please check this for me.
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
import javax.swing.*;
import java.util.*;
public class ReadFile extends JFrame {
     private BufferedReader bfile1;
     private JButton readb;
     private JTextArea output;
     private JScrollPane scroller = new JScrollPane( output );
     private String outfile = " ";
     private FileReader file1, file2;
     private double arraythick[], arraydegree[];
     public ReadFile () {
          super("Reading from a file");
          arraythick = new double[500];
          arraydegree = new double[500];
          this.getContentPane().setLayout( new BorderLayout() );
          output = new JTextArea(10,5);
          readb = new JButton("Read the File");
          readb.addActionListener(
               new ActionListener() {
                    public void actionPerformed(ActionEvent e)
                         readIt();
                         outfile += "Thickness\tAngle\n";
                         for(int j=0; j<arraythick.length; j++)
                         outfile += arraythick[j] + "\t" + arraydegree[j] + "\n";
                         output.setText( outfile );
                         getContentPane().add(scroller,BorderLayout.CENTER);
          getContentPane().add(readb,BorderLayout.SOUTH);
     private void openFile( )
     try {
          FileReader file1 = new FileReader("mydata.txt");
     BufferedReader bfile1 = new BufferedReader(file1);
     catch ( IOException e ) {
     JOptionPane.showMessageDialog( this,
     "File does not exist",
     "Invalid File Name",
     JOptionPane.ERROR_MESSAGE );
     private void closeFile()
     try {
     bfile1.close();
     catch ( IOException ioe ) {
     JOptionPane.showMessageDialog( this,
     "Error closing file",
     "Error", JOptionPane.ERROR_MESSAGE );
     System.exit( 1 );
     public void readIt() {     
     String srecord = null;
     openFile();
     try {  
     srecord = new String();
          int index = 0;
     while ( (srecord = bfile1.readLine()) != null ) {
          StringTokenizer tokens = new StringTokenizer( srecord );
          arraythick[index+1] = Double.parseDouble(tokens.nextToken());
          arraydegree[index+1] = Double.parseDouble(tokens.nextToken());
          catch (IOException e) {
     // catch possible io errors from readLine()
     System.out.println("Uh oh, got an IOException error!");
     e.printStackTrace();
public static void main( String args[] )
final ReadFile app = new ReadFile();
app.setSize(300, 300);
app.addWindowListener(
new WindowAdapter() {
public void windowClosing( WindowEvent e )
app.closeFile();
          System.exit( 0 );
app.show();
     

Similar Messages

  • DW CS5 Missing Related Files Problem

    Hello
    Hoping somebody may be able to help me with a missing related files problem in CS5. I've tried Adobe phone support but they couldn't solve the problem.
    *Some* of my sites (but not all) are not showing all the files related to that page. My pages are typically in .asp vb server model and contain .asp virtual includes (header, nav etc) plus .js and .css linked files
    However DW is only showing the .asp includes as related files and not css or js ones. In design view the CSS is displaying correctly, and all styles appear in the CSS inspector but not showing as a related file in the bar. In CS4 it works fine.
    I've tried deleting the site and recreating it, copying the files to a new folder and setting up a fresh site, creating a new folder and downloading all files from the remote server but no joy. I've also tried refreshing related files. if I click on the filter in the bar it only shows the asp includes and nothing else.
    Any help would be gratefully appreciated, this is a great feature when it works
    Cheers
    MB

    UPDATE:
    Managed to solve this problem, this is a new issue to DW CS5, previous versions do not seem to exhibit this problem
    It occurs when you use site root rather than document relative paths for js/css etc files AND don't have the remote site url (web url) specified in the site setup | local info dialog, or do not have it fully qualified with http://
    ie. ../js/file.js works fine without a remote web url but /js/file.js does not show the related file in the bar unless a remote url is defined.
    Hope that helps anyone else that encounters the same issue!
    MB

  • With conversion to Leopard, file problems with networked Windows computer

    Last night I did an Archive & Install from Tiger to Leopard on my Intel MacBook Pro. Today, I had trouble finding the other computers at my office. Once I finally got them to show up, I opened a Word file found on another computer, made some changes, and when I tried to save it, I got this message: "This is not a valid file name. Try one or more of the following: *Check the path to make sure it was typed correctly. *Select a file from the list of files and folders." Since this file already existed and I wasn't changing the name, I thought this was odd, but I changed the name from "Seating Chart 3-8-08" to "SeatingChart3-8-08" in case Leopard didn't like spaces when talking to Windows, but I got the same error message. Finally I gave up, not knowing what to do, then discovered that it had in fact saved my file. Still, every time I try to save ANY Word document from the shared folder of the Windows computer, I get the same error message endlessly until I choose "Don't Save."
    When I try to open an Excel file from that computer, it won't even open; it says " 'File Name.xls' cannot be accessed. This file may be Read-Only, or you may be trying to access a Read-Only location. Or, the server the document is stored on may not be responding." As with the Word file problem above, I did not have any problem accessing the files until I converted to Leopard.
    The Windows machine is Windows XP using Microsoft Office 2003; I have Microsoft Office 2004 on my machine.

    See if this Link, by Pondini, offers any insight to your issue...
    Transfer from Old  to New
    http://pondini.org/OSX/Setup.html
    Also, See here if you haven't already...
    http://www.apple.com/support/switch101/     Switching from PC

  • I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

  • Anyone know if the long standing duplicate files problem with File History has been fixed yet?

    There are loads of public threads about the duplicate files problem
    with Windows 8/8.1 File History backup system.
    From all the threads I've looked at, there seems to be no solution,
    and no acknowledgement from MS that they can even repro the problem
    (which surprises me considerably as there are so many people who
    notice the problem).
    Is anyone aware of whether MS (may) have fixed this for Win10?
    Are MS aware of the problem and if they're able to fix it?
    Dave - with many GB of duplicated files in File History :)

    Hmm, is that the attitude MS would recommend? :)
    Why would I care what Microsoft would recommend?
    Clearly you don't, and you appear to have missed my smiley. Calm down
    Noel, many of us are as annoyed by aspects of modern Windows as you
    are. :)
    I'm all about making Windows actually WORK/./
    Aren't we all? Windows is software I use too many hours every day, I
    along with many millions of others need it to work really well. You
    are not alone.
    When they implement something that doesn't work, and even if it did work doesn't do what's needed - and/beyond that/ they remove features people DO need (such as the GUI for Windows Backup), I see no wrong in advising people of the way things
    really are.
    File History essentially does work - it's saved me a couple of times
    in the past couple of weeks. It just has a highly annoying habit of
    creating 100% duplicates of some files for no apparent reason. If MS
    have fixed that I won't have any known complaints about it.
    If you don't like it, you don't have to use it. I generally like it, I
    just want to see that its fixed.
    Dave

  • Idoc to file problem.......... IDOC lost

    i have a idoc to file problem,
    the idoc is sent from R/3 to XI,
    the problem is IDOC is sent from R/3,
    it didnt reach to XI.....
    i have checked.......we05 in R/3, it gives a status 3,
    then i checked SM58 in R/3, it shows nothing,
    when i check in idx5 in XI, theres no trace of that idoc....and no trace of the scenario run in SXMB_MONI
    pls help, where can i trace the idoc.....
    pls help

    Hi sudeer,
    Did You Check It In WE19.(Test Tool For Idoc Processing)
    If Not Do The Following Steps:
    <u><b>Step1:</b></u>
      >>      Give Your Existing Idoc Number.
    <u><b>Step 2:</b></u>
      >>      Basic Type is Your Message type.
            Ex: MATMAS05 or CREMAS05.
    <u><b>Step 3:</b></u>
      >>      In Your Existing MATMAS05 or CREMAS05 Structure say EDIDC,
      >>      You Should Fill  Your Mapped Entries In Data Structure of EDIDC.
      >>      So that Those Fields Gets Framed as Segments.
    <u><b>Step 4:</b></u>
      >>      After Doing It goto  Menu Bar and Click Idoc And Goto  Edit Control Record.
    <u><b>Step 5:</b></u>
      >>      Now You Give Your Sender And Receiver Port Number Along With Your 
            Logical System And Message Type again its Your MATMAS05  or
           CREMAS05 .
    <u><b>Step 6:</b></u>
      >>      After Doing It Click Standard Outbound Processing.
    <u><b>Step 7:</b></u>
      >>      It Will Say what Happened To your Idoc.
    <u><b>Step 8:</b></u>
      >>     It Is For Sure That if This Processing Fails It Wont Go To XI..
    Regards,
    Dhayanandh .S
    Dont forget To Provide Points If Found Helpful...
    Message was edited by:
            DHAYANANDH SIVASANKARAN

  • TS5179 I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update (PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it. #out of space...??)

    I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update, 11.4.62 (on a PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it (Ugh).  First result Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there.  Second result, upon installing iCloud again, I have two iCloud contact files shown in outlook - "iCloud" & iCloud, within iCloud".  1,332 & 1,385 contacts respectively. 
    Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  This is NOT fun at 72-yrs old...!!
    So, how do I make sure I haven't lost anythying from Outlook?   Russ-AZ

    Interesting response, Kappy  -  Back to original post: "First result: Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there (therefore, initially I had lost my contact file from Outlook).  Second result, upon installing iCloud again, I now have two iCloud contact files shown in Outlook - "iCloud" & iCloud, within iCloud".  W/ 1,332 & 1,385 contacts respectively.  
    Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  This is NOT fun at 72-yrs old...!!
    So, how do I make sure I haven't lost anythying from Outlook?   Russ-AZ"
    You can safely assume that I have tried using it!   So, to make things a little clearer:
         1)  I now have two iCloud "contacts files", w/ a different total count. What's the difference?  Why the different toatl count?
         2)  Since re-installing the Apple software (part of the MSVCR" recovery instructions) "couldn't possible affected Outlook", why am I getting an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  What's in those files? And where are they?
    Probably more important questions get down to:
         3)  Why is a basic Apple product upgrade "screwing-up Outlook"?  This iTunes upgrade, failing to install properly forced Outlook 2007 into a 2-min start-up cycle.  Which was fixed with this "Goat-Rpdeo" of re-installing MSVCR80.dll.
         4)  And under the latest release of iOS-7.0.4 on our iPhones, why is Apple now forcing us to use the iCloud to back-up our contacts, calendars & tasks, vs. allowing these files to be backed-up directly on our PC's via the USB cable?
    Thanks again for your interest and comments.  - Russ-AZ

  • RMI class file problem

    I have already write a RMI example for self-study successfully, but there are a little class file problem that I'm not able fix it.
    In my RMI example there are 3 .java files (RMIServer.java, RMIClient.java and a MethodImpl.java)
    After I have javac and rmic them, I got RMIServer_Skel.class, RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
    In order to run the RMI in a local envirnment, I divide them into 2 folders as listed below:
    Server - RMIServer_Skel.class, RMIServer_Stub.class and the MethodImpl.class
    Client - RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
    Then when I start to run them in a DOC envirnment...
    start rmiregistry........(run successful and another rmiregistry DOC window created)
    java RMIServer.........Exception in thread "main" java.lang.NoClassDefFoundError: RMIServer
    Oops? Class not found? How can that be? And after that, I tried something.......to add the RMIServer.class into the Server folder.
    Again, I start to run them in a DOC envirnment...
    start rmiregistry........(run successful and another rmiregistry DOC window created)
    java RMIServer.........The server is instantiated(run successful and print out a String)
    Um...is the RMI have to run with a RMIServer.class file? But the RMI notes I refered from is not seems to be telling me to do this, are there any one can give me a helping hand?

    please, go here, read thoroughly
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

  • Locked file problem with WebDAV

    I am using DreamWeaver CS3 on my Macintosh at home and on a
    PC at work. I am connecting to my website via WebDAV, and for some
    reason Dreamweaver cannot edit the files on the site. When I try to
    check out any file I get an error stating: "file.html is locked and
    can be viewed but not edited" I then have the option to check it
    out or view or cancel. Regardless of what I do, if I continue and
    open the file and make changes the file will not get updated on the
    remote server even though Dreamweaver reports a successful "put" or
    "check in" command in the log file. This happens on both the
    Macintosh and the Windows PC. Both are also updated to the latest
    versions of Dreamweaver.
    The strange thing is, if I mount the WebDAV server as a
    filesystem on my macintosh and authenticate with the same
    login/password that entered in Dreamweaver's WebDAV settings, I can
    edit the html files using a text editor and they save perfectly
    fine. Additionally, while the web server is mounted on the desktop,
    if I change Dreamweaver's site settings to "local/network" and
    enter the locally mounted WebDAV share path instead of using
    Dreamweaver's built-in WebDAV client, then everything works
    properly in Dreamweaver. Reverting back to using WebDAV in
    dreamweaver (as opposed to through the OS) brings about the same
    "locked file" problem as before.
    There appears to be a problem with Dreamweaver's WebDAV
    access to the site, and I'm wondering if there's an easy fix or if
    this has been experienced by others?
    Thanks,
    -Topher

    Have a look at FileUtils::DecomposeUnicode and NormalizeUnComposedUnicodeChars. Use the first to convert before using i.e. FileUtils::PMStringToSysFile() and the later afetr i.e. FileUtils::IDFileToPMString().
    HTH

  • Bat file problems with 5.2(3)

    I'm having bat file problems with CCM 4.2(3) with bat version 5.2(3). When adding phone/users getting an error number -2146828279 with this message "Description -Subscript Out of range".

    Hi Denis,
    Just wanted to know if the description contained a comma? There was a bug in a previous BAT version that would affect phone/user inserts if there was a comma.
    CSCsb61425 Bug Details
    Headline BAT insert fails if phone description contains comma
    This was in BAT 5.1.4
    Hope this helps!
    Rob

  • Tcode FILE problem

    I am trying to use the Direct Input method in the LSMW (It is my first time using the Direct Input method) but I encounter a problem during the Specify File step saying that No Logical Path was specified. I look into the forums and they told me that I needed to define one with the FILE Tcode but when go to the FILE Tcode a message pops up saying Changes to Repository or cross-client Customization are not permitted.
    What would cause this? How should I deal with it?

    Hi Obie,
    I guess you are testing in Testing client .
    Do it in development client.
    Mohinder

  • Macbook Air 11" i7 corrupt files problem with Adobe Illustrator CS4

    Hi
    this problem may not be entirely related but maybe someone could help anyways or knows how I can proceed...
    I'm running Illustrator CS4 on a Macbook Air 11" (latest 2011 model, with i7, 4GB, 128SSD), and lately some files are getting corrupted. specifically, adobe illusrator CS4 files with weeks of work. interestingly, the time machine backups are also getting corrupted.
    its like I'm working on a file for a few days, backing up with time machine as well
    closes the file, after a few days returns to it… (normal behavior)
    then when i try to get back to the file then sometimes it says "Cant open the illustration, could not complete the operation" and opens a blank canvas.
    restoring the file via time machine also gives the same error (its like all versions get corrupted simultaneously), even 4-5 versions backwards, even though they worked before when the file worked
    it happened quite a few times, ruining weeks of work.
    I tried the following:
    reinstalling CS4 - didn't work
    Opening the files on CS5 - still don't open
    doing the file recovery thing and then opening it in a notepad - didn't work at all
    using Time machine - the files are still corrupt
    it only happenes with AI files, not photoshop files, for example.
    I thought maybe it has anything to do with SSD? since my previous macbook pro (15", 2007) never did these errors…
    please help
    Eido

    If at all, this would be I/O performance and bandwidth issues with Time Machine, but I don't think that's the problem. More to the point I think that it's a case of Preview opening the files to genereate thumbnails and icons and something going wrong there. I'd look up some guides on how to edit the relevant plist and conf files to exclude your AIs or turn off the behavior to generate these previews globally. This may help hugely...
    Mylenium

  • Spool file problem,Can't see the query in output file.

    Hello ,
    I am facing a very old school kind of problem .....about spool file ....
    The scenario -
    I have made a script by name DB_Status_checkup.sql which i want to fire on the database to check the database status. In this script their are many queries regarding the data dictionary views to know about the database. It consist of nearly 25-30 different select queries..
    The problem is i want to make a spool file of the output of that query....i want to see the SQL query & the output below in the spool file, so it will be easy for me to judge the result. But i can't see the SQL query , i can only see the output , & in so many queries it all gets jumbled up....even i can't understand where the next output starts ...
    Sample of my SQL Script ....
    clear buffer
    spool D:\DB_status.txt
    /*To check the database startup time*/
    Select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
    from v$instance
    .........next query n so on....
    spool off;
    In the output pf the spool file at D:\db_status.txt..
    Startup time
    08:25 16-JUL-10It shows only the output of the query in the spool file not the query,
    What should i do to get the SQL query as well as the output of that query just below it in the spool file ???
    Please suggest if you have anymore ideas , regarding this .....
    ORACLE 10g R2
    Windows Server 2008
    Thanks in advance ...

    Why don't you just use database control, instead of re-inventing the wheel?
    Apart from that, SQL*Plus has it's own reference manual, which you apparently refuse to read.
    The answer to your quiz/doc question is
    set echo on
    Sybrand Bakker
    Senior Oracle DBA

  • Edge Animate's OAM file problem placed in Muse or other unknown problem??  Please help!

    Hi,
    I need help please.  Did anyone do a whole page animation in Edge Animate and place the OAM file into Muse, and somehow all the menu and social media icon buttons in Muse are blocked by the placed animation?  All my menu buttons, social media icon buttons and a link are not working (blocked by the transparent AN stage).   I can't go to any other pages because of this issue when previewed in browser.  My animation is a slide-open page from center of the page to both right and left side, also text moved up to the top.  All are moved out of the stage once animation finished to show the home page with contents, including menu and social media icon buttons.  Thanks for your help in advance!!
    Thanks,
    mykw123     

    That answers why the two G4's talk normally! I do
    have the TCP/IP settings set up manually.
    Well, if they are already set manually, maybe you should change them to Auto-negotiate. You shouldn't have to use the Manual setting at all. If you so, then someone, usually the people who wrote the driver for the network card, have screwed something up. It then becomes your job to fix it.
    The problems are just very slow document/file
    transfer from either new to old or old to new
    computer over network, which usually is great with
    the two G4's.
    That is probably the problem. You may want to go ahead and setup the new machine with manual settings to match the G4s. Otherwise, even the Internet will be noticeably slower.
    As for Target Disk Mode...so reboot the old G4
    holding the T key and the hard drive should show up
    on the desktop of the new computer?
    That will do it. It is the best and fastest option to transfer large amounts of data. But even target disk mode is kind of slow. A real, external firewire hard drive will be the fastest of all. It is an excellent idea for backups and this kind of thing.

  • Private Key File problem

    I have Weblogic Server Version 6.0. I created Private Key File using Certificate
    Request Generator Servlet. It created the the private key file (.der) file &
    CSR using which I got the Trial Server Certificate from Verisign. I installed
    the certificate (.pem) and configured the server. When I restarted the server
    it gives the following EOFException while reading the Private Key File : (I gave
    the Private Key password while generating the private key file from the servlet)
    <Dec 21, 2001 7:43:08 PM GMT+05:30> <Alert> <WebLogicServer> <Security configura
    tion problem with certificate file config/mydomain/TTI-D066-key.der, java.io.EOF
    Exception>
    java.io.EOFException
    at weblogic.security.Utils.inputByte(Utils.java:133)
    at weblogic.security.ASN1.ASN1Header.inputTag(ASN1Header.java:125)
    at weblogic.security.ASN1.ASN1Header.input(ASN1Header.java:119)
    at weblogic.security.RSAPrivateKey.input(RSAPrivateKey.java:119)
    at weblogic.security.RSAPrivateKey.<init>(RSAPrivateKey.java:91)
    at weblogic.t3.srvr.SSLListenThread.<init>(SSLListenThread.java:398)
    at weblogic.t3.srvr.SSLListenThread.<init>(SSLListenThread.java:301)
    at weblogic.t3.srvr.T3Srvr.initializeListenThreads(T3Srvr.java:942)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:403)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
    at weblogic.Server.main(Server.java:35)
    Thanks in advance for any solutions...
    Regards,
    Venkatesan

    Hi,
    please check if you provided the private key password which was used to
    create the file in the following property
    -Dweblogic.management.pkpassword
    on the command line correctly.
    In addition, please check "Use Encrypted Keys" to "true" in <server>->SSL
    tab from the admin console.
    Maria
    Developer Relations Engineer
    BEA Support
    Venkatesan schrieb in Nachricht <3c234536$[email protected]>...
    >
    I have Weblogic Server Version 6.0. I created Private Key File usingCertificate
    Request Generator Servlet. It created the the private key file (.der) file&
    CSR using which I got the Trial Server Certificate from Verisign. Iinstalled
    the certificate (.pem) and configured the server. When I restarted theserver
    it gives the following EOFException while reading the Private Key File : (Igave
    the Private Key password while generating the private key file from theservlet)
    >
    <Dec 21, 2001 7:43:08 PM GMT+05:30> <Alert> <WebLogicServer> <Securityconfigura
    tion problem with certificate file config/mydomain/TTI-D066-key.der,java.io.EOF
    Exception>
    java.io.EOFException
    at weblogic.security.Utils.inputByte(Utils.java:133)
    at weblogic.security.ASN1.ASN1Header.inputTag(ASN1Header.java:125)
    at weblogic.security.ASN1.ASN1Header.input(ASN1Header.java:119)
    at weblogic.security.RSAPrivateKey.input(RSAPrivateKey.java:119)
    at weblogic.security.RSAPrivateKey.<init>(RSAPrivateKey.java:91)
    atweblogic.t3.srvr.SSLListenThread.<init>(SSLListenThread.java:398)
    atweblogic.t3.srvr.SSLListenThread.<init>(SSLListenThread.java:301)
    at weblogic.t3.srvr.T3Srvr.initializeListenThreads(T3Srvr.java:942)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:403)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
    at weblogic.Server.main(Server.java:35)
    Thanks in advance for any solutions...
    Regards,
    Venkatesan

  • WLS 6.1, SP2, Error Deploying WAR, Manifest file problem

    Hi,
    When I moved to SP2 on 6.1, I am getting a new error while deploying a war file.
    It looks from the stack trace that there is a problem with my manifest file, but
    I am just taking the manifest file created by jdk1.3 jar utility - My META-INF
    dir is empty before jarring. When opened in notepad, the cursor can go to the
    start of the line below the blank line. I mention this in case that is the EOF,
    and relevant to the problem. Any help is much appreciated.
    Mike
    Manifest File:
    Manifest-Version: 1.0
    Created-By: 1.3.1 (Sun Microsystems Inc.)
    Stack Trace:
    ####<Feb 22, 2002 10:32:36 AM EST> <Info> <HTTP> <mdunbar> <myserver> <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101031> <[WebAppServletContext(1118014,ipp,/ipp)]
    extracting classfiles to C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\WEB-INF\_tmp_war_myserver_myserver_ipp:>
    ####<Feb 22, 2002 10:32:36 AM EST> <Debug> <HTTP> <mdunbar> <myserver> <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101158> <Exception
    thrown while loading ipp: java.lang.StringIndexOutOfBoundsException: String index
    out of range: -1>
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1525)
         at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166)
         at weblogic.utils.jars.Manifest.stream(Manifest.java:78)
         at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:398)
         at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:177)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3405)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:815)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy32.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:984)
         at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:971)
         at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:956)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:648)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy98.addTarget(Unknown Source)
         at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationManager.java:867)
         at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:966)
         at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:886)
         at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:802)
         at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:733)
         at weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:206)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy5.update(Unknown Source)
         at weblogic.management.console.webapp._domain.__upload_app._jspService(__upload_app.java:149)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:241)
         at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
         at weblogic.management.console.actions.ForwardAction.perform(ForwardAction.java:35)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<Feb 22, 2002 10:32:36 AM EST> <Error> <J2EE> <mdunbar> <myserver> <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <160001> <Error deploying
    application ipp: Could not load ipp>
    ####<Feb 22, 2002 10:32:36 AM EST> <Error> <Management> <mdunbar> <myserver> <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <141042> <Error deploying
    application .\config\mydomain\applications\ipp.war: java.lang.reflect.UndeclaredThrowableException>

    I figured out what was causing this for me. Apparently, the new Manifest reader
    classes in WLS SP2 are a lot pickier ( polite way of saying they dont handle exception
    cases very well ;-) ). I had 2 third-party jar files in my WEB-INF/lib directory
    whose manifests had issues that the Manifest reader could not handle. One of
    them was a header line that wrapped and the other had extra lines at the end of
    the file. I had to unjar them, fix the manifests, and re-jar them. the server
    started up fine after that.
    It might be nice if they provided a better error message than "String Index Out
    Of Bounds: -1" for this problem, but hey, you can't have everything because where
    would you put it :)
    "Mike Dunbar" <[email protected]> wrote:
    >
    Hi,
    When I moved to SP2 on 6.1, I am getting a new error while deploying
    a war file.
    It looks from the stack trace that there is a problem with my manifest
    file, but
    I am just taking the manifest file created by jdk1.3 jar utility - My
    META-INF
    dir is empty before jarring. When opened in notepad, the cursor can go
    to the
    start of the line below the blank line. I mention this in case that is
    the EOF,
    and relevant to the problem. Any help is much appreciated.
    Mike
    Manifest File:
    Manifest-Version: 1.0
    Created-By: 1.3.1 (Sun Microsystems Inc.)
    Stack Trace:
    ####<Feb 22, 2002 10:32:36 AM EST> <Info> <HTTP> <mdunbar> <myserver>
    <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101031> <[WebAppServletContext(1118014,ipp,/ipp)]
    extracting classfiles to C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\WEB-INF\_tmp_war_myserver_myserver_ipp:>
    ####<Feb 22, 2002 10:32:36 AM EST> <Debug> <HTTP> <mdunbar> <myserver>
    <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101158> <Exception
    thrown while loading ipp: java.lang.StringIndexOutOfBoundsException:
    String index
    out of range: -1>
    java.lang.StringIndexOutOfBoundsException: String index out of range:
    -1
         at java.lang.String.substring(String.java:1525)
         at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166)
         at weblogic.utils.jars.Manifest.stream(Manifest.java:78)
         at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:398)
         at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:177)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3405)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:815)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy32.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:984)
         at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:971)
         at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:956)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:648)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy98.addTarget(Unknown Source)
         at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationManager.java:867)
         at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:966)
         at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:886)
         at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:802)
         at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:733)
         at weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:206)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy5.update(Unknown Source)
         at weblogic.management.console.webapp._domain.__upload_app._jspService(__upload_app.java:149)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:241)
         at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
         at weblogic.management.console.actions.ForwardAction.perform(ForwardAction.java:35)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<Feb 22, 2002 10:32:36 AM EST> <Error> <J2EE> <mdunbar> <myserver>
    <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <160001> <Error
    deploying
    application ipp: Could not load ipp>
    ####<Feb 22, 2002 10:32:36 AM EST> <Error> <Management> <mdunbar> <myserver>
    <ExecuteThread:
    '1' for queue: '__weblogic_admin_html_queue'> <system> <> <141042> <Error
    deploying
    application .\config\mydomain\applications\ipp.war: java.lang.reflect.UndeclaredThrowableException>

Maybe you are looking for