Saturday, December 31, 2011

Happy new ear

and a prosperous 2012

Impress your friends with this great Dr Spock costume! Available on ebay!

Thursday, December 29, 2011

Coherence cluster interference

####<Dec 28, 2011 12:32:51 PM CET> <Warning> <Coherence> <acme102> <osbdv1ms1> <Logger@1780819408 3.6.0.4> <<anonymous>> <> <0000JI4RpfkE8Tk5ozx0iY1Eyjr6000002> <1325071971843> <BEA-000000> <Oracle Coherence 3.6.0.4 (member=n/a): Received a discovery message that indicates the presence of an existing cluster that does not respond to join requests; this is usually caused by a network layer failure:
Message "SeniorMemberHeartbeat"
{
FromMember=Member(Id=1, Timestamp=2011-11-24 15:56:30.477, Address=13.53.53.189:7890, MachineId=14269, Location=process:26431, Role=OSB-node)
FromMessageId=0
Internal=false
MessagePartCount=1
PendingCount=0
MessageType=17
ToPollId=0
Poll=null
Packets
{
}
Service=ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_ANNOUNCE), Id=0, Version=3.6}
ToMemberSet=null
NotifySent=false

LastRecvTimestamp=none
MemberSet=MemberSet(Size=1, BitSetCount=1, ids=[1])
}>

-Dtangosol.coherence.wka=localhost -Dtangosol.coherence.ttl=0 -Dtangosol.coherence.localhost=127.0.0.1

to the JVM parameters, or make sure each installation has a unique Coherence cluster multicast address

If you get forever this message:
"Delaying formation of a new cluster; waiting for well-known nodes to respond"

then remove the wka option and use an explicit address:

Accessing data from Oracle DB XML with OSB

Referring to the excellent post by Chris:

Local OSB protocol is ACTUALLY local

It seems that LOCAL doesn’t load balance stuff..."Local" means "NOT Remote", so all calls are within the same JVM.

I have done this test:

CLIENT -> HTTP PS deployed in cluster -> publish to LOCAL PS

Client sends all requests to only 1 HTTP service on server ms1 of the cluster made by ms1,ms2.

Only the LOCAL PS on the ms1 is invoked. ms2 shows no activity.

What if instead of LOCAL protocol I use some remotable protocol like HTTP? Is Server Affinity going to kick in, so all requests will stay anyway local? I am too lazy to test this now... maybe one day...

Wednesday, December 28, 2011

Test Console service is not running. Contact administrator to start this service

I was unable to test a Proxy/Business service, and getting the error message
"Test Console service is not running. Contact administrator to start this service"

I opened the AdminServer logs and it was full of:

An exception [java.lang.StackOverflowError] was thrown while rendering the content at [/jsp/dashboard/DashboardAlerts.jsp].
javax.servlet.ServletException: java.lang.StackOverflowError
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.continueChainNoWrapper(PageFlowPageFilter.java:455)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:114)

It is unclear how the server got itself in that state.... anyway restarting AdminServer and Managed Servers fixed the issue.... weird.

Removing empty optional elements erroneously inserted by mapping

if a XQuery mapping, theoretically you should check for existence of an optional element in the source, and only if it exists you create it on the destination:

if ($myvar/customer/shoesize) then <shoesize> data($myvar/customer/shoesize)
</shoesize>

If the developer likes to take shortcuts (=is a lazy bum), and doesn't do the "if", you must clean the garbage afterwards.

You can use the action:
delete //*[not(node()) and not(.//@*)] from body

Book: The Definitive Guide to SOA Oracle Service Bus

Definitely worth reading, with plenty of source code available at their site:

Tuesday, December 27, 2011

EOL issues on Unix/Windows

in vi, if you want to view a file in HEX mode, do this:

:%!xxd

line feed=10=0x0A (\n)
carriage return=13=0x0D (\r)

in Windows, a EOL is defined by \r\n (0D0A)
in Unix, a EOL is defined by \n (0A)

to change EOL to some other character:

tr '\n' '#' < test1.txt > test2.txt

to turn a Windows file into Unix:
dos2unix filename

Excellent Notepad++ to convert one format into another (Edit/EOL conversion)

Disabling debatching in Oracle JCA File Adapter

If in the JCA file adapter file you specify PublishSize=1, the file translator will
consider that every LINE (up to EOL) in your file is a MESSAGE.

Even if the Root Element of my message is a complexType made by a sequence of subtypes, the NXSDTranslator will dispatch a message to OSB PER EACH LINE, and the message will contain ONLY THE SUBTYPE, not the Root Element.

Even if you specify uniqueMessageSeparator="someweirdstring", it will keep doing the same trick.

In the log, you see:

jca.file.BatchIndex=1 (2, 3... up to the number of lines in the file)
jca.file.Batch=CsHjmLiOA8VinpSTERKIh6cfUYmxQvUbZzfDlDH0DRI

(all the messages in the same Batch (=file) have the same jca.file.Batch property)

The only way to avoid this DEBATCHING (split a message in multiple submessages) is to explicitly set the PublishSize to a BLANK value (default is 1).

see doc here

PublishSize: This property indicates whether the file contains multiple messages and how many messages to publish to the BPEL process at a time. The parameter is of type int and is not mandatory. The default value is 1.

For example, if a certain file has 11 records and this parameter is set to 2, then the file will be processed 2 records at a time and the final record will be processed in the sixth iteration.

Pay attention to the JCA file, the PublishSize can be nested there.
Look in the nXSD file, there can be a nxsd:publishSize clause, set it to "" (an empty string)

In the logs, per each batch element you will see a separate invocation to the translator:

Invoking inbound translation for : PuO20111212_164122_1640.txt
InboundTranslatorDelegate:: Ordinary DOM Created
Completed inbound translation for : PuO20111212_164122_1640.txt

Classes to monitor:

oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl
(method xlator.translateFromNative(in, res, xlationCtx))

(ProcessorDelegate.process(FileInfo) and does a doXlate)

WebLogic and AspectJ

Zillions of times I have wished in my life to be able to tell which methods are being executed in an application deployed in WLS, and the values of the parameters and return values. Call it "tracing method execution in weblogic".
If no debug statements exist in the WLS code or in the application, the only way is to weave the classes with some AOP product.

So here I go:

http://www.eclipse.org/aspectj/doc/next/devguide/ltw-configuration.html

In setDomainEnv there is a property JAVA_PROFILE
I set it to
-javaagent:C:/apps/aspectj/lib/aspectjweaver.jar

after checking the WLS classpath, I see that the . directory (C:\Oracle\Middleware\user_projects\domains\base_domain) is in the classpath (because I have a System Variable CLASSPATH=.)
I create then a C:\Oracle\Middleware\user_projects\domains\base_domain\META-INF\aop.xml file where I define an INLINE ASPECT (no need to precompile separately with ajc):

Here is the aspect, to be compiled and put in the classpath (you will need to add the AspectJ jars to the Eclipse project)

package com.pierre.aop;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public abstract class AbstractAspect {

@Before("execution(* *(..))")
public void before(JoinPoint jp) {
System.out.println("CIAOOOOO");
}

@Pointcut("execution(public * *(..))")
public void anyPublicOperation() {
System.out.println("anyPublicOperation");
}
}


and this is the aop.xml:

<aspectj>

<aspects>

<!-- define a concrete aspect inline -->
<concrete-aspect name="com.pierre.aop.MyTracing" extends="com.pierre.aop.AbstractAspect">
<!--pointcut name="tracingScope" expression="within(com.pierre.*)"/-->
</concrete-aspect>

<!-- Of the set of aspects declared to the weaver
use aspects matching the type pattern "com.pierre..*" for weaving. -->
<include within="com.pierre..*"/>

</aspects>

<weaver options="-verbose">
<!-- Weave types that are within the javax.* or org.aspectj.*
packages. Also weave all types in the foo package that do
not have the @NoWeave annotation. -->
<include within="com.pierre.*"/>

<!-- Dump all types within the "somepack" package,
both before are after they are woven,
to the "./_ajdump" folder on disk (for diagnostic purposes) -->
<dump within="com.pierre.*" />
</weaver>

</aspectj>


for some reasons, it doesn't work....
I can see in the stdout:

[JspClassLoader@72d4e5] info AspectJ Weaver Version 1.7.0.M1 built on Friday Dec 16, 2011 at 16:56:09 GMT
[ChangeAwareClassLoader@f45732] info AspectJ Weaver Version 1.7.0.M1 built on Friday Dec 16, 2011 at 16:56:09 GMT

My JSP does:

AOPCUT aopcut = new AOPCUT();
aopcut.hello("pierre");

where the AOPCUT class is

package com.pierre.aop;

public class AOPCUT {

public void hello(String message) {
System.out.println("Hello " + message);
}

}

and the interceptor gets called....

Monday, December 26, 2011

How to remove (hide) the Wikipedia personal appeal?

I have donated money before to Wikipedia, but now I am sick and tired to see the faces for the fathers and mothers founders (at least they could use good looking babes for their campaign!)

On Firefox, install

(needs restart)

Then by browsing https://adblockplus.org/forum/viewtopic.php?f=2&t=6347 I find the right expression for the AdBlock filter:

/w/index.php?title=*:bannercontroller

It seems to be working for all Wikipedia regional languages.

Let me know when they have removed the ad, I will consider giving more money to thanks them for having stopped this torture.

I hope I am not doing anything illegal with this post!

Talking about Firefox plugins, I really recommend
to display vertical tabs,
essential if you have a laptop with low vertical resolution.

Saturday, December 24, 2011

WebLogic dies on startup: Unable to create a server socket for listening on channel "Default"

Unable to create a server socket for listening on channel "Default". The address 10.83.17.84 might be incorrect or another process is
using port 7001: java.net.BindException: Cannot assign requested address: JVM_Bind.

Of course there is no running process who listens on the 7001 port, I have done netstat -a to check...

It turned out that I have a dynamic IP on my laptop - with hostname pierrepc - and foolishly I have made an entry in my hosts file saying

10.83.17.84 pierrepc

Idiot me! The IP address is not static, so once I get assigned a different IP, WebLogic still tries to use the 10.83.17.84 IP to create a Socket...

Removing the (foolish) entry from hosts fixed the problem

Transport provider with id 'jca' is not registered

(guest post, the author is Chris)

We are using the ant tasks provided by Oracle to build a sbconfig.jar (task exportFromWorkspace).

Everything worked fine using the common osb artifacts. However for projects where we use JCA adapters we get the following errors when we do a build:

[java] com.bea.wli.config.component.ValidationException: Validation of BusinessService BLA : Diagnostics for BusinessService BLA 20-Dec-2011 17:04:54 [java] 20-Dec-2011 17:04:54 [java] ERROR: <0> Transport provider with id 'jca' is not registered. Failed

Some Googling taught me that is related to the 64 bit installation of OEPE, I can confirm this as I have built the same artifacts from the same projects on a 32 bits OEPE using the same scripts and they work.

Articles:

WebLogic and Maven

Jeff West makes the best presentations around. He is spot on, no blablabla.

to install WebLogic (wow, this is cool!)
mvn wls:install

to create a domain
mvn wls:create-domain (wow, this is cool!)

to start the server:
mvn wls:start-server

to run a wlst script:
mvn wls:wlst

this is a reference to the preexisting maven plugin for weblogic

WebLogic system properties

There are a number of System Properties (visible for instance with VisualVM) that influence WebLogic behaviour:

com.sun.xml.ws.api.BindingID.SOAP_12.canGenerateWsdl=true

com.sun.xml.ws.api.streaming.XMLStreamWriterFactory.woodstox=true

com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace=true

common.components.home=/home/orauser/bea1035/oracle_common

domain.home=/home/orauser/bea1035/user_projects/domains/osb_domain

file.encoding=UTF-8

file.encoding.pkg=sun.io

file.separator=/

igf.arisidbeans.carmlloc=/home/orauser/bea1035/user_projects/domains/osb_domain/config/fmwconfig/carml

igf.arisidstack.home=/home/orauser/bea1035/user_projects/domains/osb_domain/config/fmwconfig/arisidprovider

java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment

java.awt.printerjob=sun.print.PSPrinterJob

java.class.version=50.0

java.endorsed.dirs=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/endorsed

java.ext.dirs=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/ext

java.home=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre

java.io.tmpdir=/tmp

java.library.path=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/i386/jrockit:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/i386:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/../lib/i386:/home/orauser/bea1035/patch_wls1035/profiles/default/native:/home/orauser/bea1035/patch_oepe1050/profiles/default/native:/home/orauser/bea1035/patch_ocp360/profiles/default/native:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/i386/jrockit:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/i386:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/../lib/i386:/home/orauser/bea1035/patch_wls1035/profiles/default/native:/home/orauser/bea1035/patch_oepe1050/profiles/default/native:/home/orauser/bea1035/patch_ocp360/profiles/default/native:/home/orauser/bea1035/wlserver_10.3/server/native/linux/i686:/home/orauser/bea1035/wlserver_10.3/server/native/linux/i686/oci920_8:/home/orauser/bea1035/wlserver_10.3/server/native/linux/i686:/home/orauser/bea1035/wlserver_10.3/server/native/linux/i686/oci920_8

java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory

java.naming.factory.url.pkgs=weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url

java.protocol.handler.pkgs=oracle.mds.net.protocol|weblogic.net|weblogic.utils|weblogic.utils|weblogic.utils|com.bea.wli.sb.resources.url

java.rmi.server.randomIDs=true

java.runtime.name=Java(TM) SE Runtime Environment

java.runtime.version=1.6.0_24-b07

java.security.policy=/home/orauser/bea1035/wlserver_10.3/server/lib/weblogic.policy

java.specification.name=Java Platform API Specification

java.specification.vendor=Sun Microsystems Inc.

java.specification.version=1.6

java.vendor=Oracle Corporation

java.vendor.url=http://www.oracle.com/

java.version=1.6.0_24

java.vm.info=compiled mode

java.vm.name=Oracle JRockit(R)

java.vm.specification.name=Java Virtual Machine Specification

java.vm.specification.vendor=Sun Microsystems Inc.

java.vm.specification.version=1.0

java.vm.vendor=Oracle Corporation

java.vm.vendor.url=http://www.oracle.com/

java.vm.version=R28.1.3-11-141760-1.6.0_24-20110301-1430-linux-ia32

javax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder

javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl

javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl

javax.xml.rpc.ServiceFactory=weblogic.webservice.core.rpc.ServiceFactoryImpl

javax.xml.soap.MessageFactory=weblogic.webservice.core.soap.MessageFactoryImpl

jrf.version=11.1.1

jrockit.optfile=/home/orauser/bea1035/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt

line.separator=\n

oracle.core.ojdl.logging.applicationcontextprovider=oracle.core.ojdl.logging.WlsApplicationContextImpl

oracle.core.ojdl.logging.componentId=ms1

oracle.core.ojdl.logging.usercontextprovider=oracle.core.ojdl.logging.WlsUserContextImpl

oracle.deployed.app.dir=/home/orauser/bea1035/user_projects/domains/osb_domain/servers/ms1/tmp/_WL_user

oracle.deployed.app.ext=/-

oracle.domain.config.dir=/home/orauser/bea1035/user_projects/domains/osb_domain/config/fmwconfig

oracle.security.jps.config=/home/orauser/bea1035/user_projects/domains/osb_domain/config/fmwconfig/jps-config.xml

oracle.server.config.dir=/home/orauser/bea1035/user_projects/domains/osb_domain/config/fmwconfig/servers/ms1

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger

org.omg.CORBA.ORBClass=weblogic.corba.orb.ORB

org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB

org.xml.sax.parser=weblogic.xml.jaxp.RegistryParser

os.arch=i386

os.name=Linux

os.version=3.0.0-12-generic

path.separator=:

platform.home=/home/orauser/bea1035/wlserver_10.3

sun.arch.data.model=32

sun.boot.class.path=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/resources.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/rt.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/sunrsasign.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/jsse.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/jce.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/charsets.jar:/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/classes

sun.boot.library.path=/home/orauser/bea1035/jrockit_160_24_D1.1.2-4/jre/lib/i386

sun.cpu.endian=little

sun.cpu.isalist=

sun.desktop=gnome

sun.io.unicode.encoding=UnicodeLittle

sun.java.launcher=SUN_STANDARD

sun.jnu.encoding=UTF-8

sun.management.compiler=Oracle JRockit(R) Optimizing Compiler

sun.os.patch.level=unknown

user.country=GB

user.dir=/home/orauser/bea1035/user_projects/domains/osb_domain

user.home=/home/orauser

user.language=en

user.name=orauser

user.timezone=Europe/London

vde.home=/home/orauser/bea1035/user_projects/domains/osb_domain/servers/ms1/data/ldap

weblogic.Name=ms1

weblogic.ProductionModeEnabled=true

weblogic.ReverseDNSAllowed=false

weblogic.alternateTypesDirectory=/home/orauser/bea1035/oracle_common/modules/oracle.ossoiap_11.1.1,/home/orauser/bea1035/oracle_common/modules/oracle.oamprovider_11.1.1

weblogic.ext.dirs=/home/orauser/bea1035/patch_wls1035/profiles/default/sysext_manifest_classpath:/home/orauser/bea1035/patch_oepe1050/profiles/default/sysext_manifest_classpath:/home/orauser/bea1035/patch_ocp360/profiles/default/sysext_manifest_classpath

weblogic.home=/home/orauser/bea1035/wlserver_10.3/server

weblogic.jdbc.remoteEnabled=false

weblogic.management.discover=false

weblogic.management.server=http://192.168.230.130:7001

weblogic.nodemanager.ServiceEnabled=true

weblogic.security.SSL.ignoreHostnameVerification=false

weblogic.security.TrustKeyStore=DemoTrust

weblogic.system.BootIdentityFile=/home/orauser/bea1035/user_projects/domains/osb_domain/servers/ms1/data/nodemanager/boot.properties

wls.home=/home/orauser/bea1035/wlserver_10.3/server

wlw.iterativeDev=false

wlw.logErrorsToConsole=false

wlw.testConsole=false

Thursday, December 22, 2011

BPEL and OSB Monitoring with Enterprise Manager Grid Control

The books shows some use cases of monitoring and provisioning OSB projects with Enterprise Manager Grid Control

Here the official Oracle documentation:

http://docs.oracle.com/cd/E11857_01/install.111/e17558/disc_mon_osb.htm

A SOA Expert is...

An expert is a person who has made all the mistakes that can be made in a very narrow field.

Niels Bohr

Danish physicist (1885 - 1962)

Monday, December 19, 2011

XQuery: how to chain (concat) 2 elements

curly braces will do the job:

let $a := <a>bla</a> let$b := <b>blu</b>

return { $a,$b }

will return
<a>bla</a>
<b>blu</b>

Custom XPath libraries

We thank again Sandeep Phukan (we wrote about him here) for his excellent library of Custom XPath functions.

Here his wiki.

Sunday, December 18, 2011

Oracle Enterprise Manager 10g Grid Control Handbook

reading right now.... quite interesting.... from one of the main contributors to the Grid Control product: Werner De Gruyter, Matthew Hart, Daniel Nguyen

Grid Control: ORACLE_MIDDLEWARE_HOME_LOCATION subdirectory already exists

I have tried everything to install Grid Control.
I have also tried to "show empty homes" and remove them: it hangs forever and in the log C:\bea11\oracle_common\cfgtoollogs\cfgfw\CfmLogger_2011-12-18_04-17-32-PM.log it shows:

WARNING: Validation of XML schema is disabled because AggregateDescriptions.xsd could not be found
INFO: Creating new CFM connection
WARNING: A CfwClient was destroyed without a proper call to disconnect!

I will start again tomorrow.... but.... what a battle to install Grid Control...

Latinorum

This is an evolving post... it's a collection of posh-"sounds-so-difficult" names for old, well known stuff.

The more difficult we talk, the more people will worship us as gurus and we can avoid any actual physical work and we can avoid having to ACTUALLY solve problems.
This was a common practice in the Middle Ages, professionals (doctors, lawyers, priests) would put enormous energies into learning Latin, so that nobody could understand what they were saying.

Synthetic transactions

http://www.nextslm.org/fishman.html#synthetic

Synthetic transactions are a way to check the availability of an application across a network. By definition, a synthetic transaction constitutes an automated, self-contained set of user operations that can be executed against a service in the same way a real consumer of the service operates an application. For example, on the Internet, a synthetic transaction includes a script that goes a stock trading site, tries to look up a stock's price or portfolio valuation, and reports if the series of operations completed successfully. In other words, any fixed set of user operations that can be automated reliably may be defined as a synthetic transactions.

"Synthetic" sounds like Alien technology, something that only Extraterrestrial intelligences can master.... cool!

Hydrate

http://stackoverflow.com/questions/4929243/clarifying-terminology-hydrating-an-entity-fetching-properties-from-the-db

Hydrate is being used (often incorrectly) instead of the well known "populate" or "persist"... again, its association to a Chemistry term evokes a world of knowledge available only to few specialists...

Agile

I have been doing Agile for the first 10 years of my career, when I was coding for food... we were working on VERY tight budgets and even tighter deadlines.... we used to call it "get your fat stinky ass off that chair, work harder, when stuck raise a flag and get things done". It used to work like wonders, and we were delivering at least 10 times faster
than any corporate project I have ever seen.

Stakeholder

As defined here, "stakeholder is anyone who will make use of, develop, or have an impact on any aspect of your project". It sounds sooooo much cooler than "people concerned" !

Semantics

Some people say "the language doesn't have the SEMANTICS to do this".
Here an very clear definition of SEMANTICS:
"Semantics is the study of the meaning of linguistic expressions."

Probably if they used "the capability" or "the API" they would be more.... semantically correct!

Taxonomy

Taxonomy is another of those wonderful words to impress your audience. It means nothing more nothing less than Classification, but it will allow you to impersonate the Darwin or the Linnaeus of the block, leaving around you an aura of scientificity and holiness.

Patterns

Let's give the word credits: Patterns is an excellent sound bite, with the voiceless bilabial plosive "P" at the beginning sending your opponent to the ground.

Whenever in a discussion someone starts swaying the "Pattern" story around like Samson the ass jawbone

- maybe because he is the only person who has actually learned by heart the entire index of the GoF book -

I wonder "is this man trying to COMMUNICATE, or to INTIMIDATE?".

Saturday, December 17, 2011

Beware of free screen recorder...

Googling for "free screen recorder" I have stumbled upon

http://freescreenrecorder.net/

BEWARE: It tries to install Babylon on your machine (I simply hate Babylon, for having been their customer and having been harassed multiple times by their policy to revoke your license if you install it on a different PC.... I change computer every 3 months, so you can imagine....)...

Here http://www.webresourcesdepot.com/10-free-screen-recording-softwares-for-creating-attractive-screencasts/ you get a large list of "certified" free or paying screen recording software... never install anything which has not been reviewed by peers.

I used to use CamStudio but I really miss the ability to zoom.

Friday, December 16, 2011

JPA using Coherence as Level 2 Cache

quite cool this video on TopLink grid with COH in WL Cluster.

In a nutshell:

• Coherence can cache DB data in a cluster-wide manner
• Grid Cache mode uses Coherence to cache (read-through) objects by ID
• Grid Read mode turns JPQL queries into COH Grid queries
• Grid Entity mode supports read and writes directly into the Cache

Grid Entity can be tricky, because updates are asynchronous and they could fail, leaving the cache out of sync with the DB.

Recommended model:
Out-Of-Process, COH is in a different JVM as the Application Server.

In-Process: everything in the same JVM. Good only for development.

Mixed model (some data in near-cache, some in far-cache) can be useful in some applications.

Second part:

it's quite cool, it shows how to create a COH cluster and server, how to configure a WL server for COH. It gives an example of a Grid Entity mode to offload DB writes.

Here the example
http://blogs.oracle.com/jeffwest/entry/introducing_the_oracle_parcel_serviceexamplereference_application

and the code is on SVN at https://svn.java.net/svn/oracle-pacel-svc~ops-r3-ee6

COOL!

Book: Enterprise Manager Grid Control 11g

Oracle Enterprise Manager Grid Control 11g R1: Business Service Management

https://www.packtpub.com/oracle-enterprise-manager-grid-control-11g-r1/book

Chapter 1.... just skip it, it's blablabla

Chapter 2: OEB DB Control, AS Control, FMW Control, Grid Control. Management Agent.
Monitoring of Targets and Performances.

at Chapter 3 I gave up... .on the whole I find that the official Oracle documentation uses a simpler and more concise language.
From a technical book I expect some real customer stories, some use cases, a more colloquial and entertaining language.

oracle virtual box soa suite : memory for crash kernel (0x0 to 0x0) not within permissible range

If your Oracle Linux VirtualBox doesn't start, and shows a
"memory for crash kernel (0x0 to 0x0) not within permissible range" error (in reality it's only a warning, and presumably not the cause for the crash),

you can either cry, or (see http://blogs.oracle.com/reynolds/entry/using_the_soa-bpm_virtualbox_a ) Enable IO APIC handler.

Corporal Pierre got promoted today to Sergeant Major on OTN Forum

still a VERY long way from GURU:

I wonder what you become after 1000000 points.... KING of Oraclavia ?

Thursday, December 15, 2011

OSB acknowledging JMS messages part II

see here my original post

3 modes of JMS message acknowledge:

AUTO_ACKNOWLEDGE

public static final int AUTO_ACKNOWLEDGE

With this acknowledgement mode, the session automatically acknowledges a client's receipt of a message when it has either successfully returned from a call to receive or the message listener it has called to process the message successfully returns.

CLIENT_ACKNOWLEDGE

public static final int CLIENT_ACKNOWLEDGE

With this acknowledgement mode, the client acknowledges a message by calling a message's acknowledge method. Acknowledging a message acknowledges all messages that the Session has consumed.

When client acknowledgment mode is used, a client may build up a large number of unacknowledged messages while attempting to process them. A JMS provider should provide administrators with a way to limit client over-run so that clients are not driven to resource exhaustion and ensuing failure when some resource they are using is temporarily blocked.

DUPS_OK_ACKNOWLEDGE

public static final int DUPS_OK_ACKNOWLEDGE

This acknowledgement mode instructs the session to lazily acknowledge the delivery of messages. This is likely to result in the delivery of some duplicate messages if JMS fails, it should only be used by consumers that are tolerant of duplicate messages. Its benefit is the reduction of session overhead achieved by minimizing the work the session does to prevent duplicates.

My understanding is that AUTO_ACKNOWLEDGE means "ACKNOWLEDGE if the transaction was successful" (default behaviour, unless you "raise error" in OSB).

Wednesday, December 14, 2011

I create a PVQueue, override redelivery count = 3 and redelivery delay = 10000

I consume the messages with a JMS PS, no transaction required, I use the default JMS XA connection factory weblogic.jms.XAConnectionFactory.

If I "reply with success", the JMS message is consumed immediately.

If I "reply with error", the JMS message is consumed immediately.

I set the "Transaction Required" on the Proxy Service, I "reply with error", and the JMS message is consumed immediately.

In all the above cases, in the Operations/Monitoring tab, I see 1 message and 0 errors for the Proxy.

I "Raise Error" and the JMS message is played 4 times (redelivered 3 times + 1 time the first attempt) at 10 seconds interval and then it is consumed and redirected to the Error Destination, where it appears with a JMS_BEA_DeliveryFailureReason=2 and JMSXDeliveryCount=0.
In the Operations/Monitoring tab, I see 4 messages and 4 errors for the Proxy.

Same as above, without "Transaction Required", and it behaves the same way.

The Inner Geek is rejoicing....

reposting this great post:

http://oraclequirks.blogspot.com/2011/12/to-all-those-old-geeks-out-there.html

music made by sending commands to a HP scanner over the SCSI interface

this is really cool stuff

(sorry I am an electronic engineer, I have spent 7 years of my life in front of a Digital State Analyzer and Oscilloscope....)

This is the way the world works

IMF stands for International Monetary Fund, of course. Of the two characters in the Tv screen, one is for sure our glorious Pope Ratzinger, the other seems Bush but I am not sure. On the bottom it says "World bank"

The naked white man might represent the average citizen of the West. His SUV must be parked outside.

Assigning a value to $fault I was trying to assign a value to$fault in a "Error Reporting" service, to see if the built-in "Report" action could parse the $fault and populate the right fields in the Error Report message. This is a sample$fault:

<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>MYERROR</con:errorCode>
<con:reason>MYMESSAGE</con:reason>
<con:location>
<con:node>PipelinePairNode1</con:node>
<con:pipeline>PipelinePairNode1_request</con:pipeline>
<con:stage>stage1</con:stage>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>



Unfortunately the $fault variable is meaningful only in the error handler. If you try to use it in a normal message flow, you get: Variable name validation failed: The variable "fault" cannot be used here Tuesday, December 13, 2011 Using JCA JMS Adapter in OSB [JCATransport:381984]OSB JCA transport does not support adapter type: JMS This puts an abrupt end to my adventure :o( Sunday, December 11, 2011 Oracle nXSD in action: parsing EDI to XML Schema level options: http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/nfb.htm#CIAHDGJI Element level options: http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/nfb.htm#CIACIJCF lots of valuable examples here http://otndnld.oracle.co.jp/document/products/as10g/101310/doc_cd/integrate.1013/b28994/nfb.htm#BGBBAJFD I have a EDI document, made by several fixed length segments. Each segment starts with a fixed label. Each segment contains multiple fixed length fields. Segment can appear in groups (sequence of many segments). Groups can appear multiple times. Lesson learned: * since there is no fixed sequence of segments, you should use this construct xsd:choice minOccurs="0" maxOccurs="1000" xsd:element name="ACME0001" type="tns:ACME0001_Type" nxsd:startsWith="ACME0001" xsd:element name="ACME0002" type="tns:ACME0002_Type" nxsd:startsWith="ACME0002" .... (using maxOccurs="unbounded" sends the nXSD parser into an infinite loop) * segments who are not needed, should still be parsed, using a generic element: xsd:element name="ACME0001" type="tns:Any1064Block_Type" minOccurs="0" maxOccurs="10" nxsd:startsWith="ACME0001 " where Any1064Block_Type is: <xsd:complexType name="Any1064Block_Type"> <xsd:sequence> <xsd:element name="DATA" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1054"/> </xsd:sequence> </xsd:complexType>  where 1054 = 1064 (length of the segment) - length of the "startsWith" element (ACME0001 ) * if the data you are interested in are in the middle of a segment, you can "skip" the initial characters: xsd:element name="PONbr" type="xsd:string" minOccurs="1" nxsd:style="fixedLength" nxsd:length="35" nxsd:skip="136" * you should always consume each segment to its end, maybe using a "FLUFF" element just for the sake of telling the parser to skip data: xsd:element name="FLUFF2" type="xsd:string" minOccurs="1" nxsd:style="fixedLength" nxsd:length="883" failing to consume a segment to its exact end will stop the parser. XSD: elements in arbitrary order my situation is that I have child elements which can occur repeatedly in any order: <root> <a>bla</a> <b>bli</b> <b>blo</b> <a>blu</a> <a>ble</a> </root>  Googling around I find this solution: <xs:complextype mixed="true" name="p"> <xs:choice maxoccurs="unbounded" minoccurs="0"> <xs:element name="a"> <xs:element name="b"> </xs:element></xs:element> </xs:choice> </xs:complextype>  it seems to work pretty well... my wish is that XSD contained a native construct like "anyorder", similar to "sequence" or "choice" or "all" Thursday, December 8, 2011 remote desktop connection change password I keep forgetting: it's CTRL-ALT-END OSB, finding the WebLogic server name on which a message flow is executing https://forums.oracle.com/forums/thread.jspa?threadID=982549 apparently there is no other way than doing a Java Callout (or better, a Custom XPath) returning System.getProperty("weblogic.Name"). The OSB Reporting puts the server name in the reporting message, but I think it gets it from inside Java code. Wednesday, December 7, 2011 WebLogic cluster monitor script #Script to monitor running cluster #will write thread dumps and other cluster diagnostic info to a file, at regular intervals #Vernetto 2011-11-11 from java.io import File from java.io import FileOutputStream from java.io import FileInputStream from java.util import HashMap from java.util import HashSet from java.util import ArrayList from time import sleep import datetime import zlib import zipfile from os import * configFileProperties = None isConnected = false previousStdout = None #======================================================================================= # Utility function to load properties from a config file #======================================================================================= def loadProps(configPropFile): global configFileProperties propInputStream = FileInputStream(configPropFile) configFileProperties = Properties() configFileProperties.load(propInputStream) def appendToAlarmLog(alarmmessage): alarmsfile = configFileProperties.get('alarmsfile') alarmFile = open(alarmsfile, 'a') alarmFile.write(getNowTimestamp() + ' ' + alarmmessage + '\n') alarmFile.close() def getNowTimestamp(): now = datetime.datetime.now() nowtimestamp = now.strftime("%Y%m%dT%H%M%S") return nowtimestamp def monitorServer(): global isConnected fos = None previousStdout = theInterpreter.getOut() try: #initialize variables serverURL=configFileProperties.get('serverURL') serverName=configFileProperties.get('serverName') username=configFileProperties.get('username') password=configFileProperties.get('password') logFile=configFileProperties.get('logFile') aliveServerCountExpected=configFileProperties.get('aliveServerCountExpected') interval=configFileProperties.get('interval') #initialize timestamp to append to log filename nowtimestamp = getNowTimestamp() #save stdout handle logFileNameWithTimestamp = logFile + '.' + nowtimestamp #set new stdout print "start the script" #easeSyntax() if (not isConnected) : connect(username, password, serverURL) isConnected = true serverRuntime() #redirect output to log file f = File(logFileNameWithTimestamp) fos = FileOutputStream(f) theInterpreter.setOut(fos) cd('/') print 'Health', cmo.getHealthState() cd('/ClusterRuntime/myCluster/') print 'AliveServerCount=', cmo.getAliveServerCount(), ' ServerNames', cmo.getServerNames() if (aliveServerCountExpected != cmo.getAliveServerCount()) : alarmmessage = 'MONITORALARM, we were expecting AliveServerCount ' + aliveServerCountExpected + ' and we have instead %d , see file %s' % (cmo.getAliveServerCount() , logFileNameWithTimestamp, ) print alarmmessage appendToAlarmLog(alarmmessage) cd('/ClusterRuntime/myCluster/UnicastMessaging/UnicastMessagingRuntime') print 'DiscoveredGroupLeaders=', cmo.getDiscoveredGroupLeaders(), ' Groups=', cmo.getGroups(), ' LocalGroupLeaderName=', cmo.getLocalGroupLeaderName(), ' RemoteGroupsDiscoveredCount=', cmo.getRemoteGroupsDiscoveredCount(), ' TotalGroupsCount=', cmo.getTotalGroupsCount() cd('/ServerChannelRuntimes/unicastChannel') print 'AcceptCount=' , cmo.getAcceptCount() , ' MessagesReceivedCount=' , cmo.getMessagesReceivedCount() , ' MessagesSentCount=' , cmo.getMessagesSentCount() scr = cmo.getServerConnectionRuntimes() #scr is an array of weblogic.server.channels.ServerConnectionRuntimeImpl$SerializableConnectionRuntime
for myscr in scr:

print ""

cd('/JVMRuntime/' + serverName)
#this is valid for JRockit
#this is valid for JRockit
print "HeapFreeCurrent=", cmo.getHeapFreeCurrent(), ' HeapSizeCurrent=', cmo.getHeapSizeCurrent()

#restore stdout
theInterpreter.setOut(previousStdout)

fos.close()
#now zip the report
zipfileLog = zipfile.ZipFile(logFileNameWithTimestamp + '.zip', 'w')
zipfileLog.write(logFileNameWithTimestamp, compress_type=zipfile.ZIP_DEFLATED)
zipfileLog.close()
os.remove(logFileNameWithTimestamp)

except:
isConnected = false
theInterpreter.setOut(previousStdout)
if (fos != None) :
fos.close()
print "Unexpected error:", sys.exc_info()[0]
raise

# monitor script init
try:
# sys.argv[1] is the config properties file
configFile = sys.argv[1]
interval = configFileProperties.getProperty('interval')

while True:
try:
sleep(float(interval))
monitorServer()
except:
errorMessage = "ERROR_QUERYING_SERVER %s - %s - %s"% (sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2], )
appendToAlarmLog(errorMessage)
dumpStack()

except:
print "Unexpected error: ", sys.exc_info()[0]
dumpStack()
raise



and the property file contains:

serverURL=t3://pierrepc:7031
serverName=ms3
logFile=C:/pierre/clustermonitor/clustermonitorinfo3.log
alarmsfile=C:/pierre/clustermonitor/clustermonitoralarms3.log
aliveServerCountExpected=3
interval=10

Monday, December 5, 2011

A DSL for OSB

tonight talking with a colleague we envisaged the opportunity of devising a DSL to describe OSB projects without going through all the click-click necessary in Eclipse or in the Web Console.

If anybody wants to join me in this challenge, please drop me an email

publicpierre gmail com

Often, when confronted with something (people, products, methodologies...) which is clearly underperforming, management is in denial and comes up with all sort of workarounds (rather than burying the horse and buying a new one) as the famous "flog the dead horse" story teaches:

2. Changing riders.
3. Say things like, “This is the way we have always ridden this horse.”
4. Appointing a committee to study the horse.
5. Arranging to visit other sites to see how they ride dead horses.
6. Increasing the standards to ride dead horses.
7. Appointing a tiger team to revive the dead horse.
8. Creating a training session to increase our riding ability.
9. Comparing the state of dead horses in today’s environment.
10. Change the requirements declaring that “This horse is not dead.”
11. Hire contractors to ride the dead horse.
12. Harnessing several dead horses together for increased speed.
13. Declaring that “No horse is too dead to beat.”
14. Providing additional funding to increase the horse’s performance.
15. Do a Cost Analysis study to see if contractors can ride it cheaper.
16. Purchase a product to make dead horses run faster.
17. Declare the horse is “better, faster and cheaper” dead.
18. Form a quality circle to find uses for dead horses.
19. Revisit the performance requirements for horses.
20. Say this horse was procured with cost as an independent variable.
21. Promote the dead horse to a supervisory position.

I will add more as they come to my mind:

22. ask a consultant to provide the dead horse detailed instructions on how to trot
23. ask a consultant to define SLAs to prove that the horse is actually dead and not simply agonizing

(this things come to my mind because I have desperately tried to push a developer to actually deliver something.... had I done it myself it would have cost me a lot less energies)

Sunday, December 4, 2011

nxsd:validation, nxsd:fieldValidation,

the question is risen here

here the official doc

http://docs.oracle.com/cd/E15586_01/integration.1111/e10231/nfb.htm

Top-Level Validation -> nxsd:validation="true"

information about the line and column in the native stream where the error was encountered is not provided by top-level validation.

Field-Level Validation -> nxsd:fieldValidation="true"

information about the exact line and character where the error was encountered is displayed.

So, what is the difference between

a) NOT using any validation at JCA level
b) using nxsd:validation="true" in the nXSD file
c) using nxsd:fieldValidation="true" in the nXSD file
d) using both nxsd:validation="true" and nxsd:fieldValidation="true" in the nXSD file

and submitting a file which has a correct structure but a validation error in a field.

In case a), the file passes the JCA adapter and is handed over to the Proxy Service

In case b), the file is rejected in the JCA adapter, with this message:

Error while translating inbound file : spaceattheend.dat
ORABPEL-11157

Error: translated xml document does not conform to xml schema.
error:Invalid text 'PAL ' in element: 'UOM'.
Please ensure that native data is correct. To turnoff result validation, unset flag nxsd:validation in nxsd

at oracle.tip.pc.services.translation.framework.XlatorHelper.validateDOMNode(XlatorHelper.java:701)
at oracle.tip.pc.services.translation.framework.XlatorHelper.validate(XlatorHelper.java:667)
at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.translateFromNative(NXSDTranslatorImpl.java:612)