Initializing Vectors with objects.

Hi all,
I am investigating a problem and have narrowed down to a section of code where the Vector.get() method returns an empty string instead of null when the key queried doesn�t exist. I know I can alter the code to check for null or empty string but I wanted to find out why?
I am not sure if initializing a Vector variable with an existing object is the cause� Here is a line from the code:
Vector result = oracleWrapper.getCodeList (regionCode); //This call returns a vector.In test I ran this code a million times but couldn�t recreate it� but in production, after a few days (since the server bounce (JRun 4x)) of normal behaviour, it just starts returning empty string instead of null for keys that don�t exist in the Vector! Restarting the server is the solution for now!
What I want to find out:
1. Is initializing Vectors like in the snippet above fine?
2. Are there any known issues similar to this scenario?
3. Is call to a constructor explicitly required to guarantee its integrity?
Thanks a mill,
Jay

True and I have already removed the Vector from my list of suspects because this problem only happens after a few days of normal functioning and the vector still contains an incomplete string when the error starts. I am on the look for statements that may be resulting in memory leaks and temporarily have a Properties object in my list of suspects along with a few StringBuffers.
The code has a statement Properties props = null; and then after a few lines a value from a Vector object is put into it!
props= (Properties) result.elementAt(idx);I have load tested it but cant get it to break!
I have spent way too long on this and may be rewriting it would have been quicker! But can�t :(
I am soo stuck.

Similar Messages

  • Initializing Vector with ResultSet(too Slow!)

    Hi
    I'm createing a JTable with two Vectors. Im am initializing the Vectors in a while loop, but it is way to slow with large ResultSets.
    Does anyone know how I can speed this process up?
    Thanks!

    Heres the full method Ive removed some of hte code in the for loop. But that makes no difference to the speed
    private Vector getData(int columns[]) throws Exception
         rows = new Vector(queue.count);
         while (res.next())
                 Vector newRow = new Vector(columns.length);
              for (int i = 0; i < columns.length; i++)
                 newRow.addElement(res.getString(columns));     
    rows.addElement(newRow);
    return rows;

  • Initializing Vector with ResultSet(TO SLOW!)

    Hi
    Im creating a JTable from two Vectors. I need to initialize
    the one vector from a resultset. This is way to slow for large result sets. Heres my loop:
    private Vector getData(int columns[]) throws Exception
         rows = new Vector(queue.count);
         while (res.next())     
             Vector newRow = new Vector(columns.length);
             for (int i = 0; i < columns.length;i++)  
               newRow.addElement(res.getString(columns));
    rows.addElement(newRow);
    return rows;
    Any Ideas to speed this up a bit.
    Thanks!

    private Vector getData(int columns[]) throws
    Exception
    rows = new Vector(queue.count);
    while (res.next())
    Vector newRow = new Vector(columns.length);
    for (int i = 0; i < columns.length;i++)
    newRow.addElement(res.getString(columns));
    rows.addElement(newRow);
    return rows;
    Any Ideas to speed this up a bit.
    Thanks!
    I tested your code using String[][] rows (instead of Vector rows) hoping using arrays will make it faster. But it did not. What really did improve the performance was declaring and alocating memory for String[][] rows before calling the function. That is to say, the most time is spent on rows = new String[ROWS][COLS]. If you your conditions allow you to use String[][] rows instead of Vector rows and allocate memory for String[][] rows before calling your method getData(), then, in my opinion, it will improve the performance.
    Cheers!

  • How to copy objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution?

    I recently have bought a new Macbook Pro (Version 10.10.1) with the OS X Yosemite. The computer comes with the new Pages (version 5.5.1).
    Here is the problem: I like to create artwork using the shapes on Pages. Previously, on my old mac, I used Pages 4.3 to create objects, which I would copy then paste to Photoshop and it would become a vector smart object. However, in the new Pages (version 5.5.1), when I copy objects, they would appear on Photoshop as instead, a layer and it would not be in full resolution.
    Also, I know there is nothing wrong with the Pages file itself because I have converted the document to PDF form and it is high resolution when inserted into Photoshop that way.
    Does anyone know how I can copy individual objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution as I have done before?
    Thanks!

    ghotiz wrote:
    copy the image and have it in a high-quality PNG format that does not include the background from the Pages document.
    Oh, well if you don't actually need vector objects then it looks like this is possible. As I said earlier, Pages is putting a PNG on the clipboard. I tested it and it does paste into Photoshop as a transparent layer, because I can see the transparent background of the pasted PNG graphic if I either turn off all layers behind it in Photoshop, or if I start a new Photoshop document to paste into but make sure I choose Transparent for the Background Contents in the New Document dialog.

  • Passing vector of object with multiple datatype

    Hi
    I want to pass vector of objects to stored procedure and I am facing some problem
    please suggest is it possible or I need to follow some other way.
    I have one class detail with two attributes i.e int ID and string course
    In main I have created 1000 objects of different ID and course and pushed back the objects to avector of detail and passed to a function my function is
    void bulkdatainsert(vector<detail>rec)
    stmt = conn->createStatement ("begin storeBulk(:1);end;");
         stmt->setMaxIterations(rec.size());
         stmt->setMaxParamSize(1,1024);
         setVector(stmt,1,rec,"course"); // The error coming here
    The error is due to the type rec .
    I want to know can we pass objects of multiple data to stored procedure through OCCI ?
    If not do we need to break every attribute and make vector of corresponding attributes and pass to stored procedure?
    please suggest me
    Thanks

    I think Custom objects are not supported directly.
    Following are the normal ones which you can use
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector< T > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is not supported, such
    as Windows NT. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<T* > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is supported. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BDouble> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Bfile> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BFloat> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Blob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Clob vector;
    multibyte support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Clob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Date> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Date vector;
    multibyte support.

  • Is it possible to export Vector Smart Objects as vector SVG files from Photoshop CC 2014?

    I have Vector Smart Objects copied from Illustrator and pasted into Photoshop. I would like to export them as vector SVG files (using Generator or Extract Assets). I can add the .svg extension to the layer and actually export an SVG just fine. The problem is any SVG I have exported have all been raster images. It defeats the purpose of having that as an option as far as I'm concerned.
    I remember watching and listening to keynotes and other speakers at Adobe MAX 2014 who said it was so powerful and amazing to create SVG files from Photoshop. If we're still exporting raster SVG files from Photoshop...that's not very impressive or exciting--especially since this era of modern web development benefits greatly from using vector SVG files.
    I understand that Shape Layers can be exported as vector SVG files but that seems very limiting. I also realize that users can create some impressive vectors in Photoshop, but that is not optimal. Illustrator is a better tool for creating vectors and I normally use Photoshop and Illustrator side-by-side. I know that vector SVG files can be exported from Illustrator but that isn't as user friendly and convenient as utilizing Photoshop > Generator > Reflow.
    My idea was to create my assets in Illustrator, paste them into Photoshop as Vector Smart Objects, set up my layout, and then use the Generator/Reflow method or Extract Assets to get a new web design started.
    Maybe I misunderstood what the speakers at Adobe MAX had said. Perhaps it's just user error and I'm just missing something simple (it happens).
    Photoshop CC 2014 notes the following under Help > System Info:
    Adobe Photoshop Version: 2014.2.2 20141204.r.310 2014/12/04:23:59:59 CL 994532  x64
    Operating System: Windows 8.1 64-bit
    Any help or suggestions would be greatly appreciated! Thank you in advance for your time.

    Not quite the same, but have a look at the new Libraries feature that came with 2014.2.2  I just tried it, and dragging a vector object into a library I created in Photoshop, was there in Illustrator.  This happens without having to close and reopen Illustrator.  Just use the drop down at the top of the Libraries panel (in Illustrator) to find your custom, or job specific library.

  • PS opens vector smart object all pixilated

    I have this problem when using graphics from Illustrator as vector smart objects in Photoshop. I have followed tones of heated discussions on this but I haven't got any further. So here is what I do following the steps on the PS help: I copy graphics in AI and paste them in PS as smart object. A layer will be added that even has the name vector smart object but the graphic itself is all pixilated. Now the size of my PS-file is 150X150 Pixels with a resolution of 300. I need this size because I want to implement the file into my website and the layout requires this size for all my graphics. I would say it doesn't matter much what size the file is anyway since according to the PS help whatever vector smart object I place in Photoshop it won't change image quality when transformed. Therefor I'd say that not even the small file should be a problem here. But obviously there is something not working... because even when, to compare, I paste the graphic as pixel it shows the same result. Strange enough that I have used this vector smart objects before and it worked just fine... So I tried to paste the graphic in different ways, saving it as pdf in AI and then placing it in PS, insert it directly as smart object, making sure the file handling and clipboard references are adjusted, and finally after no success trashing the preferences in both applications. Still not closer to a satisfying result. I attach the graphics (first the AI graphic, then the vector smart object from PS) to show the difference and maybe there is someone out there that can tell what I am doing wrong. By the way I just converted the files to jpegs to post them here so the sizes might not match on the screen...

    One other thing to check...
    Are you viewing the display at 100%?
    Photoshop's OpenGL-based image resizing algorithms are smoother and fuzzier than they used to be (or than they are with OpenGL disabled).  What I'm getting at is that you may be perceiving fuzziness in the display that's not really there in the image.
    How does the fuzziness look if you zoom in a lot?
    -Noel

  • Problem with object view with primary-key based object identifier

    Hello!
    I met such problem.
    t1 is persinstent-capable class:
    class t1 : public PObject { .... };
    T1OV is object view, based on object table T1OT
    I1 is primary key of the table T1OT.
    Next code:
    t1* t = new (conn, "T1OV") t1(...);
    conn->commit();
    try
    t->markDelete();
    conn->commit(); // exception throws here
    Works fine if T1OV defined as:
    create view t1ov of t1 with object identifier default
    as select * from t1ot;
    And throws an exception
    "ORA-22883: object deletion failed"
    if:
    create view t1ov of t1 with object identifier (I1)
    as select * from t1ot;
    Such problem also occurs when object view is based on relational table/view (OID is primary-key based).
    Also it occurs when
    t->markModified() used insted of t->markDelete()
    I am using Oracle 9i second release for windows and
    MS VC++
    Thank You

    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_85a.htm#2065512
    You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.
    Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.
    Restrictions on View Constraints
    View constraints are a subset of table constraints and are subject to the following restrictions:
    You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
    View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
    You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
    You cannot define view constraints on attributes of an object column.
    Rgds.

  • Error in JMS receiver adapter: "Error creating initial context with environment"

    Hello,
    I have some trouble with a JMS receiver adapter (access to JMS-provider with JNDI).
    The message in adapter monitoring is:
    A channel error occurred. Detailed error (if any) :
    com.sap.aii.adapter.jms.api.connector.ConnectorException: Fatal Error looking up connection factoryJMSQueueConnectionFactory, for profile: ConnectionProfile of channel: CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd:
    ConnectorException: Error creating initial context with environment: java.naming.provider.url=wcsefdev.example.com:9064; java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory; for profile: ConnectionProfile of channel:
    CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd: javax.naming.NoInitialContextException:
    Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory<br> at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory
    (JndiConnectorImpl.java:152)<br> ....
    Message processing failed. Cause:
    com.sap.aii.adapter.jms.core.fsm.DFA$InvalidTransitionException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_RCV_XLIMI00001:5b424f2f79b6350ca636ab35d528cfdd
    The third party assured me that the specified JNDI parameters are right and everything is configured on their site, so it should work...
    Might there be a problem with the JMS drivers?
    Regards,
    Marcus

    Hi Marcus,
    Have a look at below thread
    Connecting to PI 7.11 JMS Queue from other PI 7.11 Server

  • Keynote 6.0 vector smart object conversion to Photoshop CS6

    Hi,
    I upgraded to OS 10.9 and Keynote 6.0. In the previous version of Keynote, I was able to easily paste Keynote content (words, shapes, charts) into Photoshop CS6 & Illustrator CS6 as vector objects, of which the elements could be independently manipulated by releasing the clipping mask.
    However, with Keynote 6.0, it appears the content mentioned above pastes into CS6 software as .tiff files with no option to convert to a vector smart object?  Is there a way to force a vector object placement or does this new Keynote version no allow (and if so why eliminate such a convenient function as vector smart objects)?
    Thanks for the help...

    Hello  thanks for your answers,
    i posted this when i was upset because it was a very frustrating situation. I create Vector art in Illustrator and most of the times i just copy and paste them into Photoshop. I dont use Illustrator Cs6 because some Issues with the color Picker and because i Use Scriptographer alot. So i use Photoshop CS6 and Illustrator CS 5.
    Somehow recently i noticed this strange behaviour. When i close Illustrator completely and doubleclick the Layer in Photoshop it works fine.

  • Error creating initial context with environment

    Hi,
    Currently we are working on a scenarios, where we need to integrate XI and webmethods using JMS.
    It was working fine. But recently they have restarted the webmethods server. After that we re getting an error message like,
    In Adapter Monitoring:
    Channel error occurred; detailed error description: com.sap.aii.adapter.jms.api.connector.ConnectorException: Error creating initial context with environment: {java.naming.provider.url=server:port, java.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl, java.naming.security.principal=XYZ, java.naming.security.credentials=ABC}for profile: ConnectionProfile of channel: CC_RCV_JMS_INon node: 3010950 having object id: ABCXYZ: NamingException: Error getting the server-side naming service functionality during getInitialContext operation.
    at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createInitialContext(JndiConnectorImpl.java:66)
    In RWB
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: No transition found from state: STARTING, on event: process_commence for DFA: C_RCV_JMS_IN:e4413a5265a436459e271d5e0dd4859b
    Can one please tell me what the problem is?
    Thanks in advance.
    Regards,
    Prasad Babu.

    Hi,
    Check this link looks like same problem
    Re: file to JMS(for MQ series)
    Thanks
    Vikranth

  • How to create Vector with reference to Collection

    hello experts,
    can someone let me know how to create vector with reference to Collection interface.
    Collection is an interface. and we cant create an instance of it. i'm not clear of what to pass in that constructor.
    Vector v = new Vector (Collection c);
    what are the possible objects of 'c'
    post some example code please.
    thanks

    Ever heard of reading the javadocs?
    "Collection is an interface. and we cant create an instance of it." - you don't understand interfaces, then.
    // I certainly can create a Collection - here's one
    Collection c = new ArrayList();
    // Now I'll add some Strings to my Collection.
    c.add("foo");
    c.add("bar");
    c.add("baz");
    // Now I'll make a Vector out of it.
    Vector v = new Vector(c);%

  • Vector smart Object wont open

    Dear Adobe,
    i'm getting furious when i'm bombarded with new options and messages that i should hurry uprading to CC when the CS 6 release is still buggy. Illustrator CS 6 is nearly inusable. When i double click on a vector smart object Layer Icon in Photoshop Ilustrator opens and... nothing happens. Please dont tell me to get subscription when i just payed 4000 € for a buggy Version of Creative Suite. Make it worth the money.
    Please find out why i cant use vector smart Object like i did in CS 5.5 or give me my money back.
    J.

    Hello  thanks for your answers,
    i posted this when i was upset because it was a very frustrating situation. I create Vector art in Illustrator and most of the times i just copy and paste them into Photoshop. I dont use Illustrator Cs6 because some Issues with the color Picker and because i Use Scriptographer alot. So i use Photoshop CS6 and Illustrator CS 5.
    Somehow recently i noticed this strange behaviour. When i close Illustrator completely and doubleclick the Layer in Photoshop it works fine.

  • Vector smart object? Big deal.

    My primary use for Photoshop is for producing illustrations rather than manipulating photographs. With that in mind, I don't understand the revolutionary nature of "Vector" Smart Objects, since once they land in Photoshop they cease to have any "vector" qualities. They can be resized, distorted, and made more or less transparent, which is fine, but all those things can be done to any raster Photoshop layer.  So my feature request is: since Photoshop's Path tool  can deal in vector art within Photoshop, why can't that facility be extended to the Smart Objects? I realize that what I am asking amounts to asking for Illustrator to be installed inside Photoshop, but why not? I think there was an app that worked that way-Deneba Canvas? I don't know, maybe only illustrators who work in both Photoshop and Illustrator would care about this, but I do a lot of it-produce an item in Adobe Illustrator for use in a picture, then copy and paste it into a scanned figure opened in Photoshop, then add shadows and tones. It would be helpful to be able to manipulate the vector art as vector art in Photoshop.

    ya, you  have to open it up in ai like the above post said if you want to edit it. but also one of the advantages to smart objects is that when you resize it, the quality remains unchanged as long as it is equal to or smaller than the original size. for example, if you design a button in illustrator, then you put it on a web page in photoshop and scale it down and hit enter, you can always make it bigger (up to original size) without losing quality. if you did this with a regular raster image you cannot size it up without losing quality.
      the reason you cannot edit the vectors in photoshop is that vector and raster are different types of files. it's kindof like trying to edit videos in photoshop. just wont work. it'd be cool if you could though because i am in your shoes too.

  • SortedVector with Objects???

    Can you use a SortedVector with objects? I have browsed the forums and every time someone uses this they insert a string or int. Here's my senario...
    I have a vector of objects (mailboxItems that contain header information for each entry) and I need to sort the information based on the messageDate.
    I'm fairly new to Java, so feel free to point out the obvious.
    Thanks!

    I am following, but I have two questions:
    1. If I implement the object as comparable then how do
    I determine which field to sort by?The choice is yours as the implementor
    >
    2. I understand the concept of overriding the equals
    and hashCode, but why am I doing this? Oh yeah, and
    could you point me in the right direction as to what I
    would change in there?So when you put them in sorted sets, they get fairly evenly distributed into hashbins - which will give you better performance than saying, setting the hashcode to 17 for all objects. The latter is valid, but leads to inefficient code.
    >
    BTW, thanks for the link, very helpful.
    Thanks for the fast responses everyone!

Maybe you are looking for

  • Editable field in ALV GRID/LIST

    Hi All, I developed an alv program in which 10 rows is there. In alv grid/list first column is check box. I want 1,5 and 10th row is editable for first column (check box) while rest is not editable. Can you please give solution for same. Please tell

  • Sequence settings mistake

    Hey - I somehow have edited most of a very complicated video with the wrong sequence settings. For some reason, it's set to both a 4:3 aspect ratio and a much smaller image size, but I didn't notice because it retained the aspect ratio of the video f

  • How to Handle Inventory Management Scenarios in BW (NW2004) BW7

    Hello, does anybody know if there is a more actual version of the document available? Thx, Christian

  • Handling unit production order process flow

    Hi Experts, Can anybody please tell me process steps involved in packing for Production order. What configuration need it. Please tell step by step with T-code.

  • Workflow Process Manager Unavailable

    Hi I have installed siebel on my system.(Siebel 8 ,Oracle 10.2.0.2 on Windows 2003)While installing i have selected Workflow component group. After installtion i checked for componets Some componets are online but some are unavailalbe In workflow com