InputStream not reading booleans

Hello gyus,
I'm currently working on a little something, and basically what my 'little something' is based on, is a server-client communication.
And right now, I need my server to read two strings that have been pasted into a file by my client, but at a certain time! So of course I'm having a boolean to check for when to read the text in the .DAT file.. And I'm also having a 'writeBoolean(boolean data)' method, to write that true value to the server.. But for some reason my server is not reading the boolean. Here's my 'writeBoolean(boolean data)' method:
public static void writeBoolean(boolean data){
try{
Client.objOut = new ObjectOutputStream(Client.output);
Client.objOut.writeBoolean(data);
System.out.print("Sent boolean: " +data+ "\n");
}catch(IOException ioe){
ioe.printStackTrace();
Client.close();
}And here's where I call the method:
if(!cache.exists()){
readLoginData = true;
cache.createNewFile();
Stream.writeString(username +"\n", cache);+
+Stream.writeString(password, cache);+
+Stream.writeBoolean(readLoginData);+
+}else{+
+readLoginData = true;+
+Stream.writeString(username+ "\n", cache);
Stream.writeString(password, cache);
Stream.writeBoolean(readLoginData);
}And in my client console it prints out: "Sent boolean: true", so it is sending the correct value.
And here's my 'readBoolean()' method.
public static boolean readBoolean(){
try{
ClientHandler.objIn = new ObjectInputStream(ClientHandler.input);
boolean data = ClientHandler.objIn.readBoolean();
System.out.print("Recieved boolean: " +data+ "\n");
return data;
}catch(IOException ioe){
ioe.printStackTrace();
ClientHandler.close();
return false;
}And this is where I call it:
@Override
public void run(){
while(true){
boolean readLoginData = Stream.readBoolean();
}But nothing ever shows up in my server console..
If you need to see more code, then feel free to tell me, and please help me! :)
-By the way: I'm sorry that the format is all screwed up, but the code tags always does that.. :(

If you need to see more code, then feel free to tell me, and please help me! :)We need less code that's more correct. Post an SSCCE. Why are Stream, Client, etc static? You can only ever have one client? These should be object/instance methods, not static. In which case, why do you even need custom read/write Boolean methods? Why not just pass around an ObjectOutputStream/ObjectInputStream?
Anyway, on a hunch I'd say you're not flushing a stream somewhere.
-By the way: I'm sorry that the format is all screwed up, but the code tags always does that.. :(No they don't. There's something wrong with the way you're pasting it. Are you copying it from another post? You should be copying it directly from your IDE.

Similar Messages

  • Serial port not reading after few seconds PLZ HELP...

    Hi,
    I have developed a GUI using Swing in NetBeans IDE 4.0 on Windows 2000 professional for one of our products.
    It communicates with the associated Hardware through serial port.
    The GUI sends commands to the H/W to perform some functionality. After receiving response from the H/W, GUI displays the necessary messages.
    Since the H/W does require some time to perform the indicated operation, it sends the response after 10-11 seconds but my GUI is not reading the response.
    Both the command and response are single byte (8 bits) wide.
    The GUI can read the response if sent within 3-4 sec.s but not after that.
    I have disabled the Receive TimeOut on the serial Port.
    Following is the code I use to Open and use the SerialPort.
    public void OpenPort(){
             portList = javax.comm.CommPortIdentifier.getPortIdentifiers();
            while (portList.hasMoreElements()) {
                portId = (javax.comm.CommPortIdentifier) portList.nextElement();
                if (portId.getPortType() == javax.comm.CommPortIdentifier.PORT_SERIAL) {
                    if (portId.getName().equals(Welcome.CommPort)) {
                        try {
                            serialPort =  (javax.comm.SerialPort)portId.open("FCAT-01 ATE", 20000);
                        } catch (javax.comm.PortInUseException e) {}
                        try{
                            serialPort.addEventListener(this);
                        }catch (java.util.TooManyListenersException e){}
                            serialPort.notifyOnDataAvailable(true);
                   try {
                            outputStream = serialPort.getOutputStream();
                        } catch (java.io.IOException e) {}
                            try {
                                inputStream=serialPort.getInputStream();
                            }catch (java.io.IOException e){}
                                serialPort.notifyOnDataAvailable(true);
                   try {
                            serialPort.setSerialPortParams(Welcome.Speed, javax.comm.SerialPort.DATABITS_8, javax.comm.SerialPort.STOPBITS_1,
                                javax.comm.SerialPort.PARITY_NONE);
                        } catch (javax.comm.UnsupportedCommOperationException e) {}
                             serialPort.disableReceiveTimeout();
           Pls help me how to solve this problem as its really very urgently necessary to release the product.
    Thank u for ur time and consideration,
    Umesh Balikai

    Sir,
    Here is the complete code.
    The H/W takes about 10 seconds to reply. The GUI is responding to first response from ATE H/W and not to the subsequent ones. The ATE responds after the GUI sends command when the user clicks OKButton.
    package my.ate.pkg;
    import javax.swing.*;
    import java.util.*;
    public class PingTest extends javax.swing.JFrame implements javax.comm.SerialPortEventListener{
        /** Creates new form PingTest */
        public PingTest() {
            initComponents();
        private void initComponents() {                         
            // create and initialise  various buttons, labels, etc.
        private void OKButtonMouseClicked(java.awt.event.MouseEvent evt) {                                     
            // TODO add your handling code here:
            OKClick();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new PingTest().setVisible(true);
        // Variables declaration                     
        private javax.swing.JLabel AN;
        private javax.swing.JButton OKButton;
        public static java.io.OutputStream outputStream;
        public static java.io.InputStream inputStream;
        public static java.util.Enumeration portList;
        public static javax.comm.CommPortIdentifier portId;
        public static javax.comm.CommPort commPort;
        public static javax.comm.SerialPort serialPort;
        public static byte[] readBuffer=new byte[20];
        public static int numBytes=0;
        private java.awt.Color Fail=java.awt.Color.red;
        private java.awt.Color Pass=java.awt.Color.blue;
        public static int requestCommand;
        public static int receiveCount=0;
        public static boolean portOpen=false;
      // End of variables declaration 
        public void serialEvent(javax.comm.SerialPortEvent event){
                switch(event.getEventType()){
                    case javax.comm.SerialPortEvent.BI:
                    case javax.comm.SerialPortEvent.OE:
                    case javax.comm.SerialPortEvent.FE:
                    case javax.comm.SerialPortEvent.PE:
                    case javax.comm.SerialPortEvent.CD:
                    case javax.comm.SerialPortEvent.CTS:
                    case javax.comm.SerialPortEvent.DSR:
                    case javax.comm.SerialPortEvent.RI:
                    case javax.comm.SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                         break;
                    case javax.comm.SerialPortEvent.DATA_AVAILABLE:   
                        try{
                                 numBytes=inputStream.read(); 
                                     if(numBytes==0x54)  {
                                        // display some message
                     else if(numBytes==0x41)  {
                                        // display some message
                                    else if(numBytes==0x46)  {
                                         // display some message
                      else if(numBytes==0x42)  {
                                             // display some message
                        }catch (java.io.IOException e){}
                        break;
        public void OKClick(){
            if(portOpen){
                        serialPort.close();
                        portOpen=false;
            OpenPort();
            try{
               Thread.sleep(500);
            }catch(java.lang.InterruptedException e){//display error}
            try{
                outputStream.write(0x39);
            }catch(java.io.IOException e){//display error}
            //display some Progress Message
        public void OpenPort(){
             portList = javax.comm.CommPortIdentifier.getPortIdentifiers();
            while (portList.hasMoreElements()) {
                portId = (javax.comm.CommPortIdentifier) portList.nextElement();
                if (portId.getPortType() == avax.comm.CommPortIdentifier.PORT_SERIAL) {
                    if (portId.getName().equals(Welcome.CommPort)) {
                        try {
    serialPort =  (javax.comm.SerialPort)portId.open("FCAT-01ATE",2000);
                                           } catch (javax.comm.PortInUseException e) { //display error}
                        portOpen=true;
                        serialPort.notifyOnDataAvailable(true);
                        try{
                            serialPort.addEventListener(this);
                        }catch (java.util.TooManyListenersException e){ //display erro}
                        serialPort.disableReceiveTimeout();
         try {
                            outputStream = serialPort.getOutputStream();
                        } catch (java.io.IOException e) { //display erro}
                            try {
                                inputStream=serialPort.getInputStream();
                            }catch (java.io.IOException e){ //display erro}
                                serialPort.notifyOnDataAvailable(true);
         try {
                            serialPort.setSerialPortParams(Welcome.Speed, javax.comm.SerialPort.DATABITS_8, javax.comm.SerialPort.STOPBITS_1,
                                javax.comm.SerialPort.PARITY_NONE);
                        } catch (javax.comm.UnsupportedCommOperationException e) { //display erro}
    }Probably the command after clicking OKButton is not reaching the H/W. because the ATE will surely respond if it receives the command and that is tested several times.
    Thanks.

  • How to create a custom control of a button where the look will be applied to all others but not the Boolean text?

    Hi all
    I would like to create a customized button as a master so that if I change the look of the master all other buttons will change too.
    I have done this with a custom control as a "strict type def" otherwise the look will not change BUT If I do this as a strict type def I cannot change the Boolean text anymore which should be different on every button.
    How can I create a master control of a button where the look will be applied to all others but not the Boolean text?
    Stay Hungry, Stay Foolish
    Solved!
    Go to Solution.

    Steve Chandler wrote:
    I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.
    As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.
    Kudos for being sneaky.
    I like these creative work-arounds!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Server Socket does not read data input stream

    Hi all,
    I am very newbie to Java Network programming with sockets and multi-threading.
    But I am obliged to develop a chat system written in Applets which can be placed on the website and used by visitors who come to my website.
    In order to understand this, I have tested a basic web chat program I downloaded from the Internet which use sockets and multi-threadings. The program work fine, no bugs at all at both compilation and run time. I noticed that all three streams for Client side (i.e. first one is input stream used receiving data from User; the second one is socket input stream used for receiving data from Server socket, and the third is socket output stream used for writing data to server socket) were established. And the same, two socket streams (input & output) for Server side were also connected when running program giving right port number and IP address of the server.
    The problem is both server and client sockets do not read data using the following stream classes:
    1. DataStreamInput: I use input.readUTF() method
    2. or BufferedReader: I use input.readLine() method
    The example of the codes are below:
    private BufferedReader input = null;
    private PrintWriter output = null;
    private Socket socket = null;
    public void open() throws IOException
    {  input = new BufferedReader(new
    InputStreamReader(socket.getInputStream()));
    System.out.println("Server socket input stream was created, and");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Server socket output stream was created");
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    System.out.println("Server is reading data from Client, wait...");
    String fromClient = input.readLine();
    System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    The problem is at the line: String fromClient = input.readLine(); in the run() method? What is wrong with the codes above?
    Note: I also try to use original codes which use readUTF() method in DataStreamInput class instead using readLine() in BufferedReader. Both methods dont read data from inputstream socket?
    I very appreciate any help/advice from experienced developers.
    Best regards

    Hi,
    Yes. The readLine() method hangs! After the test, the execuation of the program is stopped at the line of readLine() method; it does not pass it?
    There is no problem with writing to Server socket. After the test, the program pass through flush() method. Here is the code for writing to sever socket within ChatClient (client side socket) class:
    private BufferedReader input = null;
    private PrintWriter           output = null;
    public ChatClient(String serverName, int serverPort)
    {  System.out.println("Establishing connection. Please wait ...");
    try
    {  socket = new Socket(serverName, serverPort);
    System.out.println("Connected: " + socket);
    start();
    catch(UnknownHostException uhe)
    {  System.out.println("Host unknown: " + uhe.getMessage()); }
    catch(IOException ioe)
    {  System.out.println("Unexpected exception: " + ioe.getMessage()); }
    public void start() throws IOException
    {  input   = new BufferedReader (new
                             InputStreamReader(System.in));
    System.out.println("Client User input stream was created,");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Client Socket output stream was established, and");
    if (thread == null)
    {  client = new ChatClientThread(this, socket);
    thread = new Thread(this);
    thread.start();
    public void run()
         while (thread != null) {
         String fromUser;
              try{
                   while((fromUser = input.readLine())!= null)
                   System.out.println("Client wasreading a data from User, and");
    output.println(fromUser);
         output.flush();
         System.out.println("Client has written a data to Server");
    catch(IOException ioe)
    {  System.out.println("Sending to server error: " + ioe.getMessage());
    stop();
    etc.
    Here is a piece of codes for reading data from the Client Socket in the ChatServer Class (Server Side socket):
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    {  //server.handle(clientPort, input.readLine());
    System.out.println("Server is reading data from Client, wait...");
    String fromUser = input.readLine();
    //while((fromUser = input.readLine()) != null)
         System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    etc. Please advice why the readLine() method hangs; does not read data from the input stream received from the CLIENT?

  • After WLS10.3 migration getBinaryStream in Oracle.sql.BLOB not reading data

    Please some one help me. After the 10.3 migration, the values in CSV file(as BLOB in DATABASE) is not read by getBinaryStream method. It returns 0. It was working before. Please find below the code:
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    public InputStream RetriveISfromBlob(int batchid)
                        BLOB blob;
                        InputStream instream=null;
                        try
                             Statement stmt = connection.createStatement ();
                             ResultSet resSet = stmt.executeQuery
                             ("SELECT content FROM file_upload WHERE batch_id="+batchid);
                             resSet.next();
                             System.out.println("after query");
                             /*Get the BLOB locator.*/
                             blob = ((OracleResultSet)resSet).getBLOB(1);               
                             /*get the blob's outputstream
                             any data read from this stream comes from the BLOB*/
                             instream = blob.getBinaryStream();
    Below is code from Another class which call the above method RetriveISfromBlob:
    InputStream inputstream = fileDataDAO.RetriveISfromBlob(batchId);
                   System.out.println("afterfileread");
                   CommaFileInputStream reader = new CommaFileInputStream(inputstream);
                   reader.setIgnoreFirstLine(true);
                   CommaRecord comma = reader.getCommaRecord();
                   System.out.println("Number of records -" + comma.size());     /This returns o but CSV file has lot of datas
    NOTE: When I use Ojdbc14.jar only the above code returns 0. When i use Ojdbc_6g.jar it throws NULL POINTER EXCEPTION because the code was written like import oracle.jdbc.driver.OracleResultSet; But in all cases the data in BLOB was not read
    Edited by: 833987 on Feb 4, 2011 9:07 AM

    Hi,
    The problems 1, 2 and 3 under the heading Issue 2 should be fixed in the Early Adopter release 3.1 EA3, which is now available.
    David

  • URLConnection.getInputStream()  not reading the full HTML

    I need code to read a html file after posting a request. The code is as follows:
    URLConnection connection = url.openConnection();
    connection.setDoInput( true );
    connection.connect();
    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    if(in.equals(null)){
    throw new IOException();
    while((inputLine = in.readLine()) != null){
    System.out.println("line is: " + inputLine);
    Sometimes it works fine. Sometimes it can not read full content.(may be the low network). but i view the source in my browser, I can find it just fine.
    Any ideas? Has anyone encountered this kind of problem?

    my code is same for reading input from a servlet, but it sometimes get and inputstream, sometimes, don't, it always can not read the second one. mine code is inside applet and chat with other applet thourgh a servlet. The server side does write message out.
    Any insight how to debug this, I am totally out!!

  • Java.lang.InstantiatiCould not read mime-mappings config file: ./mime.types

    I am about to had enough of this moronic container call OC4J that's compatible to to itself.
    I did a
    1. clean unzip and installation.
    2. setup admin account.
    3. config the autodeploy in server.xml (Who in their right phreakin mind design a container with no hot deploy nowaday).
    4. configure the data source.
    5. test data source using a webapp with one page jsp do a JSF jdbc connection.
    When try and deploy the error-free webapp (tested in tomcat) using both frontend and autodeploy,a cryptic error occur: could not read mime.types.
    I have never see this error before in my life. its in oracle.oc4j.admin.internal.ApplicationDeployer.addApplication
    This error happened after I configure my webapp to do phreakin orion-application.xml disable toplink, orion-webapp xml prefer local class file. If I don't get this resolve within couple days, I'll put my career on the line with full force and request we do not use OC4J anywhere in this group.
    A M$FT .NET project looks very promising and efficient compare this deployment hell they call OC4J
    2007-06-20 13:22:50.500 NOTIFICATION Application Deployer for norm STARTS.
    2007-06-20 13:22:50.546 NOTIFICATION Copy the archive to C:\oc4j101320_SA\j2ee\home\applications\norm.ear
    2007-06-20 13:22:50.890 NOTIFICATION Initialize C:\oc4j101320_SA\j2ee\home\applications\norm.ear begins...
    2007-06-20 13:22:50.890 NOTIFICATION Auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm.ear...
    2007-06-20 13:22:50.890 NOTIFICATION Unpacking norm.ear
    2007-06-20 13:22:50.890 NOTIFICATION Unjar C:\oc4j101320_SA\j2ee\home\applications\norm.ear in C:\oc4j101320_SA\j2ee\home\applications\norm
    2007-06-20 13:22:53.625 NOTIFICATION Done unpacking norm.ear
    2007-06-20 13:22:53.625 NOTIFICATION Finished auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm.ear
    2007-06-20 13:22:53.640 NOTIFICATION Auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war...
    2007-06-20 13:22:53.640 NOTIFICATION Unpacking norm.war
    2007-06-20 13:22:53.640 NOTIFICATION Unjar C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war in C:\oc4j101320_SA\j2ee\home\applications\norm\norm
    2007-06-20 13:22:59.828 NOTIFICATION Done unpacking norm.war
    2007-06-20 13:22:59.828 NOTIFICATION Finished auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war
    2007-06-20 13:22:59.906 NOTIFICATION Initialize C:\oc4j101320_SA\j2ee\home\applications\norm.ear ends...
    2007-06-20 13:22:59.906 NOTIFICATION Starting application : norm
    2007-06-20 13:22:59.906 NOTIFICATION Initializing ClassLoader(s)
    2007-06-20 13:22:59.906 NOTIFICATION Initializing EJB container
    2007-06-20 13:22:59.906 NOTIFICATION Loading connector(s)
    2007-06-20 13:23:00.062 NOTIFICATION Starting up resource adapters
    2007-06-20 13:23:00.078 NOTIFICATION Initializing EJB sessions
    2007-06-20 13:23:00.078 NOTIFICATION Committing ClassLoader(s)
    2007-06-20 13:23:00.078 NOTIFICATION Initialize norm begins...
    2007-06-20 13:23:00.187 NOTIFICATION application : norm is in failed state
    07/06/20 13:23:00 WARNING: Application.setConfig Application: norm is in failed state as initialization failed.
    java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    07/06/20 13:23:00 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:515)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    07/06/20 13:23:00 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    07/06/20 13:23:00 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    07/06/20 13:23:00 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/06/20 13:23:00 at java.lang.Thread.run(Thread.java:595)
    07/06/20 13:23:00 Caused by: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:497)
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:340)
    07/06/20 13:23:00 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1879)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
    07/06/20 13:23:00 ... 6 more
    07/06/20 13:23:00 Caused by: java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    07/06/20 13:23:00 at com.evermind.server.http.XMLHttpApplicationConfigContext.getConfiguration(XMLHttpApplicationConfigContext.java:155)
    07/06/20 13:23:00 at com.evermind.server.Application.getHttpApplicationConfig(Application.java:593)
    07/06/20 13:23:00 at com.evermind.server.Application.initHttp(Application.java:1345)
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:451)
    07/06/20 13:23:00 ... 9 more
    2007-06-20 13:23:00.218 NOTIFICATION Application Deployer for norm FAILED.
    2007-06-20 13:23:00.218 NOTIFICATION Application UnDeployer for norm STARTS.
    2007-06-20 13:23:00.281 NOTIFICATION Removing all web binding(s) for application norm from all web site(s)
    07/06/20 13:23:00 SEVERE: ProgressObjectImpl.reportError java.lang.InstantiationException: Application: norm is in failed state as initialization failedoracle.oc4j.admin.jmx.shared.exceptions.InternalException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(NotificationUserData.java:107)
    at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:515)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    ... 4 more
    Caused by: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at com.evermind.server.Application.setConfig(Application.java:497)
    at com.evermind.server.Application.setConfig(Application.java:340)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1879)
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
    ... 6 more
    Caused by: java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    at com.evermind.server.http.XMLHttpApplicationConfigContext.getConfiguration(XMLHttpApplicationConfigContext.java:155)
    at com.evermind.server.Application.getHttpApplicationConfig(Application.java:593)
    at com.evermind.server.Application.initHttp(Application.java:1345)
    at com.evermind.server.Application.setConfig(Application.java:451)
    ... 9 more

    Thank you Steve for your help. I really do appreciate ppl taking the time to answer questions from n00b like me.
    I tried and disable global.libraries and global.tag.libraries when deploy, and at one point the login page (its Spring 1.2.8 + hibernate 3.1.3 + Myface 1.1.4 + acegi 1.0.1 ) came out, but cannot login and without exceptions, so I was guessing acegi poblem. But the spring and hibernate is working, I can see the conn and other activities. And after a couple tries, cannot even get the login page display now in MyFace, with exceptions:
    include(java.lang.String) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.String,boolean)
    And then after some googling found out there will be code change for this webapp as well.
    - change webapp.listener for double instantiation in OC4J (Code Change)
    - create new class OrionSessionListener implements HttpSessionListener for session invalidation (Code Change) NEW JAVA CLASS
    - acegi j_security_check URL reference change (Code Change, but minor)
    I think the container has great performance, but I just wish they can look more to the compatabilities/common practices issues
    full stacktrace:
    2007-06-22 14:12:04.437 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : oracle.jsp.provider.JspCompileException: Errors compiling:C:\oc4j101320_SA\j2ee\home\application-deployments\norm\norm\persistence\_pages\\_login.java
    [jsp src:line #:13] include(java.lang.String) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.String,boolean)
    pageContext.include( __url,false);
         at oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456)
         at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:375)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)

  • InputStream - OutputStream: Reader - Writer

    What was not possible by InputStream & OutputStream that JAVA had to provide Reader and Writer. I have found out that if I use InputStream to read a Chinese HTML page, it reads it. I can create a copy of the same HTML page by using OutputStream, the data remaining un-affected. Then, why do I go for Reader and Writer?
    What happens if InputStream encounters some unicode charchters to be read? How does InputStream and OutputStream function internally?

    Well, you can go look at the source of InputStream/OutputStream.
    The reason we have Reader/Writer as well is because the streams don't deal with character encoding (or at least, they tried to and did it very badly). So you would normally use streams for dealing with binary data and reader/writer for dealing with character data. If you're using streams to copy a file and this file happens be be HTML with Chinese characters, this will work fine because you're just duplicating bytes. But if you try and use a stream to read this file into memory, you will have problems because it won't understand the Unicode characters in the file. In this case, you need to use a Reader and tell it what the character encoding of the file is.

  • Adobe Media Encoder for CS4 error Could not read from the source

    Hello,
    I get an error when I try to export from Premiere CS4. It doesn't matter how I export. Seems like an easy fix, but I can't figure it out. Any help is appreciated:
    - Source File: C:\DOCUME~1\ARTWHI~1\LOCALS~1\Temp\extra and b roll.prproj
    - Output File: E:\Living Accused Movie Transfers\video\Cindy at table.avi
    - Preset Used: NTSC DV
    - Video:
    - Audio:
    - Bitrate:
    - Encoding Time: 16:10:34
    1/21/2009 9:50:25 PM : Encoding Failed
    Could not read from the source. Please check if it has moved or been
    deleted.
    Thank you
    Art

    When you attempt to encode media with Adobe Media Encoder CS4 on Windows, the following error message appears in the text file (AMEEncodingErrorLog.txt) that opens when you click the error icon: "Encoding Failed. Could not read from the source. Please check if it has moved or been deleted."
    If it's that correct, you removed an earlier version of Adobe Premiere Pro or Adobe Creative Suite on the same computer.
    Do one or both of the following solutions:
    Solution 1: Create a shortcut to the Premiere Pro executable file, rename the shortcut to Premiere, and move the shortcut to C:\Program Files\Common Files\Adobe\dynamiclink.
    Close all Adobe applications.
    In Windows Explorer, navigate to C:\Program Files\Adobe\Adobe Premiere Pro CS4. (If you installed Premiere Pro CS4 in a location other than the default of C:\Program Files\Adobe, then navigate to your custom installation location.)
    Right-click on Adobe Premiere Pro.exe (which might appear without the .exe extension) and choose Create Shortcut.
    Rename the newly created shortcut to just Premiere.
    Important: The name of the shortcut must be exactly Premiere with no other characters.
    Open a second Windows Explorer window, and navigate to C:\Program Files\Common Files\Adobe\dynamiclink.
    Move the Premiere shortcut that you created into the dynamiclink folder.
    Solution 2: Remove and reinstall all Premiere Pro CS4 components or all Adobe Creative Suite 4 components.
    Do one of the following:
    Windows XP: Choose Start > Control Panel > Add or Remove Programs.
    Windows Vista: Choose Start > Control Panel > Programs and Features.
    In the list of installed programs, select Adobe Premiere Pro CS4, Adobe Creative Suite 4 Production Premium, or Adobe Creative Suite 4 Master Collection.
    Click Change/Remove (Windows XP) or Uninstall (Windows Vista).
    Follow the on-screen instructions to remove all components of Premiere Pro CS4 (including Adobe Encore CS4 and Adobe OnLocation CS4) or to remove all components of your edition of Adobe Creative Suite 4.
    Re-install your Adobe software.

  • When I was talking on phone, suddenly the phone was switched off. i tried to switch it on but it gave the message....connect to itunes for set up.  when I connected it to itunes...it gave the message, itunes can not read data from this iphone, restore it

    when I was talking on phone, suddenly the phone was switched off.
    i tried to switch it on but it gave the message....connect to itunes for set up.
    when I connected it to itunes...it gave the message, itunes can not read data from this iphone, restore it to factory settings. It also said while restoring ypu will lose all media data but you can restore the contacts.
    I restored the factory settings....the phone was on recovery mode...it was verified by itunes and all that..but in the end it again said that iphone has some problem and can not function right now.
    after that when ever i connect it with itunes, it gives the message, it can not activate the iphone further, try again later or contact customer service.
    What to do now?????? Customer service people say..it is hardware problem

    If it's a hardware problem, then the phone will need to be replaced.
    There is no magic that can fix a hardware problem.

  • VSTS loadtest error while running Loadtest with Runsettings as No of test iterations , ERROR is : could not read result repository: unknown transaction id in results:

    Subject: VSTS loadtest error while running Loadtest with Runsettings as  No of test iterations ,  ERROR is :  could not read result repository: unknown transaction
    id in results:
    Hello All,
    I am facing the following error while running a loadtest (when i choose the scenario to be executed for No of test iterations). But the same loadtest with the Run duration for X minutes is running fine without any issues. 
    Any suggestions on the issue i am facing
    error is :
    could not read result repository: unknown transaction id in results:
    or
    could not read result repository: unknown request id in results: 
    Thanks
    Satish

    Hi Kotapati,
    >>Subject: VSTS loadtest error while running Loadtest with Runsettings as  No of test iterations ,  ERROR is :  could not read result repository: unknown transaction
    id in results:
    According to your description, you mean that when you run your load test using the Test Iterations way and then get the error message, am I right?
    If yes, please you try to close the VS, and then open this VS again. Then clean your load test project/solution and then re-build it, run your load test again check this issue again.
    In addition, I suggest you could try to create a new load test and then run it using Test Iterations way check if you get the issue for the specified load test or all load tests.
    If possible, I suggest you could share me simple load test for us so that we will further help you.
    You could upload your load test to OneDrive and then copy link here.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem-.thanks

    I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem….thanks

    If you are having the same problem, i.e. a disk permission problem, open your favorite search engine and search on, "change disk permissions", and I think you'll find plenty of information on how to fix the problem. This is a Lightroom forum. Your problem is with your operating system. There is no sense in rewriting instructions that are already available if you do a simple search.

  • I have a brandnew 7th gen classic ipad, it does not read in my itunes anymore. i bought it cause apple was suppose to be good, now i am lost as i just want my music, any help. tried the rec. steps to fix it and nothing

    let em elaborate more, the unit is less than 5months old, i bought it just for music, i use to have a lot of cds, well it does not read anynore in my computer nor the itunes programe, i reset it, i put it to disk mode, i down loaded the newest itunes program, i want to know how to fix this as i paid apple good money for a product that died after 5months, for real.
    this is bad business and i need some help

    Does the iPod work okay otherwise apart from not being able to connect with and communicate with iTunes?
    Have you tried connecting the iPod to another PC or Mac running iTunes to see if it is properly recognized there?
    Is iTunes up to date on your PC?  Does it appear in Device Manager when you plug it in? To access Device Manager, click start, right->click on Computer (or My Computer in Windows XP) and choose Manage.  When the window opens, select Device Manager in the left hand pane if necessary.
    Any unknown devices listed or does the iPod appear anywhere under USB Host Controllers?
    B-rock

  • My PC is not reading my itunes music files, all I get is '!'

    Hi, my computer recently crashed and I had to recovery the HDD and lose all my materials, but I still had all my itunes media on a separate drive. Anyway, I redownloaded itunes and now I added a folder of over 4800 songs, all either individual mp3 files or albums in folders. Now that all the albums are up (I lost a lot of the album covers too) I am having trouble playing music on itunes.
    Whenever I click on most songs, I get a '!' saying that I have to now search for the file because it cannot be found. I have to search for EVERY song before it can find it. I have over 4800 songs, so I can't realistically search for EVERY ONE. Under 'Preferences' I went into "Advanced" and chose the folder where my songs would be read from. Yet still I have this problem. Funny thing is that it doesn't do it for EVERY song, but I would say about 90% of them. Why is my itunes not reading my files? I have the latest version of itunes on my PC and there is no problem with any of my mp3 files as they are all well and play fine on my ipod. The strange thing here is that all of my movies play just fine, I have 34 digital copy movies on my itunes. I have Windows 7.
    Please help, this is a really annoying thing to deal with!

    Since you mention PC, I'm guessing that you are referring to a Windows machine. If so, then see this support document.  http://support.apple.com/kb/TS1538

  • Problem:  this mac is not reading an excell file after upgrading to yosemite.   My Mac is from 2009, it use to work perfectly but it wasn´t able to open some apps, thats why i upgrade it.   Now it once i donwload the zip it appears with an ".ods" ext

    Problem:  this mac is not reading an excell file after upgrading to yosemite.   My Mac is from 2009, it use to work perfectly but it wasn´t able to open some apps, thats why i upgrade it.   Now it once i donwload the zip it appears with an ".ods" extension
    i even already download a link
    http://www.microsoft.com/en-us/download/confirmation.aspx?id=44026
    which i read on another support page... but it doesnt allowed me to install it cause it says that i already have the disk of this program....
    Im afraid to erase it and not being able to get it back...
    What can i do!??
    Thanks in advance for this kind answer!!!

    fsolution wrote:
    Problem:  this mac is not reading an excell file after upgrading to yosemite...   Now it once i donwload the zip it appears with an ".ods" extension...
    If the "it" refers to a compressed (zipped) spreadsheet that you downloaded, the ".ods" extension is used by LibreOffice and probably OpenOffice (which are free versions of MS Office) for spreadsheets, which would suggest that wherever you're getting that "Excel" file from has switched to one of those programs. I've tried opening an .ods file from LibreOffice using MS Office 2013 for Windows and it does open though with a warning that some things have been changed. I don't know if Office for Mac can normally open .ods files. But if your need is to just open .ods files, take a look at LibreOffice.

Maybe you are looking for

  • Downloaded and Saved Files Do Not Show On Desktop

    I've noticed just in the past two weeks that files such as email attachments, photos, or other files downloaded from Safari or Mail do not appear on the desktop where the default location is set. Also, this happens when I save a Word document or a do

  • Failover DMVPN hup-spoke setup

    This is the current setup: crypto keyring LAN-to-LAN   pre-shared-key address A key 1   pre-shared-key address B key 2   pre-shared-key address C key 3   pre-shared-key address D key 4   pre-shared-key address E key 5   pre-shared-key address F key 6

  • PSE9 Organizer is very slow

    The organizer is very slow and take over a minute just to page from one screen to another.  I took off facial recognition but that only helped minimally.  Is this an improvement?  Previously used PSE 6 which worked fine. This is test of the trail ver

  • Installing creative cloud package crashes explorer.exe

    Need help

  • New Info Tab information not syncing

    I just got an ipod (nano fourth generation) and itunes for the first time. Since I wanted everything organized, I went through and changed the info tabs to all my music while in Itunes and the synced. Unfortunately my ipod doesn't seem to have added