Wednesday, May 18, 2016

Maven Archetypes

I have been using Maven for a long while now. It's great for dependency management, and packaging my applications. Even though in many areas I see movement towards Gradle, I don't think that Maven is going anywhere anytime soon. Maven has the concept of Archetypes; these allow anyone to create a project very simply including a good amount of the folder structure (Although any directory you want to have needs to have a file.)

I have used archetypes a number of times in the past, but I never created any. Recently I kept thinking to myself that I needed a way to generate a project without needing to do it by hand. For some reason in my mind I never made the connection that I could just create my own. However, something clicked and suddenly I decided that I wanted to create my own. Using the Maven guide, I had one made up in a matter of 20 minutes. Most of that time was spent making my own customizations that I wanted for the specific type of project. The actual initialization of the archetype definition was extremely easy.

Oddly enough the people who came up with archetypes were kind enough to even come up with an archetype for the archetype.



Using the below code you can get your own archetype started:

mvn archetype:generate
  -DgroupId=[your project's group id]
  -DartifactId=[your project's artifact id]
  -DarchetypeArtifactId=maven-archetype-archetype

Happy Archetyping!

Recap of the WMOUG Spring 16 Conference

The West Michigan Oracle Users Group (WMOUG), founded in 2000, is a not-for-profit organization and an official partner of the Independent Oracle Users Group (IOUG). The Spring 16 Conference which took place yesterday, May, 17, 2016 in Grand Rapids, Michigan was a huge success with excellent turnout and standout presentations.

Displaying DSC06071.JPG

More photos can be found here.

Keynote

Rich Niemiec, an Oracle ACE Director and one of 6 originally honored worldwide OCMs, gave the keynote presentation on Uncommon Leaders. Interest was high on this one and the crowd was definitely engaged. Rich is the past President of the IOUG and the current President of the Midwest Oracle Users Group (MOUG). He won IOUG's Chris Wooldridge Award for outstanding service to the user group community in 2012. That year, he authored the #1 Oracle bestseller Oracle 11g R2 Performance Tuning Tips & Techniques. He was inducted into the Entrepreneurship Hall of Fame in 1998. Rich is currently President of the Oracle Consulting Practice of Rolta International.

Displaying DSC06077.JPG


Presentations

A good mix of presentations were given in this half day event that included:

  • The Best Oracle Database 12c Features, Rich Niemiec, Advizex
  • Oracle's Latest Platforms as a Service, Josh Hernandez, Oracle
  • Running Oracle on All Flash Arrays, The Value & The Problems Solved, Matt Kaberlein, EMC
  • Provisioning Amazon Web Services (AWS) - A Live Walkthrough, Ahmed Aboulnaga, Raastech
  • 12c Database In-Memory option and its use in Oracle E-Business Suite R12, Prashanth Vedire, Centroid
  • Plugging the DevOps Data Gap, Adam Bowen, Delphix


Summary

The WMOUG offers a half day event, breakfast, snacks, lunch, 7 presentations, and a wide array of prizes with a 15% chance of winning... all for just $10! For the cost, it is definitely worth it to hear from renowned speakers and meet the sponsors.

The crowd from the West Michigan area is a tight knit group, and the beauty of this group is that a lot of people from a lot of companies know each other, giving everyone an opportunity to network with their peers from other companies. Attendees came from Advizex, Amway, Auto-Wares Group, Bissell, Blue Medora, Centroid, Davenport University, Delphix, EMC, Experis, Gentex, HP, Initech, Johnson Controls, Oracle, Perrigo Company, Raastech, Spectrum Health, Steelcase, TEKsystems, and ThinkLiquidity.

Prizes included 2 Apple MacBook Airs, an iPad Mini, 2 $100 gift cards, and a few other small giveaways!

Many thanks to the WMOUG volunteers, Pat, Mike, Ahmed, and Greg who made this all happen.
                                                    






Tuesday, May 17, 2016

JDB remote debugging locking Oracle WebLogic Server 11g

Problem:

Are you trying to do remote JDB debugging on Oracle WebLogic Server 11g and the server locks up? The cluster, the AdminServer, the EM Console... everything simply locks up.

Here are the standard settings you may be accustomed to using:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=7009,suspend=n


Solution:

This is a bug which was fixed in Java SE 8 update 72, released in January, 2016.

Once workaround is to change the suspend=n portion of the debug flag to suspend=y, allowing the port to never lock and the JVM can be created. Alternatively, use any version of Java SE 8 from update 72 or later to avoid this issue.


References:

  • Oracle Doc ID 2104909.1





Friday, May 6, 2016

What's the difference between MEM_ARGS and USER_MEM_ARGS?

When starting up Oracle WebLogic Server, you might find the following entries in the logs:
...<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: CDC_JOINED_DOMAIN=na.intranet.msd> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: MODULES_DIR=/u01/app/oracle/middleware/modules> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: INPUTRC=/etc/inputrc> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: MEM_ARGS=-Xms32m -Xmx200m -XX:PermSize=128m -XX:MaxPermSize=256m> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: CDC_JOINED_DC=usadadc04.na.intranet.msd> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: HISTSIZE=1000> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: WLS1211_PATCH_LIBPATH=/u01/app/oracle/middleware/patch_wls1211/profiles/default/native> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: CDC_LOCALHOST=devhost> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: WEBLOGIC_EXTENSION_DIRS=/u01/app/oracle/middleware/patch_wls1211/profiles/default/sysext_manifest_classpath> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: PATH=/u01/app/oracle/middleware/wlserver_12.1/server/bin:/u01/app/oracle/middleware/modules/org.apache.ant_1.7.1/bin:/apps/weblogic/jdk1.7.0_40/jre/bin:/apps/weblogic/jdk1.7.0_40/bin:/apps/weblogic/jdk1.7.0_40/bin:/usr/kerberos/bin:/usr/share/centrifydc/bin:/usr/local/bin:/bin:/usr/bin:/var/cfengine/bin> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: DERBY_TOOLS=/u01/app/oracle/middleware/wlserver_12.1/common/derby/lib/derbytools.jar> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: PATCH_CLASSPATH=/u01/app/oracle/middleware/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: COHERENCE_HOME=> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: KDE_IS_PRELINKED=1> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: DOMAIN_HOME=/u01/app/oracle/middleware/user_projects/domains/soadomain> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: USER_MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=350m> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: KDE_NO_IPV6=1> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: DA_SESSION_ID_AUTH=81d6fb70-adcd-4576-a835-739ce09e4498> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: FEATURES_DIR=/u01/app/oracle/middleware/modules/features>
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: CDC_JOINED_SITE=USAda> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass> 
<May 3, 2016 12:36:01 PM> <FINEST> <NodeManager> <Environment: JAVA_VENDOR=Sun>...

Here, you notice 2 sets of memory settings; MEM_ARGS and USER_MEM_ARGS.

If the USER_MEM_ARGS environment variable is set, it overrides all MEM_ARGS values.





Thursday, May 5, 2016

WebLogic Server domain logs old and out of order

Problem:

When inspecting the WebLogic Server domain log, the entries are out of order. Not only that, but sometimes they are days apart!
####<May 2, 2016 12:00:01 AM EDT> <Notice> <Stdout> <machine1> <soa_server1> ...
####<Apr 30, 2016 2:18:42 PM EDT> <Critical> <Health> <machine1> <AdminServer> ...
####<Apr 30, 2016 4:01:29 PM EDT> <Critical> <Health> <machine1> <AdminServer> ...
####<Apr 30, 2016 5:32:44 PM EDT> <Critical> <Health> <machine1> <AdminServer> ...
####<Apr 30, 2016 6:16:14 PM EDT> <Critical> <Health> <machine1> <AdminServer> ...
####<Apr 30, 2016 12:14:45 PM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<Apr 30, 2016 11:46:08 PM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<Apr 30, 2016 11:46:08 PM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<Apr 30, 2016 11:46:08 PM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<Apr 30, 2016 11:46:13 PM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<May 1, 2016 6:36:32 AM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<May 1, 2016 6:36:32 AM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...
####<May 2, 2016 1:22:29 AM EDT> <Notice> <Stdout> <machine2> <soa_server2> ...

Explanation:

The Oracle documentation explains this extremely well:
Each WebLogic Server instance writes all messages from its subsystems and applications to a server log file that is located on the local host computer. By default, the server log file is located in the logs directory below the server instance root directory; for example, DOMAIN_NAME/servers/SERVER_NAME/logs/SERVER_NAME.log, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server. 
In addition to writing messages to the server log file, each server instance forwards a subset of its messages to a domain-wide log file. By default, servers forward only messages of severity level NOTICE or higher. While you can modify the set of messages that are forwarded, servers can never forward messages of the DEBUG severity level.
The domain log file provides a central location from which to view the overall status of the domain. The domain log resides in the Administration Server logs directory. The default name and location for the domain log file is DOMAIN_NAME/servers/AdminServer/logs/DOMAIN_NAME.log. 
The timestamp for a record in the domain log is the timestamp of the server where the message originated. Log records in the domain log are not written in the order of their timestamps; the messages are written as soon as they arrive. It may happen that a Managed Server remains out of contact with the Administration Server for some period of time. In that case, the messages are buffered locally and sent to the Administration Server once the servers are reconnected.
In each managed server, under the Logging tab, under Domain log broadcaster, you will notice these modifiable settings. The Severity level indicates at which level (and higher) you want the logs forwarded to the central domain log.


The Buffer Size is recommended to be set to 10 in production mode and 1 in development mode. Is this the number of minutes? Number of hours? Number of lines? Number of kilobytes? Nobody knows.

However, what is important to know is that the messages will be forwarded only when the buffer is full. This could take days, so don't be alarmed if you notice log entries in the domain log that appear to be old.


References:





Thursday, April 7, 2016

Running RDA for Oracle WebLogic Server 12c (12.1.1)

Never ran an RDA (Remote Diagnostic Agent) before? It is a way to collect comprehensive diagnostic information to provide to Oracle Support.

Some WebLogic Server versions have RDA already installed under the ~/oracle_common or ~/utils folder. If not, you may need to download, install, and run it on your own.


Instructions

1. Download RDA from the My Oracle Support website:
https://updates.oracle.com/Orion/PatchDetails/process_form?aru=19959625&patch_password=&no_header=0
2. Copy the downloaded zip file p21769913_8111638_Linux-x86-64.zip to /tmp.

3. Run these commands:
cd $MW_HOME/utils

unzip /tmp/p21769913_8111638_Linux-x86-64.zip

mv readme.txt rda

cd $MW_HOME/utils/rda

./rda.sh -s wls_issue -p WebLogicServer

(follow the prompts)

gtar -czvf wls_issue.2016.tgz wls_issue
3. Send the wls_issue.2016.tgz file to Oracle Support.


Sample Output

Below is a sample output of the prompts (anything in red is manually inputted):
------------------------------------------------------------------------------
RDA.BEGIN: Initializes the Data Collection
------------------------------------------------------------------------------
Enter the Oracle home to be used for data analysis
> /u01/app/oracle/middleware/user_projects/domains/soa_domain

------------------------------------------------------------------------------
RDA.CONFIG: Collects Key Configuration Information
------------------------------------------------------------------------------
------------------------------------------------------------------------------
OS.OS: Collects the Operating System Information
------------------------------------------------------------------------------
------------------------------------------------------------------------------
OS.PROF: Collects the User Profile
------------------------------------------------------------------------------
------------------------------------------------------------------------------
OS.NET: Collects Network Information
------------------------------------------------------------------------------
------------------------------------------------------------------------------
OS.PERF: Collects Performance Information
------------------------------------------------------------------------------
------------------------------------------------------------------------------
OFM.WREQ: Handles the Oracle WebLogic Server Collection Requests
------------------------------------------------------------------------------
Are custom scripts used to start Oracle WebLogic servers (Y/N)?
Press Return to accept the default (N)
> N

Do you want RDA to capture thread dumps when a data collection module requires on-line collections (Y/N)?
Press Return to accept the default (Y)
> N

------------------------------------------------------------------------------
OFM.WLS: Collects Oracle WebLogic Server Information
------------------------------------------------------------------------------
Select a Oracle WebLogic Server domain home target list:
  1  Domain medrec (in
     /u01/app/oracle/middleware/wlserver_12.1/samples/domains)
  2  Domain medrec-spring (in
     /u01/app/oracle/middleware/wlserver_12.1/samples/domains)
  3  Domain soa_domain (in
     /u01/app/oracle/middleware/user_projects/domains)
  4  Domain wl_server (in
     /u01/app/oracle/middleware/wlserver_12.1/samples/domains)

  A  All Oracle WebLogic Server domain home targets
  D  Define a new Oracle WebLogic Server domain home target
  E  Edit an Oracle WebLogic Server domain home target
  N  No Oracle WebLogic Server domain home targets

Enter your selection, as a comma-separated list of item numbers or ranges
Press Return to accept the default (3)
> 3

Server list for 'soa_domain' - domain home (in
/u01/app/oracle/middleware/user_projects/domains/soa_domain):
Two or more managed servers have been discovered.
  1  AdminServer
  2  osb_server1
  3  osb_server2
  4  soa_server1
  5  soa_server2
Enter your selection, as a comma-separated list of item numbers or ranges
Press Return to accept the default (1-5)
> 1-5

Enter the user name to connect to the AdminServer of 'soa_domain' domain
(/u01/app/oracle/middleware/user_projects/domains/soa_domain)
Press Return to accept the default (weblogic)
> weblogic

------------------------------------------------------------------------------
RDA.OCM: Set up the Configuration Manager Interface
------------------------------------------------------------------------------
RDA benefits from Oracle Configuration Manager by improving its data
collection. Oracle Configuration Manager (OCM) collects the configuration
information and uploads it to the OCM Repository in connected mode. When OCM
is configured in disconnected mode, it adds the OCM payload to the RDA report
packages in future RDA runs.

Pending Configurations in /u01/app/oracle/middleware:
  MH_T0002  Middleware home /u01/app/oracle/middleware

Hit 'Return' to continue

Do you want RDA to configure OCM now (Y/N)?
Press Return to accept the default (Y)
> N

------------------------------------------------------------------------------
RDA.STATUS: Produces the Remote Data Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.LOAD: Produces the External Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.FILTER: Controls Report Content Filtering
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.END: Finalizes the Data Collection
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA Data Collection Started 04-May-2016 10:55:32
------------------------------------------------------------------------------
Processing RDA.BEGIN module ...
Processing OS.PERF module ...
Processing RDA.CONFIG module ...
Processing OS.OS module ...
Processing OS.PROF module ...
Processing OS.NET module ...
Processing OFM.WLS module ...
Processing OFM.WREQ module ...
Enter 'weblogic' user password for 'soa_domain' domain: welcome1
Re-enter it to confirm:
This can take time. Be patient ...
Processing HCVE tests ...
Performing HCVE checks ...

Test "WLS PostInstall Check: WebLogic Server 12c (12.x) Generic" executed at 04-May-2016 11:04:32

Test Results
~~~~~~~~~~~~

ID     NAME                 RESULT  VALUE
====== ==================== ======= ==========================================
A10000 Domain List          RECORD  soa_domain
A10005 -- soa_domain Domain --
A10010 Domain directory     RECORD  /u01/app/oracle/middleware/user...
A10011 Domain valid?        PASSED  isValid
A10015 Domain URL           RECORD
A10016 Domain User Name and RECORD  weblogic/***
A10020 WLS Version          RECORD  12.1.1
A10021 Version 12?          PASSED  VersionIsGood
A10100 Admin server name?   PASSED  AdminServer
A10110 Server names?        PASSED  AdminServer osb_server1 osb_server2 s...
A10120 Installed Patch List RECORD  no patches installed
A10130 config.xml Data      RECORD  General Server Configurations, value ...
A10140 JDBC Configuration   RECORD  Data from EBS_Datasource-4735-jdbc.xm...
A10150 JMS Configuration    RECORD  Data from soa_process_jms_module1-jms...
A05000 JMS bytes-maximum    FAILED  The following do not have bytes-maxim...
A05001 JMS messages-maximum FAILED  The following do not have message-max...
A05002 JDBC pinned-to-threa FAILED  The following do not have pinned-to-t...
A05003 JDBC statement-cache FAILED  The following do not have statement-c...
A05004 JDBC statement-cache FAILED  The following do not have statement-c...
A05005 Server native-io-ena PASSED  protected
A05006 Cluster frontend-hos FAILED  The following do not have cluster fro...
A05007 Virtual-host max-pos PASSED  protected
A05008 Server max-post-size FAILED  The following do not have max-post-si...
A05009 Server max-open-sock FAILED  The following do not have max-open-so...
A05010 Config server ssl ho PASSED  protected
A05011 JVM heapsize         PASSED  protected
A05012 JDBC WaitingForConne PASSED  protected
Result file: wls_issue/collect/OFM_HCVE_P_WLS12_gen_res.htm
Processing RDA.LOAD module ...
Processing RDA.END module ...
------------------------------------------------------------------------------
RDA Data Collection Ended 04-May-2016 11:04:35
------------------------------------------------------------------------------

  You can review the reports by transferring the
  /u01/app/oracle/middleware/utils/rda/wls_issue directory structure to
  a location where you have web-browser access. Then, point your browser at
  this file to display the reports:
    RDA__start.htm

  Based on your server configuration, some possible alternative approaches
  are:
  - If your client computer with a browser has access to a web-shared
    directory, copy the ? directory structure to the web-shared directory and
    visit this URL:
    http://machine:port/web_shared_directory/RDA__start.htm
  or
  - If your client computer with a browser has FTP access to the server
    computer with the ? directory, visit this URL:
    ftp://usayn80@uslx792.intranet.local//u01/app/oracle/middleware/utils/rda/wls_issue

  If this file was generated to assist in resolving a Service Request, send
  /u01/app/oracle/middleware/utils/rda/RDA_wls_issue_uslx792.zip to
  Oracle Support by uploading the file via My Oracle Support. When sending
  with FTP, make sure you send it in BINARY format.

  Note: Do not submit any health, payment card or other sensitive production
  data that requires protections greater than those specified in the Oracle
  GCS Security Practices
  (http://www.oracle.com/us/support/library/customer-support-security-practices-069170.pdf).
  Information on how to remove data from your submission is available at
  https://support.oracle.com/rs?type=doc&id=1227943.1



Wednesday, March 16, 2016

Legal Usage of Oracle JDK with Docker

I have been a fan of Docker for a while now, and while it has grown out of infancy some things still feel like they can be a bit up in the air. One of the topics that comes up is that a lot of people are using Java. Now if you don't require Oracle's JDK that's find just simply install OpenJDK and that's fine.

Recently, the folks at Takipi made this post, talking about a practice that I would believe many people could be following. The long and short of it involves using a cookie to override accepting Oracle's License Agreement. This is far from ideal, potentially illegal, and while I don't endorse such action the likelihood of Oracle enforcing this for individuals seems unlikely. On the other hand companies are likely to be targets of such violations. In order to follow the correct procedures I have a very simple solution.

Manually download it from Oracle.

Amazing! I know! How could something be so simple? You're not by-passing anything, because someone is logging in and downloading the software just as you would if someone were to be setting up this software themselves. This practice extends any other Oracle software which requires this. Now I may get flak for saying this, but when thinking about it in a corporate context if an app is planning on upgrading to a new JVM that's going to require updating the Dockerfile regardless. Once this is manually downloaded it's placed on to some share drive where the build server will have access to the files. The additionally advantage is that every time you build your Dockerfile the JDK and what ever other files don't need to be downloaded.

Update (4/7/2016): I have actually confirmed this with sales people from Oracle

Thursday, February 11, 2016

Calling a web service from Unix using Curl

Problem:

Create a request message:
echo "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:chec=\"http://xmlns.oracle.com/MOUS/HealthCheck/CheckBPEL\">" > /tmp/request.xml 
echo "   <soapenv:Header/>"  >> /tmp/request.xml 
echo "   <soapenv:Body>"     >> /tmp/request.xml 
echo "      <chec:process/>" >> /tmp/request.xml 
echo "   </soapenv:Body>"    >> /tmp/request.xml 
echo "</soapenv:Envelope>"   >> /tmp/request.xml

Invoke the web service using curl:
curl -X POST -H "Content-Type: text/xml" -H "SOAPAction: \"http://soadev:8001/soa-infra/services/default/HealthCheck/checkbpel_client_ep\"" --data-binary @/tmp/request.xml http://soadev:8001/soa-infra/services/default/HealthCheck/checkbpel_client_ep?WSDL > /tmp/response.xml

View the contents of the response:
cat /tmp/response.xml



Wednesday, February 10, 2016

Red Hat Enterprise Linux Server release 5.5 - Hacked and fixed

One of our public, rarely used, sandbox servers was hacked last January. Even Amazon Web Services got hit with one of the three we've gotten rid of.

Several of the OS binaries would have been overwritten by a 1135000 byte binary file, so you will have to re-copy them from a different server.

Run these commands to get rid of the offending trojans/viruses:
killall -9 l26.tmp 
killall -9 http.sh 
killall -9 https.sh 
killall -9 sleep
killall -9 ps 
killall -9 .sshd 
chattr -i /usr/bin/.sshd 
chattr -i /usr/bin/kernel 
chattr -i /usr/bin/acpid 
chattr -i /etc/bash 
rm -rf /usr/bin/dpkgd 
rm -rf /usr/bin/bsd-port 
rm -f /l26.tmp 
rm -f /usr/bin/.sshd 
rm -f /usr/bin/kernel 
rm -f /usr/bin/acpid 
rm -f /etc/bash 
rm -f /etc/Centos-ssh 
rm -f /etc/Centos-sshd 
rm -f /etc/fake.cfg 
rm -f /etc/http.sh* 
rm -f /etc/https.sh* 
scp oracle@soadb:/bin/ps /bin 
scp oracle@soadb:/bin/netstat /bin 
scp oracle@soadb:/usr/sbin/lsof /usr/sbin 
scp oracle@soadb:/usr/sbin/ss /usr/sbin 
scp oracle@soadb:/usr/bin/chattr /usr/bin 
scp oracle@soadb:/usr/bin/kernel /usr/bin 
scp oracle@soadb:/usr/bin/acpid /usr/bin


Applicable Versions:
  • Red Hat Enterprise Linux Server release 5.5


Wednesday, January 27, 2016

Error 503--Service Unavailable when trying to access the EM console

Problem:

If you're running Oracle Fusion Middleware (specifically Oracle SOA Suite 11g), and when navigating to the EM console via this URL:
http://soadev.raastech.com:7001/em
We get this error on the browser:
Error 503--Service Unavailable 
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 
10.5.4 503 Service Unavailable 
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. 
Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.


Solution:

In this particular case, the file targets.xml was missing.

1. Confirm that targets.xml is missing.
export DOMAIN_HOME=/u01/app/oracle/middleware/user_projects/domains/soa_domain 
ls -l $DOMAIN_HOME/sysman/state/targets.xml

2. If so, recreate the targets.xml file using the following as a template:
<Targets>
 <Target TYPE="oracle_ias_farm" NAME="Farm_soa_domain" DISPLAY_NAME="Farm_soa_domain"> 
  <Property NAME="MachineName" VALUE="soadev.raastech.com"/> 
  <Property NAME="Port" VALUE="7001"/> 
  <Property NAME="isLocal" VALUE="true"/> 
  <Property NAME="Protocol" VALUE="t3"/> 
  <Property NAME="serviceURL" VALUE="service:jmx:t3://soadev.raastech.com:7001/jndi/weblogic.management.mbeanservers.domainruntime"/> 
  <Property NAME="WebLogicHome" VALUE="/u01/app/oracle/middleware/wlserver_10.3"/>
  <Property NAME="DomainHome" VALUE="/u01/app/oracle/middleware/user_projects/domains/soa_domain"/>
 </Target> 
</Targets>

3. Restart the AdminServer


Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)


Friday, January 1, 2016

Oracle SOA Suite development error: 'jca.retry.count' must be a positive number

Problem:

After developing an Oracle SOA Suite 11g composite and attempting to deploy it directly from Oracle JDeveloper 11g, we get the following error in the JDeveloper logs:
[11:24:23 AM] Received HTTP response from the server, response code=500 
[11:24:23 AM] Error deploying archive sca_HealthCheck_rev1.0.jar to partition "default" on server soa_server1 [http://soahost1:8001]  
[11:24:23 AM] HTTP error code returned [500] 
[11:24:23 AM] Error message from server:
There was an error deploying the composite on soa_server1: Update Failed: Error while validating JCA Reference Binding meta data during composite deployment: Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "Cannot parse JCA binding retry property 'jca.retry.count', value '0' due to: Value of JCA binding retry property 'jca.retry.count' must be a positive number". 
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
: Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "Cannot parse JCA binding retry property 'jca.retry.count', value '0' due to: Value of JCA binding retry property 'jca.retry.count' must be a positive number". 
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
. 
[11:24:23 AM] Check server log for more details. 
[11:24:23 AM] Error deploying archive sca_HealthCheck_rev1.0.jar to partition "default" on server soa_server1 [http://soahost1:8001]  
[11:24:23 AM] ####  Deployment incomplete.  #### 
[11:24:23 AM] Error deploying archive file:/C:/Oracle/mywork/HealthCheck/deploy/sca_HealthCheck_rev1.0.jar 
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


Solution:

This error was because value of Attempts in the database adapter configuration wizard was set to zero. This must be a positive (non-zero) number. This value maps directly to jca.retry.count.

1. Set the Attempts or jca.retry.count value in the DbAdapter to a value greater than 0.



Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)


Thursday, December 3, 2015

Oracle SOA Suite error: "Cannot call commit when using distributed transactions"

Problem:

I made a web service call to an Oracle SOA Suite 11g BPEL service, and got the following exception:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <env:Fault>
         <faultcode>env:Server</faultcode>
         <faultstring>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'QueryInstanceTable' failed due to: DBWriteInteractionSpec Execute Failed Exception.
unknown failed. Descriptor name: [unknown].
Caused by java.sql.SQLException: Cannot call commit when using distributed transactions.
Please see the logs for the full DBAdapter logging output prior to this exception.  This exception is considered retriable, likely due to a communication failure.  To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml).  To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.  All properties are integers.
". 
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.</faultstring>
         <faultactor/>
         <detail>
            <exception>Cannot call commit when using distributed transactions</exception>
         </detail>
      </env:Fault>
   </env:Body>
</env:Envelope>


Solution:

Your connection factory is misconfigured. The data source was configured to use an XA driver.

1. Make sure that this data source is included the xaDataSourceName and not the dataSourceName property.




Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)


Saturday, November 21, 2015

Searching Google Drive using Windows Search yields no items match

Are you using Google Drive on your Windows PC?

Are you trying to use Windows Search to locate a file(s) and the results are consistently coming up empty even though the files exist?




Solution:

1. Right-click on your "Google Drive" folder

2. Click on "Properties"

3. Click on the "Security" tab

4. Click on "Advanced"

5. Check the checkbox "Replace all child object permission entries with inheritable permission entries from this object"

6. Click on "Apply"


Try searching again, and you should finally see your results:




Applicable Versions:
  • Microsoft Windows 8.1 Pro
  • Oracle WebLogic Server 12c


Wednesday, November 11, 2015

Where do I get data?

When getting started with data analysis of any kind, it can sometimes seem daunting. If you have no frame of reference it can be difficult to know where to start. If you are trying to learn time-series analysis techniques it might be good to have large sets of time series data such as a list of stock quotes over time to perform the analysis. If you are trying clustering techniques it would be good to have categorical data such as a list of all car models and their characteristics including: range, mpg, number of cylinders, various emissions, country of distribution, etc.

So assuming you have the tools you need there are a number of places that you can get information. Many sites such as Twitter, Facebook, and YouTube offer apis which allow you to pull all sorts of information. However, if you are looking for information outside of the Social media area it seems to get a bit more difficult, but there are a few great options out there.

First there's the U.S. Government, there has been a large push in data openness, and the result of that is data.gov which claims to have over 198,000. Not all the sources are available in an easily ingested format such as CSV, but there are over 8200 api accessible sources. Additionally from the U.S government there are NASA Open Datasets. Beyond the government though there are more options.

Quandl is a great resource for data both for free and for a premium. All data is available in XML, CSV, and JSON via APIs. There are also Libraries directly supported by Quandl for Python, R and Excel. Additionally, there are community supported plugins for many other languages and programs including: Go, Java and Ruby.

Beyond these there's always communities such as those on reddit /r/datasets and /r/data.

Happy data collecting!

Tuesday, November 3, 2015

Why we opted against using Oracle MAF


What is Raastech Mobile Manager?

Have you seen Raastech Mobile Manager for Oracle Fusion Middleware? It's the world's only mobile monitoring and management solution for Oracle Fusion Middleware.

It has been built with a customizable framework, top-notch and responsive UI, and does everything you would expect a mobile app like this would do.

For more details, check out www.raastechmobile.com.

Designed for Oracle from the start

We are an Oracle partner. We implement Oracle solutions. We use Oracle products ourselves.

So from the start, Raastech Mobile Manager was intended to be built leveraging Oracle tools, Oracle infrastructure, and Oracle frameworks.

Currently, the Raastech Management Server (the server backend) runs on the following Oracle infrastructure software:

Deciding against Oracle MAF

For the development of our iOS and Android apps, we've chosen to go native instead of using Oracle MAF.

Forget Oracle ADF Mobile... that thing is dead. Instead, Oracle Mobile Application Framework, otherwise known as Oracle MAF, was released on June 30, 2014 and recommended by Oracle for all new mobile application development.

Oracle MAF is available as an extension to both JDeveloper and Eclipse and offers a Java-based MVC framework that executes in a hybrid container on the various mobile OSs.


The Good
  • Develop a single application that will run on both iOS and Android devices
  • Oracle Support Services available

The Bad
  • HTML5 is not what it's cracked up to be (see TheLadders' and Facebook's experience)
  • You must license Oracle MAF per user per app or per app with unlimited number of end users <-- this is the deal breaker


Though Oracle will provide you with a break if you purchase some of the Oracle Mobile Cloud Service offerings, as it stands, the awful Oracle MAF licensing model pretty much sums it up.



References: