Why String.getBytes() throws BufferOverflowException exception?

the following is my codes:
String gbStr = new String(s_content.getBytes(),"ISO_8859_1");
but sometimes it throws exception like this:
java.nio.BufferOverflowException
at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:338)
at java.lang.StringCoding.encode(StringCoding.java:372)
at java.lang.StringCoding.encode(StringCoding.java:378)
at java.lang.String.getBytes(String.java:608)
why?

One explaination offered is
We took a look at the source code of the JVM. The
problem stems from the fact that float values are used
to indicate the maximum value of bytes per characters
in java.nio.charset.CharsetEncoder.maxBytesPerChar.
The issue is that floats cannot accuratly hold more than
2^24 integer values which is equals to 16,777,216.
After that value is reached, the encoding operation in
the character set classes incorrectly rounds down the
amount of memory needed for the buffer. The correct
solution would be to use doubles instead, or account
for the round off problem by increasing the buffer size.
SUGGESTED WORKAROUND
The workaround that we are using, is to use to .
getBytes() on a substring that is smaller than 16MB,
and combined the results by either using a
ByteArrayOutputStream or a ByteBuffer.
NOTE: If you are planning on using more than one-byte
characters sets, than you have to make sure that your
buffer is set accordingly.

Similar Messages

  • Can't figure out why it's throwing this exception

    Can anyone see a problem with this method? I have checked over everything and can't figure out why it's giving me an exception. All of the get methods are retrieving data and the db table and all the fields are correct.
        // add a Reservation to the database
        public static void addReservation(Reservation aReservation)throws Exception
         try
             String query = "INSERT INTO Reservations (Number, ContactAlias, SPOC, SRNumber, StartDate, EndDate) " +
                           "VALUES ('" + aReservation.getNumber() + "', " +
                           "'" + aReservation.getContact() + "', " +
                           "'" + aReservation.getSPOC() + "', " +
                           "'" + aReservation.getSRNumber() + "', " +
                           "'" + aReservation.getStartDate() + "', " +
                           "'" + aReservation.getEndDate() + "')";
            reservationList.removeAll();
              reservationUIList.removeAll();
              Statement statement = connection.createStatement();
            statement.executeUpdate(query);
              open();
              if( reservationRS !=null)
            while( reservationRS.next() )
                   aNumber = reservationRS.getString(1);
                   reservationList.add(aNumber);
                   reservationUIList.add(aNumber);
              statement.close();
            close();
         catch (Exception e)
                System.out.println("Caught exception in addReservation of DM.");   
                throw e;
         }And the exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
         at ReservationDM.addReservation(ReservationDM.java:149)
         at Reservation.addReservation(Reservation.java:268)
         at ReservationUI.invokeAdd(ReservationUI.java:552)
         at ReservationUI.actionPerformed(ReservationUI.java:285)
         at java.awt.Button.processActionEvent(Button.java:324)
         at java.awt.Button.processEvent(Button.java:297)
         at java.awt.Component.dispatchEventImpl(Component.java:2588)
         at java.awt.Component.dispatchEvent(Component.java:2492)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)Thanks,
    Shawn

    Well, one extreme that I eventually had to go to was inserting a new row with only the primary keys, which were numerical columns, while just setting the strings to empty values.
    INSERT INTO Courses VALUES(?,?,?,1,0,?,'','','','','','','','','')
    Access finally seemed to handle this without barfing.
    Then, I updated each string column ...if you can believe it ...one at a time in a for loop from a custom 'RowUpdateSet' object. This actually worked well because eventually I also used it to update the row when necessary, and to only update columns whose values had changed. One teeny weeny snippet from a great deal of code looked like this...
      for ( int i=1; i<length; i++ ) {
        if ( updateSet.getUpdateColumn( i ) ) {
          synchronized ( updateSet ) {
            scrollResults.updateObject(i,(String)updateSet.getUpdateValue(i));
            scrollResults.updateRow();
      }I guess I will likely get flamed for participating in this whole discussion, because it all does become quite irrational. I can see why peoples initial response is likely ..."what, couldn't you even debug your own sql string bozo?" All I know is, there seems to be insert statements that Access just mysteriously refuses to perform ...and it has nothing to do with terminated strings or syntax errors. How you choose to perservere and 'get the job done' is probably as unique to each individual as is the whole mysterious error in the first place. I just got tired of staring at what appeared to be a totally disfunctional environment and decided to go around the problem and get done with the project ...which eventually worked like a charm.
    This is exactly what I meant when I said don't look too closely or you might wind up distrusting this technology you are working with on a day to day basis. Frankly, the more I work with technology the more I realize that I, for example, will never use my credit card over the web (particularly with .NET in the picture). I am sure you can find another way to get to the results you want if you think about it creatively. I got my project done. I just didn't get there in the way I had expected I would. Maybe that's not even a bad thing, even though it can be extremely frustrating at times. When we look at all the disclaimers that come with software these days, or look at faster and faster computers that just run slower and slower, maybe we shouldn't expect so much from technology. At least Java allows you to write your own logic and often work around these impediments ...which is still alot better than being stuck with .COM libraries that force you to abandon a project half way through when you find out the library fails to live up to its claims in the reference manual.
    Sorry your project is on hold at the moment. If no one else answers, start a new thread that asks your question again, and I will butt out. Maybe there is someone who has found out what causes this issue. After all, I can only speak from my own experiences ...and I am far from being an authority on any issue surrounding technology. Good luck, and don't give up. I am sure there is a way to get where you want to go.
    After saying all that, I realize kev wrote a response while I was composing this one. As he implores, yes ...do be certain you have eliminated all the obvious possibilities before you adventure into any painfull work-arounds. Really, I wish you all the best of luck.

  • ADT command line errors (java throws an exception)

    I'll spare you the frustration of these past 24 hours, needless to say I've read most (if not all) of the threads related to compiling a swf into a ipa.  As it is, I'm very close and can't seem to get it to compile.
    On a Mac: the CMD line I am running is this:
    ./adt -package -target ipa-test -storetype pkcs12 -keystore  Certificates.p12 -storepass *P*A*S*S*W*O*R*D*  -provisioning-profile Team_Provisioning_Profile_.mobileprovision APPNAME.ipa  APPNAME-app.xml -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ APPNAME.swf -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/AppIconsForPublish/ . -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ Default.png
    The APPNAME-app.xml file is as follows:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <application xmlns="http://ns.adobe.com/air/application/2.0">
        <id>APPNAME</id>
        <version>1.0</version>
        <filename>APPNAME</filename>
        <description>test build of the app</description>
        <!-- To localize the description, use the following format for the description element.
        <description>
            <text xml:lang="en">English App description goes here</text>
            <text xml:lang="fr">French App description goes here</text>
            <text xml:lang="ja">Japanese App description goes here</text>
        </description>
        -->
        <name>APPNAME</name>
        <!-- To localize the name, use the following format for the name element.
        <name>
            <text xml:lang="en">English App name goes here</text>
            <text xml:lang="fr">French App name goes here</text>
            <text xml:lang="ja">Japanese App name goes here</text>
        </name>
        -->
        <copyright></copyright>
        <initialWindow>
            <content>APPNAME.swf</content>
            <systemChrome>standard</systemChrome>
            <transparent>false</transparent>
            <visible>true</visible>
            <fullScreen>false</fullScreen>
            <autoOrients>false</autoOrients>
            <aspectRatio>portrait</aspectRatio>
            <renderMode>auto</renderMode>
        </initialWindow>
        <customUpdateUI>false</customUpdateUI>
        <allowBrowserInvocation>false</allowBrowserInvocation>
        <icon>
            <image512x512>AIRApp_512.png</image512x512>
            <image48x48>AIRApp_48.png</image48x48>
            <image57x57>AIRApp_57.png</image57x57>
            <image72x72>AIRApp_72.png</image72x72>   
        </icon>
    <iPhone><InfoAdditions><![CDATA[<key>UIDeviceFamily</key><array><string>1</string></array> ]]></InfoAdditions></iPhone></application>
    The java OS error it is throwing (on my Mac OS X 10.7.6):
    Exception in thread "main" java.lang.Error: Unable to find named traits: spark.components::Application
        at adobe.abc.Domain.resolveTypeName(Domain.java:225)
        at adobe.abc.Domain.resolveTypeName(Domain.java:142)
        at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:272)
        at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:936)
        at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:390)
        at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:278)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:194)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:350)
        at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:680)
        at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:216)
        at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:411)
        at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:87)
        at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:163)
        at com.adobe.air.ADT.parseArgsAndGo(ADT.java:504)
        at com.adobe.air.ADT.run(ADT.java:361)
        at com.adobe.air.ADT.main(ADT.java:411)
    The version of Java that I'm running is:
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
    For the life of me, I can't figure out what / why this is throwing an exception.  Having battled through the missing icon 303 errors and getting to what I think is the final issue, please... can anyone debug why the SWF is not compiling?

    Tried a variation of the above CMD line:
    ./adt -package -target ipa-test -storetype pkcs12 -keystore  Certificates.p12 -storepass PASSWORD  -provisioning-profile Team_Provisioning_Profile_.mobileprovision APPNAME.ipa  APPNAME-app.xml -C /Applications/Adobe\ AIR\ SDK\ 2.6/bin/ APPNAME.swf Default.png AppIconsForPublish
    Still threw an error:
    Exception in thread "main" java.lang.Error: Unable to find named traits: spark.components::Application
        at adobe.abc.Domain.resolveTypeName(Domain.java:225)
        at adobe.abc.Domain.resolveTypeName(Domain.java:142)
        at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:272)
        at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:936)
        at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:390)
        at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:278)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:194)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:350)
        at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:680)
        at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:216)
        at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:411)
        at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:87)
        at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:163)
        at com.adobe.air.ADT.parseArgsAndGo(ADT.java:504)
        at com.adobe.air.ADT.run(ADT.java:361)
        at com.adobe.air.ADT.main(ADT.java:411)
    Different, but the same... no success

  • Why  Integer. valueOf(String,radix) throws exception

    Can any one explains why this method throws exception
    Integer a = Integer. valueOf(" 123 ", 2);
    System.out.println(a);

    prady_jo wrote:
    Can any one explains why this method throws exception
    Integer a = Integer. valueOf(" 123 ", 2);
    System.out.println(a);As already mentioned, in binary notation, only 1's and 0's are permitted. Besides that, I see you also have some white spaces in your string: this will throw an exception as well.

  • Why socket doesn't throw an exception

    Hello,
    I am using following code
    client:
          InetAddress addr = InetAddress.getByName("localhost");
          sock = new Socket(addr, 5551);
          in = new BufferedReader(
            new InputStreamReader(
              sock.getInputStream()));
          out = new PrintWriter(
            new BufferedWriter(
              new OutputStreamWriter(
                sock.getOutputStream())), true);server
    try{
      ServerSocket server = new ServerSocket(port);
      Socket socket = server.accept();
      BufferedReader in = new BufferedReader(
         new InputStreamReader(
           socket.getInputStream()));
      PrintWriter out = new PrintWriter(
        new BufferedWriter(
          new OutputStreamWriter(
           socket.getOutputStream())), true);
      while (true){
         String msg = in.readLine();
         System.out.println(msg);
    catch (SocketException  se){
      System.out.print(se.toString());
    catch (IOException e){
      System.out.print(e.toString());
    catch (Exception ex) {
      System.out.print(ex.toString());
    }When I close client, server is constantly writing null (msg is null). Why doesn't it throw an exception?
    Thank you.

    The moral of the story is avoid using Readers and Writers with Sockets. They swallow exceptionsThat's not so. It is PrintWriters and PrintStreams that swallow exceptions.
    @OP: there is no reason for your code to throw an exception. It keeps reading the socket and encountering EOF, signalled by the null return, at which point any sensible code should exit the loop and close the socket. However as you don't do that, you just read the socket and get the EOF again ...
    You would only get an exception, specifically an EOFException, if you were calling one of the readXXX methods that is specified to throw it. readLine() isn't one of those.

  • Why constructor of rmi server throws remote exception

    why is it that the constructor of the class extending UnicastRemoteObject i.e rmi server has to throw RemoteException?

    Writing an RMI server is a matter of defining a class, exporting it when constructed and implementing one or more remote interfaces. How to export?
    auto export happens when u call super() in the constructor. It is then registered with the rmi system and made to listen to a TCP port. The various constructors for UnicatRemoteObject allow the derived classes to export at the default port.
    Because this automatic export step occurs at construction the constructors throw this exception.

  • Why Overridden method do not throw Broder exception

    Why Overridden method of derived class do not throw Broder exception than the method that is in base class

    Why Overridden method of derived class do not throw
    Broder exception than the method that is in base classWhat is a Broder Exception?
    I don't understand your question?
    You are asking something about overriding a method:
    http://java.sun.com/docs/books/tutorial/java/IandI/override.html

  • Why doesn't throw my function an exception??

    Ive written following function which converts dates into numbers represeting weekdays.
    I want the function to throw an exception if a wrong value is given but whatever I try instead of an exception the only output by a wrong input is:
    SQL> select day_calc('bla') from dual;
    select day_calc('bla') from dual
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Anybody who knows why??
    thx

    If you want the function to accept the parameter and handle the exception, then you need to make your a_date varchar2.
    You are missing "when others" after exception.
    Your line "zahl := 3/0;" will always raise an exception. I assume that was added to try to force an exception for testing.
    Please see the example below.
    scott@ORA92> CREATE OR REPLACE FUNCTION day_calc
      2    (a_date     VARCHAR2)
      3    RETURN     NUMBER
      4  IS
      5    ergebnis NUMBER;
      6  BEGIN
      7    ergebnis := TO_NUMBER (TO_CHAR (TO_DATE (a_date, 'DD.MM.RRRR'), 'D')) - 1;
      8  --  zahl := 3/0;
      9    RETURN ergebnis;
    10  EXCEPTION
    11    WHEN OTHERS THEN RETURN -1;
    12  END day_calc;
    13  /
    Function created.
    scott@ORA92> SELECT day_calc ('bla') FROM DUAL
      2  /
    DAY_CALC('BLA')
                 -1
    scott@ORA92> SELECT day_calc ('20.11.2004') FROM DUAL
      2  /
    DAY_CALC('20.11.2004')
                         6
    scott@ORA92>

  • Why it is throwing null at last  whenever i am running this program

    public static void main(String args[])
              String str;                    
              try     
              FileReader fis = new FileReader(C:\\src\\vinaysingh\\xmlreq.xml");
              BufferedReader br= new BufferedReader(fis);
              do
                   str=br.readLine();
                   System.out.println(str);
              while(!str.equals(null));
    why it is throwing null on last if i am reading any xml file

    get the value of string as the value which u
    had collected from the string instead of nullWhat? That just doesn't make any sense. At all.
    I presume what you're asking is:
    How do I read lines from a text file, ignoring empty lines. Especially how do I know when I've reached the end of the file so that I can stop trying to read more lines.
    this might help some ...
    package krc.utilz.io;
    import java.util.Collection;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.io.File;
    import java.io.Reader;
    import java.io.FileReader;
    import java.io.BufferedReader;
    import java.io.FileWriter;
    import java.io.PrintWriter;
    import java.io.InputStream;
    import java.io.FileInputStream;
    import java.io.Closeable;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    * @class: krc.utilz.io.Filez
    * A collection of static "file handling" helper methods.
    public abstract class Filez
      public static final int BFRSIZE = 4096;
       * reads the given file into one big string.<p>
       * Warning: don't use this on big files. It uses too much RAM!
       * @param String filename - the name of the file to read
       * @return the contents filename
      public static String read(String filename)
        throws FileNotFoundException
        return Filez.read(new FileReader(filename));
       * Reads the contents of the given reader into one big string, and closes
       * the reader.
       * Warning: don't use this on big files. It uses too much RAM!
       * @param java.io.Reader reader - a subclass of Reader to read from.
       * @return the whole contents of the given reader.
      public static String read(Reader in)
        try {
          StringBuffer out = new StringBuffer();
          try {
            char[] bfr = new char[BFRSIZE];
            int n = 0;
            while( (n=in.read(bfr,0,BFRSIZE)) > 0 ) {
              out.append(bfr,0,n);
          } finally {
            if(in!=null)in.close();
          return out.toString();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * (re)writes the given content to the given filename
       * @param String content - the new contents of the fil
       * @param String filename - the name of the file to write.
      public static void write(String content, String filename) {
        try {
          PrintWriter out = null;
          try {
            out = new PrintWriter(new FileWriter(filename));
            out.write(content);
          } finally {
            if(out!=null)out.close();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * Appends the given content to the given filename.
       * @param String content - the string to write to the file.
       * @param String filename - the name of the file to write to.
      public static void append(String content, String filename) {
        try {
          PrintWriter out = null;
          try {
            out = new PrintWriter(new FileWriter(filename, true)); //true=append
            out.write(content);
          } finally {
            if(out!=null)out.close();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * reads each line of the given file into an array of strings.
       * @param String filename - the name of the file to read
       * @return a fixed length array of strings containing file contents.
      public  static String[] readArray(String filename)
        throws FileNotFoundException
        return readList(filename).toArray(new String[0]);
       * reads each line of the given file into an ArrayList of strings.
       * @param String filename - the name of the file to read
       * @return an ArrayList of strings containing file contents.
      public static ArrayList<String> readArrayList(String filename)
        throws FileNotFoundException
        return (ArrayList<String>)readList(filename);
       * reads each line of the given file into a List of strings.
       * @param String filename - the name of the file to read
       * @return an List handle ArrayList of strings containing file contents.
      public static List<String> readList(String filename)
        throws FileNotFoundException
        try {
          BufferedReader in = null;
          List<String> out = new ArrayList<String>();
          try {
            in = new BufferedReader(new FileReader(filename));
            String line = null;
            while ( (line = in.readLine()) != null ) {
              out.add(line);
          } finally {
            if(in!=null)in.close();
          return out;
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * reads the whole of the given file into an array of bytes.
       * @param String filename - the name of the file to read
       * @return an array of bytes containing the file contents.
      public static byte[] readBytes(String filename)
        throws FileNotFoundException
        return( readBytes(new File(filename)) );
       * reads the whole of the given file into an array of bytes.
       * @param File file - the file to read
       * @return an array of bytes containing the file contents.
      public static byte[] readBytes(File file)
        throws FileNotFoundException
        try {
          byte[] out = null;
          InputStream in = null;
          try {
            in = new FileInputStream(file);
            out = new byte[(int)file.length()];
            int size = in.read(out);
          } finally {
            if(in!=null)in.close();
          return out;
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * do files A & B have the same contents
       * @param String filenameA - the first file to compare
       * @param String filenameA - the second file to compare
       * @return boolean do-these-two-files-have-the-same-contents?
      public static boolean isSame(String filenameA, String filenameB)
        throws FileNotFoundException
        try {
          File fileA = new File(filenameA);
          File fileB = new File(filenameB);
          //check for same physical file
          if( fileA.equals(fileB) ) return(true);
          //compare sizes
          if( fileA.length() != fileB.length() ) return(false);
          //compare contents (buffer by buffer)
          boolean same=true;
          InputStream inA = null;
          InputStream inB = null;
          try {
            inA = new FileInputStream(fileA);
            inB = new FileInputStream(fileB);
            byte[] bfrA = new byte[BFRSIZE];
            byte[] bfrB = new byte[BFRSIZE];
            int sizeA=0, sizeB=0;
            do {
              sizeA = inA.read(bfrA);
              sizeB = inA.read(bfrB);
              if ( sizeA != sizeB ) {
                same = false;
              } else if ( sizeA == 0 ) {
                //do nothing
              } else if ( !Arrays.equals(bfrA,bfrB) ) {
                same = false;
            } while (same && sizeA != -1);
          } finally {
            Clozer.close(inA, inB);
          return(same);
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * checks the given filename exists and is readable
       * @param String filename = the name of the file to "open".
       * @param OPTIONAL String type = a short name for the file used to identify
       *  the file in any exception messages.
       *  For example: "input", "input data", "DTD", "XML", or whatever.
       * @return a File object for the given filename.
       * @throw FileNotFoundException if the given file does not exist.
       * @throw IOException if the given file is unreadable (usually permits).
      public static File open(String filename)
        throws FileNotFoundException
        return(open(filename,"input"));
      public static File open(String filename, String type)
        throws FileNotFoundException
        try {
          File file = new File(filename);
          String fullname = file.getCanonicalPath();
          if(!file.exists()) throw new FileNotFoundException(type+" file does not exist: "+fullname);
          if(!file.canRead()) throw new RuntimeIOException(type+" file is not readable: "+fullname);
          return(file);
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * gets the filename-only portion of a canonical-filename, with or without
       * the extension.
       * @param String path - the full name of the file.
       * OPTIONAL @param boolean cutExtension - if true then remove any .ext
       * @return String the filename-only (with or without extension)
      public static String basename(String path) {
        return(basename(path,false));
      public static String basename(String path, boolean cutExtension)
        String fname = (new File(path)).getName();
        if (cutExtension) {
          int i = fname.lastIndexOf(".");
          if(i>0) fname = fname.substring(0,i);
        return(fname);
    }You'll probably want to remove all references to RuntimeIOException... just throw the standard checked IOException instead.

  • Why string has an extra blank when I use EJB business method to get it

    I have the following code:
    Person bean = home.create("Jon", 10, "Huge", 1.0);
    java.util.Enumeration result = home.findAll();
    if (result.hasMoreElements()) {
    Person bean1 =(Person) javax.rmi.PortableRemoteObject.narrow(result.nextElement(), Person.class);
    getTraceWriter().println(" ** name = " + bean1.getName() + ", rank = " + bean1.getRank() +
    ", power = " + bean1.getPower() + ", rating = " + bean1.getRating());
    bean1.remove();
    I found the bean1.getName is "Jon " instead of "Jon". why???? Does sb. have a clue?
    Thanks,
    JST

    Here is the code. Thanks very much!
    import javax.ejb.*;
    import java.sql.*;
    import javax.sql.DataSource;
    import java.util.Vector;
    import java.util.Enumeration;
    import javax.naming.Context;
    public class PersonBean implements EntityBean {
    public String name;
    public int rank;
    public String power;
    public double rating;
    public EntityContext context;
    private DataSource ds = null;
    private String user = "db2admin";
    private String password = "db2admin";
    * ejbCreate method
    * @param name String The person name
    * @exception javax.ejb.CreateException
    public PersonKey ejbCreate(String name)
    throws CreateException {
    return ejbCreate(name, 0, "default", 0.0);
    * ejbCreate method
    * @param name String The person name
    * @param rank int The person rank
    * @param power String The person power
    * @param rating double Rating of the person
    * @exception javax.ejb.CreateException
    public PersonKey ejbCreate(String name, int rank, String power, double rating)
    throws CreateException {
    if (name == null || name.length() == 0) {
    throw new CreateException("Invalid parameter: name cannot be null");
    else if (power == null || power.length() == 0) {
    throw new CreateException("Invalid parameter: power cannot be null");
    this.name = name;
    this.rank = rank;
    this.power = power;
    this.rating = rating;
    Connection con = null;
    PreparedStatement ps = null;
    try {
    System.err.println("before getconnection");
    con = this.getConnection();
    System.err.println("after getconnection");
    ps = con.prepareStatement("insert into TESTMEN values (?,?,?,?)");
    ps.setString(1, name);
    ps.setInt(2, rank);
    ps.setString(3, power);
    ps.setDouble(4, rating);
    if (ps.executeUpdate() != 1) {
    throw new CreateException("Failed to add (" + name + "," + rank + "," +
    power + "," + rating + ") to database.");
    PersonKey pk = new PersonKey(name);
    return pk;
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (ps != null) ps.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();
    public void ejbPostCreate(String name, int rank, String power, double rating) {
    // empty for now
    public void ejbPostCreate(String name) {
    // empty for now
    * ejbFindPrimaryKey
    * Find bean by primary key
    * @return PersonKey Primary key object for the bean
    * @exception FinderException
    * @exception ObjectNotFoundException
    public PersonKey ejbFindByPrimaryKey(PersonKey key)
    throws FinderException, ObjectNotFoundException {
    Connection con = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    boolean found = false;
    boolean multipleFound = false;
    try {
    con = this.getConnection();
    ps = con.prepareStatement("select name from TESTMEN where name = ?");
    ps.setString(1, key.name);
    rs = ps.executeQuery();
    found = rs.next();
    if (found) {
    multipleFound = rs.next();
    if (!multipleFound) {
    return key;
    else {
    throw new FinderException("Multiple objects found with name = " + name);
    else {
    throw new ObjectNotFoundException("Cannot find object with name = " + name);
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (rs != null) rs.close();
    if (ps != null) ps.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();
    * setEntityContext method
    public void setEntityContext(EntityContext context) {
    this.context = context;
    * unsetEntityContext method
    public void unsetEntityContext() {
    context = null;
    * ejbFindAll method
    * Find all the beans.
    * @return java.util.Enumeration Enumeration of all beans
    public Enumeration ejbFindAll(){
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
    con = this.getConnection();
    stmt = con.createStatement();
    rs = stmt.executeQuery("select * from TESTMEN");
    Vector keys = new Vector();
    while (rs.next()) {
    keys.addElement(new PersonKey(rs.getString("name")));
    return keys.elements();
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (rs != null) rs.close();
    if (stmt != null) stmt.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();
    * ejbActivate() method
    public void ejbActivate() {}
    * ejbPassivate method
    public void ejbPassivate() {}
    * ejbLoad method
    public void ejbLoad() {
    PersonKey pk = (PersonKey) context.getPrimaryKey();
    Connection con = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
    con = this.getConnection();
    ps = con.prepareStatement("select * from TESTMEN where name = ?");
    ps.setString(1, pk.name);
    rs = ps.executeQuery();
    if (rs.next()) {
    name = pk.name;
    rank = rs.getInt("rank");
    power = rs.getString("power");
    rating = rs.getDouble("rating");
    else {
    throw new EJBException("No record found in ejbLoad()");
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (rs != null) rs.close();
    if (ps != null) ps.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();
    * ejbStore method
    public void ejbStore() {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = this.getConnection();
    ps = con.prepareStatement("update TESTMEN set " +
    "name = ?, rank = ?, power =?, rating = ? where name = ?");
    ps.setString(1, name);
    ps.setInt(2, rank);
    ps.setString(3, power);
    ps.setDouble(4, rating);
    ps.setString(5, name);
    if (ps.executeUpdate() != 1) {
    throw new EJBException("Failed in updating database in ejbSotre().");
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (ps != null) ps.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();
    * ejbRemove method
    public void ejbRemove() {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = this.getConnection();
    ps = con.prepareStatement("delete from TESTMEN where name = ?");
    ps.setString(1, name);
    if (ps.executeUpdate() != 1) {
    throw new EJBException("cannot remove by name = " + name);
    catch (javax.naming.NamingException ne) {
    throw new EJBException (ne);
    catch (SQLException sqle) {
    throw new EJBException(sqle);
    finally {
    try {
    if (ps != null) ps.close();
    if (con != null) con.close();
    catch (SQLException sqle) {
    sqle.printStackTrace();

  • Why is this throwing ClassCastException

    case Types.LONGVARBINARY:{
       int colIndex = rs.findColumn( columnName );
      byte[] longvarbinary = rs.getBytes( colIndex );
      break;
    }I have the above code in my project.
    Passing it a set of column names, some go through and for some, it throws the exception below even though the columns are of the same type
    ensured by the surrounding case statement
    java.lang.ClassCastException: java.lang.StringWhy would the resultset try and cast to a string if you have definetely said it will be a byte array??
    Edited by: gcameo on Jan 5, 2010 3:31 AM

    This is the full method
      protected void getData(
        ResultSet rs,
        ResultSetMetaData meta,
        String columnName,
        StringBuffer html,
        String nullValue,
        String formatPattern,
        boolean dataSpaceToNbsp,
        boolean dataEscapeHtml,
        boolean nullSpaceToNbsp,
        boolean nullEscapeHtml) throws Exception
        int colIndex;
        try {
          colIndex = rs.findColumn( columnName );
        catch (Exception e) {
          throw new HrFieldDefException( "Field " + columnName + " not found!" );
        int colType = meta.getColumnType( colIndex );
        switch ( colType ) {
          case Types.CHAR:
            String chr = rs.getString( colIndex );
            if ( !rs.wasNull() && chr.length()>0 ) {
              HrUtilsRowSetToHtml.htmlAppend( html, chr, dataSpaceToNbsp, dataEscapeHtml );
            else {
              HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
            break;
          case Types.CLOB:
            break;
          case Types.JAVA_OBJECT:
            break;
          case Types.LONGVARBINARY:
            //Code breaks here. Using the Netbeans Debugger, I am able to trace it to here and it falls back to the calling methods Catch block
            byte[] longvarbinary = rs.getBytes( colIndex );
            /* getBytes does not set wasNull so have to check value for null instead */
            if ( longvarbinary != null && longvarbinary.length > 0 ) {
              HrUtilsRowSetToHtml.htmlAppend( html, new String( longvarbinary, "US-ASCII" ), dataSpaceToNbsp, dataEscapeHtml );
            else {
              HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
            break;
          case Types.LONGVARCHAR:
            String longvarchar = rs.getString( colIndex );
            if ( !rs.wasNull() && longvarchar.length() > 0 ) {
              HrUtilsRowSetToHtml.htmlAppend( html, longvarchar, dataSpaceToNbsp, dataEscapeHtml );
            else {
              HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
            break;
          case Types.TIMESTAMP:
            Timestamp timestamp = rs.getTimestamp( colIndex );
            if ( !rs.wasNull() ) {
              String format = null;
              if ( formatPattern != null && formatPattern.length() > 0 ) {
                format = formatPattern;
              else {
                format = "dd/MM/yyyy";
              HrUtilsRowSetToHtml.htmlAppend( html, new SimpleDateFormat( format ).format( timestamp ), dataSpaceToNbsp, dataEscapeHtml );
            else {
              HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
            break;
          case Types.TINYINT:
            break;
          case Types.VARBINARY:
            break;           
          case Types.VARCHAR:
            String varchar = rs.getString( colIndex );
            if ( !rs.wasNull() && varchar.length()>0 ) {
              HrUtilsRowSetToHtml.htmlAppend( html, varchar, dataSpaceToNbsp, dataEscapeHtml );
            else {
              HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
            break;
          default:
            HrUtilsRowSetToHtml.htmlAppend( html, nullValue, nullSpaceToNbsp, nullEscapeHtml );
      }This is the full stacktrace
    java.lang.ClassCastException: java.lang.String
            at sun.jdbc.rowset.CachedRowSet.getBytes(CachedRowSet.java:1778)
            at com.haydenr.lib02.crs2html.HrHtmlFldData.getData(HrHtmlFldData.java:102)
            at com.haydenr.lib02.crs2html.HrHtmlFldDataColumn.toHtmlData(HrHtmlFldDataColumn.java:28)
            at com.haydenr.lib02.crs2html.HrHtmlFldData.toHtml(HrHtmlFldData.java:393)
            at com.haydenr.lib02.crs2html.HrHtmlCellDataInputTextArea.toHtml(HrHtmlCellDataInputTextArea.java:61)
            at com.haydenr.lib02.crs2html.HrGrid.toHtmlCellData(HrGrid.java:488)
            at com.haydenr.lib02.crs2html.HrGrid.toHtmlCellDataDiv(HrGrid.java:399)
            at com.lalpac.web.Helper_Base.getHtmlCellDataDiv(Helper_Base.java:334)
            at com.lalpac.web.Helper_Base.getHtmlCellDataDiv(Helper_Base.java:324)
            at com.lalpac.web.HelperWizApp.getHtmlDataAfiEditDiv(HelperWizApp.java:2055)
            at org.apache.jsp.protected_.wca.wizAppFormLicensingObjectives_jsp._jspService(wizAppFormLicensingObjectives_jsp.java:88)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.jsp.protected_.wca.wizAppForm_jsp._jspService(wizAppForm_jsp.java:406)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

  • Throws IO Exception Error..

    Hi, basically I have a piece of code as follows:
    import java.io.*;
    public class EmpInFile
         private     DataInputStream input;
         public EmpInFile()
       public boolean  readRecord(Employee pers)
           boolean end = false;
           try {
                pers.setId(input.readInt());
                pers.setFirst(input.readUTF());
                pers.setLast(input.readUTF());
                pers.setSalary(input.readDouble());
                pers.setTaxCreds(input.readDouble()); 
                pers.setTaxCode(input.readChar());
                pers.setDeptCode(input.readChar());      
                pers.setYtdGross(input.readDouble());    
                pers.setytdTax(input.readDouble());
            catch ( EOFException eof )
                end = true;
         catch ( IOException e )
                System.err.println( "Error during read from file\n" +
                                 e.toString() );
                System.exit( 1 );
            return end;              
         public void openFile(String filename)     throws java.io.IOException
              DataInputStream input = new DataInputStream(new FileInputStream(filename));
         public void closeFile()     throws java.io.IOException
                   input.close();
    }     This compiles perfectly but when I try to compile the driver program which uses this class I get the following error:
    unreported exception in java.io.IOException; must be caught or declared to be thrown
    and the error points to the method
    public void closeFile()     throws java.io.IOException
                   input.close();
         }but clearly I have declared an exception could be thrown so why am I still getting this error? I'm a complete java novice so apologies if this is a stupid mistake to make!
    I'll post the driver program up aswell if it'll help at all, I'd be very grateful for any help!
    Thanks!

    So it was the call to the method that failed to compile. I suspected that, but why didn't you really just post the actual line of code that caused the error? Do you realize you only posted the code of the callee not the caller and this had nothing to do with the error?
    As I said, it is important to clearly communicate the problem(s) and not make people guess.
    Try harder next time.

  • Why String class is defined as immutable?

    Why String class is defined as immutable? what can be the reason behind it?

    Do try this at home. :)
    public class Main {
        public static void main(String... args) {
            System.out.println("Greetings.");
            System.out.println("Goodbye.");
        static {
            // translates into Japanese. NOT a good idea!
            try {
                final Field field = String.class.getDeclaredField("value");
                field.setAccessible(true);
                char[] chars = new char[8];
                "Sayonara".getChars(0,8,chars,0);
                field.set("Goodbye.", chars);
                chars = new char[10];
                "Konichi-wa".getChars(0,10,chars,0);
                field.set("Greetings.", chars);
            } catch (Exception e) {
                throw new AssertionError(e);
    }

  • How to call java with public static void main(String[] args) throws by jsp?

    how do i call this from jsp? <%spServicelnd temp = new spServicelnd();%> does not work because the program has a main. can i make another 2nd.java to call this spServiceInd.java then call 2nd.java by jsp? if yes, how??? The code is found below...
    import java.net.MalformedURLException;
    import java.io.IOException;
    import com.openwave.wappush.*;
    public class spServiceInd
         private final static String ppgAddress = "http://devgate2.openwave.com:9002/pap";
         private final static String[] clientAddress = {"1089478279-49372_devgate2.openwave.com/[email protected]"};
    //     private final static String[] clientAddress = {"+639209063665/[email protected]"};
         private final static String SvcIndURI = "http://devgate2.openwave.com/cgi-bin/mailbox.cgi";
         private static void printResults(PushResponse pushResponse) throws WapPushException, MalformedURLException, IOException
              System.out.println("hello cze, I'm inside printResult");
              //Read the response to find out if the Push Submission succeded.
              //1001 = "Accepted for processing"
              if (pushResponse.getResultCode() == 1001)
                   try
                        String pushID = pushResponse.getPushID();
                        SimplePush sp = new SimplePush(new java.net.URL(ppgAddress), "SampleApp", "/sampleapp");
                        StatusQueryResponse queryResponse = sp.queryStatus(pushID, null);
                        StatusQueryResult queryResult = queryResponse.getResult(0);
                        System.out.println("Message status: " + queryResult.getMessageState());
                   catch (WapPushException exception)
                        System.out.println("*** ERROR - WapPushException (" + exception.getMessage() + ")");
                   catch (MalformedURLException exception)
                        System.out.println("*** ERROR - MalformedURLException (" + exception.getMessage() + ")");
                   catch (IOException exception)
                        System.out.println("*** ERROR - IOException (" + exception.getMessage() + ")");
              else
                   System.out.println("Message failed");
                   System.out.println(pushResponse.getResultCode());
         }//printResults
         public void SubmitMsg() throws WapPushException, IOException
              System.out.println("hello cze, I'm inside SubmitMsg");          
              try
                   System.out.println("hello cze, I'm inside SubmitMsg (inside Try)");                         
                   //Instantiate a SimplePush object passing in the PPG URL,
                   //product name, and PushID suffix, which ensures that the
                   //PushID is unique.
                   SimplePush sp = new SimplePush(new java.net.URL(ppgAddress), "SampleApp", "/sampleapp");
                   //Send the Service Indication.
                   PushResponse response = sp.pushServiceIndication(clientAddress, "You have a pending Report/Request. Please logIn to IRMS", SvcIndURI, ServiceIndicationAction.signalHigh);
                   //Print the response from the PPG.
                   printResults(response);
              }//try
              catch (WapPushException exception)
                   System.out.println("*** ERROR - WapPushException (" + exception.getMessage() + ")");
              catch (IOException exception)
                   System.out.println("*** ERROR - IOException (" + exception.getMessage() + ")");
         }//SubmitMsg()
         public static void main(String[] args) throws WapPushException, IOException
              System.out.println("hello cze, I'm inside main");
              spServiceInd spsi = new spServiceInd();
              spsi.SubmitMsg();
         }//main
    }//class spServiceInd

    In general, classes with main method should be called from command prompt (that's the reason for main method). Remove the main method, put the class in a package and import the apckage in your jsp (java classes should not be in the location as jsps).
    When you import the package in jsp, then you can instantiate the class and use any of it's methods or call the statis methods directly:
    <%
    spServiceInd spsi = new spServiceInd();
    spsi.SubmitMsg();
    %>

  • Office 365 Sandbox Solution EventReceiver throwing Remote Exception in ItemAdding

    Hi,
    I created a sandbox webpart for O365 with EventReceivers with ItemAdding for Document Library and while i upload a document to library in O365  sharepoint site application throws below exception:-
    System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.
    Server stack trace: 
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type us
    Same code works perfectly on my Development machine, Please help. Below is the Code
    base.EventFiringEnabled = false;
    bool isFile = (properties.AfterProperties["vti_filesize"] != null);
    if (isFile == true)                   
    SPWeb currentWeb = properties.OpenWeb();
    // Get foldername from url like Document/EC10001/filename.txt                       
    string folderName = properties.AfterUrl.Split(new char[] { '/' })[1];
    SPList spList = currentWeb.Lists[properties.List.ID];                       
    SPQuery spQuery = new SPQuery();                       
    spQuery.Query = "<OrderBy><FieldRef Name='Modified' Ascending='FALSE'/></OrderBy>";
    //Getting the folder object from the list                       
    SPFolder folder = spList.RootFolder.SubFolders[folderName];
    //Set the Folder property                       
    spQuery.Folder = folder;
    int fileSequenceId = 0;                      
    SPListItemCollection items = spList.GetItems(spQuery);
    if (items.Count > 0)                       
    string documentID = items[0]["DocumentID"] != null ? items[0]["DocumentID"].ToString() : string.Empty;
    if (!string.IsNullOrEmpty(documentID))                           
    string splitNumber = documentID.Split(new char[] { '-' })[1];                               
    fileSequenceId = Convert.ToInt32(splitNumber) + 1;                           
    else                           
    properties.ErrorMessage = "Unable to generate Document Id";                               
    properties.Cancel = true;                           
    else                       
    fileSequenceId = 1;                       
    // Set DocumentID like EC10001-001                       
    properties.AfterProperties["DocumentID"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));      
    // Retrive "EEC000" string from Constant List               
    properties.AfterProperties["vti_title"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));   
    // Retrive "EEC000" string from Constant List                
    base.EventFiringEnabled = true;
    Thanks,
    Pranay Chandra Sapa

    Hi,
    According to your description, my understanding is that when you upload document in Office 365 site, the event receiver in sandbox solution throws error.
    Per my knowledge, if you want to use event receiver in Office 365 environment, you need to use remote event receiver instead the normal event receiver in an app.
    Here are some detailed articles for your reference:
    Create a remote event receiver in apps for SharePoint
    Handle events in apps for SharePoint
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • How to setup the default run page in WAR file

    Can anyone please tell me how to setup the default run page in WAR file using JDeveloper? I want the login page to be the default page of the application. Thanks!

  • Model-View-Controller implementation help

    Hello, all. I'm updating an old, clunky, slow-as-molasses application to a slightly more responsive and expandable app with the help of the MVC pattern. However, I'm having a little trouble figuring out the best way to implement MVC in a Java app. Sp

  • Link to Business Role and User Account

    How to link an user account with a business role so that the user account can work with the new UI?

  • Bridge opens into microsoft works

    I need some help. I installed Photoshop CS5 yesterday and it was working fine, so today I deleted CS3, now when i try to open a photo from Bridge it opens into Microsoft Works instead of Photoshop, if I right click and go to 'open with' Photoshop is

  • Photoshop CS6 extended crashes unexpectedly

    Hello, I have this slight problem with my PS6 crashing unexpectedly in the middle of my work... I was wondering could this be related to the fact I registered my trial version instead of installing the software again from a CD? The instructions told