Issue with adding JPanel objects with layout managers

Hi. The games I made in the past did not contain any customized menus (ie. not from JOptionPane) different components dividing the display screen... so I thought I would try to on my current game I'm working on. So here's the issue: I'm trying to set the GUI up for the game screen.. but when I try to add in additional JPanel objects into the my main JFrame object, all of the JPanel objects stack up at the very top left corner (their not supposed to because I am using a layout manager). Here's my simplified version of the code:
public void setUpGame(){
     MainGame game = new MainGame();
     game.setLayout(new BoxLayout(game, BoxLayout.Y_AXIS) );
        playPanel = new PlayPanel(); // don't worry about this.. it's a subclass of JPanel.
     playPanel.setPreferredSize( new Dimension(playPanel.width, playPanel.height) );     
        game.add(playPanel);
        JPanel collections = new JPanel();
        collections.setLayout(new FlowLayout() );
        collections.setPreferredSize( new Dimension( 1280, 256));
        miniMapPanel = new MiniMapPanel(); // subclass of JPanel.
     miniMapPanel.setPreferredSize( new Dimension(miniMapPanel.width, miniMapPanel.height) );
        collections.add(miniMapPanel);
        statsPanel = new StatsPanel();
     statsPanel.setPreferredSize( new Dimension(statsPanel.width , statsPanel.height ) );
        collections.add(statsPanel);
        ... // I do the same thing for StatsPanel and CommandPanel objects
        game.add(collections);
        add(game);
        // referencing to the JFrame object
        this.pack();
        setVisible(true);
        setFocusable(true);
}Notes:
-The sum of miniMapPanel.width, statsPanel.width, ... , commandPanel.width add up to 1280 pixels.
- miniMapPanel.height, statsPanel.height, ... , commandPanel.height all have the same height of 256 pixels.
- What I'm trying to do is set up a GUI very similar to that of StarCraft, and WarCraft.
- The game is set up in full screen.
When I compile the program, I see (and I've tested for it) that all of the JPanel objects that were created are all stacked one on top of each other, in the top left corner of the screen. Any ideas and/or suggestions are welcome.

Hi weng,
Try the following code example. I think the issue might be in your overridden methods if you did.
    public static void main(String[] args) {
        JPanel viewPanel = new JPanel();
        viewPanel.setBackground(Color.GREEN);
        viewPanel.add(new JLabel("You see a hut here..."));
        JPanel minimapPanel = new JPanel();
        minimapPanel.setBackground(Color.WHITE);
        minimapPanel.add(new JLabel("Minimap!"));
        JPanel commandPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));
        commandPanel.add(new JButton("Characters"));
        commandPanel.add(new JButton("Inventory"));
        commandPanel.add(new JButton("World Map"));
        commandPanel.add(new JButton("Menu"));
        JPanel lifeAndManaPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));
        lifeAndManaPanel.add(new JLabel("Life: 999/999"));
        lifeAndManaPanel.add(new JLabel("Mana: 999/999"));
        JPanel statusPanel = new JPanel(new BorderLayout());
        statusPanel.add(commandPanel, BorderLayout.PAGE_START);
        statusPanel.add(lifeAndManaPanel, BorderLayout.CENTER);
        JPanel bottomPanel = new JPanel(new BorderLayout());
        bottomPanel.add(minimapPanel, BorderLayout.LINE_START);
        bottomPanel.add(statusPanel, BorderLayout.CENTER);
        JPanel game = new JPanel(new BorderLayout());
        game.add(viewPanel, BorderLayout.CENTER);
        game.add(bottomPanel, BorderLayout.PAGE_END);
        JFrame frame = new JFrame();
        frame.getContentPane().setLayout(new BorderLayout());
        frame.getContentPane().add(game, BorderLayout.CENTER);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setSize(800, 600);
        frame.setVisible(true);
    }

Similar Messages

  • New Local Move Request fails with error "Multiple objects with Guid hex octet string were found."

    I can find nothing searching online.  Trying to move the last user mailbox from one server to another, but it fails with this error.  I have checked all mailboxes for the same GUID but can't locate it anywhere.  Anybody have some suggestions?

    Does anyone know if there is a way to perform a search based on mailbox GUID?  Maybe I could find all objects with the same and it could lead me in the right direction.
    Hi,
    To find the object that belongs to a GUID, you can refer to this blog.
    http://blogs.technet.com/b/ehlro/archive/2010/04/22/how-to-find-the-object-that-belongs-to-a-guid.aspx
    Best Regards.
    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]
    Lynn-Li
    TechNet Community Support

  • Issues when adding new objects

    A few questions regarding changes in Toplink from 2.5 to the current version.
    Say I had object A which contains a collection of Bs and a collection of Cs.
    Now when I want to save A and Bs and Cs to the database as an insert.
    Is the following code correct ?
    A a = new A();
    A cloneA = (A)uow.registerObject(a);
    Vector bCollectionClone = uow.registerAllObjects(new Vector(bCollection));
    Vector cCollectionClone = uow.registerAllObjects(new Vector(cCollection));
    uow.commit();
    This seemed to work in 2.5. According to the API java docs this should work even today.
    The reason I am asking is all of these -A, B and C are new objects. Should they be registered with registerNewObject();
    Is it incorrect to register a new object with cloning ?

    I forgot to add a couple of lines of code to that snippet
    A a = new A();
    A cloneA = (A)uow.registerObject(a);
    Vector bCollectionClone = uow.registerAllObjects(new Vector(bCollection));
    Vector cCollectionClone = uow.registerAllObjects(new Vector(cCollection));
    cloneA.setBCollection(bCollectionClone);
    cloneA.setCCollection(cCollectionClone());
    uow.commit();
    A few questions regarding changes in Toplink from 2.5
    to the current version.
    Say I had object A which contains a collection of Bs
    and a collection of Cs.
    Now when I want to save A and Bs and Cs to the
    database as an insert.
    Is the following code correct ?
    A a = new A();
    A cloneA = (A)uow.registerObject(a);
    Vector bCollectionClone = uow.registerAllObjects(new
    Vector(bCollection));
    Vector cCollectionClone = uow.registerAllObjects(new
    Vector(cCollection));
    uow.commit();
    This seemed to work in 2.5. According to the API java
    docs this should work even today.
    The reason I am asking is all of these -A, B and C
    are new objects. Should they be registered with
    registerNewObject();
    Is it incorrect to register a new object with cloning

  • Help With Multiple Class Objects With Methods

    I am dealing with multiple classes. I am wondering why I am getting an error on this line it's by the bottom
              obj1.array() = newArray[i];
    It gives the array out of bounds. On another note I believe I can change obj1 to just like incomingArray if I wanted correct since it's just a reference because I should be able to do this method sort on any array.
    method : selSort
    input - none
    output - void
    This is where we sort the arary
    Pseudocode Code:
    1 Initialize variable oldlocation to hold spot of smallest number in original array
    2 Initialize variable smallnumber to store smallest number in original array
    3 Initialize new integer array
    4 Set new array length to length of original array
    5 Initialize variable length to store lengh of new array
    6 For i = 0 and continue till i < new array length
    6.1 Find smallest number in original array
    6.2 Put the smallest number in new array
    6.3 Remove smallest number from original array
    7 Copy contents of new array that is sorted to original array
    Basic concept is to repetitively find the smallest
    (or largest) item in the original array. Once smallest
    is found, move it to the next spot in a new array and
    remove it from the old array.
    public void selSort ()
         int oldlocation = 0;
         int smallnumber = 0;
         int [] newArray = obj1.array();
         newArray = new int [obj1.length()];
         int length = newArray.length;
         for (int i = 0; i < newArray.length; i++)
    //          System.out.println("Test 1");
              newArray[i] = obj1.sortSmall();
    //          System.out.println("Test 2");
              smallnumber = obj1.sortSmall();
    //          System.out.println("This is the smallest number " + smallnumber);
              oldlocation = obj1.location(smallnumber);
    //          System.out.println("This is the old location " + oldlocation);
    //          System.out.println("Test 3");
              obj1.removeLocation(oldlocation);
    //          System.out.println("Test 4");
         System.out.println();
         System.out.println("The sorted array looks like");
         for (int k = 0; k < newArray.length; k++)
              System.out.print(newArray[k] + " ");
         System.out.println();
         System.out.println();
         obj1.resize(newArray.length);
         for (int i = 0; i < newArray.length; i++)
              obj1.array()[i] = newArray[i];
         return;

    method : selSort
    input - none
    output - void
    This is where we sort the arary
    Pseudocode Code:
    1 Initialize variable oldlocation to hold spot of smallest number in original array
    2 Initialize variable smallnumber to store smallest number in original array
    3 Initialize new integer array
    4 Set new array length to length of original array
    5 Initialize variable length to store lengh of new array
    6 For i = 0 and continue till i < new array length
    6.1 Find smallest number in original array
    6.2 Put the smallest number in new array
    6.3 Remove smallest number from original array
    7 Copy contents of new array that is sorted to original array
    Basic concept is to repetitively find the smallest
    (or largest) item in the original array. Once smallest
    is found, move it to the next spot in a new array and
    remove it from the old array.
    public void selSort ()
         int oldlocation = 0;
         int smallnumber = 0;
         int [] newArray = obj1.array();
         newArray = new int [obj1.length()];
         int length = newArray.length;
         for (int i = 0; i < newArray.length; i++)
    //          System.out.println("Test 1");
              newArray[i] = obj1.sortSmall();
    //          System.out.println("Test 2");
              smallnumber = obj1.sortSmall();
    //          System.out.println("This is the smallest number " + smallnumber);
              oldlocation = obj1.location(smallnumber);
    //          System.out.println("This is the old location " + oldlocation);
    //          System.out.println("Test 3");
              obj1.removeLocation(oldlocation);
    //          System.out.println("Test 4");
         System.out.println();
         System.out.println("The sorted array looks like");
         for (int k = 0; k < newArray.length; k++)
              System.out.print(newArray[k] + " ");
         System.out.println();
         System.out.println();
         obj1.resize(newArray.length);
         for (int i = 0; i < newArray.length; i++)
              obj1.array() = newArray[i];
         return;

  • How to get a specific layout with the available layout managers?

    Hi
    Not done java GUI's (approximately 5 and a half years) for a while (I havn't even touched java for ages until a few months ago), and I am a little embarrased by how much I have forgotten.
    After tring unsuccessfully several times with TableLayouts and GridBagLayouts to produce this [ [http://i32.tinypic.com/fl94kp.png] ] sort of layout, I have decided I am either being incredibly stupid, or It's a rather difficult thing to do.
    (Sorry about the crudeness of the drawing)
    Please can someone point me on the right track as to what combination of layout managers + components I should be using to achive this, or even be super kind and post a code snippet for it.
    Preferably, I would like to use just the default layout manages / components that come with java, which will allow me to continue working on the GUI in netbeans without it complaining, but I'll use external libraries if absolutely nesecarry.
    Thanks
    A completely unrelated side note, but where the heck have all my past posts and dukes gone. :(
    Edited by: DarthCrap on Aug 2, 2010 5:14 PM

    Yes, A BorderLayout did solve my problems. It appears I was being stupid after all. :)
    @Encephalopathic. Using a gridbaglayout does indeed help with the centering issue for the smaller panel on the right. I had just worked that out myself when you posted. I had been reluctant to try the gridbaglayout for that, because it caused me a load of pain when I tried using it for the original problem.
    Thanks

  • Issues with adding a line....

    Can someone PLEASE give me some course of action to take here. I feel extremely frustrated and upset with Verizon, and none of the reps seem to want to be of any assistance at all……
    Recently, my wife and I decided that it was time to consolidate our phones to one carrier. She previously had AT&T, and I have had Verizon for 11+ years. After calling and talking to SEVERAL Verizon reps, and insuring that my current features and promos would NOT change if I added my wife’s phone to my account, we went ahead and ported her line to Verizon. This is where all the issues begin.
    To begin with, I called and talked to two different Verizon reps, who assured me that if I were to change my plan to a family share plan, I would CONTINUE receiving all discounts and promotions that I was already receiving on my primary line. They did note that some of these discounts would not be available to my “new” line, which was understandable, but again I was assured that I wouldn’t lose ANY promotions. The promotions that I am referring to are as follows:
    18% Access Discount
    Unlimited Email & Web
    5 Friends and Family 
    Talk & Text Plus Data $20 Disc
    Within the first week of adding my wife’s phone to my account, I noticed that I had indeed lost the “Talk & Text Plus Data $20 Disc”. I immediately called Verizon and inquired about why this promotion was lost, and I got several different arguments and rebuttals from the Verizon reps. The responses spanned the gamut of “There was never a $20 Disc on your account” to “That discount was only valid for 1 year upon enrolling”. I referred all the reps to the notes on my account that were written by the previous reps who assured me that this specific promo would remain. I also went as far as reading them the information I have on the promo stating that as long as I remain in a qualified plan, the $20 promo would remain for life. I was then told there was nothing they could do, and was transferred to “Loyalty”.
    Once transferred to “Loyalty” I talked to a very nice rep, who pulled up the information on the discount and assured me AGAIN that I was eligible for this promotion and she put in what is called an “Inactive Pricing Request” form to have the promotion reinstated on my account. She also assured me that in the event that the promotion was not immediately applied to my account, she would set my account up for review when the new bill came out, and she would personally issue me the $20 credit. 
    To make a long story short, my new bill came, and there was no new credit. I called Verizon back, and asked to speak to “Loyalty”, and the rep gave me some run around about not being able to send me directly to loyalty without him attempting to help me first. Finally after a 10 – 15 minute conversation he transferred me to Loyalty. This time, the Loyalty rep told me that I was NOT eligible for the promotion. I had her review all the notes on my account from the previous rep, and she verified that red assured me I was eligible, had put in the inactive pricing request, and assured me she would give me the $20 credit if the promotion wasn’t added. The rep then told me that the other rep had bold-faced lied to me and she would be filing a complaint with her supervisor. I requested to speak to her supervisor.
    Her supervisor got on the line and stated that she was aware of the situation, there was nothing that they could do, and that the other reps that assured me I was still eligible for the promotion would get complaints filed through their supervisors for inaccuracy. I asked this rep to EMAIL the last Loyalty rep that assisted me and have her call me. She obliged, and within 15 minutes I was back on the phone with the ORIGINAL Loyalty rep.
    The ORIGINAL Loyalty rep reviewed all the new comments on my account, and AGAIN assured me that I was STILL ELIGIBLE for the promotion, and she was going to “escalate” the inactive pricing request. She also told me that she had discussed my situation with her supervisor, and after reading the promotion details he too agreed that I was eligible for the promo. She assured me that I would hear back from them regarding the status of the promotion being added back to my account before my bill due date. 
    Upon reviewing my bill I noticed that it was extremely high. Upon calling Verizon AGAIN, it was disclosed to me that since my wife’s number was ported into Verizon from AT&T, and they gave her a temporary number to use until the number was ported over, I was being billed TWO $35 line activation fees. One for her actual ported line, and the other for the “temporary number” that was only in existence for 1 hour, and never even used. Needless to say upon review, that $35 was credited back to me.
    My dilemma now is what do I do? Even though several Verizon reps assured me that my discounts would remain, at least one of them didn’t. Since I have spent so much time fighting with Verizon reps on the phone, and awaiting my new bill, we are past the time to be able to cancel my wife’s line and revert everything back to the way it was. The benefit of this promotion was that I received a $20/mo discount through the life of my contract, with no end date. I have yet to hear back from the ORIGINAL Verizon Loyalty rep even though I have had her emailed again to contact me, and all the other Reps claim there is nothing that can be done, and I should’ve taken measures prior to upgrading to ensure my promotions would remain.

    spottedcatfish wrote:
    If you want consistent answers, always ask for official written documentation.  For instance, you can read the Terms & Conditions of service on this website, and you should also recieve a copy when you sign a contract in store.  Verizon has too many employees to be able to train them all perfectly, and then you can add in the inconsistency from all the different distribution channels (premium retailers, third party retailers like Amazon and Best Buy, etc.).  Should they strive for it?  Absolutely.  Will that help you as a customer when you get a dumb or new rep? Nope.  So help yourself, get your information in writing or don't believe what you hear.
    While in theory this is a great idea, the problem lies with Verizon once again. When talking to the Verizon reps who tell me my account doesn't qualify, and they are able to "quote" to me the reasons from the promotional documentation, when I request they send me written proof of why I don't qualify, I get the reply "We can't release internal Verizon documents to the public." I quote them what the documentation I have states, and they claim their documentation is different, yet they aren't allowed to release any documentation proving my account is in fact ineligible. 
    Also, when requesting documentation as to why the "inactive pricing request" was denied, the response I get is that my account is not eligible. I ask for documentation and get the reply that the "inactive pricing requests" are done by a third party that is not affiliated with Verizon, and they can't release those documents to me either.
    It seems a little odd to me that they have all this documentation that conflicts with all the information I have, yet they can't provide me proof of anything that is being said. The problem is they want you to think you are wrong. They want you to second guess yourself and hope you give up. It is much easier to tell a customer "No", rather then take the time to fix the issues at hand.

  • Safari 5.1.2 on Windows 7 has issues with hiding SWF objects in IFRAMEs

    Try as I may I cannot hide a Flash object in an HTML page referenced as the source of an IFRAME tag despite being able to hide the IFRAME when using Safari 5.1.2 on a Windows 7 machine.
    This is not a problem for the latest versions of Safari, Chrome and Firefox on a Mac. This is not a problem for the latest versions of Internet Explorer, Chrome and Firefox on a Windows 7 machine.
    Following is sample HTML and JavaScript for the page that includes the IFRAME tag:
    <button id="tryit" type="button">Try It</button>
    <div id="test">
         <iframe src="hideswf-iframe.html" width="770" height="610" frameborder="0"></iframe>
    </div>
    <script type="text/javascript">
         var test = document.getElementById("test"),
              tryit = document.getElementById("tryit");
         tryit.addEventListener( "click", hideAndSeek, false );
         function hideAndSeek(e) {
              var style = test.style;
              style.opacity = (style.opacity == 1 || style.opacity == "") ? 0 : 1;
    </script>
    And the following is the OBJECT tag for the SWF object that would exist in the page "hideswf-iframe.html" referenced as the source of the IFRAME tag in the above code block:
    <object type="application/x-shockwave-flash" id="strobemediaplayback" data="StrobeMediaPlayback.swf" width="743" height="600" style="visibility: visible; ">
         <param name="allowFullScreen" value="true">
         <param name="wmode" value="direct">
         <param name="flashvars" value="favorFlashOverHtml5Video=true&swf=StrobeMediaPlayback.swf&javascriptCallbackFunction=$.fn.strobemediaplayback.triggerHandler&minimumFlashPlayerVersion=10.0.0&expressInstallSwfUrl=expressInstall.swf&autoPlay=false&loop=false&controlBarMode=docked&poster=&src=http://players.edgesuite.net/videos/big_buck_bunny/bbb_448x252.mp4&useHTML5=false&width=1187&height=959&queryString=favorFlashOverHtml5Video=true&swf=StrobeMediaPlayback.swf&javascriptCallbackFunction=$.fn.strobemediaplayback.triggerHandler&minimumFlashPlayerVersion=10.0.0&expressInstallSwfUrl=expressInstall.swf&autoPlay=false&loop=false&controlBarMode=docked&poster=&src=http://players.edgesuite.net/videos/big_buck_bunny/bbb_448x252.mp4&useHTML5=false&width=1187&height=959">
    </object>
    The complex aspect is that this issue only manifests itself with some SWF objects, but not all. In the admittedly small sample of objects I tested I observed that the ones that failed were focused on video content (basically they were video players) while the ones that didn't exhibit the issues were not delivery mechanisms for video content.
    I have already tried using JavaScript libraries and frameworks such as jQuery and Scriptaculous - they didn't fare any better.

    Actually it doesn't let me choose either of the buttons and before anything can happen the crash occurs. I tried to click on both buttons but it seems not to work. Thanks!

  • Dual Layer DVD with added ROM folder issue

    When I burn dual layer discs with an added ROM folder I add the ROM folder along with the TS folders at the root level in Toast, and they burn just fine. For replicated discs I've always sent the files to a company in Boston to put on LTO for the replicator. Now a client's replicator wants the files as DDP 2.0, on discs, and I can create a standard DVD Video without issue in DVDSP, except, I'm having issues with adding ROM material. Obviously, I have to add the ROM folder within DVDSP and not Toast, since it gets built in to the DDP file. The trouble I'm having is when I add the ROM material within DVDSP, with ROM selected and Joliet enabled.
    DVDSP creates the DDP files, and at the same time, it creates a TS file too, so I can burn that to see if the files are correct. But in the TS version there is no ROM folder. I only create one folder, named Extras. I've read here in this forum about the need to create a folder within a folder because of the way DVDSP reads and includes the folder. Is that still the case? Do I need to put my Extras folder inside another folder, select that folder, and DVDSP will put the Extras folder on the DVD? And finally, I don't have a lot of confidence now in what's actually on the DDP disc. Is there any way a mere mortal can confirm the contents of a DDP file?
    Ed

    I just wanted to make sure you are aware that there is no reliable way to acess ROM content outside of the user navigating to the root level of the disc. The technology was abandoned at least 6 years ago. Most people just have a menu that give the user direction on how to navigate to the root level of the DVD but in my experience this only applies to single layer discs.
    I haven't ever been able to burn successful dual-layer discs in programs outside of DSP. DSP does something in the burn process that Toast and others is unable to do so that the second layer can be read.
    I do not believe that the DDP can create/show ROM content for a dual layer disc.
    The reason being that layer 0 always has to be bigger than layer 1(second layer) and authoring of the layers doesn't allow for a xtra folder of ROM content in the DDP format.
    If these are being replicated I would check with the replicator and inquire if they have made a DL disc with ROM content. Possibly they could add the folder before the glass master is made but I believe it is unlikely.

  • Added webutil object group with JDAPI - adjust the webutil block sequence ?

    Hi all,
    I'm using the JDAPI to subclass in the webutil object group into Forms in an application. Annoyingly, the webutil block becomes the first block on the Form - which means on some Forms it displays on startup. Is there anyway (programmatically using JDAPI) that I can move the block the end of the block list after I've subclassed in the object group ?
    TIA
    Steve

    Hello,
    move
    void move(JdapiObject nextObject)
    Reorders an object with respect to its siblings in the collection it belongs to. This is similar to using drag and drop in Form Builder to move a block in a list. This method represents a way to do the same thing programmatically. For example, if you want a block appear immediately before Block5 in a list, you pass the object representing Block5 as the nextObject argument.
    Pass null to this method to move the object to the end of the list. If the specified object and the next_object do not share the same owner, or do not have the same type, the method throws an exception.
    You cannot use this method to move objects between parents. For example, it cannot be used to move an Item from one Block to another. If you want to move an object from one parent to another you will have to do something like:
    // to move 'itmA' to be positioned before 'itmB' in block
    // 'blkB' (when 'itmA' is in another block)
    // copy itmA into a new parent (blkB) using same name
    Item newItmA = itmA.clone(blkB, itmA.getName());
    newItmA.move(itmB); // move new item relative to itmB
    itmA.destroy(); // delete original object
    itmA = newItmA;
    Parameters:
    nextObject - the object next to which the specified object is to be moved.
    Throws:
    JdapiException - if you attempt to move an object next to an object that does not share the same owner or is not of the same type.
    Francois

  • Issue with SharePoint foundation 2010 to use Claims Based Auth with Certificate authentication method with ADFS 2.0

    I would love some help with this issue.  I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0  I have a test account set up with lab.acme.com to use the ACS.
    When I log into my site using Windows Auth, everything is great.  However when I log in and select my ACS token issuer, I get sent, to the logon page of the ADFS, after selected the ADFS method. My browser prompt me which Certificate identity I want
    to use to log in   and after 3-5 second
     and return me the logon page with error message “Authentication failed” 
    I base my setup on the technet article
    http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
    I validated than all my certificate are valid and able to retrieve the crl
    I got in eventlog id 300
    The Federation Service failed to issue a token as a result of an error during processing of the WS-Trust request.
    Request type: http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
    Additional Data
    Exception details:
    Microsoft.IdentityModel.SecurityTokenService.FailedAuthenticationException: MSIS3019: Authentication failed. ---> System.IdentityModel.Tokens.SecurityTokenValidationException:
    ID4070: The X.509 certificate 'CN=Me, OU=People, O=Acme., C=COM' chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed
    correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    --- End of inner exception stack trace ---
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.BeginGetScope(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.BeginIssue(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.DispatchRequestAsyncResult..ctor(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginDispatchRequest(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult..ctor(WSTrustServiceContract contract, DispatchContext dispatchContext, MessageVersion messageVersion, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext
    serializationContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String
    trustNamespace, AsyncCallback callback, Object state)
    System.IdentityModel.Tokens.SecurityTokenValidationException: ID4070: The X.509 certificate 'CN=Me, OU=People, O=acme., C=com' chain building
    failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    thx
    Stef71

    This is perfectly correct on my case I was not adding the root properly you must add the CA and the ADFS as well, which is twice you can see below my results.
    on my case was :
    PS C:\Users\administrator.domain> $root = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ad0001.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "domain.ad0001" -Certificate $root
    Certificate                 : [Subject]
                                    CN=domain.AD0001CA, DC=domain, DC=com
                                  [Issuer]
                                    CN=domain.AD0001CA, DC=portal, DC=com
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    22/07/2014 11:32:05
                                  [Not After]
                                    22/07/2024 11:42:00
                                  [Thumbprint]
                                    blablabla
    Name                        : domain.ad0001
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : domain.ad0001
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17164
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.domain> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ADFS_Signing.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "Token Signing Cert" -Certificate $cert
    Certificate                 : [Subject]
                                    CN=ADFS Signing - adfs.domain
                                  [Issuer]
                                    CN=ADFS Signing - adfs.domain
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    23/07/2014 07:14:03
                                  [Not After]
                                    23/07/2015 07:14:03
                                  [Thumbprint]
                                    blablabla
    Name                        : Token Signing Cert
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : Token Signing Cert
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17184
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.PORTAL>

  • InDesign cs6 crashes when exporting objects with drop shadows to interactive PDF

    I am using the trial version of InDesign CS6 on a mac OSX 10.7.4  I need to export my document as an interactive PDF. I have found that the export works fine so long as none of the objects within my document have a drop shadow. However, if I add a drop shadow to any object (text, images, or video) InDesign will crash when I try to export. I am adding the drop shadow by selecting the object and then choosing Object > Effects > Drop Shadow. Is there another method I should be using to add the shadow if I want to export to an Interactive PDF?

    Hi Peter, thanks for the response. Yes, I have tried creating a new blank project and adding one text object with a drop shadow and then exporting to Interactive PDF, and I experienced  the same result. I tried replacing my preferences as you suggested and found that it did not have any affect.
    I continued developing my InDesign document without using any drop shadows and began to experience the same type of crashing under two more circumstances. 1. When relinking assets in my Links panel. 2. When exporting to interactive PDF with interactive objects that are being clipped (I get a warning telling me I have clipped objects before I export; when I click export I experience the same crash.) I have tried exporting the same file to a print (non-interactive) PDF and experienced no crashing.
    I thought I should mention that I am using a retina display mac book pro with 16GB RAM. Could my graphics cards or the configureation of my machine be causing my issue?
    Thanks so much,

  • Problem extending standard ViewReceiptsSearchVO view object with logic on get method

    Hi All,
    EBS 12.1.3
    Database 11.2.0.3
    I am trying to extend the 3 VOs related to ViewReceiptsSearch.  I extended a seeded ViewReceiptsSearchVO view object.  I haven't made any changes yet, no columns added, nothing altered.  When I run this substitution, the "Received" column is null.  This column in the view used for the view object only selects NULL and uses the getter method for the attribute to populate the value.  The generated extension getter calls getAttributeInternal and skips the logic in the standard getter and the substituted view object is displaying the null in the screen.  The below discussion explains the problem very well except that the original posted had the issue in 11.5.10.2.  I am having this issue with 12.1.3.
    Problem extending standard view object with logic on get method
    The 3 VOs that I am having the problem are:
    ViewReceiptsSearchVO
    ViewReceiptsSearchReqVO
    ViewReceiptsSearchSupplierVO
    What do I need to do to get the "Received" column populated?  Please let me know any additional information you want to troubleshoot the issue.
    Thanks.

    Hi,
    Can you Please Share Extended ViewReceiptsSearchVO.xml and .jpx File?
    Thanks,
    Dilip

  • Can I call an object with synchronized methods from an EJB

    I have a need for multiple threads (e.g. Message Driven Beans) to access a shared object, lets say a singleton, I'm aware of the "you can't have a singleton in the EJB world" issues) for read/write operations, so the operations will need to be synchronised.
    I've seen various statements such as you can't use read/write static fields in EJBs and you can't use synchronisation primitives in EJBs but I've also seen statements that say its okay to access utility classes such as Vector (which has synchronised methods) from an EJB.
    Does anyone know if there is a definitive answer on this? What are the implications of accessing a shared object with synchronised methods from multiple EJBs? Is it just that the EJB's thread may block which limits the ability of the container to manage the EJBs? In the Vector example above (from Professional Java Server Programming) did they mean its okay to use these utility classes provided they aren't shared across threads?
    If I can't use a plain old Java Object does anyone know if there are other potential solutions for sharing objects across EJBs?
    In my problem, I have an operation that I want to run in a multi-threaded way. Each thread will add information to the shared object, and this info may be used by the other threads. There's no lengthy blocking as such other than the fact that only one thread can be adding/reading information from the shared object at a time.
    I've trawled through this forum looking for similar questions of which there seem to be many, but there doesn't seem to be any definitive answers (sorry if there was and I missed it).
    Thanks
    Martin

    You can share objects among EJB's or among objects used by one or more EJB's. You can use synchronization primitives - nothing will prevent you from doing that.
    After all, the container classes, JVM-provides classes, JDBC, JCA, JNDI and other such classes do all of this with impunity. You can too. You can use file and socket I/O as well, presuming you configure the security profile to allow it. Should you? Well it depends on what you need to accomplish and if there is another practical alternative.
    Yes the specification warns you not to, but you cannot be responsible for the interior hidden implementation of classes provided to you by the JVM or third parties so you can never truly know if your are breaking these written rules.
    But when you do these things, you are taking over some part of the role of the container. For short running methods that only block while another thread is using the method or code block and no I/O or use of other potentially blocking operations are contained in the method/block, you will be fine. If you don't watch out and create deadlocks, you will harm the container and its managed thread pool.
    You should not define EJB methods as synchronized.
    Also, if you share objects between EJB's, you need to realize that the container is free to isolate pools of your EJB in separate classloaders or JVM's. It's behavior can be influenced by your packaging choices (use of .ear, multiple separate .jar's, etc.) and the configuration of the server esp. use of clustering. This will cause duplicate sets of shared classes - so singletons will not necessarily be singleton across the entire server/cluster, but no single EJB instance will see more than one of them. You design needs to be tolerant of that fact in order to work correctly.
    This isn't the definitive answer you asked for - I'll leave that to the language/spec lawyers out there. But in my experience I have run across a number of occasions where I had to go outside of the written rules and ave yet to be burned for it.
    Chuck

  • How to redefine GOS toolbar function "SEND OBJECT WITH NOTE" for deliveries

    Hello Abapers,
    for inbound and outbound deliveries (tcodes VL01N, VL02N, VL03N, VL31N, VL32N, VL33N) I have to replace the GOS toolbar function SEND OBJECT WITH NOTE with a redefined function matching the following specifications:
    - Title field needs a different content
    - Text (note content) should be filled by default, maybe with standard text, but can be overwritten
    - All attachments in the attachment list of the object should be included by default or be selectable thru an additional button
    Also possible could be an addiitonal toolbar function SEND ATTACHMENTS WITH NOTE as a copy of SEND OBJECT WITH NOTE.
    Although I checked the SDN forums for a matching solution, I couldn't find one in tons of GOS threads.
    Perhaps someone had solved a similar problem to send obejct with notes from GOS toolbar with several of the object's attachments.
    Maybe some GOS classes have to be redefined for that, but this should only be available for deliveries, not for the other BOR types.
    I'm waiting for your ideas.
    Best regards,
    Klaus
    Edited by: Klaus Babl on Feb 16, 2012 10:13 AM

    No the list of steps done to solve the issue:
    1. Copy of class CL_GOS_SRV_SEND_OBJECT to new class /SIE/IS_BSD_GOS_SRV_SEND_ATT.
    2. SM30 for table SGOSATTR: New entry for new service ZSO_SENDATT for the new class.
    3. Copy of methods ON_SERVICE_SUCCEEDED, CHECK_STATUS, CREATE_ROOT_ITEM and ON_LINK_CREATED from class CL_GOS_SRV_ATTACHMENT_LIST to the new class.
    4. New code added to the top of method CHECK_STATUS to show the service for deliveries only:
    IF  is_lporb-typeid  NE  'BUS2015'
    AND is_lporb-typeid  NE  'LIKP'.  
        ep_status = mp_status_invisible.
        EXIT.
    ENDIF.
    5. Copy of function group SAPLSGOS_OUTBOX and function module SGOS_SEND_OBJECT_WITH_NOTE to own copies.
    6. Before calling cl_bcs=>short_message  there are several steps to do:
    - CALL METHOD cl_binary_relation=>read_links
    - CALL FUNCTION 'SO_DOCUMENT_READ_API1' for all links
    - cl_document_bcs=>create_document for all those documents (we are using types ATTA, NOTE and URL)
    - APPEND those created documents to the attachment table and pass it to i_attachments of cl_bcs=>short_message
    Solved issue!
    COMMENT: This SDN wiki document is outdated and doesn't work any more:
    http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-SendingGOSattachmentstoanemailaddress
    Best regards,
    Klaus

  • WAD - adding menu entries with JavaScript - help please!

    Hiya,
    I am completely new to JavaScript and I need some help with adding menu entries into my WAD template. Can anyone please help?
    I want to add functionality into my WAD template to enable users adding results rows on a selected characteristic, at a single mouse click. Currently they need to go to the menu -> properties -> characteristic -> display results -> always -> ok. That's five clicks of a mouse (provided they know were to go).
    I want to add this option to the basic menu so that they can click once only.
    What I have managed to figure out so far using SAP help is the following. I have added a Script Item into my WAD Layout and added the following line of code in the Script Editing window:
    sapbi_addToMenu("Add totals", "alternate_context_menu", "X","CHARACTERISTIC", "", "bottom", "", "")
    It worked fine in that it added an extra item "Add totals" to my menu when I righclick on a characteristic. So far so good. However, I have no idea what function I should be using here, or how to code it. Surely WAD uses some function to perform this action, something that I could reuse? Is there a library somewhere of all the function used in WAD?
    Can anyone please help with the code?
    Many thanks,
    Agata

    Hiya again,
    I have managed to partially solve this problem by using the following code. However it requires me to define on which characteristic the function is performed. In this case I have managed to get it working on 0PROJECT, but I want it to be ANY characteristic which has been right clicked?
    Any ideas how I can pass the characteristic name as a VARIABLE, whose value would be read automatically when menu is triggered?
    /* Add Contextmenu entries */
    sapbi_addToMenu("Add totals", "JS_SET_RESULT_VISIBILITY_R", "X","CHARACTERISTIC", "", "bottom", "", "")
    * Javascript functions that are to be integrated into a web template and that
    * are to be used later in the web application ALWAYS have to have the same function
    * signature, i.e. the parameters that will be passed.
    * @param currentState - a list of parameters that describe the state the web item
    * @param defaultCommandSequence - the initially used sequence of commands that
    *       would have been used instead of the custom
    *       script.
    function JS_SET_RESULT_VISIBILITY_R( currentState, defaultCommandSequence ){
    //Note: information can be extracted using the parameter 'currentState'
    // and 'defaultCommandSequence'. In either case create your own object
    // of type 'sapbi_CommandSequence' that will be sent to the server.
    // To extract specific values of parameters refer to the following
    // snippet:
    //  var key = currentState.getParameter( PARAM_KEY ).getValue();
    //  alert( "Selected key: " + key );
    // ('PARAM_KEY' refers to any parameter's name)
    //Create a new object of type sapbi_CommandSequence
    var commandSequence = new sapbi_CommandSequence();
      * Create a new object of type sapbi_Command with the command named "SET_RESULT_VISIBILITY"
    var commandSET_RESULT_VISIBILITY_1 = new sapbi_Command( "SET_RESULT_VISIBILITY" );
    /* Create parameter TARGET_DATA_PROVIDER_REF_LIST */
    var paramTARGET_DATA_PROVIDER_REF_LIST = new sapbi_Parameter( "TARGET_DATA_PROVIDER_REF_LIST", "" );
    var paramListTARGET_DATA_PROVIDER_REF_LIST = new sapbi_ParameterList();
    // Create parameter TARGET_DATA_PROVIDER_REF
    var paramTARGET_DATA_PROVIDER_REF1 = new sapbi_Parameter( "TARGET_DATA_PROVIDER_REF", "DP_1" );
    paramListTARGET_DATA_PROVIDER_REF_LIST.setParameter( paramTARGET_DATA_PROVIDER_REF1, 1 );
      // End parameter TARGET_DATA_PROVIDER_REF!
    paramTARGET_DATA_PROVIDER_REF_LIST.setChildList( paramListTARGET_DATA_PROVIDER_REF_LIST );
    commandSET_RESULT_VISIBILITY_1.addParameter( paramTARGET_DATA_PROVIDER_REF_LIST );
    /* End parameter TARGET_DATA_PROVIDER_REF_LIST */
    /* Create parameter CHARACTERISTIC */
    var paramCHARACTERISTIC = new sapbi_Parameter( "CHARACTERISTIC", "0PROJECT" );
    commandSET_RESULT_VISIBILITY_1.addParameter( paramCHARACTERISTIC );
    /* End parameter CHARACTERISTIC */
    /* Create parameter RESULT_VISIBILITY */
    var paramRESULT_VISIBILITY = new sapbi_Parameter( "RESULT_VISIBILITY", "VISIBLE" );
    commandSET_RESULT_VISIBILITY_1.addParameter( paramRESULT_VISIBILITY );
    /* End parameter RESULT_VISIBILITY */
    // Add the command to the command sequence
    commandSequence.addCommand( commandSET_RESULT_VISIBILITY_1 );
      * End command commandSET_RESULT_VISIBILITY_1
    //Send the command sequence to the server
        return sapbi_page.sendCommand( commandSequence );

Maybe you are looking for

  • HT201210 Locked out of iPhone 4! Need Help!

    I have forgotten my passcode. I locked myself out of my iPhone 4 to where it says, "iPhone is disabled, connect to iTunes". I go to connect to iTunes to restore to factory settings (i heard it is the only way) but i do not have the latest iOS update.

  • Java broken in 8.1.5

    I installed oracle 8.1.5 using the "Typical option". When I run loadjava myclass.class I get this: Error while loading com/marksaltzman/task/Task ORA-04068: existing state of packages has been discarded ORA-04067: not executed, package body "SYS.LOAD

  • Freight Charges Treatment

    Hi All We have recently implemented MM module and there is one scenario that the freight charges only will be paid to different vendor than the original vendor. Because the company wants to pay only transpotation charges to other vendor and rest of t

  • Replacement of wifi card

    I have a hp pavilion dv7 home premium, win 7premium, intel core i7 processor. Would like to replace the wifi card; currently intel 1000, to intel 6250. The bios does not recognize the 6250. My bios ver is F.1c insyde. Is there an update that will all

  • Report Viewer Webpart IE9 issue -Reports not visible

    Hi, we have several installations using Sharepoint 2010 together with Reporting Services 2008 and 2008R2. When displaying reports in Sharepoint through the report viewer webpart, the rendering in IE9 will sometimes not display the report. This means