How to retrieve detached @ManyToOne entities with relationship

Hi All,
I am having difficulty retrieving all the Zipcode, Zipname records which have successfully been deployed on Glassfish v2r2, JDK1.6.0_06, MySQL 5.0, Netbeans 6.1 on Windows XP platform.
Below are the relevant EJBs snippets:
package domain;
@Entity
@Table(name="ZIPCODE")
public class Zipcode implements Serializable {
    @Id
    @Column(name="ID")
    private int id;
    public int getId() {
        return id;
    @OneToMany(cascade={CascadeType.ALL}, mappedBy="zipcode", fetch=FetchType.EAGER, targetEntity=Zipname.class)
    private Collection<Zipname> zipnames = new ArrayList<Zipname>();
    public Collection<Zipname> getNames()
     return zipnames;
package domain;
@Entity
@Table(name="ZIPNAME")
public class Zipname implements Serializable {
    @Id
    @Column(name="ID")
    private int id;
    public void setId(int id) {
        this.id = id;
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="ZIPCODE_ID")
    private Zipcode zipcode;
    public Zipcode getZipcode() {
        return zipcode;
package ejb;
@Stateless
public class ZipcodeBean implements ZipcodeRemote {
    @PersistenceContext(unitName="GeographicalDB") private EntityManager manager;
    public void createZipcode(Zipcode zipcode)
       manager.persist(zipcode);
    public Zipcode findZipcode(int pKey)
       Zipcode zipcode = manager.find(Zipcode.class, pKey);
        zipcode.getNames().size();
        return zipcode;
    public List fetchZipcodesWithRelationships()
      List list = manager.createQuery("FROM Zipcode zipcode").getResultList();
      for (Object obj : list)
         Zipcode zipcode = (Zipcode)obj;
         zipcode.getNames().size();
      return list;
@Stateless
public class ZipnameBean implements ZipnameRemote {
    @PersistenceContext(unitName="GeographicalDB") private EntityManager manager;
    public void createZipname(Zipname zipname)
     manager.persist(zipname);
    public Zipname findZipname(int pKey)
        Zipname zipname = manager.find(Zipname.class, pKey);
        zipname.getZipcode().getNames().size();
        return zipname;
    public List fetchZipnamesWithRelationships()
      List list = manager.createQuery("FROM Zipname zipname").getResultList();
      for (Object obj : list)
         Zipname zipname = (Zipname)obj;
         zipname.getZipcode().getNames().size();
      return list;
public class ZipcodeApplicationClient {
    @EJB
    private static ZipcodeRemote zipcodebean;
    private static ZipnameRemote zipnamebean;
    public ZipcodeApplicationClient() {
    public static void main(String[] args) {
        try {
            Zipcode zipcode_1 = new Zipcode();
            zipcode_1.setcode(9001);
            Zipname zipname_1 = new Zipname();
            zipname_1.setName("Harbour Cove");
            zipcode_1.getNames().add(zipname_1);
            zipname_1.setZipcode(zipcode_1);
//          zipnamebean.createZipname(zipname_1);
            zipcodebean.createZipcode(zipcode_1);
            //fetch detached entity without relationship
            Zipcode zipcode_2 = zipcodebean.findZipcode(0);
            System.out.println("zipcode_2.getId(): " + zipcode_2.getId());
            System.out.println("zipcode_2.getCode(): " + zipcode_2.getCode());
            Iterator iterator = zipcode_2.getNames().iterator();
            while (iterator.hasNext())
                System.out.println(iterator.next().toString());
            // output of fetching detached entity without relationship
            zipcode_2.getId(): 0
            zipcode_2.getCode(): 2010
            domain.ZipName@107e9a8
            zipcode_2.getLatitude: -33.883
            zipcode_2.getLongitude(): 151.216
            zipcode_2.getLocality(): Sydney
            //fetch detached entity with relationship
            List list =  zipcodebean.fetchZipcodesWithRelationships(); // line 76         
            // output of fetching detached entity with relationship
                       Caught an unexpected exception!
                       javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
                       java.io.NotSerializableException: ----------BEGIN server-side stack
                       at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:76)
                       -------------------------------------------------------------------------------------------------------------------------------------------( i ) As a result, please advice on how to utilise both fetchZipcodesWithRelationships() & fetchZipnamesWithRelationships() in ZipcodeApplicationClient() to retrieve collections of Zipcodes & Zipnames without encountering this issue?
(ii) I also like to utilise the zipnamebean.createZipnamez(zipname_1) to properly create this entity.
The local firewall has been de-activated. All components reside on the same host.
I have tried various approaches and googled without success.
Your guidances would be very much appreciated.
Many thanks,
Jack

Hi All,
When trying to add multiple Zipnames with the following additional statements at the beginning of ZipcodeApplicationClient:
            Zipcode zipcode_1 = new Zipcode();
            zipcode_1.setcode(9001);
            Zipname zipname_1 = new Zipname();
            zipname_1.setName("Harbour Cove");
            zipcode_1.getNames().add(zipname_1);
            Zipname zipname_2 = new Zipname();
            zipname_2.setName("Fairyland");
            zipcode_1.getNames().add(zipname_2);
            Zipname zipname_3 = new Zipname();
            zipname_3.setName("Wonderland");
            zipcode_1.getNames().add(zipname_3);
            zipname_1.setZipcode(zipcode_1);
            zipname_2.setZipcode(zipcode_1);
            zipname_3.setZipcode(zipcode_1);
            zipcodebean.createZipcode(zipcode_1); // line 49
The whole persistence step (line 49) failed altogether with these output:
Caught an unexpected exception!
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.RemoteException: null; nested exception is:
        javax.persistence.EntityExistsException:
Exception Description: Cannot persist detached object [domain.Zipname@1a6eaa4].
Class> domain.Zipname Primary Key> [0]
at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:49)Any ideas on why this occur?
Thanks,
Jack

Similar Messages

  • How can i erase an account with relationship with some class of tax

    how can i erase an account with relationship with some class of tax

    Hi Enrique,
    I am not sure what you mean by this, can you please explain in more detail? You cannot erase accounts that already have transactions posted to it.
    Hope it helps,
    Adele

  • HAVE BEEN UNABLE TO RETRIEVE MY OLD LIBRARY OF PHOTOS, ALBUMS AND PROJECTS SINCE DOWNLOADING AN APERTURE 3 SOFTWARE UPDATE TWO DAYS AGO.  THE NEW LIBRARY ONLY HAS A FEW NEW PHOTOS IN ONE FOLDER  PLEASE ADVISE AS HOW TO RETRIEVE OLD APERTURE LIBRARY WITH

    HAVE BEEN UNABLE TO RETRIEVE MY OLD LIBRARY OF PHOTOS, ALBUMS AND PROJECTS SINCE DOWNLOADING AN APERTURE 3 SOFTWARE UPDATE TWO DAYS AGO.  THE NEW LIBRARY ONLY HAS A FEW NEW PHOTOS IN ONE FOLDER
    PLEASE ADVISE AS HOW TO RETRIEVE OLD APERTURE LIBRARY WITH ALL MY PHOTOS, ALBUMS AND PROJECTS

    Find the old Aperture library in the Finder and double click it to launch Aperture with that library set to the default.
    And check your caps look key.  It appears to be stuck.

  • How to retrieve the text associated with a link annotation

    Hello
    In Acrobat, I created a link using the Select tool. I selected the text which I wanted to create a link.
    After with a C++ plug-in, I want to retrieve the text associated with a link annotation. Which is the function which makes it possible to find the text?
    Regards
    David G

    ok thanks for ur reply now my question regarding about ur first three message..
    U told using quad we finding their rectangle dimensions and then compare that with link annatation title. So then we retrieve link annataion right..
    Ya i already done like u told.. But i have one problem so plz solve dis..
    Problem--- see my code below
    for(int nWordCounter = 0; nWordCounter < nWordCount; nWordCounter++ )
    pdNWord = PDWordFinderGetNthWord(pdWordFinder, nWordCounter );
    PDWordGetNthQuad(pdNWord, nWordCounter, &quad);
    blh = ASFixedRoundToInt32(quad.bl.h);
    blv = ASFixedRoundToInt32(quad.bl.v);
    brh = ASFixedRoundToInt32(quad.br.h);
    brv = ASFixedRoundToInt32(quad.br.v);
    tlh = ASFixedRoundToInt32(quad.tl.h);
    tlv = ASFixedRoundToInt32(quad.tl.v);
    trh = ASFixedRoundToInt32(quad.tr.h);
    trv = ASFixedRoundToInt32(quad.tr.v);
    char *a = (char*)Asmalloc(20);
    sprintf(a, "%d %d %d %d %d %d %d %d", blh, blv, brh, brv, tlh, tlv, trh, trv);
    In dis code, the quad values of blh, blv, brh, brv, tlh, tlv, trh and trv are same for all words(pdNWord). so pls help me for dis proble..
    thanks in advance
    Raghu N

  • Q: How to retrieve the current URL with PL/SQL

    I've got a pair of dynamic page portlets on a page. The first is simply an input text box and a submit button, the second is an inventory 'report' based on what is entered in the text box. When a value is entered and the button pressed, there is javascript behind the button that takes the current URL, adds '&ITEM=XXXXXXXX' (removing it first if this is not the first invocation of the page), and redirects to the new page.
    The second portlet uses the &ITEM parm to list a bill of materials for the item. If one of the items possesses a sub-assembly, I want to display the item# in an <a href= manner to make it so the user can simply click on the link to see the BOM of the subassembly.
    To do this, I believe I need to capture the current url and modify it as required to pass the new &ITEM value. I'm having a lot of trouble trying to figure out how to get the current page url. Any help would be greatly appreciated!
    Geoff

    Hello
    I have a similar problem I have developed a pl/sql portlet and put it into a page, this portlets display a dynamic page. This dynamic page have a search functionality, what I am trying to do is that when I click the search button on the dynamic page it recall the whole page and pass the paremeter that the user wrote on the search box, then the portlet that contains the dynamic page recieve the parameter and recall the dynamic page with the parameter that was received. The problem that I have is that the portlet receive the parameter but when I pass the parameter to the dynamic page it doesn't get it. This is the way the I am calling the dynamic page inside my portlet into the show procedure:
    EXECUTE IMMEDIATE
    'begin
    APP_NAME.PG_DYN_DIR_ALFABETICO.show (
    p_arg_names => PORTAL30.wwv_standard_util.string_to_table2(''url_page'',''search_param''),
    p_arg_values => PORTAL30.wwv_standard_util.string_to_table2(:1,:2));
    end;'
    using url_pg,p_text1;
    The dynamic page receive the first parameter(url_page) but not the second one(p_text1), I have checked that the p_text1 has a value on my portlet before I send it to the dynamic page so I really don't understand why my dynamic page doesn't work.
    Please HELP ME. I am desperate
    Ana Lasprilla

  • How to retrieve single iPhoto picture with TM

    Ugh. I feel like a dolt.
    I want to restore a single picture that I have in my iPhoto library, but I cannot do this (so it seems) with TM. If I want to find a single picture on my hard-drive, I simply go to: users=>Pictures=>iPhoto, then select "View Package Contents" from the little "gear-like" drop down menu. Oddly, I'm not able to do this in TM. I follow they very same path, but cannot view the contents of iPhoto.
    Any help??

    I read somewhere that three or four apps worked that way so just tried it.
    Please mark thread as solved, many thanks.

  • How to create Rows in Database with EJB3.0 Entities - Relationship Problem

    Hi,
    I don't have much experience in writing Entity Java Beans, so if some questions are "dummy-questions", I apologize for that.
    Actual state: I have implemented Entity Java Beans with relationships between them. I can deploy them to JBOSS AS and everything is fine. Then, I want to implement a small client to fill the database with some values to check if my Beans are correct.
    Problem: I have three Beans, that have relationships.
    Entity Flight, Entity FlightSeat and Entity Address
    Flight has a OneToMany relationship with FlightSeat and two ManyToOne relationships with Address (for start- and destinationaddress of the flight)
    No, I want to create Values in the database with the Entities, but I don't know how I have to conside the relationships. How can I add a Flight row to the database? Do I have to specifiy the start- and destinationaddress, when saving the entity Flight with Entitymanager.persist()?? Maybe you know a good Tutorial where I can see, how it is possible to fill the tables?
    Here my Implementation:
    Flight.java:
    package at.ac.tuwien.inetappl.entity;
    import java.io.Serializable;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.persistence.FetchType;
    import java.util.Date;
    import java.util.Collection;
    @Entity
    @Table (name="REL_FLIGHT")
    public class Flight implements Serializable{
         private long flightid;
         private String company;
         private Date duration;
         private Address startaddress;
         private Address destinationaddress;
         private Collection<FlightSeat> seats;
         public Flight() {}
         public Flight(String company, Date duration, Address startaddress, Address destinationaddress)
              this.company=company;
              this.duration=duration;
              this.startaddress=startaddress;
              this.destinationaddress=destinationaddress;
         @Id @GeneratedValue(strategy=GenerationType.AUTO)
         @Column(name="FLIGHT_ID")
         public long getId()
              return this.flightid;
         public void setId(long flightid)
              this.flightid = flightid;
         @Column(name="COMPANY")
         public String getCompany()
              return this.company;
         public void setCompany(String company)
              this.company=company;          
         @Column(name="DURATION")
         public Date getDuration()
              return this.duration;
         public void setDuration(Date duration)
              this.duration=duration;
         @ManyToOne (optional=false)
         @JoinColumn(name = "START_ADDRESS_ID")
         public Address getStartAddress()
              return this.startaddress;
         public void setStartAddress(Address startaddress)
              this.startaddress=startaddress;
         @ManyToOne (optional=false)
         @JoinColumn(name = "DESTINATION_ADDRESS_ID")
         public Address getDestinationAddress()
              return this.destinationaddress;
         public void setDestinationAddress(Address destinationaddress)
              this.destinationaddress=destinationaddress;
         @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="flight")
         //@JoinColumn(name= "SEAT_ID")
         public Collection<FlightSeat> getSeats()
              return this.seats;
         public void setSeats(Collection<FlightSeat> seats)
              this.seats=seats;
    }Address.java:
    package at.ac.tuwien.inetappl.entity;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import javax.persistence.Column;
    @Entity
    @Table (name="REL_ADDRESS")
    public class Address implements Serializable{
         private String land;
         private String city;
         private String street;
         private int streetnumber;
         private int postalcode;
         private long addressid;
         public Address() {}
         public Address (String land, String city, String street,
                   int streetnumber, int postalcode) {
              this.land=land;
              this.city=city;
              this.street=street;
              this.streetnumber=streetnumber;
              this.postalcode=postalcode;          
         @Id @GeneratedValue(strategy=GenerationType.AUTO)
         @Column(name="ADDRESS_ID")
         public long getId()
              return this.addressid;
         public void setId(long addressid)
              this.addressid = addressid;
         @Column(name="LAND")
         public String getLand()
              return this.land;
         public void setLand(String land)
              this.land=land;
         @Column(name="CITY")
         public String getCity()
              return this.city;
         public void setCity(String city)
              this.city=city;          
         @Column(name="STREET")
         public String getStreet()
              return this.street;
         public void setStreet(String street)
              this.street=street;
         @Column(name="STREETNUMBER")
         public int getStreetNumber()
              return this.streetnumber;
         public void setStreetNumber(int streetnumber)
              this.streetnumber=streetnumber;
         @Column(name="POSTALCODE")
         public int getPostalCode()
              return this.postalcode;
         public void setPostalCode(int postalcode)
              this.postalcode=postalcode;
    /code]
    FlightSeat.java package at.ac.tuwien.inetappl.entity;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Entity;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.Table;
    @Entity
    @Table (name="REL_FLIGHTSEAT")
    public class FlightSeat implements Serializable {
         private long seatid;
         private String category;
         private int price;
         private boolean available;
         private Flight flight;
         public FlightSeat() {}
         public FlightSeat(String category, int price, boolean available)
              this.category=category;
              this.price=price;
              this.available=available;
         @Id @GeneratedValue(strategy=GenerationType.AUTO)
         @Column(name="SEAT_ID")
         public long getId()
              return this.seatid;
         public void setId(long seatid)
              this.seatid = seatid;
         @Column(name="CATEGORY")
         public String getCategory()
              return this.category;
         public void setCategory(String category)
              this.category=category;
         @Column(name="PRICE")
         public int getPrice()
              return this.price;
         public void setPrice(int price)
              this.price=price;
         @Column(name="AVAILABLE")
         public boolean getAvailability()
              return this.available;
         public void setAvailability(boolean available)
              this.available=available;
         @ManyToOne()
         @JoinColumn(name="FLIGHT_ID")
         public Flight getFlight()
              return this.flight;
         public void setFlight(Flight flight)
              this.flight=flight;
    FlightBean.java - implementing business methods
    package at.ac.tuwien.inetappl.bean;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.ejb.Remote;
    import at.ac.tuwien.inetappl.entity.Flight;
    import at.ac.tuwien.inetappl.entity.Address;
    import at.ac.tuwien.inetappl.entity.FlightSeat;
    import java.util.Collection;
    import java.util.Date;
    import java.util.Iterator;
    import java.io.Serializable;
    import javax.persistence.Query;
    @Stateless
    @Remote(FlightInterface.class)
    public class FlightBean implements FlightInterface, java.io.Serializable {
         //private Collection<Flight> flight;
         @PersistenceContext
         protected EntityManager em;
         /* CRUD METHODS FOR FLIGHT */
         /* CREATE FLIGHT */
         public void createFlight(String company, Date duration, Address start, Address dest)
              Flight flight = new Flight();
              flight.setCompany(company);
              flight.setDuration(duration);
              flight.setStartAddress(start);
              flight.setDestinationAddress(dest);
              em.persist(flight);     
         public void updateFlight(Flight flight)
              em.persist(flight);
         /* DELETE FLIGHT*/
         public void deleteFlight(long id)
               Query q = em.createQuery("DELETE FROM FLIGHT f WHERE f.FLIGHT_ID = :id");
               q.setParameter ("id", new Long(id));
         /* SEARCH METHODS FOR FLIGHT */
         public Collection<Flight> getFlights()
              return em.createQuery("from FLIGHT f").getResultList();
         public Flight getFlight(long id) {
              Flight flight = em.find(Flight.class, new Long(id));
              return flight;
         public String getCompany(long id) {
              Flight flight = em.find(Flight.class, new Long(id));
              String company = flight.getCompany();
              return company;
    }Thanks to all!! I hope somebody can help.
    Greetings,
    RedBaron

    On Wed, 16 May 2007 20:41:21 +0000 (UTC), "bsoliman"
    <[email protected]> wrote:
    >You need to set up virtual directories instead?see
    >
    http://support.microsoft.com/kb/172138
    The actual directories can be wherever
    >is most convenient for you?I keep mine in a folder called
    /clients outside my
    >local web root.
    >
    > Bev
    Understand that virtual directories are not exactly the same
    thing as
    virtual hosts.
    A virtual directory will not act as the root for a site. IIS
    will
    still think that your site root is the overall IIS site root.
    There are some utilities that allow you to switch the folder
    that IIS
    uses as the root. This one works pretty well:
    http://jetstat.com/iisadmin/
    Win
    Win Day, Wild Rose Websites
    http://www.wildrosewebsites.com
    [email protected]
    Skype winifredday

  • My computer was stolen a few months ago i now have a new laptop with new id but don't know how to retrieve my itunes account for i forgot my old id. How can i get to my account?

    My computer was stolen several months ago and I now have a new laptop with a new id but I do not know how to retrieve my itunes account for i have forgotten my password and user id. I need a way to get into my old account.

    http://iforgot.apple.com
    Regards.

  • I've lost an important email correspondence from 2012. I've heard this could be due to getting new Mac with Mavericks. can any one tell me (how to find out) if this is related? Also, how to retrieve the lost emails in my Gmail? Thanks

    Hello!
    I've just been told that "a lot of people have reported the total loss of their e-mail related to the Mavericks (10.9) update.  It appears the update corrupts the email files on your computer and when the Apple e-mail client sees everything is "gone" it wipes the server too (your GMail account)."
    I need to recover/retrieve a lost email sent from my GMail account back in sep/oct 2012. can any one help?
    I have searched my account the relevant correspondence is gone. I should not have deleted it myself. I've only started using "Mail" for my GMail account last September, so the servers could not have mixed up the Gmail archives, I think. Either way, I'm not smart enough yet to know how to retrieve this correspondence. The lost email is rather important, why I need to investigate all possible solutions.
    My gmail settings i.e. POP/IMAP and Filters are as they should, as far as I believe, but yet, I cannot tell how my settings were in 2012, tho I think I've never changed anything personally. In Sep 2012, arounf the time the, now lost, corresponcence took place, I switched to using Chrome, where before I was using Safari or Firefox. I now use a new mac book with Mavericks and browse in Chrome, most of the time.
    Would anyone be able to guide me through some steps, or have any leads on this?
    Many thanks in advance!
    LK

    Unless you've done anything to change it, Google keeps every email that ever passes through their server in your All Mail folder/mailbox/label. Even if you delete stuff, they hold onto it, there. You have to go out of your way to actually delete anything permanently.

  • HT1386 The laptop I originally synch'd my iphone 4s with is broken and cannot retrieve any files. How can I sync the phone with a new laptop without losing all my downloaded music and apps already installed on my iphone?

    The laptop I originally synch'd my iphone 4s with is broken and cannot retrieve any files. How can I sync the phone with a new laptop without losing all my downloaded music and apps already installed on my iphone?

    If the answer to the above question is "yes", FIRST, set up a backup of your new computer before you do anything else so the next time your computer breaks you will not be in the same situation. Backup solutions are numerous and inexpensive, and there is absolutely no excuse in the Third Millennium not to have one.
    Then see this tip: https://discussions.apple.com/docs/DOC-3141

  • Replacing Firefox 3.6.16 containing my history, bookmarks etc by version 4.0, I find that it will not open on my Mac Power PC G4 running on OS 10.4.11. Is there is a compatibility problem and how do I retrieve version 3.6 with my bookmarks etc

    Replacing Firefox 3.6.16 containing my history, bookmarks etc by version 4.0, I find that it will not open on my Mac Power PC G4 running on OS 10.4.11. Is there is a compatibility problem and how do I retrieve version 3.6 with my bookmarks etc.

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    When you install one of the above it will use your existing bookmarks etc

  • How to retrieve all users in the portal with UME API

    Hi everybody,
    I would like to know how to retrieve all the users from a portal, which uses LDAP as a source (there are users created in the portal as well)
    My code snippet is :
    IUserFactory userFactory = UMFactory.getUserFactory();
    UserSearchFilter searchFilter = userFactory.getUserSearchFilter();
    searchFilter.setDisplayName("*", ISearchAttribute.LIKE_OPERATOR, false);
    ISearchResult searchResult = userFactory.searchUsers(searchFilter);
    My problem is that with the code above, only the users created in the portal are displayed, and no LDAP users.
    Does someone know how to retrieve all the users whatever is the source?
    Regards
    Renaud

    prakash's code should work.
    however, mine code below doesn't user a search filter. it retrieves everyuser including users like indexadmin etc. Note:
    result.next().toString();
    returns a weird uniqueID used in the portal world.
    getUniqueName()
    gives your the usernames (sAMAccountName in Microsoft AD) people use to logon to the portal.
    try {
      IUserFactory uf = UMFactory.getUserFactory();
      ISearchResult result = uf.getUniqueIDs();
      while (result.hasNext()) {
        String uniqueid = result.next().toString();
        IUser user = uf.getUser(uniqueid);
        String userid = user.getUniqueName();
    } catch(Exception e) {
      //systemout

  • With photoshop ConnectionSDK, How to retrieve app.activeDocument as PSD file?

    Dear all,
    I'm currently making an automation s/w communicating with PhotoShop via connection sdk.
    Even though my primary language is C#, translating Java/iOS sample to C# works fine.
    Sending/receiving image file, invoking Javascript snippet work fine as demonstrated in sdk sample.
    Also, sending PSD to PhotoShop also works, so that I can send PSD file in my s/w onto PhotoShop.
    My question is here, How to retrieve PSD file working in PSD via connection sdk?
    Actual goal of my s/w is
    1. send predefined PSD onto PhotoShop
    2. PhotoShop user does editing with this given psd
    3. when editing is done, retrieve PSD from PhotoShop onto my s/w to process further in Asset Management system.
    Any advice would be helpful for me, Thanks in advance.

    Did you purchase Lion or did it come with the computer? If you purchased, look in Mac App Store (MAS) under Purchases tab. You can download again.
    If you need to reinstall, you can select to Reinstall OS X while booted from the Recovery Drive.
    Boot into the Recovery Drive by holding down Command R when restarting.
    If you need to purchase Mac OS X 10.7 Lion, you may order it from this page.
    http://store.apple.com/us/product/D6106Z/A/os-x-lion

  • How do i detach a document when scanned with several documents?

    how do i detach a document when scanned with several documents?

    You would need the full version of Adobe Acrobat for that. Adobe Acrobat Reader cannot accomplish this at all.

  • HT204266 How do I retrieve a lost iphone with the Find My Iphone app?

    How do I retrieve a lost iphone with the Find My Iphone app?
    I got my iphone stolen right out of my bag and I am assuming there is no way of retrieving the phone back unless I have the Find My Iphone app? I am hoping someone could prove me wrong or give me another solution to getting it back. I have a lot of photos, videos and memories in that phone and I would do anything to get it back. Please help!

    "I got my iphone stolen right out of my bag and I am assuming there is no way of retrieving the phone back unless I have the Find My Iphone app?"
    It is not an app.  It is a feature of icloud and iphone.  Did you set it up on the iphone itself BEFORE it was stolen?  If not, then you cannot track it at all.
    Change your passwords and report it to the police.

Maybe you are looking for