rbjTech Software Development Journal

11Jan/120

Oracle Fusion Middleware – force https

After hours of research and many failed attempts of making changes to the spring settings, thinking the port redirection issue recently experienced when deploying a Flex based Java Spring app was app related, we found a simple 4 lines of code that ultimately fixed the issue.

Recap the issue was:  Within a Flex based web application the user logged in via a https page via standard port 443. Upon logging in the spring secuirty redirection request sent the response to a http standard port 80 port.  Using Oracle Fusion Middleware with Weblogic serving up the java container the https request is served up and handled by Fusion Middleware OHS - similiar to the Apache / Tomcat relationship.

To the point: Given the app was being redirected to the Weblogic side of the suite upon logging in the session was dying since the port was effectively changing.  So the fix needed a way to force the application to stay on https and standard port 443.

The solution:  Insert a permanent redirect into the httpd.conf file of the Fusion Middleware App Server.  The Http conf as follows:

NameVirtualHost *:80

Listen 80

<VirtualHost *:80>

ServerName http://server-name

Redirect permanent /contextRoot https://server-name/contextRoot

</VirtualHost>

 

NameVirtualHost *:443

Listen 443

<VirtualHost *:443>

ServerName  https://server-name:443/

<IfModule weblogic_module>

WebLogicHost server-name

<Location /contextRoot>

SetHandler weblogic-handler

WLLogFile /opt/oracle/logs/log_proxy_6666.log

Debug ALL

WebLogicHost server-name

WebLogicPort 8001

</Location>

DynamicServerList Off

WebLogicPort 8001

</IfModule>

<IfModule ossl_module>

SSLEngine on

SSLProtocol nzos_Version_1_0 nzos_Version_3_0_With_2_0_Hello nzos_Version_3_0

SSLCipherSuite SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_DES_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA

SSLVerifyClient none

SSLWallet  "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/keystores/rrsRob5"

SSLCRLCheck Off

</IfModule>

</VirtualHost>

 

 

19Dec/110

Linux – curl command

Curl : grab files/documents from a server without user interaction or any kind of interactivity.

ex:

curl http://path[start range of files-range of files].ext -o "#1.ext"

Filed under: Linux No Comments
30Nov/110

WebLogic 11g (10.3.5)

Installation notes and links to Oracle documentation on installing WebLogic Middleware 11g.  A recent task I had to complete within a RHEL 5.5 environment.  Two web servers within a clustered fail-over environment.  The clustering is a work in process.

http://docs.oracle.com/cd/E21764_01/doc.1111/e14142.pdf

http://docs.oracle.com/cd/E21764_01/web.1111/e13709/setup.htm

http://docs.oracle.com/cd/E21764_01/index.htm

http://docs.oracle.com/cd/E14571_01/core.1111/e10106/toc.htm?

Filed under: Linux No Comments
30Nov/110

Maven Andriod plugin Version issues

ERROR:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'com.jayway.maven.plugins.android.generation2:android-maven-plugin:
3.0.0-alpha-13:generate-sources': Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin
'com.jayway.maven.plugins.android.generation2:android-maven-plugin'
Component descriptor cannot be found in the component repository: org.sonatype.aether.RepositorySystem.

FIX:

In this case the error was caused by using Andriod Maven Plugin version 3.0.0-alpha-13 and Maven 2.2.1.  Simple fix is update the Maven install to 3.0.3.

 

22Oct/110

Linux Notes [env vars:usb ports:tarfiles]

Setting environment variables for all users

  • vi /etc/profile

SET JAVA_HOME=/opt/javaPath

export JAVA_HOME

Unzip a tar.gz

  • tar -zxvf filename

Network Card settings

  • ethtool -s eth0 autoneg off
  • ethtool -s duplex full

Reset USB Ports

  • insmod /lib/modules/[kernel version]/kernel/drivers/usb/storage/usb-stor.ko

User Environment Variables

  • vi ~/.bashrc
  • source .bashrc
Filed under: Linux No Comments
16Oct/110

Red Hat Linux rpm management

Removing rpms

  • rpm -e foo.rpm
  • rpm -ivh --replacefiles foo.rpm
  • rpm -ivh --replacepkgs foo.rpm
  • Options: --nodeps
  • Upgrade: -Uvh
  • Old Package: rpm -Fvh foo.rpm
Filed under: Linux No Comments
15Oct/110

SVN instance on Mac Snow Lepoard

Working on a project is not always complete on the same computer - setting up a simple local instance of SVN is a way to maintain source  control for hobby projects when your not always at your main development machine.

simple steps on setting up SVN on Mac:

  • Create a repository

svnadmin create /svnrepos

  • Create a svn user

vi /Library/svnrepository/conf/svnserve.conf

#edit the file access to something similiar

anon-access = none

auth-access = write

password-db = [password]

  • Create the password file

vi /Library/svnrepository/conf/passwd

#add a user name and password

Bear = bearspassword

  • Start svn as a daemon - creating a startup script would be useful for auto starts upon reboot

svnserve -d

  • using a good SVN client (Subclipse for Spring Tool Suite works well)

Spring Tool Suite with Subclipse Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x

Filed under: Mac No Comments
4Oct/110

Spring Source Tool Suite

Downloaded the Spring Source Tool Suite today at http://bit.ly/qdFZFZ .  Tagged as the best development tool for enterprise Java.  Well here goes for giving it a shot; after all it is basically just Eclipse on spring steriods I suppose. No high expectations right now though time will tell.

Filed under: Technology No Comments