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