Skip to main content

Posts

Showing posts from December, 2011

ADF: Timezone not found problem

I thought I was rid of this problem but it reared its ugly  head again. Local deployments all worked and where fine but when we copyed all our stuff over to the clustered dev server we where getting the dreaded timezone error again. The solution and last resort was to add the following tag to the adfc-config.xml (Application Resources - Descriptors - ADF META-INF) <user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">   < user-timezone expression="GMT+2.00"/ > < /user-time-zone-config >

JDeveloper, Weblogic: java.io.IOException: Empty server reply; No available router to destination

When trying to call a remote ejb (java client) with weblogic on another box I get the following error: java.net.ConnectException: t3://SERVER:7001: Destination unreachable; nested exception is: java.io.IOException: Empty server reply; No available router to destination The solution: I just unchecked use HTTP proxy checkbox in my jdev Tools > Preferences > Web Browser And Proxy and the code work - before you make yourself mad just make sure you call is not trying to go to your web proxy. There are many other reasons for this but hopefully this will help someone ...

Linux: set ls and vim colors

echo "colorscheme " >> ~/.vimrc to find the color schemes - Color schemes scripts that live in the colors/ directory of the Vim runtime hierarchy (:help runtimepath) Alternative: press the : button when in vim and type colorscheme Alternative to the Alternative: echo "set background=dark" >> ~/.vimrc http://www.indelible.org/ink/vim-colorschemes/ For ls : dircolors -p > ~/.dir_colors Done on RHEL

JDeveloper: JEE Web Application

I had to throw together a quick demo of the JDeveloper JEE functionality and was pleasantly surprised what Jdeveloper give you for free. Will be posting some of what I have found. Create a New JEE Web Application and press OK button Fill in your info here  replacing ProjectName with your project Name: App Package prefix: eg: za.co.test Next * 5 Finish Now on to creating an EJB Entity: Select Entities from Tables and click ok As we are creating the first ejb in the app you can click next on the persistance unit screen. I am going to select the  countries and regions tables from the HR schema by selecting them and clicking the blue arrow after querying all the tables. Next. Next Select Discover foriegn keys dynamically. Next * 3 but take note of the info in the screens. (You can change the class and package names etc) Finish Now take note of the java classes created complete with annotaions and relationships very nifty. ...

Development Philosophy : The Framework approach

Warning: Long blurb about what is in my head right now   Ok so I have been pondering the role of architecture and its current relevance. In some organizations it is ignored in others it is a hindrance. It is very hard to measure its impact. This is a thought that came from that exercise. Development should not be difficult; so keep it simple for the majority of things and hide the complexity. One of the key things business wants is to be more agile and get what will add business value as quick as possible. This allows them to have a completive edge over the competition.  As for maintenance it is a hidden cost at time of development and will cost many times more than the cost of the initial development over time. This is kind of where my passion lies bringing down the cost of maintenance and upping the speed of development. One of the tools I use to address the above is Framework based development where you don’t just provide a blueprint but a working fully funct...

Development Philosophy : Development and Teams

Warning: Rant about what is in my head and random opinions to follow. I have seen a few posts on sites disparaging developers from various nations but from my perspective I understand this but don’t agree with it. First off if you pay peanuts you get monkeys (do monkeys really like peanuts who comes up with these sayings) if you pay top dollar generally besides the charlatans you can get the best people no matter what country you are in. I have worked with awesome developers from a lot of countries but as a general rule developers tend to be crap and under-trained (by my standards) because the pervading philosophy of the day is cheap is better. I think every nation produces a small set of highly skilled developers and then the average ones. Most of those great developers have been hit by the peter principal and are no longer developers. I don’t know many great developer who are not non coding architects, development mangers etc. (Let’s start creating hero’s in every role please...

Development Philosophy : Travelling Technologist

Warning: Rant about what is in my head and how to solve the problem. I have noticed a trend in small companies to overspend on IT items. Examples of this are buying vendor product when they are way more than they need (and open source can do). Hiring the wrong kind of people to create small systems and wasting money. Also the only options for small companies (who can afford the cost of enterprise development) is to get shoddy work from whoever they can find or to buy product. They do not have the cash to hire someone to advise them in a permanent capacity on the technology side. What are they looking for: Someone that is trusted with a passion for delivering the correct solution for the job. Someone with knowledge across multiple disciplines of IT who can be called on when needed to give advice and also when things go wrong. What they are not looking for: Salesman, time and money wasters and high cost projects. My solution to this would be to create a role for a...

ANT, ADF: Adding version info to my build and help about screen

Build I added two steps to my build (after everything was built) one to create the properties file and the other to package it: <antcall target="create-version-property" inheritAll="true" inheritRefs="true"/> <antcall target="inject-version-file" inheritAll="true" inheritRefs="true"/> Creating the file.   <target name="create-version-property">    <-- check that the jar file is available -->     <available file="${build.file.location}/lib/svnant.jar" property="SVN_ANT_AVAILABLE" />         <fail unless="SVN_ANT_AVAILABLE" message="Run jar target to generate the required task"/>        <-- load the svn ant plugin classpath -->         <taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">             <classpath>         ...

ANT: Appending a file to a jar/war/zip

Just use the update="true" attribute   Example : <jar destfile="${project.deploy.location}/${project.deploy.name}.${project.type}" update="true" >   <zipfileset file="deploy/META-INF/version.properties" prefix="META-INF/"/> </jar> Notes: Jar   destfile - the jar file you want to add to     project.type - this can be war/zip/ear etc     project.deploy.name the name of your artifact     project.deploy.location the location of your artifact zipfileset   file- the file you want to add to your jar   prefix - the prefix/location for this file inside the jar

ADF ADFC-12001 ControllerException pop last entry from page flow scope stack

I was getting the following error in my logs when closing a popup (everything worked though) : Caused by: oracle.adf.controller.ControllerException: ADFC-12001: The ADF Controller is attempting to pop last entry from page flow scope stack. I had to call my popup page directley instead of using a task flow to a resolve this. Launch popup button: <af:commandLink text="#{viewBundle.ABOUT_HELPABOUT_TITLE}"   id="pt_cl21" inlineStyle="color: white; white-space: nowrap; "   action="dialog:helpAbout" useWindow="true" windowWidth="480" windowHeight="340"   clientComponent="true" immediate="true" windowEmbedStyle="inlineDocument"   windowModalityType="applicationModal"/> Entry in adfc config:   <view id="helpAbout">    <page>/pages/help/about.jspx</page>   </view>   <control-flow-rule id="__8">     <from-activi...

ADF Encountered deferred syntax #{ in template text.

OracleJSP error: oracle.jsp.parse.JspParseException:  Error: Encountered deferred syntax #{ in template text.  If intended as a literal, escape it or set directive  deferredSyntaxAllowedAsLiteral This normally happens when you have some tag lib dependancy problems but this was  not the case for me... My problem: For some reason my model project had web stuff in it(public html etc)  so I had to remove the public html stuff from my project and manually edit the Model.jpr project file and remove the tag lib entries at the bottom o the file. Go figure.    

ADF: the oci driver

Ok so we had a requirement to check if the oci driver would work with ADF. So here are the steps I followed to get it working quite simple I think. Will post here if there are any problems with using the driver but with a quick scan test everything looks ok. 1) Installed the oracle client on our weblogic box. 2) Replaced the ojdbcdms.jar reference in the weblogic classpath with the exact version that comes with the client (VERY important) 3) changed my connection string to jdbc:oracle:oci:@127.0.0.1:1521:SID. Things that will be investigated : Client side caching, speed tests, amount of connections Notes: UnsatisfiedLinkError - ocijdbc11.dll not found Change your path on your system to have your client library location as the first in the list - ie for me I installed my client to C:\Oracle\11.2.0\client64 so that dir must be the first entry in my path. java.lang.UnsatisfiedLinkError: oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber()I You are using the incorrect...

ADF 403 Forbidden - invoke method

If you have a method call as your default activity in a task flow and you get 403 Forbidden http status code is returned (given you have set all the correct permissions in the jazn-data file to your task flow). Just add the following tag to your taskflow (add the tag in the near the bottom of the enclosing task-flow-definition tag) <visibility><url-invoke-allowed/></visibility> Or you can  click on the task flow overview, visibility , URL Invoke section for the same result

OJDeploy: Documentation for the tool

Real DOCS:  http://docs.oracle.com/cd/E26098_01/user.1112/e17455/deploying_apps.htm#OJDUG645 OJDeploy Documentation if you run it from the command line - I keep looking for this so I though I would post it here so I remeber. Oracle JDeveloper Deploy 11.1.2.1.0.6081 Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. Usage:   ojdeploy -profile <name> -workspace <jws> [ -project <name> ] [ <options> ]   ojdeploy -buildfile <ojbuild.xml> [ <options> ]   ojdeploy -buildfileschema Arguments:   -profile               the name of the Profile to deploy   -workspace      full path to the JDeveloper Workspace file(.jws)   -project              name of the JDeveloper Project within the .jws where the Profile can be...

ADF : Performance Tuning

I am going through a set of performance tuning exercises and so here is my plan and set of items I will address. I hope to post results for each of these steps once I have completed them.  1)      Build a.      Ant (Auditing only run for CI builds) Ojdeploy64 - 45,41,42,42 seconds Ojdeploy - 41,40,40,39 seconds Negligible difference but non 64 bit seems a little bit faster (non scientific one project test) b.     Maven - my maven build tests where about 10 seconds quicker than the ojdeploy builds but this is exculding the generation of some of the custom adf files. c.      Precompile pages ( http://blogs.oracle.com/groundside/entry/jsp_precompilation_for_adf_applications ) 2)      Jdeveloper a.      Memory AddVMOption  -Xmx1536M AddVMOption  -Xms512M b.     Garbage collection AddVMOption -XX:+AggressiveOpts AddVMOp...