Showing posts with label WID/WPS. Show all posts
Showing posts with label WID/WPS. Show all posts

Wednesday, June 16, 2010

Caution while using "and" and "or" operator in standard visual snippet

The "and" & “or” operator from standard visual snippet doesn't execute the way it is getting executed in Java. In visual snippet case it does differently

The translated code

java.lang.String __result__1 = null;
input1 = __result__1;
boolean __result__4 = input1.trim().length() != 0;
boolean __result__3 = input1 != null;
boolean __result__5;
{// and
__result__5 = __result__3 && __result__4;
}

In the above snippet the string is null, when using the "and" & “or” operator. It executes the left and right hand side conditions separately and stores in a variable and then does an 'and' operation on the variable.

While executing you will get a null pointer exception, because the string is null on top of that we are trying to trim().length()


The visual snippet operator will unnecessarily execute both the left and right hand side conditions which we don't want to do


To avoid this use the 'and' logical operator '&&' in the visual snippet.

boolean __result__6 = input1 != null && input1.trim().length() != 0;

In this case it executes as it does it in Java the safer way. :-)

Wednesday, October 21, 2009

WebSphere Technical Exchange Web cast

There is web cast organised by IBM on Mediation Module Development in WebSphere Integration Developer (WID). The main contents that to be discussed are creating a Mediation flow, re-using Mediation logic in subflow components, XPath builder, transforming messages, invoking external services using CallOut component, and aggregating and broadcasting messages using Fan-out, Fan-in components.

Web conference URL: link

Password/Conference ID: wste27oct

View presentation click here

For more info click here

Timing : October 27, 2009 11 AM EDT

Tuesday, February 24, 2009

Error "org.omg.CORBA.portable.UnknownException: vmcid: 0x0 minor code: 0 completed: Maybe]"

I was bugged by this error yesterday. I didn't have any clue. I tried to do clean build on WID (WebSphere Integeration Developer). Its doesn't help. Restarted the server couple of times, removed from the server and published again no way & no improvements not even a single step forward.

Exception stack trace: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.portable.UnknownException: vmcid: 0x0 minor code: 0 completed: Maybe]
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1939)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at com.ibm.ws.sca.internal.ejb.util.EJBLocator$JndiLocator.locate(EJBLocator.java:464)
at com.ibm.ws.sca.internal.ejb.util.EJBLocator.locate(EJBLocator.java:442)
at com.ibm.ws.sca.internal.ejb.util.EJBObjectFactory.createStub(EJBObjectFactory.java:72)
at com.ibm.ws.sca.internal.ejb.util.EJBStubAdapter.getStub(EJBStubAdapter.java:87)
at com.ibm.ws.sca.internal.ejb.util.EJBStubHelper.lookup(EJBStubHelper.java:89)
at com.ibm.ws.sca.internal.ejb.util.EJBStubHelper.lookup(EJBStubHelper.java:82)
at com.ibm.ws.sca.internal.binding.handler.SCAImportBindingHandler.getExportEJBStub(SCAImportBindingHandler.java:146)
at com.ibm.ws.sca.internal.binding.handler.SCAImportBindingHandler.processMessage(SCAImportBindingHandler.java:221)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:725)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1166)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:843)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processUOWMessage(ModuleSessionBean.java:338)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.transactionNotSupportedActivitySessionNotSupported(ModuleSessionBean.java:287)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.transactionNotSupportedActivitySessionNotSupported(EJSLocalStatelessModule_43132892.java:131)
at com.ibm.ws.sca.internal.uow.handler.UOWStrategyImpl.transactionLocalActivitySessionFalse(UOWStrategyImpl.java:386)
at com.ibm.ws.sca.internal.uow.handler.JoinUOWHandler.processMessage(JoinUOWHandler.java:131)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:725)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1166)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:834)
at com.ibm.ws.sibx.mediation.flowaction.impl.sca.SCAInvocationAction.invokeSync(SCAInvocationAction.java:531)
at com.ibm.ws.sibx.mediation.flowaction.impl.sca.RetryControl.invokeByStyle(RetryControl.java:327)
at com.ibm.ws.sibx.mediation.flowaction.impl.sca.RetryControl.invokeWithRetry(RetryControl.java:221)
at com.ibm.ws.sibx.mediation.flowaction.impl.sca.ServiceInvocation.complete(ServiceInvocation.java:124)
at com.ibm.ws.sibx.mediation.flowaction.impl.sca.FlowActionFactoryImpl.create(FlowActionFactoryImpl.java:667)
at com.ibm.ws.sibx.mediation.primitives.serviceinvoke.ServiceInvokeMediation.invokeFlowAction(ServiceInvokeMediation.java:469)
at com.ibm.ws.sibx.mediation.primitives.serviceinvoke.ServiceInvokeMediation.mediate(ServiceInvokeMediation.java:390)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.performInvocation(JavaMediationPrimitive.java:323)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.invoke(JavaMediationPrimitive.java:217)
at com.ibm.ws.sibx.scax.mediation.engine.SIBXJavaMediationPrimitive.invoke(SIBXJavaMediationPrimitive.java:93)
at com.ibm.ws.sibx.scax.mediation.engine.MediationPrimitive.invokeConnections(MediationPrimitive.java:311)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.fireOutputTerminals(JavaMediationPrimitive.java:419)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.performInvocation(JavaMediationPrimitive.java:345)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.invoke(JavaMediationPrimitive.java:217)
at com.ibm.ws.sibx.scax.mediation.engine.MediationPrimitive.invokeConnections(MediationPrimitive.java:311)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.fireOutputTerminals(JavaMediationPrimitive.java:419)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.performInvocation(JavaMediationPrimitive.java:345)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.invoke(JavaMediationPrimitive.java:217)
at com.ibm.ws.sibx.scax.mediation.engine.MediationPrimitive.invokeConnections(MediationPrimitive.java:311)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.fireOutputTerminals(JavaMediationPrimitive.java:419)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.performInvocation(JavaMediationPrimitive.java:345)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.invoke(JavaMediationPrimitive.java:217)
at com.ibm.ws.sibx.scax.mediation.engine.SIBXJavaMediationPrimitive.invoke(SIBXJavaMediationPrimitive.java:93)
at com.ibm.ws.sibx.scax.mediation.engine.MediationPrimitive.invokeConnections(MediationPrimitive.java:311)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.fireOutputTerminals(JavaMediationPrimitive.java:419)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.performInvocation(JavaMediationPrimitive.java:345)
at com.ibm.ws.sibx.scax.mediation.engine.JavaMediationPrimitive.invoke(JavaMediationPrimitive.java:217)
at com.ibm.ws.sibx.scax.mediation.engine.MediationPrimitive.invokeConnections(MediationPrimitive.java:311)
at com.ibm.ws.sibx.scax.mediation.engine.Input.invoke(Input.java:137)
at com.ibm.ws.sibx.scax.mediation.engine.RequestFlow.invokeFlow(RequestFlow.java:132)
at com.ibm.ws.sibx.scax.mediation.engine.MediationFlow.invokeRequestFlow(MediationFlow.java:135)
at com.ibm.wsspi.sibx.mediation.flow.ejb.MediationFlowBean.invokeRequestFlow(MediationFlowBean.java:230)
at com.ibm.wsspi.sibx.mediation.flow.ejb.EJSLocalStatelessMediationFlow_f5ad87fe.invokeRequest
Flow(EJSLocalStatelessMediationFlow_f5ad87fe.java:127)

I got tensed thinking of the whole day, will go in vain in debugging this issue. Search didn't give us much information. Then got some clue from devworks forum. Oops there were lot of unanswered questions, few of them got some suggestions same as clean+build and deploy.

I tried a different combination, removed the project from server. (checked in the admin console). Delete all the projects which are generated by WID (App,EJB and WEB Projects). Then do a clean build and deploy application. Mostly this works b'coz it worked for me.

Note : Even after the below steps your facing the problem check in devworks or open a PMR with IBM.

Thursday, February 19, 2009

BO Map Failure at runtime with null pointer Exception

The issue is the BO Map was failing at runtime giving null ponter exception at a custom map, i got really confused looked every thing in the custom map. All the value was checked to null or it is intialized to default. After doing all this again the same error kept on throwing.

Wait i remember something, i checked the right hand side BO (to BO) to which value needs to be assigned. That particular BO was null. Why this ? :-(

There is a file named map.config.properties which is located in
runtimes/properties/ folder of your WID/WPS installation location. That file has an important property set which is

createChildBOsbyDefault=false




if this is set to false if there is custom mapping where the value needs to set to a particular field of the BO, at first we need to create the BO otherwise there should be move option to that particular. unless the above two occurs the BO will be always null. If you try to assign a value to field in the BO. It will throw null pointer exception (check the above screenshot)

In order to overcome the issue, before doing a custom assign to variable to the BO, first create that BO or make a move. The move should be always before the custom assign (exceution order) check the below screen shot

Thursday, February 05, 2009

using promoted properties websphere enterprise service bus aka ESB

The concept of the promoted property is dynamic change without restarting or reinstalling the application again. ESB is used mostly in integeration space. Each and every down time of app change counts. This is very good feature. The implemenatation example goes like this.

For example there is two type of implementations which will be used in the mediation flow, only one of the implementation will be used which one to use will can be configured using the promoted property.


Use "MessageFilter" primitive. In the details select the distribution as "First" . And in the filters tab using xpath create two terminals "match1" and "match2".Click on the promoted properties you can see the filter property is promoted field. select the two field and give alias name different.

Wire the "match1" terminal to one application and "match2" to other application.


Deploy the application. Log in to the admin console. Go the sca modules. This will display all the applications deployed in the server.Select the application and then select mdoule properties there you can see your two properties



Give the value such that it passes one condition (it will use one application at a time). If you gave both the conditions as true. since you have given distribution as first. The first condtion matched terminal will be fired.

If you want all the terminals to be fired then set the distribution property as "All". It will the check all the conditions and fires which ever matching

Tuesday, January 27, 2009

Calling Stand alone reference from an EJB

It is as simple as mentioned, calling stand alone reference from an EJB. Create an EJB project let us use stateless session bean here as an example. In the EJB bean add the method which you want to call and use the piece of below code.

ServiceManager serviceManager = new ServiceManager();
(interface) service= (interface)serviceManager.locateService("");

After the lookup, with the help of service call the interface
and the operation with the parameters

service.operationname(parameters);

Add the newly created EJB project to your BEPL/Mediation Module App or project.
While creating the EJB project itself you will see option for
specifying App project,At the place use the ModuleApp Project Name.

For testing the EJB, use universalTestClient http://localhost:9080/UTC/

Thursday, January 08, 2009

CWWBV0003E: Validated process model ''{0}'' with findings: {1} errors, {2} warnings, {3} information: {4}

Now this is error added to my favorite error list, i have rarely seen this when working in 6.0.2. But after migrating to 6.1.2 this has become a regular, I have added it in my checklist.

SystemErr R com.ibm.bpe.plugins.BPELValidationException: CWWBV0003E: Validated process model 'SampleComponent' with findings: 1 errors, 0 warnings, 0 information:
CWWBV3011E: The XSD type definition 'Sample' was not found (process variable 'sample').
at com.ibm.bpe.validation.BPELValidation.writeProblemsToSystemOutWithException(BPELValidation.java:1378)
at com.ibm.bpe.validation.BPELValidation.validateExecutableBPELExtensionsProcess(BPELValidation.java:842)
at com.ibm.bpe.validation.BPELValidation.validateExecutableBPELExtensionsProcess(BPELValidation.java:674)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.loadBPELResource(ProcessSCAArchive.java:795)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.createBPELContext(ProcessSCAArchive.java:273)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.initBPELProcessContexts(ProcessSCAArchive.java:222)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.(ProcessSCAArchive.java:134)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.(ProcessSCAArchive.java:169)
at com.ibm.bpe.management.application.process.ProcessSCAArchive.(ProcessSCAArchive.java:145)
at com.ibm.bpe.processarchive.SCDLProcessComponentConfigureTask.performTask(SCDLProcessComponentConfigureTask.java:129)
at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:262)
at java.lang.Thread.run(Thread.java:810)

As per our initial analysis we figured that the library files which specified in the dependencies are not getting bundled while deploying. we confirmed that by extracting the EAR file of the module. The solution to the problem if the dependencies are not getting correctly bundled then follow these steps

  • remove everything under .settings folder and recompile so that these files will be regenerated from scratch
  • Check the MANIFEST.MF file under META-INF, if any dependency are missing add it manually
  • Do a clean build
  • Export the ear file and check the ear file for the dependency projects
  • If everything looks ok now deploy the application
Note : This may be not 100% solution, the error may be due to some other issue. The solution works only if dependency not getting bundled with the EAR

Tuesday, December 30, 2008

Business Process not deploying (com.ibm.bpe.util.VersionInfo.(VersionInfo.java:52))

I was trying to publish the application (Business process) module in WID to the server. The server was kept on throwing the error
000000c1 SystemErr R java.lang.NullPointerException
000000c1 SystemErr R at java.util.StringTokenizer.(StringTokenizer.java:197)
000000c1 SystemErr R at java.util.StringTokenizer.(StringTokenizer.java:219)

000000c1 SystemErr R at com.ibm.bpe.util.VersionInfo.(VersionInfo.java:52)

00000c1 SystemErr R at com.ibm.bpe.util.VersionInfo.(VersionInfo.java:47)
000000c1 SystemErr R at com.ibm.bpe.management.application.DeploymentTargetContext.initNodeVersionMap(DeploymentTargetContext.java:565)
000000c1 SystemErr R at com.ibm.bpe.management.application.DeploymentTargetContext.(DeploymentTargetContext.java:98)
000000c1 SystemErr R at com.ibm.bpe.management.application.AbstractDeploymentTask.getDeploymentTargetContexts(AbstractDeploymentTask.java:260) 000000c1 SystemErr R at com.ibm.bpe.processarchive.SCDLProcessComponentConfigureTask.performTask(SCDLProcessComponentConfigureTask.java:301) 000000c1 SystemErr R at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:262)
SystemErr R at java.lang.Thread.run(Thread.java:810)


Then i found that i was trying to publish a module to ESB server. I started the websphere process server and published the project. It was successfully published and started. BPEL modules cannot be published on ESB. If you are getting this error first check this and add it to your checklist

Friday, December 12, 2008

WID+ClearCase (Killer Combination)

Yes exactly its a Killer Combination WID+Clearcase (WebSphere Integeration Developer+ClearCase). It can easily take away all of your development time by making some wild assumptions !!!!. I think when these guys get togther they have AI (Artifical Inteligence) or the Seventh Sense. My God ... no even god can't save you. We have been using this combination WID+Clearcase for the past two years.In a way its good b'coz its good CM(Configuration Management) tool.


For us it started with one fine day, when i started my machine and opened my WID did a clean Build (Alt+p+n). I see hell lot of errors. I got scared b'coz we were in middle of our testing cycle. I started checking am i the culprit. All the error was leading to XSD file. when i opened the file it had .............. I am not adding etc.. dots here guys. Its the dot(.) character i see at the end of the file. Hurray i can find who did this checked in clearcase about the history no one has edited the file from the creation date. I got confused and deleting the unwanted character did Alt+p+n.

Everything was normal. Couple of days gone, the monster returns back this time not only in machine space, couple of other machines too faced but with different files. S...t i had this bug did the same thing and cleaned it. From that day still we are getting this issue. Earlier it was only on XSD file It has grown and it managed to spread to .java, .mon , .bpel, .import, .sca module ...... yes all the project files.

One improvement with the issue, it started adding some other characters other than dot to the file. But it has been consistent it adds only at the last

The only solution for this is to checkout the file delete the character and check in again. we have raised a PMR a longgggggggg back. IBM as usual started asking all the log files and their list of documents. We have provided them but they say they are not able reproduce this.

Hope they never. So the only solution is the above one.

Its weekend guys enjoy.... take a break from work ....

Monday, December 01, 2008

Mediation(.mfc) file could not open using Websphere Integeration Developer aka WID



"Unable to create this part due to an internal error,Reason for the failure: An unexcpected exception was thrown" This was the error i got when i opened my mediation flow in WID. I didn't have clue searched and found nothing. Then started looking seriously into the error. One of my collegue got the same error earlier and he solved it by taking previous version from reposirty, he too started getting the same error.The error said Java.lang.NullPointerException at com.ibm.wbit.sib.mediation.flow.ui.tray.editparts.ReferencePartnerTrayEditPart.getModuleChildren(Unknown Source).

Look at this error "ReferencePartner" that is the clue. We saw a pattern here and found something. It seems that the other collegue deleted the an interface. The deleted interface was having a reference in mediation flow. So when iam trying to open i started getting the above error. I manually created the interface and did a clean build. It worked we are able to open the mediation flow. So here is the thumb rule guys if you have decided to delete any interface check whether it has been used in some other components/module. In case if its mediation be carefull, check the reference partner. If its there delete it from your mediation module and go ahead with your final deletion

Reblog this post [with Zemanta]

Friday, August 08, 2008

Human Task Escaltion Settings

While using human task in BPEL, if particular task is not actioned with in a configured time period. we can configure to escalate that through E-mail, Work Item or Event. In event we can customize how we want to handle the escalation. The human tasks which are claimed, ready and subtask started can be configured to escalate.



We have done with event. I will explain how to escalate human task using event. Select any one of the escalation type and create a escalation. In the details tab configure the values you need

Excepted Task State, Escalate After (Time), Notification Type and others.


Escalate After is the time configurable when escalation is to triggered after creation of task, It can be mentioned or it can be dynamic. For dynamic configuration you should pass the time as input to the Human task and you can access like this

%htm.input.<interfacename>HTParamaters\<inputBO Variable
Name>\<Variable holding value>





For example the time values can be like

10 Seconds, 10 hours, 10 minutes


In the Notification Type select Event

Select any where in the Human Task Editor go to the properties tab in details section there will be input place holder for Event handler name, give the class name of the eventHandler.


Now create the class with the name given in the event Handler input box that class should implement NotificationEventHandlerPlugin. This class has a method named escalationNotification with parameters taskID and escalation. with taskid you can get the input values of HT and do the what ever your escalation implementation as designed

TKIID tkiid = task.getID();
String HT_EJB="local:ejb/com/ibm/task/api/HumanTaskManagerHome"
context = new javax.naming.InitialContext();
LocalHumanTaskManagerHome localTaskHome =
(LocalHumanTaskManagerHome)context.lookup();
LocalHumanTaskManager taskManager = localTaskHome.create(HT_EJB);
ClientObjectWrapper clientObjectWrapper =taskManager.getInputMessage(tkiid);
DataObject inputDO = (DataObject) clientObjectWrapper.getObject();




Afer completeion of coding of go the project resources view create a folder name services inside META-INF folder, create a file inside the folder with the name of com.ibm.task.spi.<EventHandlerClassName>NotificationEventHandlerPlugin. Inside the file in the first line type the fully classified name of the event handler.

Upto this is WID. Now from WPS perpective. After installing the application. Go the TaskContainer application, browse through the link Map RunAs roles to users. Here you will see a user can be configured to run the escalation. If there is mismatch between the user which you have configured in Human Task the escalation task will fail.

The better approach is to use groups while configuring Human Task, create a user assign that user to the particular group and use that user as the run as user.

Thursday, July 10, 2008

Sharing your DataPool values across workspace WID

During development we are forced to use different workspace because of n number of issues. If we do changing the workspace we will lose that data which we added in our datapool while using TestComponent facility in WID. To over come this we found shortcut go to your old workspace folder open .metdata folder under that look
folder named com.ibm.wbit.comptest.ui copy that folder.

Paste the folder in your new workspace .metedata folder. Bravo !!!! you got all your old datapool values no need of entering again.

Thanks to keshav who gave this tip to us.


Tuesday, July 08, 2008

uninstall applications which has process instace running or hanging WPS/WID

Most of us face this problem in development some times (sry most of the times :-) ) we are not able to uninstall application which has process instance running. you will not be able to terminate the process or stop. To overcome this, there is a solution which i found in WID forums thought of sharing good one. use the below command to do the uninstall of application

Go to u r bin directory and run this command

wsadmin -lang jacl -f ../ProcessChoreographer/admin/bpcTemplates.jacl -uninstall MyModuleApp
-force

In the place of MyModuleApp give your application name. This commands connects to the server and unistall the application.

Click here to the solution page at WID Forum

Wednesday, June 25, 2008

Quick publishing your application to Process server (using WID)

While doing development you will be changing lot of things in your code. To test those changes usually we used to restart the project.But WID(WebSphere Integeration Developer) has smart option, After completing your changes build the application.Go to problem tab you can see a message stating that your project has changed need to be reinstalled in server. Select the particular row, and right click there you will see a option called Quick Fix. This option will replace the files which has got modified. Your publishing process became faster now :-)