Saturday, April 16, 2016

Oracle LDAP connection String in context.xml

Connection string format to connect to Oracle DB through LDAP



If your an Oracle database and its details are configured in LDAP.

Rename or delete tnsnames.ora
(default location in most cases is at C:\Oracle\product\11.2.0\client_1\NETWORK\ADMIN\)

Ask for Directory Servers, Default Admin Context and server type information from DBA.


You need to configure the LDAP.ORA and SQLNET.ORA files appropriately.

#########################################################################
# Filename......: ldap.ora                                              #
# Version: 10.x.X.1                                                     #
# Create Date...: 05.04.2014 00:00:00 -                                 #
# ALL OID ALIASES POINT TO GSLB ENTRY THAT ROUND ROBINS         #
#########################################################################

DIRECTORY_SERVERS=(brahma.decimalSolutions.com:9901:9911,brahma.decimalSolutions.com:9901:9911,brahma.decimalSolutions.com:9901:9911)

DEFAULT_ADMIN_CONTEXT = "dc=decimalSolutions, dc=com"

DIRECTORY_SERVER_TYPE = OID



#########################################################################
# Filename......: sqlnet.ora                                              #
#########################################################################
# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

#NAMES.DIRECTORY_PATH = (TNSNAMES)
#NAMES.DIRECTORY_PATH = (LDAP)
#NAMES.DIRECTORY_PATH = (TNSNAMES,LDAP)
NAMES.DIRECTORY_PATH = (LDAP,TNSNAMES)






                auth="Container"
                type="javax.sql.DataSource"
                factory="com.decimalSolutions.launchpad.encryption.EncryptedDataSourceFactory"
                driverClassName="oracle.jdbc.OracleDriver"
                url="jdbc:oracle:thin:@ldap://brahama.decimalSolutions.com:9901/hlpd1,cn=OracleContext,dc=decimalSolutions,dc=com ldap://brahama.decimalSolutions.com:9901/hlpd1,cn=OracleContext,dc=decimalSolutions,dc=com ldap://brahama.decimalSolutions.com:9901/hlpd1,cn=OracleContext,dc=decimalSolutions,dc=com"
                username="FT_GUEST"
                password="Rnl1eF82MTI="
                maxActive="400"
                maxIdle="25"
                maxWait="5000"
                removeAbandoned="true"
                removeAbandonedTimeout="120"
                logAbandoned="true"/>



How to Add Power button and the Shut Down, Restart, Sleep, and Hibernate



  1. Press the Windows key + R to bring up the Run box. Type gpedit.msc and press Enter to open the Local Group Policy Editor.
  2. In left-side pane, navigate to Computer Configuration -> User Configuration  -> Administrative Template -> Start Menu and Taskbar.
  3. In the right pane select the “Remove and prevent users from access to Shut Down, Restart, Sleep, and Hibernate commands” double-click on it. Select Disable and click Apply and OK.




Sunday, December 6, 2015

Router not getting DHCP address from Cable Modem

 

Router not getting DHCP address from Cable Modem


1. Connect your computer directly to the cable modem. Do an ipconfig /renew on your computer so it pulls the IP from the cable modem.




2. Plug the cable modem back into the router, and your computer back into the router. go to the router's menu via 192.168.1.1. clone the 
MAC address of your computer onto the router.
 


3. Go to the Status in the Menu and see modem's IP address. by the time you get to this screen, it should have already pulled the IP address. Press DHCP Renew IP Address, it will get the IP address from the cable modem.

These steps are when your router is not able to get the IP via standard procedures.

Tuesday, January 3, 2012

Drop Down Tab menu obscured by page content in IE

Either change your style sheet and add z-index:10000



.sidebarmenu {
z-index: 10000;
}

to your stylesheet should take care of the problem. It shouldn't adversely affect other browsers, but might. Try it out and out it and put it through its paces. Make sure to refresh and/or clear your browser's cache to make sure you are viewing the page with the updated style directive.


If you do not want to change the style sheet of the menu, here is an example:



         <%@ include file="/pages/sidemenu.jsp" %>







  • Find Patient


  • Find an Event

  • ...
    ...
    ...

    Friday, October 21, 2011

    wsdl2java maven2

    My quick fast tested...
    Creating Service stub from wsdl for Axis2
    Here is the POM.


    <?xml version="1.0"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <name>Sample Axis-Maven Project</name>
      <groupId>com.dsi</groupId>
      <artifactId>axis-maven</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>jar</packaging>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>axistools-maven-plugin</artifactId>
            <version>1.3</version>
            <configuration>
             <sourceDirectory>src/main/resources</sourceDirectory>
             <!-- The plugin navigates your source src/main/** tree and finds your WSDLs for you; just name them individually in a <wsdlFiles/> element. -->
              <wsdlFiles>
                <wsdlFiles>wsdlFileOne.wsdl</wsdlFiles>
                <wsdlFiles>MyOtherWsdlFile.wsdl</wsdlFiles>
              </wsdlFiles>
              <!-- Start ...or the wsdl are at remote locations -->
              <urls>
                       <url>http://host/server/sample.wsdl</url>
                       <url>http://host/server/sample2.wsdl</url>
              </urls>
              <!-- End ..or the wsdl are at remote locations -->
           
              <!-- This is optional, but lets you explicitly namespace the generated code. -->
              <packageSpace>com.dsi.myclient</packageSpace>
            </configuration>
            <dependencies>
              <!-- Required for attachment support; you can remove these dependencies if attachment support is not needed. Note that if you do want it, you have to specify the dependencies both here in the plugin and also in the POM dependencies. -->
              <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>1.4.1</version>
              </dependency>
              <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
                <version>1.1</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <goals>
                  <goal>wsdl2java</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.apache.axis</groupId>
          <artifactId>axis</artifactId>
          <version>1.4</version>
        </dependency>
        <dependency>
          <groupId>javax.xml</groupId>
          <artifactId>jaxrpc-api</artifactId>
          <version>1.1</version>
        </dependency>
        <dependency>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
          <version>1.4.1</version>
        </dependency>
        <dependency>
          <groupId>javax.activation</groupId>
          <artifactId>activation</artifactId>
          <version>1.1</version>
        </dependency>
      </dependencies>
    </project>



    Wednesday, June 29, 2011

    Configuring Derby over Eclipse

    Download Derby plugins:
    http://db.apache.org/derby/derby_downloads.html
    When you click on any release lets say 10.8.1.2 Release
    Look  little down just before the "Release Notes for Apache Derby 10.8.1.2"
    two zip files
    derby_core_plugin_10.8.1.zip [PGP] [MD5]
    derby_ui_doc_plugin_1.1.3.zip [PGP] [MD5]



    Both plugins must be installed for full functionality. Unzip them in the c:\eclipse or in the eclipse folder where ever it is installed.
    Here are more details in this link 
    http://db.apache.org/derby/integrate/plugin_howto.html#Installing+the+plug-ins

    Next Step is adding the Apache Derby Nature to your project. If you do not have create one Java Project.
    Right-click it and select Apache Derby >> Add Apache Derby nature.


    Adding the Derby nature to your Eclipse project does the following:

    1. Adds the derby.jar, derbynet.jar, derbytools.jar, derbyclient.jar jar files to the Java Build Path of the project. 
    2. Enables the Derby features for the project. Several other menu items now appear under the Apache Derby menu item. The ij and sysinfo tools are now accessible from this menu, and the Apache Derby Network Server can now be started and stopped using this menu. 
    3. Allows Apache Derby properties such as the port number the Network Server listens on, and the value for derby.system.home to be set for the project.



    Very Important


    Assuming you are using a jdk for as your JRE. Look in preferences (Installed JRE) If it is JRE add another runtime that points to JDK (e.g. C:\Program Files\Java\jdk1.6.0_24). Make this as your default runtime. ( delete the other JRE runtime).


    Now go to the 'java.policy' in C:\Program Files\Java\jdk1.6.0_24\jre\lib\security' folder.
    We need to make changes in 'java.policy' because we want to allow derby.jar file to access some of the folders.

    There are so many examples given here you should look at that if you are concerned to opening up holes on your computer. For eclipse plugin I spent one day, I was not able to make it work.
    Finally I got one simple solution, add one line
    permission java.security.AllPermission;
    at the top and bottom of  java.policy, here is mine...


    // Standard extensions get all permissions by default

    grant codeBase "file:${{java.ext.dirs}}/*" {
    permission java.security.AllPermission;
    };

    // default permissions granted to all domains

    grant { 
    // Allows any thread to stop itself using the java.lang.Thread.stop()
    // method that takes no argument.
    // Note that this permission is granted by default only to remain
    // backwards compatible.
    // It is strongly recommended that you either remove this permission
    // from this policy file or further restrict it to code sources
    // that you specify, because Thread.stop() is potentially unsafe.
    // See the API specification of java.lang.Thread.stop() for more
            // information.
            
            permission java.security.AllPermission;
    permission java.lang.RuntimePermission "stopThread";

    // allows anyone to listen on un-privileged ports
    permission java.net.SocketPermission "localhost:1024-", "listen";

    // "standard" properies that can be read by anyone
      permission java.util.PropertyPermission "derby.log", "read,write"; //Pankaj
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";

    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";

    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";
    permission java.security.AllPermission;

    };

    /* Grants permission to run Derby and access all      */
    /* databases under the Derby system home              */
    /* when it is specified by the system property             */
    /* derby.system.home                                        */
     
    /* Note derby.system.home must be an absolute pathname */
     
    grant codeBase "file://C:/springsource//sts-2.6.0.SR1/plugins//org.apache.derby.core_10.8.1/derby.jar" {
     
     permission java.lang.RuntimePermission "createClassLoader";
       permission java.util.PropertyPermission "derby.*", "read";
       permission java.util.PropertyPermission "${user.dir}", "read";
       permission java.util.PropertyPermission "derby.storage.jvmInstanceId";
     permission java.io.FilePermission "${derby.system.home}${/}-", "read,write";
     permission java.io.FilePermission "${user.dir}${/}derby.log", "read,write";
     permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read" ;
       permission java.io.FilePermission "<>",
              "read,write,delete";
                permission java.net.SocketPermission "*", "accept"; 
                permission java.security.AllPermission;

    };


    ------------------------------
    Next step is to start the server

    Right-click on your project and select Apache Derby >> Start Derby Network Server


    -------------------

    Now go to the Database Development Perspective and create a new database by following these steps
    Step By Step guide


    Derby Documentation

    Wednesday, June 22, 2011

    Setup Maven and maven plugin on eclipse

    Best way to give Maven access to Spring is via Spring’s bundle repositories. I find that the easiest way to do this is to include therepository entries in my settings.xml file, but you can also put them in the POM file for your project or even add them to Nexus as proxy repositories if you are in such an environment. The entries should look like this:
    
    
    
        com.springsource.repository.bundles.release
        SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases
        http://repository.springsource.com/maven/bundles/release
    
    
    
        com.springsource.repository.bundles.external
        SpringSource Enterprise Bundle Repository - External Bundle Releases
        http://repository.springsource.com/maven/bundles/external
    
    
    
    
    
    With these entries in place Maven should now be able to import Spring 3.0 binaries and certain other useful bundles.

    ---------------------------------------------------------

    For Hibernate add following dependency.

    <dependency>
        <groupId>org.hibernategroupId>
        <artifactId>hibernate-c3p0artifactId>
        <version>3.6.0.CR2version>
    dependency>
    
    
    ---------------------------------------------------------
    For Rest Framework Jersey  add following 
    Dependency
       com.sun.jersey
       jersey-client
       1.8
     
    
    
    Repository (if you do not have this)
      
       maven2-repository.java.net
       Java.net Repository for Maven
       http://download.java.net/maven/2/
       default
      
    ---------------------------------------------------------
    
    
    
    

    Followers