Sunday, April 5, 2015

TBE: CSS fix for login area in CWS

 

Ok, a little expansion first. This is a CSS fix for the login area of the Career Website using Taleo Business Edition (TBE). The Careers Web Site (CWS), is Taleo's portal to get job-searching candidates to register and enter their information. TBE provides options to set up multiple CWS pages for different job types, but they will all inherit styles from TBE's cloud service. The login area is one such place in the page which cannot be customized. Due to an existing product defect, the text in the login area is misplaced and misaligned.

cleartext.blogspot.com

Eg: this is from one of many TBE CareerSites.

tmp25F8

Some other examples:

tmp3738

tmpA26A

tmp3A94

 

tmp739F

tmp3BEF

 

and so on…..cleartext.blogspot.com

Do you see the pattern ? In all of these sites, the text "Re-type new password" appears misaligned. The placement of this text cannot be controlled from within TBE, the login id and password fields are always together.  This is because this form layout is downloaded from TBE's public web servers, like most cloud applications, and thus the layout will be similar for any TBE user. Only minor UI enhancements like font type and size is inherited from the base parent website.

Now for the fix:

This simple form issue can be fixed with a minor CSS tweak into the CWS header itself. Just insert the following into the header enclosed inside text/css sections:

tmp376D

Save the header and try the CWS again, you should see the login area move into place something like this:

tmpD63D

Now the labels all appear in alignment on the left side, and the gap above the third field is removed.

To see a complete Career Web Site designed by me, see here.

 

 

 

 

This article first appeared on cleartext.blogspot.com

Saturday, April 4, 2015

BIP Logs

 

A quick roundup on how to set up the log levels on a BIP setup.

On the BIP Desktop Addon:

Here is how to increase Log levels on your windows machine, running the BIP Destop addon

cleartext.blogspot.com

1.Find out the Java folder your Word add on is using.
In side your Word's Addin Tab, go to BIPublisher -> Tools -> Options -> Preview

tmp2EF8

2. In this java folder, go to /lib/ folder, and create a file named xdodebug.cfg

3. Add these two lines the xdodebug.cfg file:

LogLevel=STATEMENT
LogDir=C:\xdo_logs

4.Create a folder named xdo_logs under C:\  Next time you preview a report on your addon, BIP will create logs in the folder.

This article first appeared on cleartext.blogspot.com

Alternate: TemplateViewer

If you want a quick method to get logs without making these changes, you could simply use the TemplateViewer jar file. It will be under the TemplateViewer folder under the BIP addon installation. For me, it was under :

C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\TemplateViewer\tmplviewer.jar

1: Just run the jar file in Windows.

tmp841B

 

2:Use the browse button to go a folder where you have your RTF template & XML data file.

3:In the left pane, select the XML file, and in the right pane, select the RTF file you need to test.

tmpACC2

4. Before you run the report, go to the Settings tab, and select log leve as Maximum.

tmp8B31

5. Click on the Start Processing button, to see the logs getting generated and the preview being generated.

On a BIP Server:

Here are the steps to change your BI Publisher Enterprise Server to be in a debug mode:

  1. Login to BIP as Administrator
  2. Select Admin -> System Maintenance -> Server Configuration
  3. Change Debug Level to ‘Debug’ under General Properties
    clip_image001
  4. Click on the ‘Apply’ button and restart the server.

 

When set to maximum log level, BIP will generate the logs, and in addition, create a .xml file, .xsl file, and a .fo file. The XML file will contain the dataset used to generate the report. The .fo file contains the final output, and can be renamed to PDF or whatever output you had chosen and it will open up in its viewer.

 

Happy BIP ! and Happy Easter !

This article first appeared on cleartext.blogspot.com

 

This article first appeared on cleartext.blogspot.com

Thursday, April 2, 2015

java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.defaultIfEmpty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String

 

While using the Taleo Connect Client (TCC) for some advanced configurations , for instance for attachments, you might run into some weird java related errors.

 

java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.defaultIfEmpty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    at com.taleo.integration.client.customstep.BaseCustomStep.init(BaseCustomStep.java:120)
    at com.taleo.integration.client.customstep.xml.ExtractAttachedFilePostStep.init(ExtractAttachedFilePostStep.java:424)
    at com.taleo.integration.client.step.BaseCustomStep.init(BaseCustomStep.java:58)
    at com.taleo.integration.client.step.CustomStepWrapper.init(CustomStepWrapper.java:111)
    at com.taleo.integration.client.workflow.WorkflowManager.addSteps(WorkflowManager.java:1006)
    at com.taleo.integration.client.workflow.WorkflowManager.addPostProcessSteps(WorkflowManager.java:977)
    at com.taleo.integration.client.workflow.WorkflowManager.createWorkflow(WorkflowManager.java:172)
    at com.taleo.integration.client.workflow.WorkflowManager.execute(WorkflowManager.java:328)
    at com.taleo.integration.client.rcp.job.ConfigurationExecutionJob.run(ConfigurationExecutionJob.java:109)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

 

 

It turns out that the issue was with the TCC installer itself. The fix is to replace commons-lang-2.0.jar with commons-lang-2.6.jar [TCC installation folder]\lib\endorsed

Oracle Sucks !

Wednesday, March 18, 2015

Understanding SQL's Null

 

Tony Hoare invented the null reference in 1965, and he considers it his "billion-dollar mistake" for the amount of trouble it has caused. Even today, SQL's null value is the cause of several common mistakes.

Let’s go over the most egregious.

Equals Null

These two queries return the exact same result on a users table with many rows:

select * from users where deleted_at = null;
-- result: 0 rows

select * from users where deleted_at != null;
-- result: 0 rows

How can that be? It's because null represents an "unknown" type. This means it doesn't make sense to compare null to anything else with normal conditional operators. Null isn't even equal to itself:

select null > 0;
-- result: null

select null < 0;
-- result: null

select null = 0;
-- result: null

select null = null;
-- result: null

The right way to compare values with null is with the is, and is not operators:

select * from users 
where deleted_at is null;
-- result: all non-deleted users

select * from users
where deleted_at is not null;
-- result: all deleted users

If you want to check if two columns are different, you can use is distinct from:

select * from users
where has_address is distinct from has_photo
-- result: users with an address or
-- photo, but not both

Not in Null

One handy way to filter rows is with a subselect. For example, if you wanted the userswho did not have any packages, you could write a query like this:

select * from users 
where id not in (select user_id from packages)

But if one of the rows in packages has a null user_id, this query will return no results! To understand why this happens we need to factor the query like the SQL compiler does. Here's a simpler example:

select * from users 
where id not in (1, 2, null)

Which translates to:

select * from users 
where id != 1 and id != 2 and id != null

As we now know, id != null is an unknown value, null. Using and on any value withnull becomes null, so all of the other and conditions fall away. No rows match the resulting query since null is not equal to true.

If the condition is inverted, the query works fine. This time we'll look for users withpackages.

select * from users 
where id in (select user_id from packages)

Which we can simplify for the example:

select * from users 
where id in (1, 2, null)

This query translates to:

select * from users 
where id = 1 or id = 2 or id = null

Since the where clause is a list of or conditions, it doesn't matter that one of them is null. That condition is simply ignored because non-true values do not change the evaluation of the rest of the clause.

Sorting Nulls

When it comes to sorting, nulls are considered the largest possible value. This can lead to some frustrating queries when trying to sort values descending, since all the nulls will be on top.

This query is meant to show the users ranked by their points, but it's putting users without any points first!

select name, points
from users
order by 2 desc;
-- null points sort above
-- any number of points!

There are two ways to deal with this. The easiest way is to get rid of those nulls in the output or the comparison using coalesce:

-- treat nulls as 0 in output
select name, coalesce(points, 0)
from users
order by 2 desc;

-- keep nulls in output, but sort as 0
select name, points
from users
order by coalesce(points, 0) desc;

And if your database supports it, you can instead tell it where to put nulls when sorting with nulls first or nulls last:

select name, coalesce(points, 0)
from users
order by 2 desc nulls last;

Of course, nulls can also be used to prevent errors. One great use of nulls is in dealing with divide by zero errors.

Divide by Zero

Divide by zero errors are especially painful. Queries that ran fine yesterday all of a sudden are failing with divide by zero errors. One common solution is to check if the denominator is 0 before dividing with a case statement:

select case when num_users = 0 then 0 
else total_sales/num_users end;

The case statement approach is verbose and duplicates the denominator. That's OK if the denominator is simple, but if it's an expression, you're likely to get more bugs if you change the query later.

Here we can use null to our advantage. Use nullif on the denominator to make the denominator null instead of zero. Rather than failing, the query will return null on days where num_users = 0.

select total_sales/nullif(num_users, 0);

If you prefer the result to be 0 or anything else instead of null, use coalesce on the previous query:

select coalesce(total_sales/nullif(num_users, 0), 0);
-- nulls results become 0

Conclusion

Tony Hoare may regret his mistake, but at least it’s easy to work around the issues that null presents. Now go forth with your new knowledge and keep null from nullifying your future query results!

Monday, March 2, 2015

TBE: Enabling General Application in Career Web Site

 

Taleo Business Edition (TBE) is Oracle's recruiting application offering for small to mid-sized companies. It does not have the full feature set available in Tale Enterprise Edition, and the system is deliberately watered down to allow quick setup and faster go-live. The system is also not well documented, and sometimes you have to hunt across the application to implement the simplest settings.

Like when we tried to turn on General Application in the Career Web Site.

1: Go to Administration -> Customize Recruit. Click on "Careers Website Pages"

tmpDE81 2:  Edit the Job Search Pages.

tmpE97A

3: In the next page, just unhide the two entries for "General Application" and its header section.

tmp723A

 

This is weird, because we expected some kind of global parameter which can be set to turn on such features. Instead, this configuration change is the only way to turn this on.

Sunday, March 1, 2015

25 Funny Situations Of A Programmer's Life

 

1. When the project manager enters the office

2. When I try to fix a bug at 3 in the morning


3. When I'm told that the module on which I have worked all the week will never be used

4. When the code that I have not tested on dev works perfectly in production

5. When the sales people announce they have sold our product to the customer

6. When sysadmin finally gives us the root access

7. When I launch my script for the first time after several hours of development

8. When I go off for the weekend while everyone else is still trying to fix bugs

9. When the boss is looking for someone to urgently fix a difficult bug

10. When a thing that worked on Friday no longer works on Monday

11. When a bug goes unnoticed during a presentation

12. When a newbie suggests to add a new feature to project

13. When I realize that I have been blocked for two hours because of a forgotten semicolon

14. When the project manager suddenly looks on my screen

15. When customer wants to change specification 2 days before pushing to production

16. When my script finally worked

17. When I'm told that my code is broken in production

18. When I find a solution without searching Google

19. When the intern tells me that "the tests are for those who can not program"

20. When I manage to replace 200 lines of the algorithm by only 10 lines

21. When I return to development of my code that wasn't commented

22. When they tell me the website has to be supported by IE6

23. When a misformed sql query actually returns me the correct results

24. When I start coding without doing analysis first

25. When project manager thinks that I can handle whole project all by myself

Oracle Cloud Support

 

Now that Oracle is a full fledged Cloud company, certain changes can be seen across their sites, letting visitors known that they tend to move to the cloud full on. If you are using an Oracle cloud product, you will see changes in their supportweb system. Logging into Suppotweb with the OPN of your cloud service takes you a new site, with the text "Oracle Cloud Support" on the top.

 

image

This new site has a minimalistic design, even the process of creating a Service Request is easier.

 

image

Clicking on the "Knowledge" tab , the search page is toned down. Users can choose to search in the realm of their cloud product, or search in "All Knowledge" for fill supportweb content.

image