Issue: javax.management.MalformedObjectNameException: Key properties cannot be empty
at javax.management.ObjectName.construct(ObjectName.java:393)
at javax.management.ObjectName.(ObjectName.java:1314)
at com.evermind.server.Application.registerApplicationMBeans(Application.java:3060)
at com.evermind.server.Application.addJ2EEApplicationMBean(Application.java:1742)
at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:219)
at com.evermind.server.Application.setConfig(Application.java:460)
at com.evermind.server.Application.setConfig(Application.java:361)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1919)
at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:776)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:273)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Solution: Add ":type=Application,name=ManageUtilMBean" in objectname
<jmx-mbean objectname=":type=Application,name=ManageUtilMBean" class="com.oracle.huawei.mbean.ManageUtil">
<description>Manage Oracle AS and BPEL util
<attribute name="Property1">
<value>1
</attribute>
</jmx-mbean>
----------------------------------------------------------------------------------------------------------------
Issue:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:228)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:169)
Solution:
Add jta.jar in your classpath
----------------------------------------------------------------------------------------------------------------
Issue: Unhandled java exception, blocks the process
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:246)
at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:58)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
public void invokeBPEL(IBPELProcessHandle bpelProcessHandle,
String operationName, String payloadName,
String initiateInput) {
try {
IDeliveryService dService =
(IDeliveryService)locator.lookupService(com.oracle.bpel.client.dispatch.IDeliveryService.SERVICE_NAME);
String bpelProcessName =
bpelProcessHandle.getProcessId().getProcessId();
// Create normalized message with payload
NormalizedMessage nm = new NormalizedMessage();
nm.addPart(payloadName, initiateInput);
LOGGER.info("Operation Name: " + operationName);
// Operation Type 1 & 3 are synchronous, 0 and 2 are asynchronous
int operationType =
bpelProcessHandle.getOperationType(operationName);
LOGGER.info("OperationType :" + operationType);
if (operationType == 1
operationType == 3) {
//NormalizedMessage responseNM =
LOGGER.info("Before Sync Invoke");
dService.request(bpelProcessName, operationName, nm);
LOGGER.info("After Sync Invoke");
} else {
LOGGER.info("Before Async Invoke");
dService.post(bpelProcessName, operationName, nm);
LOGGER.info("After Async Invoke");
}
} catch (Exception e) {
LOGGER.info("Got Exception");
e.printStackTrace();
} finally {
LOGGER.info("Finally block: Posted message successfully");
return;
}
}
Solution:
If there is an error after post message bpel call, it throws exception as shown above and it will never catch in Exception block and exits the process without returning back to called method.
To return back to the called method add finally block with empty return for the void method.
at javax.management.ObjectName.construct(ObjectName.java:393)
at javax.management.ObjectName.
at com.evermind.server.Application.registerApplicationMBeans(Application.java:3060)
at com.evermind.server.Application.addJ2EEApplicationMBean(Application.java:1742)
at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:219)
at com.evermind.server.Application.setConfig(Application.java:460)
at com.evermind.server.Application.setConfig(Application.java:361)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1919)
at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:776)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:273)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Solution: Add ":type=Application,name=ManageUtilMBean" in objectname
<jmx-mbean objectname=":type=Application,name=ManageUtilMBean" class="com.oracle.huawei.mbean.ManageUtil">
<description>Manage Oracle AS and BPEL util
<attribute name="Property1">
<value>1
</attribute>
</jmx-mbean>
----------------------------------------------------------------------------------------------------------------
Issue:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:228)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:169)
Solution:
Add jta.jar in your classpath
----------------------------------------------------------------------------------------------------------------
Issue: Unhandled java exception, blocks the process
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:246)
at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:58)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
public void invokeBPEL(IBPELProcessHandle bpelProcessHandle,
String operationName, String payloadName,
String initiateInput) {
try {
IDeliveryService dService =
(IDeliveryService)locator.lookupService(com.oracle.bpel.client.dispatch.IDeliveryService.SERVICE_NAME);
String bpelProcessName =
bpelProcessHandle.getProcessId().getProcessId();
// Create normalized message with payload
NormalizedMessage nm = new NormalizedMessage();
nm.addPart(payloadName, initiateInput);
LOGGER.info("Operation Name: " + operationName);
// Operation Type 1 & 3 are synchronous, 0 and 2 are asynchronous
int operationType =
bpelProcessHandle.getOperationType(operationName);
LOGGER.info("OperationType :" + operationType);
if (operationType == 1
operationType == 3) {
//NormalizedMessage responseNM =
LOGGER.info("Before Sync Invoke");
dService.request(bpelProcessName, operationName, nm);
LOGGER.info("After Sync Invoke");
} else {
LOGGER.info("Before Async Invoke");
dService.post(bpelProcessName, operationName, nm);
LOGGER.info("After Async Invoke");
}
} catch (Exception e) {
LOGGER.info("Got Exception");
e.printStackTrace();
} finally {
LOGGER.info("Finally block: Posted message successfully");
return;
}
}
Solution:
If there is an error after post message bpel call, it throws exception as shown above and it will never catch in Exception block and exits the process without returning back to called method.
To return back to the called method add finally block with empty return for the void method.