Monday, June 11, 2012

CVS Tag plugin failure for Hudson

CVS Tag plugin fails with the following exception when it runs.
 This was due to cvs-tag version 1.5 being not compatible with Hudson 2.2. This required recompilation of CvsTagPlugin ver 1.5 to work with Hudson 2.2 API.

 If you need the modified source code for CvsTagPlugin, leave a message for me. It sounds like new objects such as Locations and Project have been introduced in Hudson 2.2 that support the method calls that used to fail.

Oct 21, 2011 4:44:43 PM hudson.model.Executor run 
SEVERE: Executor threw an exception java.lang.NoSuchMethodError: 
hudson.scm.CVSSCM.getCvsRoot()Ljava/lang/String; at hudson.plugins.cvs_tag.CvsTagPlugin.perform(CvsTagPlugin.java:81) at hudson.plugins.cvs_tag.CvsTagPublisher.perform(CvsTagPublisher.java:66) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:584) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:168) at hudson.model.Run.run(Run.java:1410) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145)

Saturday, April 7, 2012

Multiple instances of Apex Listener (on Tomcat)

An instance of an APEX listener is configured for a single instance of Oracle database.
If you need to support mulitple environments such as Dev and QA running on different instances of Oracle databases,
then the listener can easily be redeployed with a new context name.

This is what is required on a Tomcat server hosting Oracle APEX listener.

- Stop Tomcat
- Copy apex.war as myapex.war under tomcat/webapps(images need not be deployed for this instance as they will be served from original /i/ location)
- Copy tomcat/temp/apex as tomcat/temp/myapex
- Remove tomcat/temp/myapex/apex-config.xml
- Start tomcat
- Configure the new listener by opening http:/tomcat_server:port/myapex/listenerConfigure

Thursday, March 8, 2012

Olite: to_timestamp(...) not working

I am still running olite for an old version of OC4J. Turning on sensor values for in a BPEL process started throwing errors as the query used to to_timestamp(...) which was not working in my version of olite.

After going through Oracle Olite docs, this how I came up with a temp-fix.

- Created a Java Class.
import java.sql.*;
public class Formatter {
public static Timestamp to_X(String date, String format) {
return new Timestamp(System.currentTimeMillis());
}
}

- Loaded this class into olite
SQL> create java class using bfile ('C:\Oracle\10.1.3.1\OracleAS_1\bpel\bin', 'Formatter.class');

- Bound Formatter.to_X(...) to to_timestamp(...) in olite.
SQL> create or replace function to_timestamp(a varchar2, f varchar2)
return timestamp as language java
name 'Formatter.to_X(java.lang.String, java.lang.String) return java.sql.Timestamp';


- Do not forget a commit after this.

Very slow file open dialog/"Save As" on Windows 7

I was recently experiencing very long delays before the "File Open" dialog opened up whenever "Save As" was clicked from Word or Excel. The blue wheel was spinning and spinning for minutes, before the dialog allowed me to choose anything. Finally found out that it was all related to a recent installation of SAP Portal Drive Client on my Windows 7 x64 laptop. Removing this client solved the problem immediately. I will update this blog later when I find out what in the tool was causing such a horrible delay.

OC4J - File interaction spec and last modified date.

The last modified date used by the File or FTP Adapter on BPEL PM or ESB deployed in an OC4J container can be found in
OC4J/j2ee/home/fileftp/controlFiles/_process-name~ver_/_mangled_name_/inbound/lastModifiedDate.txt file.

This file seems to be maintained for every process version, so deploying a new version of the a process will process any residual files in the incoming directory for the second time if the file/ftp adpater is not configured to archive or delete the incoming file.

Friday, December 9, 2011

CVS update failures from Hudson

Found out that permission denied errors causing CVS checkout to fail in Hudson was related to Symantec auto-protect running on the build VM. Added security exception to Symantec for D:\hudson\builddir.
See screenshot for exception.

---------------------- CVS checkout failure in Hudson console

$ cvs -Q -z3 -d :pserver:user@cvsserver:/sourceCode co -P -r CVS_TAG -d projectDir -D "Friday, December 9, 2011 9:15:28 PM UTC" projectDir


cvs checkout: cwd=D:\hudson\builddir ,current=D:\hudson\builddir
cvs server: cwd=C:\cvsnt\Temp\cvs-serv1120a ,current=C:\cvsnt\Temp\cvs-serv1120a

cvs [checkout aborted]: cannot create CVS/Entries.Extra.Old for copying: Permission denied

FATAL: CVS failed. exit code=1
------------------------





Friday, September 2, 2011

Oracle SQL Developer Configuration

- Move <sqldeveloper_home>/sqldeveloper/bin/sqldeveloper.conf away so that a new JVM can be selected when SQL developer starts next time.

- All connection configurations are stored in %APPDATA%/SQL Developer/system<sql_dev_ver>/0.jdeveloper.db.connection.<jdev_mod_ver>/connections.xml

- If JDev windows is not visible (mapped outside the screen), then edit MainWindow.x or MainWindow.y property in these files.
%APPDATA%/SQL Developer/system3.0.02.37/o.sqldeveloper.11.1.2.2.37/ide.properties
There could be more than one file in your directory such as
%APPDATA%/SQL Developer/system3.0.04.34/o.sqldeveloper.11.1.2.4.34/ide.properties, so edit the appropriate one.

Tuesday, July 5, 2011

APEX and Active Directory(what is in bindDN?)

I was setting up Active Directory(AD) authentication for an Oracle APEX application. The settings seemed to be straight forward, but authentication did not succeed. So it was time to fire up ldapsearch from the Oracle db server serving APEX, but found same issues.

After a lot of googling, I did not find any issue being documented for this problem. Then I thought this may not be an issue per say, but how information is perceived by the AD server or how these accounts were set up in AD.

So went further digging on our side ...

I was using samaccountname for bindDN that seemed to work for some application(service) account, but not for my own account. Found some interesting info related to AD or how it was set up in our environment.

- If "samaccountname" to be used for bindDN, then it need to be suffixed with "@domain-name.com" as appropriate.
- One can use "cn" (sn, givenName) as the bindDN if it leads to a unique entry.
- One can use "dn" for bindDN, but this is not user friendly as it is a long one with all the OU and DC info.


Then there were a couple of service accounts that did not seem to have any problem authenticating using samaccountname only, without @domain-name.com appended to it. This one was very confusing initially, but found out that these service accounts were created with no last name(sn), so their first name(givenName) matched their cn and samaccountname. In essence, we thought we were specifying samaccountname for the service accounts, but it was reall their "cn".

So this is how APEX authentication scheme screen finally looked like.

Google search results were hijacked by search.search-tab.com

My wife told me a few days ago that the links from Google search results were hijacked on our home computer. Clicking on links from google keyword search results in Firefox showed unrelated pages, but cutting and pasting the URLs in the address bar seemed to work fine.


She logs in as a restricted Windows user and has been doing Alt+F4 on any ad-window or unrelated pop-ups that beat Fire-fox's block pop-up settings.

Malware bytes's Anti-malware some times showed that it blocked illegal access to an IP address, but it did not happen every time unrelated content showed up. Running Malware scan or Norton did not find anything whether it was a quick scan or full scan. After googling for some time, the problem was found to be related to "keyword.url" configuration property accessed through "about:config" URL. This URL was pointing to "search.search-tab.com" on our home computer. So I reset this property, restarted Firefox to see this problem come up again and the URL was still pointing to search-tab.com.

So I decided to manually clean up this entry found in both user.js and prefs.js under
Documents and Settings/<username>/Application Data/Mozilla/Firefox/Profiles/.default/ directory.

So it seems to be working since then, but I wonder how long?

Monday, June 20, 2011

Disk upgrade

As my old DELL has become slow to boot, started to crank the disk randomly for a long period of time and freezing during this time, I decided to try out an SSD like other people in the group. My laptop was blazing with SSDs, but it lasted for about 3 months as the SSD crashed one day.

So I decided to try out a 7200 RPM disk as the old one was 5400 RPM.

I went ahead and imaged the new disk and also collected manual stats for a normal reboot with no new applications installed. I did not want to use a tool to benchmark before and after as it would tell me the stats, but not how it feels like. So I picked up my phone, paper and pencil and then started the timer.

Here are the stats for a DELL latitude – D620

                                   5400-RPM 7200-RPM

Dell boot appears                   0         0

Windows XP boot screen disappears  27        21
Blue background appears            54        38
Welcome to Windows, login screen   76        54
appears


Entered username and password       0         0
while timer is reset with
left hand.
Custom background picture           6         1
appears                                     
Quick launch bar appears           38        33
Desktop flashes after loading      83        48
all the icons
Disk activity                      183       Stopped.
                                  Still

Monday, June 6, 2011

SQL pitfall ('NOT IN')

It was frustrating recently to see that the following simple SQLs behave fundamentally different though one result was supposed to be the negative of the other.

-- Lists emloyees present in the tmp table.
select * from empl empl
where empl.empl_id in (select empl_id from tmpTable);

-- Expected to list the employees that are not present in the tmp table
-- Very similar to the above query, but using 'not in' construct.
select * from empl empl
where empl.empl_id not in (select empl_id from tmpTable);

No results were returned from this query though a number of records were expected to be returned.

After digging into the basics and spending quite a bit of time googling, a record with null emloyee id was found in the tmpTable, which originated from the CSV source file used to populate this table.

So I put in a filter 'where empl_id is not null' for second query (based on 'not in') alone. Realized that I should have used 'not exists', and would have avoided this pitfall.

Friday, May 20, 2011

Moving BPEL Data and Files to a test environment - 2

We did another round of prod to test move of data and files, a few days ago, but found out this time that processes with wait activities did not wake up even after of expiry of the time.

After refreshing alarm table a few times in vain and  frustrated digging attempts here and there, found out that the column orabpel.work_item.cluster_node_id had the IP address and a port number of the production cluster nodes. I guess these entries prevented these processes from waking up in the test environment as the test server IP was different from production servers.

So this column was nulled, then restarted oc4j_soa and then all of those pending processes woke up to move further.

Tuesday, April 26, 2011

Moving BPEL Data and Files to a test environment - 1

We had to recently capture a snapshot of BPEL metadata from production to be put in an test environment where some of the long running processes were continued and observed in the new test environment. So we started with a consistent copy of production BPEL database and then copied all BPEL deployment files from $OC4J_HOME/bpel/domains/default/tmp directory to the new environment where OC4J was running.

Then we had to ensure that the new test environment was isolated so that continuing process instances in this test environment would not interact with production systems. Unfortunately our production network was not isolated from the test servers. In other words all production servers were resolvable from this test servers.

So we had to come up with some tweaks on the server that was hosting OC4J application server to prevent the new instance from responding to actual clients.

- Production ports for OC4J were restricted only from the production Web servers.
- Redirected all production partner link hosts to 127.0.0.1 in the Windows hosts file of the OC4J test server.
- Redirected all production cluster and node hostsnames for OC4J to 127.0.0.1 as well in the Windows hosts file of the OC4J test server.

This did it for us as the client base for BPEL processes were small, so we could do an inventory of all client machines and then route them to 127.0.0.1 in windows hosts file to prevent the test instance talking to production clients. It could have been worse if the client base was wide and they made async calls.

Wednesday, March 9, 2011

OC4J and support for 64bit JVM

OC4J supports 32bit JVMs only on Windows x64 platforms. OC4J, starting from 10.1.3.4, supports using an external JVM for an instance.

But no where it to be found, in any of the documents, about not using a 64bit JVM for a newly created OC4J(custom) instance.

The ability to plug in a JVM may pave the way for using a 64bit JVM in a 32bit install, if that instance runs pure JAVA applications (no JNI based code). So we added necessary data elements to opmn.xml to start an OC4J instance using a 64bit JVM.
Everything is looking good since then and all applications (JAVA only) are seen to be working ok on this instance. This instance also shows up in the enterprise manager console, but seemed to take up a little more memory than a 32bit version would do at start up or run time. This could be related to how addresses are aligned in a 64bit executable.

We have it running for a few weeks in dev now (home and oc4j_soa in 32bit JVM and oc4j_apps in 64bit JVM) and did not see any issues so far. I will keep updating this blog if I come across any issues in the future.

Monday, March 7, 2011

DB Adapter configurations not recognized after 10.1.3.5 migration

Oracle DB adapter configurations (connector configurations), though present in J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml not recognized after upgrading to OC4J 10.1.3.5 from 10.1.3.4 (mlr#10).

The issue was seen to be related to the presence "usesSkipLocking" attribute for a connector definition. Removing this attribute (XPath exp: ...config-property/@name[.='usesSkipLocking']) from definitions in oc4j-ra.xml and then restarting the OC4J container seemed to bring them back.

Tuesday, December 14, 2010

XSL 1.0 vs 2.0

XML-23006: (Error) value does not match required type
Many of the XSL templates that were working for a long time started failing after upgrading to XSL 2.0.
Almost of all of the failing XPath expressions were identified to be not absolute expressions(starting with //).

The problem was eventually identified to be what certain XPath expressions returned - node or node set -
difference between XSL 1.0 and 2.0 behavior. Wherever an XPath expression, such as "string(//ns1:elemX)", returned a node set in XSL 2.0 led to a run time error. The same expression returned the first matching node when XSL 1.0 was used and did not trigger an error.

This is how the above expression was rewritten to fix it with XSL 2.0
          string((//ns1:elemX)[1]) - Note that this expression is entirely different from string(//ns1:elemX[1]) which would return a node set as opposed to the first node.

Monday, November 15, 2010

Windows batch script as CVS commit trigger

Windows batch script, as a commit trigger, to prevent check ins for a CVS branch.

@@echo off
if exist CVS\tag (set /p TAG=<CVS\tag) else (set TAG=THEAD)
if ["%TAG%"] equ ["T%1"] (echo Cannot commit to %1 branch. && exit 1)
exit 0

Friday, November 12, 2010

Apache Rewrite Rule for outage notification.

Apache rewrite rule to redirect all application specific URLs to an outage page during maintenance. Make sure that modules/mod_rewrite.so module is loaded and turned on.

...
RewriteEngine On
...

Also make sure that this rule is ahead of any other rules in the conf file.
...
RewriteRule (^/context.*$|^/cxt2.*$) /outage/reason.html [R,L]
....
 
R - to send HTTP redirection.
L - this is the last rule to be evaluated.

Tuesday, August 3, 2010

Creating PDF995 printer again

We noticed that PDF995 Printer set up on a server may go missing some times after a RDP (remote desktop) session despite of having unchecked "Printers" under "Local Resources" (RDP properties).

You may be able to create it manually as follows.

  • Make sure c:/windows/pdf995.ini has the settings as needed. If this file is empty, see whether you can get a copy from c:/program files/pdf995/res/pdf995.ini that you can modify appropriately.
  • Launch "Add Printer" wizard.
  • Select "Local printer attached to this computer", uncheck "Automatically detect and install ..."
  • Select "PDF995PORT (local port)" for "Use the following port:"
  • Ignore listed Manufacturer and Printers, but click on "Have Disk ...".
  • Navigate to c:/Program Files/pdf995/res/convert to select "ghostpdf.ini".
  • Change printer name to PDF995.
  • Complete printer set up.
  • Make the new printer as the default printer, if necessary.
  • Find the printer in "Printer and Faxes", click on properties to go to "Advanced tab" as shown.
  • Select "PDF995 Printer Driver" under "Driver" as opposed to any reference to Ghostscript.
  • Click OK to complete printer configuration.
  • Print a text file, from Word Pad, to PDF995 printer to make sure it shows up as a PDF file under "My Documents".  If the file does not show up, then the printer set up likely not working.

Thursday, May 20, 2010

ORABPEL-04003 error in OC4J 10.1.3.4

If you are running into this error when you click on the "Activities"
tab in the standalone(olite based) instance of Oracle BPEL
Console(10.1.3.4), then it is due to a missing column, namely
process_guid, in "admin_list_wi" view.

You can create the view again by running the following.

create or replace view admin_list_wi
as select wi.cikey, wi.node_id, wi.scope_id, wi.count_id,
wi.creation_date wi_creation_date, wi.creator wi_creator,
wi.modify_date wi_modify_date, wi.modifier wi_modifier,
wi.state wi_state, wi.transition,
wi.exp_date, exp_flag, wi.priority wi_priority,
wi.label, wi.custom_id, wi.comments, wi.reference_id,
wi.execution_type,
ci.domain_ref as ci_domain_ref,
ci.process_id process_id, ci.revision_tag revision_tag,
ci.process_guid process_guid,
ci.title title, ci.root_id, ci.parent_id, fault_name,
index_1, index_2, index_3, index_4, index_5, index_6
from cube_instance ci, work_item wi, wi_fault fault, ci_indexes indexes
where ci.cikey = wi.cikey (+)
and fault.cikey (+) = wi.cikey
and fault.node_id (+) = wi.node_id
and fault.scope_id (+) = wi.scope_id
and fault.count_id (+) = wi.count_id
and indexes.cikey (+) = ci.cikey ;