Wednesday, July 31, 2013

wlsbjmsrpDataSource security policy: role must be ALSBSystem or Admin

A Monitoring WebApplication has to do a JNDI lookup for all Datasources in a WebLogic domain.

For wlsbjmsrpDataSource only I get this error message:
User <anonymous> does not have permission on wlsbjmsrpDataSource to perform lookup operation.
Looking in the JNDI tree of the server, I notice that only wlsbjmsrpDataSource has a security policy associated, to allow access only to ALSBSystem or Admin roles. All other Datasources are allowed to everyone.

I open the ear: /opt/oracle/fmw11_1_1_5/osb/lib/common/jmsreportprovider.ear

and peeping in the ejb-jar.xml I see

ejb-jar/enterprise-beans/message-driven/security-identity/run-as/role-name = ALSBSystem

and also in weblogic-ejb-jar.xml we have:

weblogic-ejb-jar/weblogic-enterprise-bean/run-as-principal-name = alsb-system-user

Sunday, July 28, 2013

Java 8 and Eclipse

I want to start using Java 8, (early access here http://jdk8.java.net/download.html ), mostly because I like using closures (aka lambda expressions) http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html.

First you need a supportive IDE; apparentyl Eclipse (pueah) is not ready yet, but you can try e(fx)clipse:
http://downloads.efxclipse.org/eclipse-java8/2013-06-30/

Netbeans doesn't seem ready yet, it has only experimental support for lambda.

IntelliJ IDEA version 12 seems so far the only "solid" IDE to offer support for Java 8.

Friday, July 26, 2013

BEA-090476 Invalid/unknown SSL header was received from peer during SSL handshake

We get this "BEA-090476 Invalid/unknown SSL header was received from peer during SSL handshake" warning when the monitoring system polls WLS with HTTP.

You must check if your client supports TLS 1.0 and SSL 3.0 - which is the version recognized by WebLogic 10.3.5

Look at Oracle support document Doc ID 1372247.1, or Doc ID 1548475.1 / BUG - 16363439. Weblogic Certicom SSL implementation does not support protocol versions greater than TLS1.0, but it now falls back to TLS1.0 when it receives a later version in the SSL handshake.

You can edit setEnv.sh and add these JAVA_OPTIONS: -Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true -Dweblogic.security.SSL.verbose=true -Djavax.net.debug=all

You can also try to use Sun SSL
-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
-Dssl.SocketFactory.provider=com.sun.net.ssl.internal.SSLSocketFactoryImpl
-DUseSunHttpHandler=true
-Dweblogic.wsee.client.ssl.usejdk=true 

and if you are really desperate, disable "SSLRejection Logging Enabled" is server configuration / General / SSL.



Wednesday, July 24, 2013

Do yourself a BIG favour: quit smoking now.

No excuses. Just stop it. Now.









Tuesday, July 23, 2013

OSB Hello World

I hate WSDL. So here I put a basic WSDL for a Hello World SOAP service for OSB.

I had one here http://www.javamonamour.org/2010/06/helloworld-wsdl.html but I need a WLSD with a xsd:import.

PVHelloWorld.xsd:



<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
 targetNamespace="http://www.example.org/PVHelloWorld/" 
 xmlns:tns="http://www.example.org/PVHelloWorld/" 
 elementFormDefault="qualified">

    <element name="HelloWorldRequest" type="string"></element>

    <element name="HelloWorldResponse" type="string"></element>
    
</schema>





PVHelloWorld.wsdl:


<wsdl:definitions name="PVHelloWorld" targetNamespace="http://www.example.org/PVHelloWorld/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/PVHelloWorld/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
 <xsd:schema>
  <xsd:import namespace="http://www.example.org/PVHelloWorld/" schemaLocation="PVHelloWorld.xsd"/>
 </xsd:schema>
  </wsdl:types>
  
  <wsdl:message name="HelloWorldRequest">
    <wsdl:part element="tns:HelloWorldRequest" name="parameters"/>
  </wsdl:message>
  
  <wsdl:message name="HelloWorldResponse">
    <wsdl:part element="tns:HelloWorldResponse" name="parameters"/>
  </wsdl:message>
  
  <wsdl:portType name="PVHelloWorldPortType">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldRequest"/>
      <wsdl:output message="tns:HelloWorldResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  
  <wsdl:binding name="PVHelloWorldPortBinding" type="tns:PVHelloWorldPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://www.example.org/PVHelloWorld/HelloWorld"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  
  <wsdl:service name="PVHelloWorld">
    <wsdl:port binding="tns:PVHelloWorldPortBinding" name="PVHelloWorldPort">
      <soap:address location="http://www.example.org/"/>
    </wsdl:port>
  </wsdl:service>
  
</wsdl:definitions>






Monday, July 22, 2013

Python, show methods for a class, and type of an object

use "inspect", "type" and __class__

here an example:

from xml.dom import minidom
aproxy='someps.proxy'
xmldoc = minidom.parse(aproxy)
route=xmldoc.getElementsByTagNameNS("http://www.bea.com/wli/sb/stages/publish/config", 'route')[0]

print type(route)
<type 'instance'>

print route.__class__
xml.dom.minidom.Element

import inspect
inspect.getmembers(route, predicate=inspect.ismethod)
 
[('__init__', <method Element.__init__ of Element instance 2>), ('__nonzero__', <method Element.__nonzero__ of Element instance 2>), ('__repr__', <method Element.__repr__ of Element instance 2>), ('_call_user_data_handler', <method Element._call_user_data_handler of Element instance 2>), ('_get_attributes', <method Element._get_attributes of Element instance 2>), ('_get_childNodes', <method Element._get_childNodes of Element instance 2>), ('_get_firstChild', <method Element._get_firstChild of Element instance 2>), ('_get_lastChild', <method Element._get_lastChild of Element instance 2>), ('_get_localName', <method Element._get_localName of Element instance 2>), ('_get_tagName', <method Element._get_tagName of Element instance 2>), ('appendChild', <method Element.appendChild of Element instance 2>), ('cloneNode', <method Element.cloneNode of Element instance 2>), ('getAttribute', <method Element.getAttribute of Element instance 2>), ('getAttributeNS', <method Element.getAttributeNS of Element instance 2>), ('getAttributeNode', <method Element.getAttributeNode of Element instance 2>), ('getAttributeNodeNS', <method Element.getAttributeNodeNS of Element instance 2>), ('getElementsByTagName', <method Element.getElementsByTagName of Element instance 2>), ('getElementsByTagNameNS', <method Element.getElementsByTagNameNS of Element instance 2>), ('getInterface', <method Element.getInterface of Element instance 2>), ('getUserData', <method Element.getUserData of Element instance 2>), ('hasAttribute', <method Element.hasAttribute of Element instance 2>), ('hasAttributeNS', <method Element.hasAttributeNS of Element instance 2>), ('hasAttributes', <method Element.hasAttributes of Element instance 2>), ('hasChildNodes', <method Element.hasChildNodes of Element instance 2>), ('insertBefore', <method Element.insertBefore of Element instance 2>), ('isSameNode', <method Element.isSameNode of Element instance 2>), ('isSupported', <method Element.isSupported of Element instance 2>), ('normalize', <method Element.normalize of Element instance 2>), ('removeAttribute', <method Element.removeAttribute of Element instance 2>), ('removeAttributeNS', <method Element.removeAttributeNS of Element instance 2>), ('removeAttributeNode', <method Element.removeAttributeNode of Element instance 2>), ('removeAttributeNodeNS', <method Element.removeAttributeNode of Element instance 2>), ('removeChild', <method Element.removeChild of Element instance 2>), ('replaceChild', <method Element.replaceChild of Element instance 2>), ('setAttribute', <method Element.setAttribute of Element instance 2>), ('setAttributeNS', <method Element.setAttributeNS of Element instance 2>), ('setAttributeNode', <method Element.setAttributeNode of Element instance 2>), ('setAttributeNodeNS', <method Element.setAttributeNode of Element instance 2>), ('setIdAttribute', <method Element.setIdAttribute of Element instance 2>), ('setIdAttributeNS', <method Element.setIdAttributeNS of Element instance 2>), ('setIdAttributeNode', <method Element.setIdAttributeNode of Element instance 2>), ('setUserData', <method Element.setUserData of Element instance 2>), ('toprettyxml', <method Element.toprettyxml of Element instance 2>), ('toxml', <method Element.toxml of Element instance 2>), ('unlink', <method Element.unlink of Element instance 2>), ('writexml', <method Element.writexml of Element instance 2>)]

Saturday, July 20, 2013

Scum Master

If you feel bored and that life has nothing more to offer you, google "scum master" (with quotes) and you will get back a taste of life and laughter.

Let me google it for you: http://bit.ly/14pum3j

The one "Hello, I would like to become a certified Scum Master." is a masterpiece.


Friday, July 19, 2013

OSB dependencies rendered as graphs

Excellent "graphviz getting started" guide: http://dborody.wordpress.com/2013/02/23/graph-visualization-with-graphviz-examples-tutorial/

Official graphviz site: http://www.graphviz.org/

Details on Service Discovery in OSB

Here a sample graph, showing some PS, BS and JMS queues (unfortunately native shapes don't match normal EAI symbols, one should use HTML shapes)
digraph {
  rankdir = LR; 
  ps01 [label = "ps1", fillcolor = red, style = filled, shape = box];
  bs01 [label = "bs1", shape = rarrow];
  ps02 [label = "ps02", fillcolor = red, style = filled, shape = box];
  bs02 [label = "bs02", shape = rarrow];
  q01 [label = "q01", shape = doublecircle];
  rq01 [label = "rq01", shape = doublecircle];
  ps01 -> bs01 [label = "invokes"];
  ps02 -> bs02 [label = "invokes"];
  bs01 -> q01 [label = "posts"];
  bs02 -> q01 [label = "posts"];
  q01 -> rq01 [label = "onerror"];
  ps03 [label = "ps03", fillcolor = red, style = filled, shape = box];
  q01 -> ps03 [label = "consume"];
}



It's really easy to generate the graph from code

Lint and CheckStyle for OSB

Export your sbconfig.jar and unjar it
find . -name *.ProxyService > allproxies.txt
wlst osblint.py > osblintresult.txt

from xml.dom import minidom

f = open('allproxies.txt')
allproxies = [line.strip() for line in f ]
f.close()

for aproxy in allproxies:
    print "processing", aproxy
    xmldoc = minidom.parse(aproxy)
    logs = xmldoc.getElementsByTagNameNS("http://www.bea.com/wli/sb/stages/logging/config", 'log')    
    for log in logs:
        logLevel = log.getElementsByTagNameNS("http://www.bea.com/wli/sb/stages/logging/config", 'logLevel')[0]
        xqueryTexts = log.getElementsByTagNameNS("http://www.bea.com/wli/sb/stages/config", 'xqueryText')
        if len(xqueryTexts) > 0: 
            xqueryText = xqueryTexts[0]
            logLevelString = logLevel.childNodes[0].nodeValue
            variableString = xqueryText.childNodes[0].nodeValue
            print aproxy, "logLevel", logLevelString, "variable", variableString
            if "fault" in variableString and logLevelString == "debug":
                print "OSBLINTERROR fault with debug level"
        else:
            print "OSBLINTERROR missing xqueryText"




The check above tests that all fault variables are logged with level different from debug.


OSB service discovery code (poor man's Amberpoint)

This will generate SQL code to display dependencies. You need to create 3 tables: ACME2_OSBPROJECTS, ACME2_SERVICES, ACME2_SERVICE_DEPENDENCIES

  CREATE TABLE "ACME2_OSBPROJECTS" 
   ( "OSBPROJECTNAME" VARCHAR2(50 BYTE), 
 "MESSAGESPERDAYMAX" NUMBER(10,0), 
 "PROJECTNAME" VARCHAR2(50 BYTE), 
 "DEPLOYMENT_ORDER" NUMBER DEFAULT 1, 
 "MESSAGESPERDAYMIN" NUMBER(10,0)
   ) ;

   

  CREATE TABLE "ACME2_PROJECTS" 
   ( "PROJECTNAME" VARCHAR2(20 BYTE), 
 "DOMAINNUMBER" VARCHAR2(20 BYTE), 
 "TYPE" VARCHAR2(20 BYTE), 
 "BUSINESSAREA" VARCHAR2(20 BYTE), 
 "REMARKS" VARCHAR2(100 BYTE), 
 "STATUS" VARCHAR2(20 BYTE) DEFAULT 'ACTIVE'
   ) ;


  CREATE TABLE "ACME2_SERVICE_DEPENDENCIES" 
   ( "SERVICE" VARCHAR2(200 BYTE), 
 "DEPENDENTSERVICE" VARCHAR2(200 BYTE)
   ) ;


  CREATE UNIQUE INDEX "ACME2_OSBPROJECTS_PK" ON "ACME2_OSBPROJECTS" ("OSBPROJECTNAME")   ;

  CREATE UNIQUE INDEX "ACME2_PROJECTS_PK" ON "ACME2_PROJECTS" ("PROJECTNAME")   ;

  CREATE UNIQUE INDEX "ACME2_SERVICE_DEPENDENCI_UK1" ON "ACME2_SERVICE_DEPENDENCIES" ("SERVICE", "DEPENDENTSERVICE")   ;

  ALTER TABLE "ACME2_OSBPROJECTS" MODIFY ("DEPLOYMENT_ORDER" NOT NULL ENABLE);
  ALTER TABLE "ACME2_OSBPROJECTS" ADD CONSTRAINT "ACME2_OSBPROJECTS_PK" PRIMARY KEY ("OSBPROJECTNAME") ENABLE;
  ALTER TABLE "ACME2_OSBPROJECTS" MODIFY ("OSBPROJECTNAME" NOT NULL ENABLE);

  ALTER TABLE "ACME2_PROJECTS" ADD CONSTRAINT "ACME2_PROJECTS_CHK3" CHECK (DOMAINNUMBER IN ('1', '2', '3', '4', 'ALL', 'NONE')) ENABLE;
  ALTER TABLE "ACME2_PROJECTS" ADD CONSTRAINT "ACME2_PROJECTS_CHK4" CHECK (STATUS IN ('ACTIVE', 'DEAD', 'FUTURE')) ENABLE;
  ALTER TABLE "ACME2_PROJECTS" MODIFY ("STATUS" NOT NULL ENABLE);
  ALTER TABLE "ACME2_PROJECTS" MODIFY ("DOMAINNUMBER" NOT NULL ENABLE);
  ALTER TABLE "ACME2_PROJECTS" ADD CONSTRAINT "ACME2_PROJECTS_CHK2" CHECK (BUSINESSAREA IN ('Frontend', 'Backend')) ENABLE;
  ALTER TABLE "ACME2_PROJECTS" ADD CONSTRAINT "ACME2_PROJECTS_CHK1" CHECK (TYPE IN ('NonCritical', 'Critical')) ENABLE;
  ALTER TABLE "ACME2_PROJECTS" ADD CONSTRAINT "ACME2_PROJECTS_PK" PRIMARY KEY ("PROJECTNAME") ENABLE;
  ALTER TABLE "ACME2_PROJECTS" MODIFY ("PROJECTNAME" NOT NULL ENABLE);

  ALTER TABLE "ACME2_SERVICE_DEPENDENCIES" ADD CONSTRAINT "ACME2_SERVICE_DEPENDENCI_UK1" UNIQUE ("SERVICE", "DEPENDENTSERVICE") ENABLE;
  ALTER TABLE "ACME2_SERVICE_DEPENDENCIES" MODIFY ("DEPENDENTSERVICE" NOT NULL ENABLE);
  ALTER TABLE "ACME2_SERVICE_DEPENDENCIES" MODIFY ("SERVICE" NOT NULL ENABLE);

  ALTER TABLE "ACME2_OSBPROJECTS" ADD CONSTRAINT "ACME2_OSBPROJECTS_ACME2_FK1" FOREIGN KEY ("PROJECTNAME")
   REFERENCES "ACME2_PROJECTS" ("PROJECTNAME") ENABLE;




this is the code:


#There is a change to do to be able to run this WLST script:
#vi /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
#change this:
#export CLASSPATH
#into this:
#CLASSPATH=/opt/oracle/fmw11_1_1_5/osb/lib/sb-kernel-api.jar:/opt/oracle/fmw11_1_1_5/osb/modules/com.bea.common.configfwk_1.5.0.0.jar:$CLASSPATH
#export CLASSPATH


import javax.management
import java.util
import javax.management.remote
import javax.naming
import weblogic.management.mbeanservers.domainruntime
import com.bea.wli.sb.management.configuration

from java.util import Hashtable
from java.util import HashSet
from javax.management.remote import JMXServiceURL
from weblogic.management.mbeanservers.domainruntime import DomainRuntimeServiceMBean
from javax.naming import Context
from javax.management.remote import JMXConnectorFactory
from javax.management import ObjectName
from com.bea.wli.sb.management.configuration import SessionManagementMBean
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
from com.bea.wli.config import Ref

from com.bea.wli.config.env import EnvValueQuery
from com.bea.wli.config.env import QualifiedEnvValue
from com.bea.wli.config.resource import DependencyQuery
from com.bea.wli.sb.management.query import ProxyServiceQuery
from com.bea.wli.sb.management.query import BusinessServiceQuery

from com.bea.wli.sb.util import EnvValueTypes
from java.util import Collection
from java.util import Collections



def displayAllProjectsAndServices():
    sb = ""
    refs = configMBean.getRefs(Ref.DOMAIN)
    refsList = ArrayList()
    refsList.addAll(refs)
    
    for ref in refs:
        if (ref.isProjectRef()) :
            sb = sb + ("insert into ACME2_OSBPROJECTS (OSBPROJECTNAME) values ('" + ref.getFullName() + "');\n")
        
    sb = sb + "\n\n\n"
    
    for ref in refsList :
        if ref.getTypeId() == "ProxyService" or ref.getTypeId() == "BusinessService" :
            if ref.getTypeId() == "ProxyService" :
                isPS = "1"
            else:
                isPS =  "0"
            sb = sb + ("INSERT INTO ACME2_SERVICES (SERVICENAME, SERVICEFULLPATH, OSBPROJECTNAME, ISPS) values ('" + ref.getLocalName() + "', '" + ref.getFullName() + "', '" + ref.getProjectName() + "', '" + isPS + "');\n")
            sb = sb + ("UPDATE ACME2_SERVICES set SERVICENAME = '" + ref.getLocalName() + "', OSBPROJECTNAME='" + ref.getProjectName() + "', ISPS = '" + isPS + "' where SERVICEFULLPATH = '" + ref.getFullName() + "';\n")
    
    
    sb = sb + "\n\n\n"
    return sb


def getAllServiceURIs():
    sb = ""
    evquery = EnvValueQuery(None, Collections.singleton(EnvValueTypes.SERVICE_URI), None, False, None, False)
    founds = configMBean.findEnvValues(evquery)
    for value in founds: 
        sb = sb + ("UPDATE ACME2_SERVICES set SERVICE_URI = '" + value.getValue() + "' where SERVICEFULLPATH ='" + value.getOwner().getFullName() + "';\n")
    return sb
    
    
def getAllProxyServices():    
    sb = ""
    query = ProxyServiceQuery()
    refs = configMBean.getRefs(query)
    for ref in refs:
        uriObject = configMBean.getEnvValue(ref, EnvValueTypes.SERVICE_URI, None)
        if uriObject == None:
            uri = "NULL"
        else:
            uri = uriObject
        sb = sb + ("UPDATE ACME2_SERVICES set SERVICE_URI ='" + uri + "', TYPE = '" + lookupType(uri) + "', ISPS = 1 where SERVICEFULLPATH = '" + ref.getFullName() + "';\n")
    
    return sb

def getAllBusinessServices():    
    sb = ""
    query = BusinessServiceQuery()
    refs = configMBean.getRefs(query)
    for ref in refs:
        uri = getBusinessServiceURI(ref)
        sb = sb + ("UPDATE ACME2_SERVICES set SERVICE_URI ='" + uri + "', TYPE = '" + lookupType(uri) + "', ISPS = 0 where SERVICEFULLPATH = '" + ref.getFullName() + "';\n")
    return sb
    



def getDependentServices():
    sb = ""
    psQuery = ProxyServiceQuery()
    myPSSet = configMBean.getRefs(psQuery)
    for myPS in myPSSet:
        depQuery = DependencyQuery(Collections.singleton(myPS), False)
        refs = configMBean.getRefs(depQuery)
        for ref in refs:
            if (ref.getTypeId() == "BusinessService" or ref.getTypeId() == "ProxyService"):
                sb = sb + ("INSERT INTO ACME2_SERVICE_DEPENDENCIES (SERVICE, DEPENDENTSERVICE) values ('" + myPS.getFullName() + "', '" + ref.getFullName() + "');\n")
    return sb
    

def getBusinessServiceURI(ref):
    envValueTypesToSearch = HashSet()
    envValueTypesToSearch.add(EnvValueTypes.SERVICE_URI);
    evquery = EnvValueQuery(None, envValueTypesToSearch, Collections.singleton(ref), False, None, False )
    founds = configMBean.findEnvValues(evquery);
    uri = ""
    for qev in founds:
        if (qev.getEnvValueType() == EnvValueTypes.SERVICE_URI):
            uri = qev.getValue()
    return uri;
    


def lookupType(uri):
    result = "NONE"
    if (uri == None) :
        result = "LOCAL"
    elif uri.startswith("/") :
        result = "HTTP"
    elif (uri.startswith("jca://eis/DB/")):
        result = "DBADAPTER"
    elif (uri.startswith("flow:")):
        result = "SPLITJOIN"
    elif (uri.startswith("http://")):
        result = "HTTPBS"
    elif (uri.startswith("jca://eis/FileAdapter")):
        result = "HAFILEADAPTER"
    elif (uri.startswith("jca://eis/Ftp/")):
        result = "FTPADAPTER"
    elif (uri.startswith("jms:")):
        result = "JMS"
    return result;



sessionName = "MySession"
hostname='ACME.reacm.com'
port=7001
username='Pierluigi'
password='weblogic1'
serviceURL=JMXServiceURL("t3", hostname, port, "/jndi/" + DomainRuntimeServiceMBean.MBEANSERVER_JNDI_NAME)
h=Hashtable()
h.put(Context.SECURITY_PRINCIPAL, username)
h.put(Context.SECURITY_CREDENTIALS, password)
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote")

conn = JMXConnectorFactory.connect(serviceURL, h)

mbconn = conn.getMBeanServerConnection()

sm = JMX.newMBeanProxy(mbconn, ObjectName.getInstance(SessionManagementMBean.OBJECT_NAME), SessionManagementMBean)

sm.createSession(sessionName)

configMBean = JMX.newMBeanProxy(mbconn, ObjectName.getInstance("com.bea:Name=" + ALSBConfigurationMBean.NAME + "." + sessionName + ",Type=" + ALSBConfigurationMBean.TYPE), ALSBConfigurationMBean)

print displayAllProjectsAndServices()
print getAllProxyServices()
print getAllBusinessServices()
print getAllServiceURIs()
print getDependentServices()


sm.discardSession(sessionName)
conn.close()




Thursday, July 18, 2013

Oracle DB, purge large tables

I have a huge table WLI_NESOA2_REPORTING_ARCHIVE and I need to purge 10000 rows at a time for all records older than 2013-05-10. It's easy if you use a ROWID table and empty it progressively.


--evaluate number of rows to delete
select count(*) from WLI_NESOA2_REPORTING_ARCHIVE;
select count(*) from WLI_NESOA2_REPORTING_ARCHIVE where EventOccuredOn < '2013-05-10';

--prepare empty table containing those rowids
drop table tobedeleted;

--populate table
create table tobedeleted  as SELECT rowid as MYROWID from WLI_NESOA2_REPORTING_ARCHIVE where EventOccuredOn < '2013-05-10';

--evaluate if numbers match
select count(*) from tobedeleted;


DECLARE
  nCount  NUMBER; 
BEGIN
  nCount := 0;
  LOOP
    --create subset of 10000 to delete
    execute immediate 'create table TOBEDELETEDNOW as select MYROWID from tobedeleted where rownum <= 10000';
    --delete first 10000
    execute immediate 'delete from WLI_NESOA2_REPORTING_ARCHIVE where rowid in (select MYROWID from TOBEDELETEDNOW )';
    commit;
    --remove the already purged records from list
    execute immediate 'delete from tobedeleted where MYROWID in (select MYROWID from TOBEDELETEDNOW)';
    nCount := sql%rowcount;
    execute immediate 'drop table TOBEDELETEDNOW';
    commit;

    
    DBMS_OUTPUT.PUT_LINE('deleted records: ' || to_char(ncount) );
    commit;    

    EXIT WHEN nCount = 0;

  END LOOP;
end;
/



Tuesday, July 16, 2013

How to retrieve a BLOB and write it to a file in WLST

We often need to recover errored payloads from the OSB reporting archiving tables. in WLST/Python it's VERY easy (much easier than in Java)



from com.ziclix.python.sql import zxJDBC

def connectToProd(zxJDBC):
    jdbc_url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mydb.acme.com)(PORT=1522))(CONNECT_DATA=(SERVICE_NAME=myservice)))"
    username = "USER_SOAINFRA"
    password = "PASSWORD"
    driver = "oracle.jdbc.OracleDriver"
    conn = zxJDBC.connect(jdbc_url, username, password, driver)
    return conn


conn = connectToProd(zxJDBC)
cursor = conn.cursor(1)
cursor.execute("select DATA_VALUE, BUSINESSUNIQUEID, TECHNICALMESSAGEID from WLI_NESOA2_REPORTING_ARCHIVE where InterfaceID='BLA' and IsError != 'OK' and EventOccuredOn >= '2012-07-16T00:00:54' and EventOccuredOn <= '2013-07-16T09:30:54' order by businessuniqueid")
print "executed select  "
columnNames = []
for item in cursor.description:
        columnNames.append(item[0])


for dsrow in cursor.fetchall():
        dv = dsrow[columnNames.index('DATA_VALUE')]
        tid = dsrow[columnNames.index('TECHNICALMESSAGEID')]
        bid = dsrow[columnNames.index('BUSINESSUNIQUEID')]
        myfile = open("thefiles/" + bid + "_" + tid, "w")
        dv.tofile(myfile)
        myfile.close()







weblogic servlet redirect HTTP 302

If you deploy a WebApp, in a WebLogic cluster with a FrontEnd HTTP Host set (a loadbalancer typically), the Servlet will generate a redirect if the URL doesn't end with a /:

 wget "http://acme2-osbpr1ms2.acme.com:8001/gridlinkha"                                                            --2013-07-16 13:46:54--  http://acme2-osbpr1ms2.acme.com:8001/gridlinkha
Resolving acme2-osbpr1ms2.acme.com... 10.11.5.181
Connecting to acme2-osbpr1ms2.acme.com|10.11.5.181|:8001... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://acmev2.acme.com/gridlinkha/ [following]
--2013-07-16 13:46:54--  http://acmev2.acme.com/gridlinkha/
Resolving acmev2.acme.com... 10.11.5.35
Connecting to acmev2.acme.com|10.11.5.35|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1308 (1.3K) [text/html]
Saving to: `index.html.2'

100%[=====================================================================================================>] 1,308       --.-K/s   in 0s

2013-07-16 13:46:54 (96.0 MB/s) - `index.html.2' saved [1308/1308]



but if you append a /, the HTTP 302 is not generated.

wget "http://acme2-osbpr1ms2.acme.com:8001/gridlinkha/"


--2013-07-16 13:50:26--  http://acme2-osbpr1ms2.acme.com:8001/gridlinkha/
Resolving acme2-osbpr1ms2.acme.com... 10.11.5.181
Connecting to acme2-osbpr1ms2.acme.com|10.11.5.181|:8001... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1308 (1.3K) [text/html]
Saving to: `index.html.3'

100%[=====================================================================================================>] 1,308       --.-K/s   in 0s

2013-07-16 13:50:26 (113 MB/s) - `index.html.3' saved [1308/1308]



It took me forever, and this post, to figure it out.

Oracle support says that by using virtualhost you can avoid redirect.

currentTimeMillis reverse lookup, AKA "from currentTimeMillis to date" in WLST

If you have a timestamp expressed as

System.currentTimeMillis()

=1373941644513  

you can transform it into a readable date this way:

from java.text import SimpleDateFormat 
from java.util import Date

sdf = SimpleDateFormat("MMM dd,yyyy HH:mm")
mydate = Date(1373941644513)
print sdf.format(mydate)

Jul 16,2013 04:27




Sunday, July 14, 2013

com.bea.wli.monitoring.statistics.ALSBStatisticsManager.getRemoteAggregator failed hostname verification

In the server logs I was getting:
####<Jul 14, 2013 8:59:00 AM CEST> <Error> <ALSB Statistics Manager> <hqchacme104> <osbts1ms2> <[ACTIVE] ExecuteThread: '31' for queue:
'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <9455361429c2e897:13c82adc:13fdbf6c9a3:-8000-0000000000000055> <1373785140070>
<BEA-473003> <Aggregation Server Not Available. Failed to get remote aggregator
javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3s://acme2-osbts1ms1.acme.com:8002: Destination
unreachable; nested exception is:
        javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from acme2-osbts1ms1.acme.com - 10.44.5.114 fail
ed hostname verification check. Certificate contained acmev2.test.acme.com but check expected acme2-osbts1ms1.acme.com; No av
ailable router to destination]
        at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
        at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
        at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
        at weblogic.jndi.Environment.getContext(Environment.java:315)
        at weblogic.jndi.Environment.getContext(Environment.java:285)
        at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at com.bea.alsb.platform.weblogic.topology.WlsRemoteServerImpl.getInitialContext(WlsRemoteServerImpl.java:101)
        at com.bea.alsb.platform.weblogic.topology.WlsRemoteServerImpl.lookupJNDI(WlsRemoteServerImpl.java:54)
        at com.bea.wli.monitoring.statistics.ALSBStatisticsManager.getRemoteAggregator(ALSBStatisticsManager.java:291)
        at com.bea.wli.monitoring.statistics.ALSBStatisticsManager.access$000(ALSBStatisticsManager.java:38)
        at com.bea.wli.monitoring.statistics.ALSBStatisticsManager$RemoteAggregatorProxy.send(ALSBStatisticsManager.java:55)
        at com.bea.wli.monitoring.statistics.collection.Collector.sendRawSnaphotToAggregator(Collector.java:284)
        at com.bea.wli.monitoring.statistics.collection.Collector.doCheckpoint(Collector.java:243)
        at com.bea.wli.monitoring.statistics.collection.Collector$CheckpointThread.doWork(Collector.java:68)
        at com.bea.wli.monitoring.utils.Schedulable.timerExpired(Schedulable.java:68)
        at com.bea.wli.timer.ClusterTimerImpl$InternalTimerListener.timerExpired(ClusterTimerImpl.java:254)
        at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.net.ConnectException: t3s://acme2-osbts1ms1.acme.com:8002: Destination unreachable; nested exception is:
        javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from acme2-osbts1ms1.acme.com - 10.44.5.114 failed hostname verification check. Certificate contained acmev2.test.acme.com but check expected acme2-osbts1ms1.acme.com; No available router to destination




It turns out that weblogic.security.SSL.ignoreHostnameVerification was false, so I edited:
$DOMAIN_HOME/servers/osbts1as/data/nodemanager/startup.properties
$DOMAIN_HOME/servers/osbts1ms1/data/nodemanager/startup.properties
$DOMAIN_HOME/servers/osbts1ms2/data/nodemanager/startup.properties

setting

SSLArguments=-Dweblogic.security.SSL.ignoreHostnameVerification\=true -Dweblogic.ReverseDNSAllowed\=false



Thursday, July 11, 2013

Migrating Admin for a OSB cluster

if you plan to start the admin server on the second node, all DOMAIN_HOME/osb/config/* have to be copied from node1 o node2:

make sure no osb session is currently open:
 this should be empty:
ls /opt/oracle/domains/osbpr4do/osb/config/sessions

align the DOMAIN_HOME/osb/config/core on node2 with the content of node1:

on node1:
cd /opt/oracle/domains/osbpr4do/osb/config/core
jar cvf /tmp/coreconfig.jar *


on node2:
copy the coreconfig.jar to /tmp
cd /opt/oracle/domains/osbpr4do/osb/config/core
rm -rf *
cp /tmp/coreconfig.jar .
jar xvf coreconfig.jar




copy of ldap files and deployments:

on node 1:
cd /opt/oracle/domains/osbpr4do/servers/
jar cvf /tmp/osbpr4as.jar osbpr4as*


copy the jar /tmp/osbpr4as.jar on node1 to /tmp/osbpr4as.jar on node2
cd /opt/oracle/domains/osbpr4do/servers/
jar xvf /tmp/osbpr4as.jar




Now you can start the Admin on node2
The alternative is to move all DOMAIN_HOME/osb folder to a shared location, and create a symbolic link
ls -s $DOMAIN_HOME/osb $DOMAIN_HOME/shared/osb
unfortunately there doesn't seem to be a way to configure this folder, so the only workaround is the symlink.
See also http://www.javamonamour.org/2013/07/starting-weblogic-admin-on-backup-node.html

Wednesday, July 10, 2013

Starting a WebLogic admin on a backup node in a OSB cluster

I have stopped the admin on machine1, made sure the virtualIP is removed from the NIC, and started on the second node.

I get immediately this error in the logs when logging to the sbconsole:

com.bea.alsb.console.common.base.SBConsoleAccessException: The current login role is not authorized to use the console action: "/SBConsoleEntry"

Googling around, it seems that the issue could be the wrong DefaultAuthorizerInit.ldift and XACMLAuthorizerInit.ldift files, in DOMAIN_HOME/security/

On node1, in DOMAIN_HOME/security/ I have:
DefaultAuthenticatorInit.ldift DefaultRoleMapperInit.ldift XACMLAuthorizerInit.ldift DefaultAuthorizerInit.ldift SerializedSystemIni.dat XACMLRoleMapperInit.ldift

On node2 I have :
DefaultAuthenticatorInit.ldift DefaultRoleMapperInit.ldift SerializedSystemIni.dat XACMLRoleMapperInit.ldift

so effectively the 2 files DefaultAuthorizerInit.ldift and XACMLAuthorizerInit.ldift are missing.

The other files are also different. Should I replace them?

Then I discover that:

Service Bus 10g: Problem with Pack / Unpack of Domain [ID 981068.1]
OSB domain created with pack/unpack command doesn't work correctly.
This is a known issue. The jar file generated by the "pack" command has to be manually changed. Please follow the instructions below:
After creating the template, and before you create any new domains from this template, you must do the following: 

1) Add the missing files, DefaultAuthorizerInit.ldift and XACMLAuthorizerInit.ldift, from the DOMAIN-ROOT/security folder of your original domain to the security folder inside the template JAR (jar file generated by the pack command).

2) Manually update the top-level security.xml file in the template JAR with the contents of the DOMAIN-ROOT/init-info/security.xml file of your original domain.


So, the message is: don't use pack/unpack for OSB.


Monday, July 8, 2013

Puppet: usermod: user is currently logged in

If you are provisioning a node, and this entails changing something os a user (in my case, the home directory), usermod could fail with the message

"usermod: user BLA is currently logged in"

Run "who" or "w" to determine if this is the case.

If not, run "ps -ef -grep BLA" or better "ps U BLA" to determine if the user is running processes. If yes, kill them all.



Downloading files from a WebLogic WebApp

If you want to download from your WebLogic webapp any file located anywhere in your filesystem, use the virtual-directory-mapping clause in the weblogic.xml of your webapp:


<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/we
blogic810-web-jar.dtd">

<weblogic-web-app>

<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
</container-descriptor>

<virtual-directory-mapping>
<local-path>/opt/oracle/apps/downloads/</local-path>
<url-pattern>/files/*</url-pattern>
</virtual-directory-mapping>

</weblogic-web-app>




In this case, the folder /opt/oracle/apps/downloads/files should exist, and you can download a file in it by specifying http://myserver.acme.com:7001/mywebapp/files/myfile.txt

Sunday, July 7, 2013

WebLogic, changing the listen address or port

if your port is 7001, since it's the default it might not be mentioned in the config.xml. config.xml only reports stuff which differs from the default, for sake of simplicity.
apart from the config.xml, you should look into a number of other places under your domain-home:

bin/stopWebLogic.sh
bin/stopManagedWebLogic.sh
bin/startManagedWebLogic.sh
config/fmwconfig/servers/osbts1as/applications/em/META-INF/emoms.properties
config/config.xml
init-info/startscript.xml
init-info/tokenValue.properties

servers/osbts1as/data/nodemanager/osbts1as.url
servers/osbts1as/data/ldap/conf/replicas.prop
servers/osbts1ms1/data/nodemanager/osbts1ms1.url
servers/osbts1ms1/data/nodemanager/startup.properties

servers/osbts1ms2/data/nodemanager/osbts1ms2.url
servers/osbts1ms2/data/nodemanager/startup.properties
startManagedWebLogic_readme.txt
sysman/state/targets.xml
 
with osbts1as being the admin, osbts1do the domain name, osbts1ms1 and 2 the MS.

And don't forget to update any internal URIs of your deployed code.
Especially changing the listen address/port of the admin can be troublesome. If you change only the managed server, it's a lot easier.
The best option is just rebuilding the domain.
Here http://www.javamonamour.org/2013/04/weblogic-change-admin-port-number.html another post on the same topic.
(see also http://stackoverflow.com/questions/8082222/how-to-change-listen-port-from-default-7001-to-something-different/17511271#17511271 )


Saturday, July 6, 2013

Wikilosers, get a life

From Urban Dictionary: "Wiki-loser: a loser with too much time on their hands spending that time at the wikipedia editing pages and making changes to fit their own personal philosophy"

Once more I have posted on the Italian Wikipedia some original historical content - written by my father and published on another site. Of course my father gave me the authorization.

The content was immediately removed without further ado, and I got a scorching reprimand from one of the Wikipedantic Big Brothers watchdogs.

I promise I will never touch again the Wikipedia. There is so much censorship and negativity, with all these beta males lonely geeks marauding the site in search of a victim to club to a bleeding pulp. So sad. You don't find that kind of negative greyholes on sites like stackoverflow.com or Oracle Forums, which are much more fostering and helping communities.



First came the Genius creator, the inspired revolutionary
Then came the Apostles
Then hordes of followers in search of a new way of life, of a Brave New World
Then the priests, the cardinals, the Popes
Then the hatred to the homosexual, the jew, the communist, the women
Then the Inquisition, the collaboration with Fascism and Dictatorship, the control from Secret Services

Wikipedia is like the Catholic Church.

(a few days later: Wikipedia Italy has effectively permanently blocked my account. I am very proud for having been banned from a Stalinist Party. Italy is a failed country and you can see it also from the lack of freedom and mutual respect in it)

Friday, July 5, 2013

Configuration error while reading domain directory



Error occured while performing nmConnect : Cannot connect to Node Manager. : Configuration error while reading domain directory

Solution: locate all nm_password.properties in your domains, and enter

username=bla
password=bla

where bla/bla correspond to your nodemanager username - typically weblogic_n - not to WLS username

Also, make sure your nodemanager.domains file contain the entry

domainname=domainpath


see also http://www.javamonamour.org/2011/08/nmconnect-weblogicnodemanagernmexceptio.html



WebLogic, umask and log files permissions

Our soa user has umask 0022 , which mean every new file will be created with rw.r..r.. attributes.
However, weblogic log files are rw.r...., which means that our monitoring system, running with a user not belonging to soa group, will not be able to read them.

In DOMAIN_HOME/bin/startWebLogic.sh there is a umask 037 statement, which changes the rule of the game for the WebLogic process.

See related discussion here.

The other solution is to make the monitoring user as member of the soa group.



Thursday, July 4, 2013

com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte

When enrolling a domain, I get com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte (see Oracle Doc "ID 1505142.1").

This the stacktrace:
weblogic.security.internal.encryption.EncryptionServiceException: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:136)
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:169)
        at weblogic.security.internal.encryption.ClearOrEncryptedService.decryptBytes(ClearOrEncryptedService.java:126)
        at weblogic.management.scripting.NodeManagerService.decrypt(NodeManagerService.java:285)
        at weblogic.management.scripting.NodeManagerService.nmEnrollMachine(NodeManagerService.java:311)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.python.core.PyReflectedFunction.__call__(Unknown Source)
        at org.python.core.PyMethod.__call__(Unknown Source)
        at org.python.core.PyObject.__call__(Unknown Source)
        at org.python.core.PyInstance.invoke(Unknown Source)
        at org.python.pycode._pyx76.nmEnroll$89(:1443)


In fact, even when I start the admin I get a similar exception:

 com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
        at com.rsa.jsafe.c.a(Unknown Source)
        at com.rsa.jsafe.JSAFE_SymmetricCipher.decryptFinal(Unknown Source)
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:124)
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:184)
        at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy._invokeServiceMethod(DescriptorManager.java:173)
        at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy.decrypt(DescriptorManager.java:192)
        at weblogic.descriptor.DescriptorManager$SecurityServiceImpl.decrypt(DescriptorManager.java:114)
        at weblogic.descriptor.internal.AbstractDescriptorBean._decrypt(AbstractDescriptorBean.java:1092)
        at weblogic.management.configuration.SecurityConfigurationMBeanImpl.getCredential(SecurityConfigurationMBeanImpl.java:736)
        at weblogic.security.internal.ServerPrincipalValidatorImpl.getSecret(ServerPrincipalValidatorImpl.java:88)
        at weblogic.security.internal.ServerPrincipalValidatorImpl.sign(ServerPrincipalValidatorImpl.java:67)
        at weblogic.security.service.PrivilegedActions$SignPrincipalAction.run(PrivilegedActions.java:62)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.security.service.SecurityServiceManager.createServerID(SecurityServiceManager.java:1096)
        at weblogic.security.service.SecurityServiceManager.getServerID(SecurityServiceManager.java:1109)
        at weblogic.security.service.SecurityServiceManager.sendASToWire(SecurityServiceManager.java:600)
        at weblogic.server.channels.ChannelService.resetQOS(ChannelService.java:286)
        at weblogic.server.channels.ChannelService.start(ChannelService.java:252)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)



Oracle doc suggests that this is due to "This exception could be thrown when the key WLS is using to decrypt is different from that used to encrypt it in the first place." (?????)

As suggested, I remove the password from the config.xml, but then I get:

<BEA-000362> <Server failed. Reason: [Management:141266]Parsing Failure in config.xml: java.lang.IllegalArgumentException: In production mode, it's not allowed to set a clear text value to the property: NodeManagerPasswordEncrypted of SecurityConfigurationMBean>

After many hours I discovered that the WLS servers were configured to use a non existing JKS file store. Instead of refusing to create the domain (as I would prefer), WebLogic probably writes the encoded passwords in some other funny way. No clue really. Anyway setting the right JKS solved the problem.

Wednesday, July 3, 2013

WebLogic webapplications returning HTTP 302 Moved Temporarily

If I configure a HTTPFRONTEND HOST to the LoadBalancer lbr.acme.com (5.6.7.8), when I contact directly a Managed Server myserver.acme.com in the cluster, results in a HTTP redirect with the new location pointing to the LoadBalancer.
I am struggling to find out how to disable this.


wget http://myserver.acme.com:8001/gridlinkha
--2013-07-03 13:40:15--  http://myserver.acme.com:8001/gridlinkha
Resolving myserver.acme.com... 1.2.3.4
Connecting to myserver.acme.com|1.2.3.4|:8001... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://lbr.acme.com/gridlinkha/ [following]
--2013-07-03 13:40:15--  http://lbr.acme.com/gridlinkha/
Resolving lbr.acme.com... 5.6.7.8
Connecting to lbr.acme.com|5.6.7.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1308 (1.3K) [text/html]
Saving to: `index.html'


setting max-redirect=0 makes the request fail altogether:

wget --max-redirect 0 http://myserver.acme.com:8001/gridlinkha
--2013-07-03 13:51:14--  http://myserver.acme.com:8001/gridlinkha
Resolving myserver.acme.com... 1.2.3.4
Connecting to myserver.acme.com|1.2.3.4|:8001... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://lbr.acme.com/gridlinkha/ [following]
0 redirections exceeded.



Dynamic HTTP endpoint creation in OSB

When you create a OSB HTTP service, no war is deployed to WebLogic.
The kernelEar (XBus Kernel) application contains a WebCreatorModuleFactory which - through a WebCreatorModule - will register your endpoint to a dummy httpTransport.war web application - this httpTransport.war is strictly empty.

In the deployment monitoring page, you will see all these endpoints as sources by httpTransport.war:




The internal implementation of a HTTP service is based on a weblogic.servlet.internal.WebAppModule