Saturday, July 23, 2016

Linux commands for the newbie

Many developers become intimidated using the Linux command line for the first time. Below are some introductory commands to help you get started.

Navigation
pwd                                      Get current directory
ls -l                                    File listing

Directories
du -k                                    Get size of all subdirectories in KB
du -m                                    Get size of all subdirectories in MB

Copying Files
cp -r en en.backup                     Copy directory recursively to new one

Symbolic Links
ln -s /u01 newlink                     Create a symbolic link

Find
du -S | sort -n | tail -20             Finding the largest directories
ls -lR | sort +4n | tail -20             Finding the largest files
find . -name filename.txt                Find a file in hard disk
which java                               Locate command, display pathname/alias
find / -perm -2 ! -type l -ls            Find all world writable files
find / -nouser -o -nogroup -print        Find files with no owner and no group
find . -type f | xargs grep -n "text"    Find text in string

Find Files > 20 MB
find . -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
find . -size +20000k -exec du -h {} \;
find . -size +20000k -exec du -h {} \; | sort -n | more

Files
cat filename.txt                       List contents of file
more filename.txt                      List contents of file, with page pause
tail -f filename.log                   List contents of file, with scrolling
head -10 filename.log                  List first 10 lines of a file
tail -10 filename.log                  List last 10 lines of a file
grep -i text test.log                  Search for "text" in file, case insensitive
grep text test.log                     Search for "text" in file, case sensitive

Filesystem
df -k                                  File system in Kb
df -h                                  File system in MB
df -m                                  File system in MB

Processes
ps -ef                                 View all processes on system
kill -9 12345                          Force kill process id 12345
killall a.out                          Kill all processes
free -m                                Check the amount of free memory
ps -efaux                              View all processes hierarchically
top                                    Running processes; cpu & memory usage
pstree -p                              Shows running processes in tree format
ps -aux | sort +5n | tail -20          Find processes that are largest
  
Zipping
gzip download.tar                      Compress file to .gz file
gunzip download.tar.gz                 Uncompress
tar -xvf download.tar                  Extract
tar -cvf newfile.tar *.bmp             TAR the files
gtar -xzvf source.tar.gz onefile.java  Extract only one file
gtar -xzvf webmail*.tar.gz             Extract compressed file
gtar -czvf source.tar.gz directory     GTAR + compress

Java
jar tvf test.jar                       View contents of JAR file
jar xvf test.jar                         Extract contents of JAR file
  
Network
netstat -nr                            Show routing table
netstat -na | grep 7001 | grep LISTEN  See if exists process on port 7001
traceroute 200.200.200.23              Traces route & hops to target ip
tcpdump                                Dump traffic on a network

RPM Packages
rpm -e --test anonftp-3.0-9            Not real uninstall
rpm -i anonftp-3.0-9.i386.rpm          Install RPM package
rpm -q kernel                          Short kernel version
rpm -qa                                Query the RPM database
rpm -qa | grep perl                    Query the RPM for anything 'perl'
rpm -qai                               Query + information
rpm -qia                               Query all detail
rpm -e anonftp-3.0-9                   Uninstall RPM package

Host
hostname                               Display hostname of server
uptime                                 Uptime of server
uname -a                               Show kernel version
uname -r                               Short kernel version
dmesg                                  Find out information
rpm -q kernel                          Short kernel version
rpm -qi kernel                         Detailed kernel version
nmap localhost                         Check open ports

Shell
alias bdf='df -h'                      Create alias
alias bdf                              Query alias
set -o vi                              Set command thing to vi
env                                    Show environment
export ORACLE_SID=demo                 Set an environment variable (Bash shell)
setenv ORACLE_SID demo                 Set an environment variable (C shell)
echo $CLASSPATH                        Query classpath environment
history                                Show history
umask 027                              Default create permissions of 750
echo $SHELL                            See what shell you are running
export PS1='\u:$PWD> '                 Set prompt

Shutdown
shutdown -h 10                         Shutdown and halt in 10 seconds
shutdown -r 10                         Shutdown and reboot in 10 seconds
poweroff                               Power off
halt                                   Halt

User
id                                     Information on current user
id webuser                             Information on user 'webuser'
groups                                 Groups of current user
groups webuser                         Groups of user 'webuser'
gpasswd                                Administer the /etc/group file
last -20                               Show last 20 logged in users
useradd, usermod, userdel              User admin commands
groupadd, groupmod, groupdel           Group admin commands

Performance
top                                      Realtime
iostat 2                                 CPU and IO stats every 2 seconds
vmstat 5                                 System statistics every 5 seconds

Miscellaneous
ll ; ll                                Run multiple commands using ;
ulimit                                 Set or get limits on system resources
ulimit -Sa                             Check if shell has limits on file size
ulimit -Ha                             Check if shell has limits on file size
chkconfig --list                       Query runlevels



Wednesday, July 6, 2016

Manifest property won't write to MANIFEST.MF during packaging

Problem
I was working along happily when I realized I wanted to make some additions to the MANIFEST.MF. I had something that looked similar to this:

...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
        <archive>
            <manifestEntries>
                <Weblogic-Application-Version>${project.version}</Weblogic-Application-Version>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>
...

Thinking that this should work. I use mvn clean package and I went to verify it's presence in my manifest only to be disappointed.

Solution
Sometimes the solution is right in front of you, and you just don't see it. Very often I am working with JAR files, however this time I was making a WAR file.

...
<packaging>war</packaging>
...

These two files use different archivers during the packaging process, so while the above <plugin> section would have been find with jar, we simply need to change a single letter, and this works just fine.

...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <archive>
            <manifestEntries>
                <Weblogic-Application-Version>${project.version}</Weblogic-Application-Version>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>
...

Happy coding!


Saturday, July 2, 2016

You must first create an Oracle Database Cloud Service with a backup destination before creating a SOA Cloud Service instance

Problem:

When creating an Oracle SOA Cloud Service, you receive the following error:
You must first create an Oracle Database Cloud Service before creating a SOA Cloud Service instance. Oracle Database Cloud Service - Virtual Image instances can not be used.
This error appears even when you have an Oracle Database Cloud Service instance created.


Solution:

1. When creating the Oracle Database Cloud Service instance, you must configure a Backup Destination option (e.g., Cloud and Local Storage or Cloud Storage). This cannot be set to "None".




Applicable Versions:
  • Oracle SOA Cloud Service (2016)
  • Oracle Database Cloud Service (2016)


Friday, July 1, 2016

OSB authentication error message with oracle/wss_username_token_service_policy

You can attach the oracle/wss_username_token_service_policy OWSM policy to an OSB proxy service to enforce authentication.

If authentication fails, the caller will receive the following exception:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>BEA-386200: General web service security error</faultstring>
         <detail>
            <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
               <con:errorCode>BEA-386200</con:errorCode>
               <con:reason>General web service security error</con:reason>
               <con:location>
                  <con:path>request-pipeline</con:path>
               </con:location>
            </con:fault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

The osb_server1-diagnostic.log file show the following entries:
[2016-06-22T11:18:37.668-04:00] [gateway_server1] [ERROR] [WSM-00069] [oracle.wsm.resources.security] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 01d0797cabcbcd11:74991fef:15399c6a040:-8000-000000000004b0d9,0] [APP: XBus Kernel] [WSM_POLICY_NAME: oracle/wss_username_token_service_policy] The security header is missing. Ensure that there is a valid security policy attached at the client side, and the policy is enabled. 
[2016-06-22T11:18:37.669-04:00] [gateway_server1] [ERROR] [WSM-00006] [oracle.wsm.resources.security] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 01d0797cabcbcd11:74991fef:15399c6a040:-8000-000000000004b0d9,0] [APP: XBus Kernel] [WSM_POLICY_NAME: oracle/wss_username_token_service_policy] Error in receiving the request: oracle.wsm.security.SecurityException: WSM-00069 : The security header is missing. Ensure that there is a valid security policy attached at the client side, and the policy is enabled.. 
[2016-06-22T11:18:37.669-04:00] [gateway_server1] [ERROR] [WSM-07607] [oracle.wsm.resources.enforcement] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 01d0797cabcbcd11:74991fef:15399c6a040:-8000-000000000004b0d9,0] [APP: XBus Kernel] [WSM_POLICY_NAME: oracle/wss_username_token_service_policy] Failure in execution of assertion {http://schemas.oracle.com/ws/2006/01/securitypolicy}wss-username-token executor class oracle.wsm.security.policy.scenario.executor.WssUsernameTokenScenarioExecutor. 
[2016-06-22T11:18:37.669-04:00] [gateway_server1] [ERROR] [WSM-07602] [oracle.wsm.resources.enforcement] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 01d0797cabcbcd11:74991fef:15399c6a040:-8000-000000000004b0d9,0] [APP: XBus Kernel] [WSM_POLICY_NAME: oracle/wss_username_token_service_policy] Failure in WS-Policy Execution due to exception. 
[2016-06-22T11:18:37.669-04:00] [gateway_server1] [ERROR] [WSM-07501] [oracle.wsm.resources.enforcement] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 01d0797cabcbcd11:74991fef:15399c6a040:-8000-000000000004b0d9,0] [APP: XBus Kernel] [WSM_POLICY_NAME: oracle/wss_username_token_service_policy] Failure in Oracle WSM Agent processRequest, category=security, function=agent.function.service, application=XBus Kernel, composite=null, modelObj=bpelprocess1_client_ep, policy=oracle/wss_username_token_service_policy, policyVersion=null, assertionName={http://schemas.oracle.com/ws/2006/01/securitypolicy}wss-username-token.


Applicable Versions:
  • Oracle Service Bus (OSB) 11g





Wednesday, June 29, 2016

Unable to request an Authentication Token when calling the Oracle Storage Cloud Service REST API

Problem:

You are attempting to request an authorization token using curl. Curl is used to invoke the REST API of the Oracle Storage Cloud Service to do so.

For example, you invoke it as follows:

root@demo:/root> curl -v -s -X GET -H "X-Storage-User: Storage-myIdentityDomain:ahmed@raastech.com" -H "X-Storage-Pass: Welcome_1" https://ahmeddomain.storage.oraclecloud.com/auth/v1.0

The output shows an error as highlighted:

* About to connect() to ahmedraastech.storage.oraclecloud.com port 443 (#0)
*   Trying 192.152.172.2... connected
* Connected to ahmeddomain.storage.oraclecloud.com (192.152.172.2) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*.storage.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Aug 07 00:00:00 2015 GMT
*       expire date: Oct 05 23:59:59 2016 GMT
*       common name: *.storage.oraclecloud.com
*       issuer: CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ahmeddomain.storage.oraclecloud.com
> Accept: */*
> X-Storage-User: Storage-myIdentityDomain:ahmed@raastech.com
> X-Storage-Pass: Welcome_1
>
< HTTP/1.1 401 Unauthorized
< X-Trans-Id: tx2cdb525f54cc420989925-00576ee463ga
< WWW-Authenticate: Token
< Content-Type: text/plain;charset=UTF-8
< Content-Length: 27
< Date: Sat, 25 Jun 2016 20:06:59 GMT
< Server: Oracle-Storage-Cloud-Service
<
* Connection #0 to host ahmeddomain.storage.oraclecloud.com left intact
* Closing connection #0
Invalid user id or password


Solution:

1. The format of the curl command is:

curl -v -s -X GET -H "X-Storage-User: Storage-<Identity Domain>:<Oracle Account>" -H "X-Storage-Pass: <Oracle Account Password>" https://<Identity Domain>.storage.oraclecloud.com/auth/v1.0

2. Keep in mind the following:
  • Enter your identity domain in two locations in the command above.
  • The username is your Oracle Account username.
  • The password is your Oracle Account password, not your My Services password.

WRONG: 
root@demo:/root> curl -v -s -X GET -H "X-Storage-User: Storage-myIdentityDomain:ahmed@raastech.com" -H "X-Storage-Pass: Welcome_1" https://ahmeddomain.storage.oraclecloud.com/auth/v1.0 
RIGHT: 
root@demo:/root> curl -v -s -X GET -H "X-Storage-User: Storage-ahmeddomain:ahmed@raastech.com" -H "X-Storage-Pass: mypassword" https://ahmeddomain.storage.oraclecloud.com/auth/v1.0


Applicable Versions:
  • Oracle Storage Cloud Service (2016)




Creating an Oracle Storage Cloud Service

Creating an Oracle Storage Cloud Service is necessary if you want to enable cloud backup on your Oracle Database Cloud Service instance.

Creating an Oracle Database Cloud Service instance with cloud backup is required if you decide to create an Oracle SOA Cloud Service instance.

Thus, creating an Oracle Storage Cloud Service is relatively important. Unfortunately, there is no front-end GUI that allows you to do this. This blog post describes how to do it.


Login to Unix Server

1. Log in to a linux server.

2. Ensure that you have curl available on this server, as you will use it to invoke a REST web service.


Request an Authentication Token

3. The format of the curl command is as follows:

curl -v -s -X GET -H "X-Storage-User: Storage-<Identity Domain>:<Oracle Account>" -H "X-Storage-Pass: <Oracle Account Password>" https://<Identity Domain>.storage.oraclecloud.com/auth/v1.0

4. For example:

root@demo:/root> curl -v -s -X GET -H "X-Storage-User: Storage-ahmeddomain:ahmed@raastech.com" -H "X-Storage-Pass: mypassword" https://ahmeddomain.storage.oraclecloud.com/auth/v1.0

5. The output will look like this. Note the values highlighted in yellow. You will use this authentication token in subsequent requests.

* About to connect() to ahmeddomain.storage.oraclecloud.com port 443 (#0)
*   Trying 192.152.172.2... connected
* Connected to ahmeddomain.storage.oraclecloud.com (192.152.172.2) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*.storage.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Aug 07 00:00:00 2015 GMT
*       expire date: Oct 05 23:59:59 2016 GMT
*       common name: *.storage.oraclecloud.com
*       issuer: CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ahmeddomain.storage.oraclecloud.com
> Accept: */*
> X-Storage-User: Storage-ahmeddomain:ahmed@raastech.com
> X-Storage-Pass: mypassword
>
< HTTP/1.1 200 OK
< date: 1466885484548
< X-Auth-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e
< X-Storage-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e
< X-Storage-Url: https://storage.us2.oraclecloud.com/v1/Storage-ahmeddomain
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service
<
* Connection #0 to host ahmeddomain.storage.oraclecloud.com left intact
* Closing connection #0


Create a Cloud Storage Instance

6. The format of the curl command is as follows:

curl -v -s -X PUT -H "X-Auth-Token: <Authorization Token>" https://storage.us2.oraclecloud.com/v1/Storage-<Identity Domain>/<New Container Name>

7. For example:

root@demo:/root> curl -v -s -X PUT -H "X-Auth-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e" https://storage.us2.oraclecloud.com/v1/Storage-ahmeddomain/MyContainer1

8. The output will look like this. Note the values highlighted in yellow to confirm creation.

* About to connect() to storage.us2.oraclecloud.com port 443 (#0)
*   Trying 192.152.172.4... connected
* Connected to storage.us2.oraclecloud.com (192.152.172.4) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*.us2.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Dec 08 00:00:00 2015 GMT
*       expire date: Jan 06 23:59:59 2017 GMT
*       common name: *.us2.oraclecloud.com
*       issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
> PUT /v1/Storage-ahmeddomain/MyContainer1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: storage.us2.oraclecloud.com
> Accept: */*
> X-Auth-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e
>
< HTTP/1.1 201 Created
< X-Trans-Id: tx181d451d2f8048e281b86-00576ee5
< Date: Sat, 25 Jun 2016 20:13:26 GMT
< Connection: keep-alive
< X-Last-Modified-Timestamp: 1466885606.10161
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service
<
* Connection #0 to host storage.us2.oraclecloud.com left intact
* Closing connection #0


Verify Creation of Cloud Storage Instance

9. The format of the curl command is as follows:

curl -v -s -X GET -H "X-Auth-Token: <Authorization Token>" https://storage.us2.oraclecloud.com/v1/Storage-<Identity Domain>/<Container Name>

10. For example:

root@demo:/root> curl -v -s -X GET -H "X-Auth-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e" https://storage.us2.oraclecloud.com/v1/Storage-ahmeddomain/MyContainer1

11. The output will look like this. Note the values highlighted in yellow to verify instance.

* About to connect() to storage.us2.oraclecloud.com port 443 (#0)
*   Trying 192.152.172.3... connected
* Connected to storage.us2.oraclecloud.com (192.152.172.3) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*.us2.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Dec 08 00:00:00 2015 GMT
*       expire date: Jan 06 23:59:59 2017 GMT
*       common name: *.us2.oraclecloud.com
*       issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
> GET /v1/Storage-ahmeddomain/MyContainer1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: storage.us2.oraclecloud.com
> Accept: */*
> X-Auth-Token: AUTH_tk2d476138c79fba6ac4cb559b3b9e2406
>
< HTTP/1.1 204 No Content
< X-Container-Object-Count: 0
< X-Container-Write: ahmeddomain.Storage.Storage_ReadWriteGroup
< Accept-Ranges: bytes
< X-Timestamp: 1466885606.14093
< X-Container-Read: ahmeddomain.Storage.Storage_ReadOnlyGroup,ahmeddomain.Storage.Storage_ReadWriteGroup
< X-Container-Bytes-Used: 0
< X-Trans-Id: tx6519d2b91911413885376-00576ee61aga
< Date: Sat, 25 Jun 2016 20:14:18 GMT
< Connection: keep-alive
< X-Storage-Class: Standard
< X-Container-Meta-Policy-Georeplication: us2-us6
< X-Last-Modified-Timestamp: 1466885606.10161
< Content-Type: text/html;charset=UTF-8
< Server: Oracle-Storage-Cloud-Service
<
* Connection #0 to host storage.us2.oraclecloud.com left intact
* Closing connection #0


Configure Backup and Recovery Options

Keep in mind that the name of an your Oracle Storage Cloud Service container takes the form <Storage Service Name>-<Identity Domain>/<Container Name>

For example...

Cloud Storage Container: Storage-ahmeddomain/MyContainer1
Cloud Storage User Name: ahmed@raastech.com (your Oracle Account username)
Cloud Storage Password: mypassword (your Oracle Account password)



Applicable Versions:
  • Oracle Storage Cloud Service (2016)


References:



Tuesday, June 28, 2016

Cannot access the Oracle Database Cloud Service consoles (e.g., DBaaS Monitor)

Problem:

After creating an Oracle Database Cloud Service instance, you cannot access any of the consoles (e.g., DBaaS Monitor Console, Application Express Console, EM Console).

When you click on the menu option, and choose one of the consoles as follows:

You get an error on your browser such as "This site can't be reached":



Solution:

1. Click on the menu icon and select Access Rules.

2. Since the DBaaS Monitor Console listens on HTTPS 443 (see the URL in the previous screenshot), on the ora_p2_httpssl line, click on the menu icon, and select Enable.


3. Click on the Enable confirmation button to enable this access rule:


You should now be able to access the console:




Applicable Versions:
  • Oracle Database Cloud Service (2016)




Friday, June 24, 2016

Spring Boot on Weblogic

Problem
I was excited to hear that Weblogic 12c supports Servlet 3.0. One of the features I was looking forward to was XML free projects, obviously I need a pom.xml. (Unless I switch to Gradle, but that's a story for another time!) I hadn't taken the time to ever try it, and I decided now was the time. So I started on a simple Spring Boot application. After I had some basic entities and a simple REST controller, I decided it was time to test deploying it. When attempting to deploy the application to Oracle Weblogic Server I ran into an error.

 <1466700792596> <BEA-149265> <Failure occurred in the execution of deployment request with ID "4230055130590606" for task "33". Error is: "weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getEnvironment()Lorg/springframework/core/env/Environment;"
weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getEnvironment()Lorg/springframework/core/env/Environment;
        at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
        at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
        at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

I did some tooling around and did not have much success.

Solution
In addition to preferring the slf4j packages in the application, I also included the springframework packages since the class loaders were loading conflicting version of different spring packages. WebLogic 12.1.3 supports Spring 3.0.x officially. However Spring Boot uses 4.x versions of the various Spring frameworks.

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
                        http://xmlns.oracle.com/weblogic/weblogic-web-app
                        http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
    <wls:weblogic-version>12.1.1</wls:weblogic-version>
    <wls:context-root>application-name</wls:context-root>
    <wls:container-descriptor>
        <wls:prefer-application-packages>
            <wls:package-name>org.slf4j.*</wls:package-name>
            <wls:package-name>org.springframework.*</wls:package-name>
        </wls:prefer-application-packages>
    </wls:container-descriptor>
</wls:weblogic-web-app>


Resources
http://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html#howto-weblogic
http://stackoverflow.com/questions/21788134/spring-starting-throws-an-exception