Code behaves differently inside/outside WLS 7.0.2

I'm using the embedded LDAP server for directory testing. The following
code runs happily outside Weblogic, but fails if run inside webligc(invoked
through a servlet), any idea?
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
props.put(Context.PROVIDER_URL, "ldap://host:7001");
props.put(Context.SECURITY_PRINCIPAL, "cn=Admin");
props.put(Context.SECURITY_CREDENTIALS, "weblogic");
DirContext ctx = new InitialDirContext(props);
Attributes attrs = new BasicAttributes(true);
Attribute objclass = new BasicAttribute("objectclass");
objclass.add("top");
objclass.add("organizationalUnit");
attrs.put(objclass);
Context result = ctx.createSubcontext("ou=Fruits", attrs);
WLS output when ran inside a servlet:
javax.naming.directory.SchemaViolationException: [LDAP: error code 65 -
Missing Attributes: [ou], Not Allowed Attributes
: []]; remaining name 'ou=Fruits'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2762)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2677)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2483)
at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:696)
at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDir
Context.java:317)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(Partial
CompositeDirContext.java:246)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(Partial
CompositeDirContext.java:234)
at
javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.
java:174)
at test.jndi.DirTest.testCreateSubContext(DirTest.java:93)
at test.common.TestServlet.doGet(TestServlet.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

Hi,
A guess would be that it may be referring different classes...
HTH
regards
MS

Similar Messages

  • The same code behaving different in two files.

    The same code behaving different in two files.
    in pro*c file it is returning rows
    in sql file it is not returning any rows.
    please suggest me.
    regards,
    prasad.

    please find the code.
    sql_stmt := 'SELECT rNum, dpcCode, sID, hDate, fBlock, '||
    'lBlock, recQty, fID, fName, ' ||
    'tSeqNo, sType, tDate, fStatCode, pDate, recCount, r ' ||
    'FROM (SELECT rownum rNum, DPC_CODE_ORIG dpcCode, ' ||
    'SENSOR_ID sID, ' ||
    'to_char(HEADER_DATE, ''YYYYMMDDHH24MISS'') hDate, ' ||
    'FIRST_BLOCK_NUMBER fBlock, ' ||
    'LAST_BLOCK_NUMBER lBlock, ' ||
    'RECORD_QUANTITY recQty, ' ||
    'FILE_ID fID, ' ||
    'substr(FILE_NAME,1,30) fName, ' ||
    'TRACE_SEQUENCE_NO tSeqNo, ' ||
    'SENSOR_TYPE sType, ' ||
    'to_char(TRAILER_DATE, ''YYYYMMDDHH24MISS'') tdate, ' ||
    'NVL(FILE_STATUS_CODE, ''NL'') fStatCode, ' ||
    'to_char(PROCESSED_DATE, ''YYYYMMDDHH24MISS'') pDate, '||
    'NVL(RECIRCULATE_COUNT,0) recCount, ' ||
    'ROW_NUMBER() ' ||
    'OVER(ORDER BY TRAILER_DATE DESC, LAST_BLOCK_NUMBER DESC) r ' ||
    'FROM logfc10t ' ||
    'WHERE DPC_CODE_ORIG = :IN_DPC_CODE ' ||
    'AND SENSOR_ID = :IN_SENSOR_ID ' ||
    'AND (((TRAILER_DATE <= TO_DATE(:IN_TRAILER_DATE, ''YYYYMMDDHH24MISS''))' ||
    ' AND (LAST_BLOCK_NUMBER < :IN_BLOCK_NUMBER)) ' ||
    ' OR (TRAILER_DATE < TO_DATE(:IN_TRAILER_DATE, ''YYYYMMDDHH24MISS'')))) ' ||
    'WHERE r = 1 ';

  • Code behaves differently when run in debugger

    var he:Array = handControl.getHumanInfo(ha, handNumber);
    while (he.length != 0)
    humanInfo.push(he.shift());
    This snippet is part of a large flash project I am working
    on. The program works fine by itself, but when I try to step
    through it in the debugger, it sometimes crashes, depending on
    where I put a breakpoint. If I put the breakpoint on the first line
    of code above, I can step into the function getHumanInfo(), trace
    it, and step back out, and everything is fine. But if I only put a
    breakpoint somewhere inside the getHumanInfo() function, all of a
    sudden when I step out of that function, the variable 'he' is
    undefined, and so the while loop never ends.
    This makes no sense to me. The code is either good or bad, it
    shouldn't behave differently based on where I put the breakpoint.
    The getHumanInfo() function always creates a new array and
    passes it back, so there is no reason 'he' should be undefined.
    This has happened many times when I've tried to use the flash
    CS3 debugger -- is there a known issue that this sounds like? I'm
    so fed up I'm ready to stop using the debugger altogether.

    I ran the program without the debugger and put some trace()
    statements in, just to make sure. Everything works fine without the
    debugger. So it seems to me it has to be a debugger issue. Has
    anyone heard of a similar issue?

  • How to make different inside/outside margins for only one section?

    I'm creating a Pages template and want to have several different section layouts. I've figured out most of them, but haven't been able to get one section to work as I want it.
    The problem is that I want a 3 inch left margin on odd-numbered pages, and a 3 inch right margin on even-numbered pages, but for this section only (because it will have graphic objects in those margins). Other sections should have standard symmetrical margins.
    I figure this should be possible, but I'm not selecting the right combination of properties. I tried searching the help file for "gutter", which is what the command was back in PageMaker, but couldn't find anything.

    With your cursor in the section you want to change the margins, go to the layout inspector (second icon) & click Section. The second selection under Configuration is Left and right pages are different. Then in Layout the left & right margin settings are named inside & outside. You can see the effect by displaying your document 2-up.

  • Code behaves different when SWF is in browser as opposed to stand alone player, why?

    In ActionScript, I have some code that dispatches a
    MOUSE_OVER event when a tween is complete. I am using Tweener for
    the tween. On my Mac OSX machine, I preview the SWF file in a stand
    alone player spawned from my Flash IDE, and the event is dispatched
    and the behavior works as expected, but when I preview the SWF file
    as embedded in a MacOSX browser, the event is not dispatched. On a
    Windows machine, however, the event is dispatched both in a stand
    alone player and within the embedded SWF file in a browser. The
    problem seems to come particularly from the Mac OSX player.
    Has anybody ever experienced this? Is the OSX implementation
    of the Flash player different in a stand alone and browser setting?
    Here is the code that I am using:

    HMMM! Verrrrrry interesting.
    Yes file size is an issue, it's a large project.
    Exterenally host it?
    Where could I go and do that?
    I'm not familiar with this process.  Can you please tell me exactly how it works? 
    And....that means both servers need to be up and running?  Kinda sounds a bit shakey.   This project needs to be strong and stand alone to go here and there.  Durable.   
    I feel safer if its all in one piece.  Bam.
    You know, I noticed "FAST" and "BEST" does not make a difference to file size or quality. 
    Could I be wrong?
    Thanks.

  • I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the maste

    I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the master, and I cannot get the margins to alternate at print time. The larger margin is always on the left. Can anyone please help me on this, as I have spent hours and lots of ink.

    Set up as facing pages with a larger inside margin.

  • PS1 String behaving differently - how to get only "/"?

    Hi there, let me first start with the 4 lines of code I use for my PS1 string (in bash)
    boBlack="\[\033[1;30m\]"
    boGreen="\[\033[1;32m\]"
    boCyanOnBlack="\[\033[1;36;40m\]"
    export PS1="$boCyanOnBlack"'${PWD%*/}'"$boBlack/$boGreen"
    Now what does this do?
    It will make a coloured string as part of my current working dir. (Prompt)
    Example:
    If i go to
    cd /home/shevegen
    then my prompt will look like:
    /home/shevegen/
    (I like the trailing / because I can copy/paste easier with it. )
    Now, the problem is when i am doing this:
    cd /
    then I am in /
    and while in konsole it works, in VTE this does not work.
    Does anyone know why this string behaves differently in
    VTE and Konsole? VTE for example does not show any
    / when you are in
    the / root dir
    PS: Anyone has a hint or knows why in VTE and in gnome-terminal this does
    not work?
    Last edited by shevegen (2007-03-19 12:10:39)

    Hi Dennis,
    thanks for your suggestion, unfortunately I already tried that and it didn't work. I have created several unique styles. Problem is, I need two diferent styles in *one paragraph* - one style for the "heading", which is consistent to the APA manual not an own paragraph (sorry, not my idea...), and another style for the following text. As my example above shows, the heading is followed by usual text and I may not press return after the heading and switch to a new paragraph..
    It has to look exactly like this:
    +heading in italics.+ Now heading is followed by usual text without changing the paragraph or starting a new line. Blurb blurb blurb whatsoever blurb blurb. The text goes on an on and an on you see.
    I can't format the heading differently than the text (because if I try, the whole paragraph is formatted this way) and so I can't add just the heading to the TOC. Do you see what my problem is? Got any other suggestion?

  • NavigateToURL behave differently in adove air

    Hi All,
    I have used navigateToURL in flash to navigate to a dirrerent URL and this works fine in the browser but when I used it with my adobe air application it behave differently. I have used "_SELF" as the target but in AIR, the new URL still open up as a new window. Is anyone has this same problem? How can i open the new URL in the same window? Please find below my flash code. Im using flash CS3 professional.
    var url:String = "http://localhost/Flash/login/welcome.php";
    var request:URLRequest = new URLRequest(url);
    try {               
           navigateToURL(request, '_SELF'); // second argument is target
    } catch (e:Error) {
      trace("Error occurred!");
    Thanks In advanced,
    best regards,
    Niroshan

    Hi All,
    found the answer. "_SELF" should be "_self" (simple letter).
    Thanks,
    best regards,
    niroshan

  • Why does "Link Media" behave differently when used as a keyboard shortcut vs when right clicked???

    Not sure whether anyone else is encountering this, but the "Link Media" command behaves differently when right clicked as opposed to when used as a keyboard shortcut.
    When you right click to select that option for an offline file, you get only the corresponding disconnected source media. But when you execute "Link Media" via a keyboard shortcut, PP brings up a huge list of all other offline media. Why does it only do that when you use the keyboard shortcut for "Link Media" but not when you right click "Link Media".
    I'd like to get the Link Media command to behave via the keyboard shortcut the same way it behaves when right clicked. I don't want to have to deal with relinking a hundred other files, but just the single offline file I'm working on.

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • Hashtable behaves differently in 32 bit vs 64 bit application

    Hi,
    I have an application that I am porting from 32-bit to 64-bit deployment. Its a three-tier application with its business logic residing on 2003 servers (currently), and we are moving this logic to 2008 servers. We are going to leverage the 64-bit deployment
    of this business logic, which will be called by clients via IIS 7.5. But when I am executing same code in 2003 env. vs 2008 env., the Hashtables are behaving differently. The issue here is very weird. Let's consider an arbitrary scenario:
    I create a new hashtable, and add three keys to it as below:
    Key1 - Val1
    Key2 - Val2
    Key3 - Val3
    Now when I traverse this Hashtable, I see different behaviors on 2003 and 2008 servers (i.e. 32-bit vs 64-bit processor architecture). When pointing to 2003 servers, the Hashtable traversal gives me keys as
    Key1
    Key2
    Key3.
    However, when I traverse this same Hashtable by pointing to 2008 servers, the traversal happens as 
    Key3
    Key1
    Key2
    This difference in ordering is causing multiple issues in the application. The values for these keys are lists of a custom object, and the order in which the Hashtable gets traversed results in different behavior across two environments. Any help on this
    issue ASAP will be highly appreciated.

    How do the keys compare?  If the hashcodes come from the object, does the calculated hash differ between environments?
    Why code the app so that it cares about the order of the hashtable?  If you care about order, then a hashtable is the wrong thing to be using.
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

  • Compound path inside/outside test

    Is there an API for testing if a point is inside or outside of a specific compound path? I've found stuff for the length/area, but not inside outside. I supposed I could implement it myself but that kind of code tends to have a lot of fiddly <= vs < sensitivity when implementing the winding rule, and I'd rather not re-invent the wheel when illustrator is obviously already able to do this test. (Plus I could take advantage of whatever acceleration code illustrator already has for this test.)
    If there's a individual path inside outside test, I don't mind tallying things up for the components of the compound path, but I didn't even find that. I'm probably just missing something obvious.
    Thanks,
    PS (I'm still back using CS2 since that's the suite I have and I'm unable to shell out the big bucks to upgrade.)

    Well, I think the problem with that is that the hit test will also report a "hit" when you're on things like control points outside of the fill region. Now you could say "well then check the hit type and don't report a hit if it's over a control point" but then you're just in trouble because you might be over an internal control point.
    So I don't think it can reliably be used for that.
    I guess you might be able to make it work by manually making sure no control points are visible, and that fill is on, and then use the hit test lib. I'll look into it, but my gut feeling is that this is going to have issues. Interesting though. Thanks for the suggestion!
    -Kurt

  • HTML Tag formatting is behaving differently in CC than CS6?

    Why is HTML Tag formatting is behaving differently in CC than it did in CS6, even though the settings are set the same?!??!
    I've double-checked the tag settings - they are absolutely the same between both versions, but when I use APPLY formatting to a page in CC, it completely mangles the tags formatting on ANY html file...
    What's going on?  Any way to get CC to act properly like it does in CS6??

    Can you provide code examples of what you mean by mangled?
    It could be that your code contains errors which DW is attempting to reconcile. 
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    JavaScript - http://www.jslint.com/
    PHP -  http://phpcodechecker.com/
    Or perhaps your code format is not set-up the same in both apps.  Edit >  Tag Libraries.
    Nancy O.

  • Mac and iPhone4 contact searches behave differently

    I have ~1000 contacts. One of them has an email address beginning with "c.s". Searching my mac address book for "c.s" narrows it down to that one contact. Searching iPhone contact for "c.s" gives a list of dozens of names that start with "c" and "s". Is it treating the period as a wild card?
    Related search problem: one of my contacts' email addresses starts with "diz". Searching my mac address book for "diz" narrows it down to that one contact. Searching iPhone contacts for "diz" yields nothing.
    Why do the mac and iPhone searches behave differently?

    "Powerpoint in fact is unable to play any video files, it can only play still images and sound files, as only these files can be embedded."
    The mac version CAN play videos inside PPT right on a slide. They are linked, but they still play ON the slide. Basically anything the QT player can play, ppt can play right on the slide. I assumed PPT for windows could do this with formats OTHER than QT.
    You're saying that NO VIDEO FORMAT IN EXISTANCE can play ON a slide in PPT for windows? I find that hard to believe.
    I've seen many folks post here suggesting AVI works just fine and can be played right on the slide in PPT for Windows. Mpeg1 is normally 320x240 and well, honestly it looks like crap on a 1024x768 screen (and most people these days do NOT want to show a 320x240 movie at regular size on a large slide), so I stand by my comments made previously, unless someone can post that they tested an AVI and PTT for windows actually bumps you OUT of ppt and into a player (full screen or not). I just can't imagine that's what it's doing. QT on the other hand, is pretty much broken except in the way you described, playing it in the QT player, which is why no one wants to do that.

  • Thread is behaving differently on different machines??

    Hi
    I am developing a Java Swing application, which launches an external exe.
    Then I am using a Thread to monitor whether the launched exe is running or terminated abruptly by using its PID. If it terminates then the thread shows a msg box.
    Everything works fine in my machine and in few other machines.
    But the same thread stop abruptly on some other machines... and displays the msg box even though the exe is running correctly.
    And I heard thread behaves differently on different CPUs'.
    How to handle this situation??
    Please help.
    This is my code:
    public class SolverPoller implements Runnable
            String solver = null;
            int PID;
             * Constructor to initialise the Thread
             * @param programName - Solver execuatable name
             * @param pid - Process ID of the running solver
            SolverPoller(String programName, int pid)
                solver = programName;
                PID = pid;
                //reset the blnClosedAbruptly
                blnClosedAbruptly = false;
            public void run()
                File deleteFile = null;
                try
                    //if the stored PID and refreshed are same
                    //Continue waiting
                    while(checkPIDOfSolver(String.valueOf(PID), solver))
                        //sleep for a sec
                        Thread.sleep(1000);
                    //When the solver process terminates
                    //interrupt ProgressBarIncrementer Thread
                    inc.interrupt();
                    if(Delia.getProcessorType() == 'T')
                        deleteFile = new File("TIP3DSolver.res");
                    else if(Delia.getProcessorType() == 'S')
                        deleteFile = new File("SPLITVISSolver.res");
                    if(!deleteFile.exists())
                        //set it to true, indicating solver terminated abruptly
                        blnClosedAbruptly = true;
                        progressBar.setValue(0);
                        progressBar.setStringPainted(true);
                        progressBar.setString("0%");
                        progressBar.repaint();
                        JOptionPane.showMessageDialog(DentonIntegratedToolApp.getDentonInstance().getFrame().getContentPane(), "Solver terminated abruptly!", "Solver Error", JOptionPane.ERROR_MESSAGE);
                catch(InterruptedException ie)
                catch(Exception e)
                finally
                    deleteFile = null;
        }Praveen

    I'm not sure if this matters, but it appears that you are calling Swing methods off of the EDT beginning with "progressBar.setValue(0);". What happens if you wrap those calls in a Runnable and call them with SwingUtilities.invokeLater(...)?

  • How to use different Vlans outside another gateway in sg-300 28?

    dear all
    how shall i use different vlans outside another gateway in sg-300 28?
    Example:
    vlan2 192.168.2.0/24 gateway 192.168.2.1 outside router gateway 192.168.2.254
    vlan3 192.168.3.0/24 gateway 192.168.3.1 outside router gateway 192.168.3.254
    should me doing in sg-300 28?
    thanks.

    Hi Amin,
    Leave the switch in Layer 2 mode 
    Cable  VLAN2  to the to the outside router gateway 192.168.2.254 interface
    cable  VLAN3  to the to the outside router gateway 192.168.3.254 interface
    Excuse the rough diagram
    Make the port going to the outside router gateway,  untagged in the vlans they will be transporting. (I am assuming that the router gateway is not vlan aware.)
    IP hosts will most likely get DHCP from the router gateway.  The IP hosts will then automatically send IP traffic to the router gateway.
    VLAN 1 in my switch,  could  then be the only interface within the switch  that has a IP address associated  with it,  for management purposes.
    I can see from you post,  that English is not your first language,  if you want to speak to someone,  you can ask a question by going to;
    www.cisco.com/go/sbsc
    regards Dave

Maybe you are looking for

  • Update column using a calculation based on a query

    Hi, I need to update an empty column I have created in my table. I have created a query that returns the variables I will need in the calculation but I'm not sure how to link it. This query works fine. Select z.seq_no , z.Day_X , z.Day_Y , x.Night_X

  • Will an audiobook I download from the library in WMA form expire or corrupt if I put it on my ipod?

    I have a classic Ipod and want to download audiobooks to it--some or MP# but some of them are WMA files.  My question is about the WMA files.  Will they expire if I transfer them to my ipod before the due date f the book?  Thanks for any help.

  • File names don't change

    I've just downloaded version 7.6. Now, when I import a tv show and change the file info (name, episode number, movie=>tv show, etc.), the file info changes but the file name in the iTunes folder doesn't change, nor does the file move from the "Movies

  • Why does iweb re-create everything during publish?

    I'm wondering why iweb has to create pages that have long since been created and published when I do a minor update? For instance, I just created a new photo/blog section and for some reason it is re-creating almost every page during the publish, mak

  • Can't capture audio in  stereo pair

    I have FCE HD 3.0 and the audio capture default has always been stereo pair. Just now, since having to trash preferences, the default capture is now mono. Thanks to the forum, I know how to modify>link stereo in the timeline, but could anyone explain