Saturday, October 3, 2015

ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'. - Oracle SOA 12C

ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'. - Oracle SOA 12C

We were receiving the following exception while accessing the OSB console in Oracle SOA 12C.

[2014-10-15T09:18:45.702-04:00] [AdminServer] [ERROR] [] [oracle.help.web.rich.OHWFilter] [tid: [ACTIVE].ExecuteThread: '21' for queue: 'weblogic.kernel.Default
(self-tuning)'] [userId: weblogic] [ecid: bf088c45-bbd9-4379-a8f7-4e3fb8639324-0000017d,0] [APP: service-bus] [DSID: 0000K^JuMDh0ZrALnax0iZ1KFb1b000003] ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'.[[
oracle.adf.controller.security.AuthorizationException: ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'.
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.handleFailure(AuthorizationEnforcer.java:198)
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.internalCheckPermission(AuthorizationEnforcer.java:166)
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.checkPermission(AuthorizationEnforcer.java:120)


This is caused by using an incorrect JDK version(1.8).
All Fusion Middlleware 12.1.3 products will run on JDK 1.7.55+ version.

To fix the issue downgrade the JDK to supported version.

Downgrade the JDK:

Change all the JDK location referred in the following paths:

<<Middleware_Home>>/Oracle_Home/user_projects/SOA_domain/bin/setDomainEnv.sh

<<Middleware_Home>>/Oracle_Home/oracle_common/common/bin/commEnv.sh

<<Middleware_Home>>/Oracle_Home/user_projects/SOA_domain/nodemanager/nodemanager.properties

Restart the servers.


Friday, October 2, 2015

ORA-01882: timezone region not found while creating schemas through RCU utility - Oracle SOA 12C

 ORA-01882: timezone region not found while creating schemas through RCU utility - Oracle SOA 12C

We were receiving the following exception while running the RCU Utility to create the required schema's in Oracle SOA 12C

ORA-01882: timezone region not found while creating schema's through RCU utility - Oracle SOA 12C


This can be resolved by setting the TZ environment variable before starting the RCU Utility with the supported Timezone of database machine

e.g.

export TZ='UTC'
echo $TZ

Restart the RCU utility.


Node Manager startup fails in Oracle SOA 12C

Node Manager startup fails in Oracle SOA 12C

The Node Manager failed to start in Oracle SOA Suite 12C with the following error.

[Sat Nov 09 01:29:46 2013] [I] [RunJavaApp] Invoking main class
<Nov 9, 2013 1:29:47 AM GMT> <INFO> <Loading domains file:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager
\nodemanager.domains>
<Nov 9, 2013 1:29:50 AM GMT> <INFO> <Loading identity key store:
FileName=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager\security\DemoIdentity.jks, Type=jks, PassPhraseUsed=true>
<Nov 9, 2013 1:29:50 AM GMT> <SEVERE> <Fatal error in NodeManager server> weblogic.nodemanager.common.ConfigException: Identity key store file not found:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager\security\DemoIdentity.jks
at weblogic.nodemanager.server.SSLConfig.loadKeyStoreConfig(SSLConfig.java:170)

The actual root cause of the problem is the jks file is not configured properly for nodemanager.

To fix the issue:-

Copy the file <domainhome>\security\DemoIdentity.jks to  <domainhome>\nodemanager\security\DemoIdentity.jks


Tuesday, September 29, 2015

502 Bad Gateway while accessing /libs/cq/security/userinfo.json via telnet after upgrading to Adobe Experience Manager(AEM) 6.1

502 Bad Gateway while accessing /libs/cq/security/userinfo.json via telnet after upgrading to Adobe Experience Manager(AEM) 6.1

We were using /libs/cq/security/userinfo.json url in BIG-IP via telnet to check the staus of the server(heartbeat check of Adobe Experience Manager(AEM) servers) to control the availablity of servers in BIG-IP.

This is working fine in Adobe Experience Manager(AEM) 5.6.1 but it stopped working after upgrading AEM to 6.1(the server status is down in BIG-IP even though the server is up).

The same URL is working fine using wget,curl command and also from browsers, only not working via telnet(This issue is only via dispatcher but it is working fine directly with publisher)

Trying 10.xxx.xxx.xxx...
Connected to 10.xxx.xxx.xxx.
Escape character is '^]'.
GET /libs/cq/security/userinfo.json
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Bad Gateway</title>
</head><body>
<h1>Bad Gateway</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
</p>
<hr>
<address>Apache/2.2.15 (Oracle) Server at xxxxxxxxxxx Port 80</address>
</body></html>
Connection closed by foreign host.

The actual root cause of the issue is the dispatcher module is not upgared as per the requirement.

The issue got resolved after upgrading the dispatcher module to latest version 4.1.10.

bash-3.2$ telnet 10.xxx.xxx.xxx 80
Trying 10.xxx.xxx.xxx...
Connected to 10.xxx.xxx.xxx.
Escape character is '^]'.
GET /libs/cq/security/userinfo.json
{"userID":"anonymous","userName":"anonymous","userName_xss":"anonymous","home":"/home/users/a/anonymous","impersonated":false,"allowedApps":[],"preferences":{}}
Connection to 10.xxx.xxx.xxx closed by foreign host.



org.apache.sling.commons.json.JSONException: Misplaced array - JSONWriter

org.apache.sling.commons.json.JSONException: Misplaced array - JSONWriter

The Misplaced array exception is thrown,While we are trying to create the JSON Array of objects from the servlet using - org.apache.sling.commons.json.io.JSONWriter.

Code:-

JSONWriter writer=new JSONWriter(response.getWriter());
try {
writer.object();
writer.key("authorName").value("test");
writer.key("biography").value("test");
writer.key("image").value("test");
writer.array();
writer.object();
writer.key("authorName").value("test");
writer.key("biography").value("test");
writer.endObject();
writer.endArray();
writer.endObject();
} catch (JSONException e) {

}

The root cause of the exception is not providing the key for initialized array(there will be different scenarios we will receive this exception)

To fix the issue as shown below in the code, add the key before starting the array.

JSONWriter writer=new JSONWriter(response.getWriter());
try {
writer.object();
writer.key("authorName").value("test");
writer.key("biography").value("test");
writer.key("image").value("test");
writer.key("list");
writer.array();
writer.object();
writer.key("authorName").value("test");
writer.key("biography").value("test");
writer.endObject();
writer.endArray();
writer.endObject();
} catch (JSONException e) {

}  

O/P

{"authorName":"test","biography":"test","image":"test","list":[{"authorName":"test","biography":"test"}]}