Skip to main content

Posts

Java: Active directory paging code

Forgive some of the bad code this was a quick script and a reminder to self on how to do this: (note this code changes all the AD users passwords so be careful) package common.jndi; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttribute; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; import javax.naming.directory.ModificationItem; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; import javax.naming.ldap.Control; import javax.naming.ldap.InitialLdapContext; import javax.naming.ldap.PagedResultsControl; import javax.naming.ldap.PagedResultsResponseControl; public class ModifyLdapUserScript     extends LdapBase {     public static final int PAGE_SIZE = 999;     private static final String DEFAULT_PASSWORD ...

ADF: Design view not rendering tags

Ok so I had two problems today with design view. 1) None of my tags where rendering in design view - This was a dependent library problem.   I had added the web center libraries manually to my project and had somehow removed the personalization   library this lead to a ClassNotFound error in my message log simple to fix once you know where to look. 2) Second problem vexed me for a while my c:set jstl tag libraries where just NOT rendering correctley in design view. This turned out to be a checkbox Execute Tags in JSP Visual Editor was unchecked. [Project Properties > JSP Tag Libraries]

ADF: Scroll down to item on your page

I wanted to scroll down to a component in my page and first tried anchor which just did not work on mu input driven screen. So I tried the af:scrollComponentIntoViewBehavior on my command link and it just worked. <af:commandLink id="c_cert" text="certify" >   <af:scrollComponentIntoViewBehavior componentId="sbc4" focus="true" subTargetId="content"/> </af:commandLink> ... long content <af:selectBooleanCheckbox value="false" clientComponent="true" id="sbc4"/> Note: don't do this with anchors on a non read only content page it just get messy

ADF: Logger timestamp included

I am doing some performance testing and needed to look at the times produced by the ADF Diagnostic logging items. Analyze log was not good enough because it is too slow to find the grouped info I needed. So step one) I loaded my Configure Oracle Diagnostic logging (action menu in the log window) and went straight to the source tab At the top of the logging .xml file there is an entry <log_handler name='console-handler' class='oracle.core.ojdl.logging.ConsoleHandler' level='ALL'   formatter='oracle.core.ojdl.weblogic.ConsoleFormatter' /> it need to be to see the logs in all there glory with timestamps etc <log_handler name='console-handler' class='oracle.core.ojdl.logging.ConsoleHandler' level='ALL'/>

Oracle Diagnotics logging turning it off : Logging.xml

I mistakenly put oracle Root logger to finest which of course crashed everything. So I restarted JDev then restarted Weblogic horror the setting was still set. Great so now I could not work. Solution (thanks google and this oracle doc  ): located the logging.xml file in your integrated weblogic server: C:\Users\[your user]\AppData\Roaming\JDeveloper\system11.1.1.6.38.62.29\DefaultDomain\config\fmwconfig\servers\DefaultServer Edit it and remove the offending log leve setting. (mine was <logger name='oracle'/ level='FINEST'> ==> <logger name='oracle'/>) All fixed and working again...