In OSB11 (Eclipse 3.5.3) if you right click on a WSDL you get
Web Services / Publish WSDL File
You choose "Publish this Web Service to the Unit Test UDDI Registry.
If you have not registered any UDDI Registry, you get this error message:
IWAB0363E No UDDI registry available
Do solve the problem, go to
http://ws.apache.org/juddi/releases.html
there is a 3.0.2,
download it, unzip it, deploy juddiv3-war-3.0.2.war to WebLogic.
in Eclipse do New , Other, enter UDDI and select "UDDI Registry".
You must create it inside a Oracle Service Bus Configuration project.
On Java side, you can use http://uddi4j.sourceforge.net/doc.html UDDI4J to invoke the UDDI services.
Showing posts with label osb11. Show all posts
Showing posts with label osb11. Show all posts
Saturday, November 23, 2013
Sunday, February 19, 2012
BEA-010096 unable to connect to the JMS destination
If your JMS proxy service is configured with a jms URI which doesn't match existing resources, you will get plenty of this in the logs:
The Message-Driven EJB: RequestEJB-8751392536757391289--69cc26eb.1359130af7a.-7e0e is unable to connect to the JMS destination or bind to JCA resource adapter: jms.jndi.dq.ACME.ACMEQueue. Connection failed after 3,791 attempts. The MDB will attempt to reconnect/rebind every 10 seconds. This log message will repeat every 600 seconds until the condition clears.
It is advisable to grep BEA-010096 on the logs
http://docs.oracle.com/cd/E13222_01/wls/docs91/messages/EJB.html
The Message-Driven EJB: RequestEJB-8751392536757391289--69cc26eb.1359130af7a.-7e0e is unable to connect to the JMS destination or bind to JCA resource adapter: jms.jndi.dq.ACME.ACMEQueue. Connection failed after 3,791 attempts. The MDB will attempt to reconnect/rebind every 10 seconds. This log message will repeat every 600 seconds until the condition clears.
It is advisable to grep BEA-010096 on the logs
http://docs.oracle.com/cd/E13222_01/wls/docs91/messages/EJB.html
Saturday, August 27, 2011
Installing OSB 10.3.4 on Ubuntu
The installation was not free from problems:
It is very well documented here:
http://soa-playground.blogspot.com/2011/03/oracle-service-bus-osb-on-ubuntu-linux.html
but something must be added:
ignore the warning you get about the insufficient swap space:
Starting Oracle Universal Installer...
Checking if CPU speed is above 300 MHz. Actual 2094 MHz Passed
Checking Temp space: must be greater than 150 MB. Actual 10273 MB Passed
Checking swap space: 509 MB available, 512 MB required. Failed <<<< Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] y
just say yes...
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-08-27_02-56-56PM. Please wait ...
Please specify JRE/JDK location ( Ex. /home/jre ),/bin/java should exist :/ora1034/jdk160_21/
oracle@ubuntu:~/Downloads/osbgeneric/Disk1/install/linux$ Log: /home/oracle/oraInventory/logs/install2011-08-27_02-56-56PM.log
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
just ignore the message "sh: /bin/rpm: not found"
Plenty of prerequisite checks fail... I could not find a way to display the cause of their failure. Yet if you click on the upper button (ignore the lowermost ones) "continue" the installation proceeds without other issues.... weird...
It is very well documented here:
http://soa-playground.blogspot.com/2011/03/oracle-service-bus-osb-on-ubuntu-linux.html
but something must be added:
ignore the warning you get about the insufficient swap space:
Starting Oracle Universal Installer...
Checking if CPU speed is above 300 MHz. Actual 2094 MHz Passed
Checking Temp space: must be greater than 150 MB. Actual 10273 MB Passed
Checking swap space: 509 MB available, 512 MB required. Failed <<<< Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] y
just say yes...
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-08-27_02-56-56PM. Please wait ...
Please specify JRE/JDK location ( Ex. /home/jre ),
oracle@ubuntu:~/Downloads/osbgeneric/Disk1/install/linux$ Log: /home/oracle/oraInventory/logs/install2011-08-27_02-56-56PM.log
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
sh: /bin/rpm: not found
just ignore the message "sh: /bin/rpm: not found"
Plenty of prerequisite checks fail... I could not find a way to display the cause of their failure. Yet if you click on the upper button (ignore the lowermost ones) "continue" the installation proceeds without other issues.... weird...
Labels:
osb11
Friday, July 16, 2010
HookedJarClassLoader.assertOpen
In a Java Callout in OSB I get this.... no clue why... no trace in google..
investigating...
java.lang.IllegalStateException: Already closed at com.bea.wli.sb.resources.archive.classloader.HookedJarClassLoader.assertOpen(HookedJarClassLoader.java:345) at com.bea.wli.sb.resources.archive.classloader.HookedJarClassLoader.getResource(HookedJarClassLoader.java:174) at com.tangosol.util.ExternalizableHelper.loadResource(ExternalizableHelper.java:3020) at com.tangosol.io.pof.ConfigurablePofContext.loadResource(ConfigurablePofContext.java:1224) at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:792) at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:754) at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:324) at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:45)
investigating...
Labels:
javacallout,
osb11
Saturday, July 10, 2010
OSB export in Eclipse fails: org.eclipse.core.runtime.AssertionFailedException: null argument
I have reorganized my stuff in folders, and here is what I get...
the amount of time wasted and frustration accumulated using this Eclipse Plugin for OSB is simply overwhelming....
Even if I create an empty project in a new configuration, it fails export with the same message...
I am trying a "eclipse -clean", and then reimporting an old version of the same project after deleting the "refactored" one.... this seems to fix the problem.
the amount of time wasted and frustration accumulated using this Eclipse Plugin for OSB is simply overwhelming....
Even if I create an empty project in a new configuration, it fails export with the same message...
I am trying a "eclipse -clean", and then reimporting an old version of the same project after deleting the "refactored" one.... this seems to fix the problem.
!ENTRY org.eclipse.ui 4 0 2010-07-10 13:40:56.302 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.core.runtime.AssertionFailedException: null argument: at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85) at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73) at org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(StructuredViewer.java:593) at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:960) at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703) at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1330) at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:390) at org.eclipse.jface.viewers.AbstractTreeViewer.getFilteredChildren(AbstractTreeViewer.java:636) at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:602) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:799) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:776) at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:640) at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1490) at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:829) at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1474) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1354) at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:418) at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1480) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:275) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1639) at com.bea.alsb.ui.repositories.jar.ConfigJarContentViewer.onContainerChanged(Unknown Source) at com.bea.alsb.ui.repositories.jar.ConfigJarContentViewer.access$1(Unknown Source) at com.bea.alsb.ui.repositories.jar.ConfigJarContentViewer$1.propertyChange(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:278) at com.bea.alsb.ui.containers.selection.ContainerSelector.fireSelectionEvent(Unknown Source) at com.bea.alsb.ui.containers.selection.ContainerSelector.setSelectedContainer(Unknown Source) at com.bea.alsb.ui.repositories.jar.ConfigJarContentViewer.(Unknown Source) at com.bea.alsb.ui.repositories.jar.JarContextWizardPage.createResourcesGroup(Unknown Source) at com.bea.alsb.ui.repositories.jar.JarContextWizardPage.createControls(Unknown Source) at com.bea.alsb.ui.repositories.common.BaseWizardPage.createControl(Unknown Source) at com.bea.alsb.ui.repositories.jar.JarContextWizardPage.createControl(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1161) at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1149) at org.eclipse.jface.wizard.WizardDialog$5.run(WizardDialog.java:1139) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1136) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:831) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:625) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:229) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3504) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$Export.executeHandler(WizardHandler.java:98) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:273) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:172) at org.eclipse.ui.actions.ExportResourcesAction.run(ExportResourcesAction.java:117) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3504) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:119) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:515) at org.eclipse.equinox.launcher.Main.run(Main.java:1312) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Labels:
osb11
Monday, July 5, 2010
OSB: The import failed with exception: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
The import failed with exception: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
This happens in Linux.
This thread http://forums.oracle.com/forums/message.jspa?messageID=4390710#4390710 covers the issue, with no solution.
Here same thing:
http://forums.oracle.com/forums/thread.jspa?threadID=1092747&tstart=30
The full stacktrace is:
This http://java.sun.com/javase/6/docs/api/java/io/File.html#createTempFile%28java.lang.String,%20java.lang.String%29
tells me that we are trying to write to the "default temporary directory"...
http://www.idevelopment.info/data/Programming/java/io/Files/CreateTemporaryFile.java
The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Win32 systems it is typically "c:\\temp".
Most likely your /tmp/alsbTempJars has a owner different from the user that starts WebLogic.
See here http://download.oracle.com/docs/cd/E14148_02/wlcp/ocsg41_otn/installguide/soa-install.html
After installing Oracle Service Bus on a UNIX or Linux system, make sure that the directory /tmp/alsbTempJars has the same access privileges as the BEA Home directory. Alternatively, remove the directory /tmp/alsbTempJars after the installation if the directory exists.
This happens in Linux.
This thread http://forums.oracle.com/forums/message.jspa?messageID=4390710#4390710 covers the issue, with no solution.
Here same thing:
http://forums.oracle.com/forums/thread.jspa?threadID=1092747&tstart=30
The full stacktrace is:
Caused By: java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1704) at java.io.File.createTempFile(File.java:1792) at com.bea.wli.sb.util.IOUtils.storeToTempFile(IOUtils.java:245) at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderDerivedTypeDef.computeData(ArchiveClassLoaderDerivedTypeDef.java:120) at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderDerivedTypeDef.computeData(ArchiveClassLoaderDerivedTypeDef.java:34) at com.bea.wli.config.derivedcache.DerivedCache.deriveTheValue(DerivedCache.java:453) at com.bea.wli.config.derivedcache.DerivedCache.get(DerivedCache.java:273) at com.bea.wli.config.derivedcache.DerivedResourceManager.getDerivedValueInfo(DerivedResourceManager.java:341) at com.bea.wli.config.derivedcache.DerivedResourceManager.get(DerivedResourceManager.java:386) at com.bea.wli.sb.resources.cache.DefaultDerivedTypeDef.getDerivedValue(DefaultDerivedTypeDef.java:106) at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderCache.get(ArchiveClassLoaderCache.java:38) at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryDerivedTypeDef.computeData(ArchiveSummaryDerivedTypeDef.java:46) at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryDerivedTypeDef.computeData(ArchiveSummaryDerivedTypeDef.java:23) at com.bea.wli.config.derivedcache.DerivedCache.deriveTheValue(DerivedCache.java:453) at com.bea.wli.config.derivedcache.DerivedCache.get(DerivedCache.java:273) at com.bea.wli.config.derivedcache.DerivedResourceManager.getDerivedValueInfo(DerivedResourceManager.java:341) at com.bea.wli.config.derivedcache.DerivedResourceManager.get(DerivedResourceManager.java:386) at com.bea.wli.sb.resources.cache.DefaultDerivedTypeDef.getDerivedValue(DefaultDerivedTypeDef.java:106) at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryCache.getArchiveSummary(ArchiveSummaryCache.java:31) at com.bea.wli.sb.resources.archive.ArchiveResourceTypeDef.validate(ArchiveResourceTypeDef.java:85) at com.bea.wli.config.validation.ResourceValidator.validateContents(ResourceValidator.java:118) at com.bea.wli.config.validation.ResourceValidator.call(ResourceValidator.java:64) at com.bea.wli.config.validation.SequentialValidator.validate(SequentialValidator.java:34) at com.bea.wli.config.validation.ValidationService.validate(ValidationService.java:171) at com.bea.wli.config.impl.CoreToSessionPropagator.doValidation(CoreToSessionPropagator.java:239) at com.bea.wli.config.impl.CoreToSessionPropagator.handleBeforePrepare(CoreToSessionPropagator.java:118) at com.bea.wli.config.impl.CoreToSessionPropagator.beforePrepare(CoreToSessionPropagator.java:77) at com.bea.wli.config.transaction.TransactionListenerWrapper.beforePrepare(TransactionListenerWrapper.java:64) at com.bea.wli.config.transaction.TransactionManager.notifyBeforePrepare(TransactionManager.java:1094) at com.bea.wli.config.transaction.TransactionManager._prepareForCommit(TransactionManager.java:654) at com.bea.wli.config.transaction.TransactionManager.endTransaction(TransactionManager.java:782) at com.bea.wli.config.transaction.TransactionalTask._doExecute(TransactionalTask.java:226) at com.bea.wli.config.transaction.TransactionalTask._doExecuteWithRetry(TransactionalTask.java:162) at com.bea.wli.config.transaction.TransactionalTask.doExecute(TransactionalTask.java:142) at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:236) at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:191) at com.bea.wli.config.task.impl.ImportTask.doImport(ImportTask.java:114) at com.bea.wli.config.mbeans.Config.importUploaded(Config.java:467) 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 com.bea.alsb.console.support.ConsoleSideMBeanInvocationHandler.__invoke(ConsoleSideMBeanInvocationHandler.java:113) at com.bea.alsb.console.support.ConsoleSideMBeanInvocationHandler.invoke(ConsoleSideMBeanInvocationHandler.java:71) at $Proxy183.importUploaded(Unknown Source) at com.bea.alsb.console.deployment.actions.UpdateImportRepositoryAction.execute(UpdateImportRepositoryAction.java:181) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
This http://java.sun.com/javase/6/docs/api/java/io/File.html#createTempFile%28java.lang.String,%20java.lang.String%29
tells me that we are trying to write to the "default temporary directory"...
http://www.idevelopment.info/data/Programming/java/io/Files/CreateTemporaryFile.java
The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Win32 systems it is typically "c:\\temp".
Most likely your /tmp/alsbTempJars has a owner different from the user that starts WebLogic.
See here http://download.oracle.com/docs/cd/E14148_02/wlcp/ocsg41_otn/installguide/soa-install.html
After installing Oracle Service Bus on a UNIX or Linux system, make sure that the directory /tmp/alsbTempJars has the same access privileges as the BEA Home directory. Alternatively, remove the directory /tmp/alsbTempJars after the installation if the directory exists.
Sunday, July 4, 2010
OSB: error handling, fault
First read the posts of my friend Jan and of Eric Elzinga (whom I have never had the pleasure to meet).
Here http://www.javamonamour.org/2010/04/soap-fault-in-osb.html I have taken some notes.
Here a full explanation on the topic:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/modelingmessageflow.htm#i1040168
When a fault is handled in the fault handler, you have this:
$body
$fault
Not necessarily "reason" and "details" are populated! Details should be retrieved from the $body variable. Reason is nowhere to be found.
(see also here http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1051816 for $fault definition)
To access individual info in the fault:
$fault/ctx:errorCode/text()
Error codes are here http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/errorcodes.html
NB:
the body uses the namespace http://schemas.xmlsoap.org/soap/envelope/
here http://schemas.xmlsoap.org/soap/envelope/ you can find the XSD for the env:Fault
the fault uses the namespace http://www.bea.com/wli/sb/context
If you terminate the Error Handler with "Reply with failure", you return a HTTP 500 status. In SOAPUI, in the response panel click in RAW, you will see "HTTP/1.1 500 Internal Server Error".
The ambiguity is that if you get a fault internal to OSB - rather than from an external service - the $body doesn't contain the fault, but rather the original request message. In this case the $fault will contain the info required:
The rule for a "universal error handler" could be:
merge whatever information comes from $body (if it's a env:Fault) and from $fault, to build a meaningful env:Fault object to return to the caller with a HTTP 500 status.
This can be used to merge env:Fault and ctx:fault into a meaningful env:Fault:
Using Axis2 as a client, during unmarshalling of the response Axis will generate a org.apache.axis2.AxisFault Java exception upon reception of a env:Fault in the body;
reason, code and details are populated.
This is optional and can be disabled.
All this takes place in Axis2 kernel, org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(...)
When unittesting for SOAP Fault, assert that an AxisFault exception is generated.
Here http://www.javamonamour.org/2010/04/soap-fault-in-osb.html I have taken some notes.
Here a full explanation on the topic:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/modelingmessageflow.htm#i1040168
When a fault is handled in the fault handler, you have this:
$body
<env:Body xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring/>
<detail>
<java:CacheStateException xmlns:java="java:com.acme.cache.commons">
<java:CacheName>geo-data-geographic-area</java:CacheName>
<java:Status>Not initialized</java:Status>
</java:CacheStateException>
</detail>
</env:Fault>
</env:Body>
$fault
<con:fault xmlns:con="http://www.bea.com/wli/sb/context"> <con:errorCode>BEA-380001</con:errorCode> <con:location> <con:node>RouteNodeToEJBBS</con:node> <con:path>response-pipeline</con:path> </con:location> </con:fault>
Not necessarily "reason" and "details" are populated! Details should be retrieved from the $body variable. Reason is nowhere to be found.
(see also here http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1051816 for $fault definition)
To access individual info in the fault:
$fault/ctx:errorCode/text()
Error codes are here http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/errorcodes.html
NB:
the body uses the namespace http://schemas.xmlsoap.org/soap/envelope/
here http://schemas.xmlsoap.org/soap/envelope/ you can find the XSD for the env:Fault
the fault uses the namespace http://www.bea.com/wli/sb/context
If you terminate the Error Handler with "Reply with failure", you return a HTTP 500 status. In SOAPUI, in the response panel click in RAW, you will see "HTTP/1.1 500 Internal Server Error".
The ambiguity is that if you get a fault internal to OSB - rather than from an external service - the $body doesn't contain the fault, but rather the original request message. In this case the $fault will contain the info required:
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-382513</con:errorCode>
<con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}XP0006: "text '
'": bad value for type element {http://www.acme.com/schema/GeoServicePS/v1}getLocationsByLocationIds { {http://www.w3.
org/2001/XMLSchema}anyType }</con:reason>
<con:location>
<con:node>RouteNodeToEJBBS</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
The rule for a "universal error handler" could be:
merge whatever information comes from $body (if it's a env:Fault) and from $fault, to build a meaningful env:Fault object to return to the caller with a HTTP 500 status.
This can be used to merge env:Fault and ctx:fault into a meaningful env:Fault:
xquery version "1.0" encoding "Cp1252";
xquery version "1.0" encoding "Cp1252";
(:: pragma parameter="$theBody" type="xs:anyType" ::)
(:: pragma parameter="$theFault" type="xs:anyType" ::)
(:: pragma type="xs:anyType" ::)
declare namespace xf = "http://tempuri.org/GEO_OSB_MARIA_EJBProxyProject/XQ/generateFault/";
declare namespace env = "http://schemas.xmlsoap.org/soap/envelope/";
declare namespace con = "http://www.bea.com/wli/sb/context";
declare function xf:generateFault($theBody as element(*),
$theFault as element(*))
as element(*) {
{fn:concat($theBody/env:Fault/faultcode/text(), ' ', $theFault/con:errorCode/text())}
{fn:concat($theBody/env:Fault/faultstring/text(), ' ' , $theFault/con:reason/text())}
{$theBody/env:Fault/detail/*} { $theFault/con:location}
};
declare variable $theBody as element(*) external;
declare variable $theFault as element(*) external;
xf:generateFault($theBody, $theFault) Using Axis2 as a client, during unmarshalling of the response Axis will generate a org.apache.axis2.AxisFault Java exception upon reception of a env:Fault in the body;
reason, code and details are populated.
This is optional and can be disabled.
All this takes place in Axis2 kernel, org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(...)
When unittesting for SOAP Fault, assert that an AxisFault exception is generated.
Wednesday, June 23, 2010
This project is not associated with an Oracle Service Bus Configuration.
Let's face it, the Eclipse Plugin for OSB in 11g has still some problems.
Closing and opening a Configuration and its Projects doesn't bring you back to the initial state: you get a nice
error.
What to do? I have tried several hacks, including restarting Eclipse,
finally the only solution was to create a new configuration and drag the project inside.
Closing and opening a Configuration and its Projects doesn't bring you back to the initial state: you get a nice
This project is not associated with an Oracle Service Bus Configuration.
error.
What to do? I have tried several hacks, including restarting Eclipse,
finally the only solution was to create a new configuration and drag the project inside.
Labels:
osb11
Wednesday, June 16, 2010
OSB, closing a Project belonging to a Configuration will fail deployment
I find this feature a bit irritating:
you create configuration AConf,
you create inside two projects:
AProj
BProj
Now you close BProj and you deploy AConf to the server from Eclipse.
You will get an error message reminding you that BProj is closed.
I would expect that, since I am deploying only AProj, the state of BProj doesn't really matter.
Workaround: either keep the BProj open, or move it to another configuration.
I like to keep open only the projects I am currently working on, to improve Eclipse performance issues and avoid getting confused while I click around.
I would also strongly discourage renaming projects, I have the impression the old name still hangs around in some configuration file, and when you deploy you get an error message:
Resource '/yourProjectName' does not exist.
after I have renamed yourProjectName intosomething else.
In fact you can go into ConfigurationProject/.setting/com.bea.alsb.core.prefs
and there is a property
container.referenced.projects=yourProjectName1|yourProjectName2|
Just remove the one you don't need... it's a hack but it works.
Remember to refresh the ConfigProject in Eclipse afterwards, close the ConfigProject and reopen it.
you create configuration AConf,
you create inside two projects:
AProj
BProj
Now you close BProj and you deploy AConf to the server from Eclipse.
You will get an error message reminding you that BProj is closed.
I would expect that, since I am deploying only AProj, the state of BProj doesn't really matter.
Workaround: either keep the BProj open, or move it to another configuration.
I like to keep open only the projects I am currently working on, to improve Eclipse performance issues and avoid getting confused while I click around.
I would also strongly discourage renaming projects, I have the impression the old name still hangs around in some configuration file, and when you deploy you get an error message:
Resource '/yourProjectName' does not exist.
after I have renamed yourProjectName intosomething else.
In fact you can go into ConfigurationProject/.setting/com.bea.alsb.core.prefs
and there is a property
container.referenced.projects=yourProjectName1|yourProjectName2|
Just remove the one you don't need... it's a hack but it works.
Remember to refresh the ConfigProject in Eclipse afterwards, close the ConfigProject and reopen it.
Sunday, June 13, 2010
OSB and Coherence, a real life scenario with performance data
Here http://javatoolsforweblogic.googlecode.com/svn/trunk/OSBArtifacts/OSBCachingTests.jar you have a sample project that you can explore and play with. I also log if the cache was hit or missed.
Make sure you enable Caching in OSB: "Operations/Global Settings/Enable Result Caching".
You can configure caching only at Business Service level:
and make sure you extract the Cache Token (a unique ID for the request) from the payload.
Make sure you read this:
in order to test result caching, do not invoke the business service directly from the test console
You should then create a PS with a routing node pointing to the BS, and using inbound operation for outbound.
The configuration is:
GeoOsbServicePS is the actual service
GeoOsbServiceBS is the BS with caching enabled, and pointing to GeoOsbServicePS
GeoOsbServiceWithCachePS is simply a facade to expose the GeoOsbServiceBS
Test with cache:
Test without cache:
Using SoapUI I am injecting a 5 Threads load, first on the GeoOsbServicePS Proxy Service (no cache) and then on the GeoOsbServiceWithCachePS. These are the average response times measured:
GeoOsbServicePS : 47 ms
GeoOsbServiceWithCachePS : 13 ms
I was requesting over and over the same data.... for a more realistic test we should try requesting a variety of data.... the improvement of course will heavily depend on the hit/miss ratio.... if the overhead introduced by the extra PS and the caching layer is not justified by the percentage of hits, then performance will be deteriorated...
It is particurarly fascinating to observe the outbound message to the BS:
cache token in this case is the unique identifier extracted from the payload, and the TTL in cache is set to 30 minutes
<tran:cache-token xmlns:tran="http://www.bea.com/wli/sb/transports">2</tran:cache-token>
<tran:cache-ttl xmlns:tran="http://www.bea.com/wli/sb/transports">PT30M</tran:cache-ttl>
the outbound response contains:
<tran:cache-originated xmlns:tran="http://www.bea.com/wli/sb/transports">false</tran:cache-originated>
the first time, and for subsequent invocations it becomes true.
Which Cache Token Expression are you allowed to use? Not any user defined expression, but only one dependent on:
$body, $header, $operation or $metadata.
otherwise you will get a OSB Kernel BEA-398311 error
Cache Token expression is using invalid variable variableName.
The good thing is that you can use a single BS to cache the result of multiple operations on an external service, since the actual token used in Coherence will be made by your Cache Token + Operation + BS Identifier, so there is no chance that two different operations conflict with each other because they provide the same token.
When you start your OSB server, you should find this:
<13-06-2010 16:05:25 CEST> <Info> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Loaded operational configuration from resource "zip:C:/bea11/coherence_3.5/lib/coherence.jar!/tangosol-coherence.xml">
<13-06-2010 16:05:25 CEST> <Info> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Loaded operational overrides from resource "zip:C:/bea11/coherence_3.5/lib/coherence.jar!/tangosol-coherence-override-dev.xml">
<13-06-2010 16:05:25 CEST> <Info> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Loaded operational overrides from resource "zip:C:/bea11/user_projects/domains/osbdomain/servers/AdminServer/tmp/_WL_user/ALSB Coherence Cache Provider/sm027g/APP-INF/lib/com.bea.alsb.coherence-impl.jar!/tangosol-coherence-override.xml">
<13-06-2010 16:05:25 CEST> <Info> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Loaded operational overrides from resource "file:/C:/bea11/user_projects/domains/osbdomain/config/osb/coherence/osb-coherence-override.xml">
<13-06-2010 16:05:26 CEST> <Warning> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Local address "127.0.0.1
" is a loopback address; this cluster node will not connect to nodes located on different machines>
<13-06-2010 16:05:29 CEST> <Info> <Coherence> <BEA-000000> <Oracle Coherence 3.5.3/465p2 (member=n/a): Created a new cluster "OSB-
cluster" with Member(Id=1, Timestamp=2010-06-13 16:05:26.258, Address=127.0.0.1:7890, MachineId=50080, Location=machine:localhost,
process:4468, Role=OSB-node, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=2) UID=0x7F0000010000012931A11172C3A0
1ED2>
<13-06-2010 16:05:30 CEST> <Info> <OSB Coherence WebLogic> <BEA-2032482> <The OSB Coherence Cache Provider has been initialized wi
th com.bea.alsb.coherence.impl.CoherenceProvider: SafeCluster: Name=OSB-cluster
WellKnownAddressList(Size=1,
WKA{Address=127.0.0.1, Port=7890}
)
MasterMemberSet
(
ThisMember=Member(Id=1, Timestamp=2010-06-13 16:05:26.258, Address=127.0.0.1:7890, MachineId=50080, Location=machine:localhost,p
rocess:4468, Role=OSB-node)
OldestMember=Member(Id=1, Timestamp=2010-06-13 16:05:26.258, Address=127.0.0.1:7890, MachineId=50080, Location=machine:localhost
,process:4468, Role=OSB-node)
ActualMemberSet=MemberSet(Size=1, BitSetCount=2
Member(Id=1, Timestamp=2010-06-13 16:05:26.258, Address=127.0.0.1:7890, MachineId=50080, Location=machine:localhost,process:44
68, Role=OSB-node)
)
RecycleMillis=120000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)
Services
(
TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=127.0.0.1:7890}, Connections=[]}
ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
).>
Thursday, June 10, 2010
OSB: how to use properly fn-bea:execute-sql
Full documentation is here
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/xquery.htm#OSBAG451
This statement:
assign "fn-bea:execute-sql('geo_osb_ds',
xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID > 0')" to sites
will NOT work, only 1 element will be returned.
Bear in mind that bea:execute-sql returns a element()* (with an *), which means that the XML-Fragment returned by the function NEEDS A CONTAINER NODE.
If you want the entire result set to be returned, provide a container node:
<locations>
{fn-bea:execute-sql('geo_osb_ds',
xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID > 0')
} </locations>
One more thing:
this
fn-bea:execute-sql('geo_osb_ds',xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID = $sideId')
will NOT work, the binding of $siteId will not happen. You must use this syntax:
fn-bea:execute-sql('geo_osb_ds',xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID = ?', $sideId)
Besides, there is no way you can assign a namespace to the result of the query,
the namespace will always be empty:
<java:Location>
<SITEID xmlns="">1.0</SITEID>
<SITENAME xmlns="">Suresh</SITENAME>
<STATEID xmlns="">345.0</STATEID>
<COUNTRYID xmlns="">23.0</COUNTRYID>
</java:Location>
so when you acces it with XPath you should do something like:
declare namespace empty = "";
let $countryId = $item/empty:COUNTRYID/text()
Also, even if you provide a column name in lowercase, as in
select SITEID as siteid...
fn-bea:execute-sql will convert the element name in UPPERCASE.
This is a major pain in the neck, it means that you still need to map this element into whatever case you need.
As for using the SQL IN clause, forget to be able to do it using bind variable "?" in the SQL statement, and passing a XQuery string like 'element1, element2' : it will simply not work, I have tried everything. I don't know which SQL Statement is exactly generated, I should activate the SQL DEbug flag....
A workaround is forget the fn-bea:execute-sql ? bind variable mechanism and build your SQL query dynamically:
let $sqlStat := fn:concat('select bla from bla where bla in "', $myListOfMatches, "'")
fn-bea:execute-sql('geo_osb20_ds', xs:QName('ns1:Location'), $sqlStat)
Dirty trick but it works.
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/xquery.htm#OSBAG451
This statement:
assign "fn-bea:execute-sql('geo_osb_ds',
xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID > 0')" to sites
will NOT work, only 1 element will be returned.
Bear in mind that bea:execute-sql returns a element()* (with an *), which means that the XML-Fragment returned by the function NEEDS A CONTAINER NODE.
If you want the entire result set to be returned, provide a container node:
<locations>
{fn-bea:execute-sql('geo_osb_ds',
xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID > 0')
} </locations>
One more thing:
this
fn-bea:execute-sql('geo_osb_ds',xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID = $sideId')
will NOT work, the binding of $siteId will not happen. You must use this syntax:
fn-bea:execute-sql('geo_osb_ds',xs:QName('Location'),
'select SITENAME, LATITUDE, LONGITUDE from GEO_SITE where SITEID = ?', $sideId)
Besides, there is no way you can assign a namespace to the result of the query,
the namespace will always be empty:
<java:Location>
<SITEID xmlns="">1.0</SITEID>
<SITENAME xmlns="">Suresh</SITENAME>
<STATEID xmlns="">345.0</STATEID>
<COUNTRYID xmlns="">23.0</COUNTRYID>
</java:Location>
so when you acces it with XPath you should do something like:
declare namespace empty = "";
let $countryId = $item/empty:COUNTRYID/text()
Also, even if you provide a column name in lowercase, as in
select SITEID as siteid...
fn-bea:execute-sql will convert the element name in UPPERCASE.
This is a major pain in the neck, it means that you still need to map this element into whatever case you need.
As for using the SQL IN clause, forget to be able to do it using bind variable "?" in the SQL statement, and passing a XQuery string like 'element1, element2' : it will simply not work, I have tried everything. I don't know which SQL Statement is exactly generated, I should activate the SQL DEbug flag....
A workaround is forget the fn-bea:execute-sql ? bind variable mechanism and build your SQL query dynamically:
let $sqlStat := fn:concat('select bla from bla where bla in "', $myListOfMatches, "'")
fn-bea:execute-sql('geo_osb20_ds', xs:QName('ns1:Location'), $sqlStat)
Dirty trick but it works.
Labels:
fn-bea:execute-sql,
osb11
OSB: trouble publishing projects from Eclipse Plugin to Server
this happens whenever you REMOVE a project.
I have the impression that deleting everything from the OSB Server, performing a clean (Servers tab) and republishing again fixes the issue.
See also here
http://forums.oracle.com/forums/thread.jspa?messageID=4314236&tstart=0
eclipse.buildId=unknown
java.version=1.6.0_17
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Thu Jun 10 11:07:34 CEST 2010
Runtime exception occurred during publish. The publish is aborted. Please report the bug with the stack trace. The stack can be found on the log and the Error Log view.
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.bea.alsb.server.publish.internal.ALSBModuleFactory.getDeletedContainerModules(Unknown Source)
at com.bea.alsb.server.publish.ALSBPublishOperation.execute(Unknown Source)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1253)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:804)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:660)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:526)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I have the impression that deleting everything from the OSB Server, performing a clean (Servers tab) and republishing again fixes the issue.
See also here
http://forums.oracle.com/forums/thread.jspa?messageID=4314236&tstart=0
eclipse.buildId=unknown
java.version=1.6.0_17
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Thu Jun 10 11:07:34 CEST 2010
Runtime exception occurred during publish. The publish is aborted. Please report the bug with the stack trace. The stack can be found on the log and the Error Log view.
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.bea.alsb.server.publish.internal.ALSBModuleFactory.getDeletedContainerModules(Unknown Source)
at com.bea.alsb.server.publish.ALSBPublishOperation.execute(Unknown Source)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1253)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:804)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:660)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:526)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Labels:
osb11
Wednesday, June 9, 2010
OSB JEJB, exposing a OSB Proxy Service Message Flow as a EJB
Manual is here
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jejb.htm#OSBDV1036
Further elaboration on this topic is available here:
http://biemond.blogspot.com/2010/06/jejb-transport-and-manipulating-java.html
If you create a Proxy Service as "Transport Typed Service", your only option is JEJB.
With Business Service you have EJB, JEJB and FLOW.
You should write the Interface:
package com.acme.jejb;
public interface EmployeeService {
EmployeeResponse fireEmployee(Employee emp);
}
and the Employee and EmployeeResponse classes (omitted for clarity).
You package this in a Client Jar and use it in the definition of the PS. No implementation is required, since the Service will be the OSB Message Flow itself.
The nasty surprise it that you cannot test the PS from the Console, it says "the service is not testable since all its operations require Java arguments".
Yet if you go to the WebLogic Console, Deployments, you will see a new EJB module
_JEJB_ALSB_1276103248594 deployed in a EAR:
C:\ bea11\ user_projects\ domains\ osbdomain\ sbgen\ alsb_jejb_transport\ _JEJB_ALSB_1276103248594\ build\ dist\ _JEJB_ALSB_1276103248594. ear
with a Deployment Plan
C:\ bea11\ user_projects\ domains\ osbdomain\ osb\ config\ plan\ Plan-_JEJB_ALSB_1276103248594. ear. xml
and inside the EAR you have a Jar containing the Interface you specified in the service.
Inside you find also the Stateless Session Bean generated for you by OSB:
import com.bea.wli.sb.transports.jejb.gen.inb.BaseInboundEJBHelper;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import javax.ejb.TransactionAttributeType;
import javax.ejb.Remote;
@Stateless(mappedName="EMPPS")
@Remote
@TransactionManagement(value=TransactionManagementType.CONTAINER)
public class CoherenceEJBProject_EMPPSBean extends BaseInboundEJBHelper implements com.acme.jejb.EmployeeService{
private final String targetNS = "http://www.openuri.org/";
@TransactionAttribute(value=TransactionAttributeType.SUPPORTS)
public com.acme.jejb.EmployeeResponse fireEmployee(
com.acme.jejb.Employee arg0 )
{
Object[] paramValues = new Object[1];
Class[] paramClasses = new Class[1];
String[] paramNames = new String[1];
// copy parameter values and classes into their arrays
paramValues[0] = arg0;
paramClasses[0] = com.acme.jejb.Employee.class;
paramNames[0] = "arg0";
// call the pipeline
try {
return (com.acme.jejb.EmployeeResponse) callPipeline("ProxyService$CoherenceEJBProject$EMPPS", "Archive$CoherenceEJBProject$employee", "fireEmployee", paramClasses,
paramValues, paramNames, true, targetNS, "com.acme.jejb.EmployeeResponse",
"Supports", true,
false);
} catch (Error e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (java.lang.reflect.InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t instanceof Error) throw ((Error) t);
if (t instanceof RuntimeException) throw ((RuntimeException) t);
// check each declared exception
// obscure checked exception thrown as wrapped - ERROR!
throw new RuntimeException("Unsupported checked exception thrown wrapped", t);
}
} // end fireEmployee method definition
} // end CoherenceEJBProject_EMPPS class definition
Incidentally, com.bea.wli.sb.transports.jejb.gen.inb.BaseInboundEJBHelper is in
C:\bea11\Oracle_OSB11\lib\transports\jejb_transport.jar
Besides, some configuration is made available in
C:\bea11\user_projects\domains\osbdomain\osb\config\core\YOUR_OSB_PROJECT
in an XML fragment which contains the configuration of the PS (nothing particularly exciting).
At this point most likely you will notice the exception:
java.lang.NoClassDefFoundError: com/bea/wli/sb/transports/jejb/gen/inb/BaseInboundEJBHelper
YET the component seems to be deployed OK.
The JNDI Tree will contain these entries:
_JEJB_ALSB_1276103248594CoherenceEJBProject_EMPPS_jarCoherenceEJBProject_EMPPSEJB_EmployeeService
and
_JEJB_ALSB_1276103248594CoherenceEJBProject_EMPPS_jarCoherenceEJBProject_EMPPSEJB_Home
weblogic.ejb.container.internal.StatelessEJBHomeImpl_1033_WLStub
and now how shall I cast the JNDI lookup and make a remote call? I don't have the Remote interfaces here...
WIP
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jejb.htm#OSBDV1036
Further elaboration on this topic is available here:
http://biemond.blogspot.com/2010/06/jejb-transport-and-manipulating-java.html
If you create a Proxy Service as "Transport Typed Service", your only option is JEJB.
With Business Service you have EJB, JEJB and FLOW.
You should write the Interface:
package com.acme.jejb;
public interface EmployeeService {
EmployeeResponse fireEmployee(Employee emp);
}
and the Employee and EmployeeResponse classes (omitted for clarity).
You package this in a Client Jar and use it in the definition of the PS. No implementation is required, since the Service will be the OSB Message Flow itself.
The nasty surprise it that you cannot test the PS from the Console, it says "the service is not testable since all its operations require Java arguments".
Yet if you go to the WebLogic Console, Deployments, you will see a new EJB module
_JEJB_ALSB_1276103248594 deployed in a EAR:
C:\ bea11\ user_projects\ domains\ osbdomain\ sbgen\ alsb_jejb_transport\ _JEJB_ALSB_1276103248594\ build\ dist\ _JEJB_ALSB_1276103248594. ear
with a Deployment Plan
C:\ bea11\ user_projects\ domains\ osbdomain\ osb\ config\ plan\ Plan-_JEJB_ALSB_1276103248594. ear. xml
and inside the EAR you have a Jar containing the Interface you specified in the service.
Inside you find also the Stateless Session Bean generated for you by OSB:
import com.bea.wli.sb.transports.jejb.gen.inb.BaseInboundEJBHelper;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import javax.ejb.TransactionAttributeType;
import javax.ejb.Remote;
@Stateless(mappedName="EMPPS")
@Remote
@TransactionManagement(value=TransactionManagementType.CONTAINER)
public class CoherenceEJBProject_EMPPSBean extends BaseInboundEJBHelper implements com.acme.jejb.EmployeeService{
private final String targetNS = "http://www.openuri.org/";
@TransactionAttribute(value=TransactionAttributeType.SUPPORTS)
public com.acme.jejb.EmployeeResponse fireEmployee(
com.acme.jejb.Employee arg0 )
{
Object[] paramValues = new Object[1];
Class[] paramClasses = new Class[1];
String[] paramNames = new String[1];
// copy parameter values and classes into their arrays
paramValues[0] = arg0;
paramClasses[0] = com.acme.jejb.Employee.class;
paramNames[0] = "arg0";
// call the pipeline
try {
return (com.acme.jejb.EmployeeResponse) callPipeline("ProxyService$CoherenceEJBProject$EMPPS", "Archive$CoherenceEJBProject$employee", "fireEmployee", paramClasses,
paramValues, paramNames, true, targetNS, "com.acme.jejb.EmployeeResponse",
"Supports", true,
false);
} catch (Error e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (java.lang.reflect.InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t instanceof Error) throw ((Error) t);
if (t instanceof RuntimeException) throw ((RuntimeException) t);
// check each declared exception
// obscure checked exception thrown as wrapped - ERROR!
throw new RuntimeException("Unsupported checked exception thrown wrapped", t);
}
} // end fireEmployee method definition
} // end CoherenceEJBProject_EMPPS class definition
Incidentally, com.bea.wli.sb.transports.jejb.gen.inb.BaseInboundEJBHelper is in
C:\bea11\Oracle_OSB11\lib\transports\jejb_transport.jar
Besides, some configuration is made available in
C:\bea11\user_projects\domains\osbdomain\osb\config\core\YOUR_OSB_PROJECT
in an XML fragment which contains the configuration of the PS (nothing particularly exciting).
At this point most likely you will notice the exception:
java.lang.NoClassDefFoundError: com/bea/wli/sb/transports/jejb/gen/inb/BaseInboundEJBHelper
YET the component seems to be deployed OK.
The JNDI Tree will contain these entries:
_JEJB_ALSB_1276103248594CoherenceEJBProject_EMPPS_jarCoherenceEJBProject_EMPPSEJB_EmployeeService
and
_JEJB_ALSB_1276103248594CoherenceEJBProject_EMPPS_jarCoherenceEJBProject_EMPPSEJB_Home
weblogic.ejb.container.internal.StatelessEJBHomeImpl_1033_WLStub
and now how shall I cast the JNDI lookup and make a remote call? I don't have the Remote interfaces here...
WIP
Tuesday, June 8, 2010
OSB, WebLogic and Derby Database Console with NetBeans
After installation of OSB11, we get by default a DataSource connecting to this database:
jdbc:derby://localhost:1527/osbexamples;create=true;ServerName=localhost;databaseName=osbexamples
with driver
org.apache.derby.jdbc.ClientDriver
user=DEV_SOAINFRA
To connect a Console with NetBeans 6.8 do this:
Window/Services
open the Databases tab
there should be already a jdbc:derby .../samples
you can edit it (or create a new one) with these properties:
URL: jdbc:derby://localhost:1527/osbexamples
Driver: org.apache.derby.jdbc.ClientDriver
Schema: APP
User: DEV_SOAINFRA
in the schema DEV_SOAINFRA
you can open the table
WL_LLR_ADMINSERVER which contains:
XIDSTR POOLNAMESTR RECORDSTR
JDBC LLR Domain//Server JDBC LLR Domain//Server osbdomain//AdminServer
JDBC LLR Version JDBC LLR Version 1.0
where osbdomain is your domain name, and AdminServer your admin server name.
So if you have multiple Weblogic Domains on the same machine, but only one instance of Derby running, you can create a new schema for a new user, and make sure that the second domain uses as a JDBC Pool user this new user, and update the "JDBC LLR Domain//Server" record with the name of your domain/adminserver.
This shold fix the infamous exception:
jdbc:derby://localhost:1527/osbexamples;create=true;ServerName=localhost;databaseName=osbexamples
with driver
org.apache.derby.jdbc.ClientDriver
user=DEV_SOAINFRA
To connect a Console with NetBeans 6.8 do this:
Window/Services
open the Databases tab
there should be already a jdbc:derby .../samples
you can edit it (or create a new one) with these properties:
URL: jdbc:derby://localhost:1527/osbexamples
Driver: org.apache.derby.jdbc.ClientDriver
Schema: APP
User: DEV_SOAINFRA
in the schema DEV_SOAINFRA
you can open the table
WL_LLR_ADMINSERVER which contains:
XIDSTR POOLNAMESTR RECORDSTR
JDBC LLR Domain//Server JDBC LLR Domain//Server osbdomain//AdminServer
JDBC LLR Version JDBC LLR Version 1.0
where osbdomain is your domain name, and AdminServer your admin server name.
So if you have multiple Weblogic Domains on the same machine, but only one instance of Derby running, you can create a new schema for a new user, and make sure that the second domain uses as a JDBC Pool user this new user, and update the "JDBC LLR Domain//Server" record with the name of your domain/adminserver.
This shold fix the infamous exception:
java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'my_domain2//AdminServer' expected
'my_domain//AdminServer'
An easier solution is to change (Wl Console : AdminServer/General/advanced options/JDBC LLR Table Name) the table name to use in LLR: the default is WL_LLR_ADMINSERVER but you can change it to something else)
Saturday, June 5, 2010
OSB dynamic routing to JRules
We want to provide a generic proxy to invoke JRules.
We provide a routing table in a jrulesEndpointLookupTable XQuery:
<operations>
<operation>
<name>checkemployee</name>
<endpoint>http://localhost:8080/DecisionService/ws/PV01_RuleApp/1.0/PV01_RuleProject/1.0</endpoint>
</operation>
<operation>
<name>checkcompany</name>
<endpoint>http://localhost:8080/DecisionService/ws/PV01_RuleApp/1.0/PV01_RuleProjectCompany/1.0</endpoint>
</operation>
</operations>
where we identify each Ruleset with an identifier (checkemployee).
The Request payload will specify this identifier (jrulesOperation), together with the JRules payload:
<xsd:element name="DecisionServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="jrulesOperation" type="xsd:string"/>
<xsd:element name="jrulesPayload" type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
This is a sample payload:
<dec:DecisionServiceRequest xmlns:dec="http://www.ilog.com/rules/DecisionService">
<dec:jrulesOperation>checkemployee</dec:jrulesOperation>
<dec:jrulesPayload>
<par:employeeRequest xmlns:par="http://www.ilog.com/rules/param" xmlns:emp="http://www.acme.com/Employee">
<emp:EmployeeRequest>
<emp:SSN>1234-56-7890</emp:SSN>
<emp:name>Pierre</emp:name>
<emp:dateOfBirth>1961-02-11</emp:dateOfBirth>
<emp:employeeType>none</emp:employeeType>
<emp:salary>20</emp:salary>
</emp:EmployeeRequest>
</par:employeeRequest>
</dec:jrulesPayload>
</dec:DecisionServiceRequest>
where par:employeeRequest is the verbalization of the input parameter in JRules.
The OSB proxy service must:
- extract the jrulesOperation (checkemployee) and payload:
$body/dec:DecisionServiceRequest/dec:jrulesOperation/text()
$body/dec:DecisionServiceRequest/dec:jrulesPayload/node()
- do a lookup on the jrulesEndpointLookupTable to determine the endpoint:
$jrulesEndpointTable/operation[name=$jrulesOperation]/endpoint/text()
- do a Service Callout by using the Routing Option element to set the URI
- return as a body the response from JRules:
replace . in variable body with variable jrulesResponse
We provide a routing table in a jrulesEndpointLookupTable XQuery:
<operations>
<operation>
<name>checkemployee</name>
<endpoint>http://localhost:8080/DecisionService/ws/PV01_RuleApp/1.0/PV01_RuleProject/1.0</endpoint>
</operation>
<operation>
<name>checkcompany</name>
<endpoint>http://localhost:8080/DecisionService/ws/PV01_RuleApp/1.0/PV01_RuleProjectCompany/1.0</endpoint>
</operation>
</operations>
where we identify each Ruleset with an identifier (checkemployee).
The Request payload will specify this identifier (jrulesOperation), together with the JRules payload:
<xsd:element name="DecisionServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="jrulesOperation" type="xsd:string"/>
<xsd:element name="jrulesPayload" type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
This is a sample payload:
<dec:DecisionServiceRequest xmlns:dec="http://www.ilog.com/rules/DecisionService">
<dec:jrulesOperation>checkemployee</dec:jrulesOperation>
<dec:jrulesPayload>
<par:employeeRequest xmlns:par="http://www.ilog.com/rules/param" xmlns:emp="http://www.acme.com/Employee">
<emp:EmployeeRequest>
<emp:SSN>1234-56-7890</emp:SSN>
<emp:name>Pierre</emp:name>
<emp:dateOfBirth>1961-02-11</emp:dateOfBirth>
<emp:employeeType>none</emp:employeeType>
<emp:salary>20</emp:salary>
</emp:EmployeeRequest>
</par:employeeRequest>
</dec:jrulesPayload>
</dec:DecisionServiceRequest>
where par:employeeRequest is the verbalization of the input parameter in JRules.
The OSB proxy service must:
- extract the jrulesOperation (checkemployee) and payload:
$body/dec:DecisionServiceRequest/dec:jrulesOperation/text()
$body/dec:DecisionServiceRequest/dec:jrulesPayload/node()
- do a lookup on the jrulesEndpointLookupTable to determine the endpoint:
$jrulesEndpointTable/operation[name=$jrulesOperation]/endpoint/text()
- do a Service Callout by using the Routing Option element to set the URI
- return as a body the response from JRules:
replace . in variable body with variable jrulesResponse
Friday, May 28, 2010
OSB inspection through WSIL
There are 2 interesting Servlet mappings available:
http://localhost:7001/sbinspection.wsil/
this will give you:
and
http://localhost:7001/inspection.wsil/
this will give
http://localhost:7001/sbinspection.wsil/
this will give you:
<ins:inspection>
<ins:link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/sbinspection.wsil?refpath=OSBProject1">
<ins:abstract>OSBProject1</ins:abstract>
<ins:abstract>LinkType: Project</ins:abstract>
</ins:link>
<ins:link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/sbinspection.wsil?refpath=CoherenceEJBProject">
<ins:abstract>CoherenceEJBProject</ins:abstract>
<ins:abstract>LinkType: Project</ins:abstract>
</ins:link>
<ins:link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/sbinspection.wsil?refpath=MichalProject">
<ins:abstract>MichalProject</ins:abstract>
<ins:abstract>LinkType: Project</ins:abstract>
</ins:link>
</ins:inspection>
and
http://localhost:7001/inspection.wsil/
this will give
<?xml version="1.0" encoding="UTF-8" ?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
<link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/inspection.wsil?appname=WS Transport Async Applcation">
<abstract>WS Transport Async Applcation</abstract>
</link>
<link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/inspection.wsil?appname=ALSB Subscription Listener">
<abstract>ALSB Subscription Listener</abstract>
</link>
<link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/inspection.wsil?appname=wls-wsat">
<abstract>wls-wsat</abstract>
</link>
<link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/" location="http://localhost:7001/inspection.wsil?appname=bea_wls9_async_response">
<abstract>bea_wls9_async_response</abstract>
</link>
</inspection>
Thursday, May 27, 2010
OSB integration with JRules through SOAP or EJB
First, let's get familiar with this new baby, JRules; this can be done simply by playing with her.
Documentation:
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0/index.jsp
Download JRules 7.0 binaries (including Tomcat, Derby etc):
https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swg-iwilogjt70&S_PKG=dl&S_TACT=104CBW71<=en_US&cp=UTF-8&dlmethod=http
(you need to have an account with IBM, it's free anyhow)
You can deploy JRules to WebLogic - it's only a bunch of EARs. In this case you access this way:
http://localhost:7001/res
The Console gives you:
Explorer - this contains the Navigator, to display the RuleApps and the Decision Services
You can Create a RuleApp, add RuleSet to a RuleApp by provinding a Ruleset Archive.
Decision Warehouse
Diagnostics
Server Info
In WebLogic console, view the JNDI tree and you will see this:
Binding Name: eis.XUConnectionFactory
Class: ilog.rules.res.xu.cci.IlrXUConnectionFactory
Unfortunately the JRules manual says:
"EJB3 bindings are supported for the JBoss 4.2/5.0, WebSphere 7;0 application servers."
which doesn't sound good if you use WebLogic.
Anyway ilog/rules/res/xu/cci/IlrXUConnectionFactory.class is in these 2 JARs:
C:\Program Files\IBM\WebSphereILOGJRules702\executionserver\lib\jrules-res-execution.jar:
C:\Program Files\IBM\WebSphereILOGJRules702\executionserver\lib\jrules-res-session-java.jar:
Here
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0m2/index.jsp?topic=/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global1674.html
it mentions:
"how to execute a simple stateless rule session on a Java EE application server...by using a Java client."
and here
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0m2/index.jsp?topic=/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global308.html
a promising tutorial on how to invoke JRules from WebLogic Workshop.
WIP....
Documentation:
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0/index.jsp
Download JRules 7.0 binaries (including Tomcat, Derby etc):
https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swg-iwilogjt70&S_PKG=dl&S_TACT=104CBW71<=en_US&cp=UTF-8&dlmethod=http
(you need to have an account with IBM, it's free anyhow)
You can deploy JRules to WebLogic - it's only a bunch of EARs. In this case you access this way:
http://localhost:7001/res
The Console gives you:
Explorer - this contains the Navigator, to display the RuleApps and the Decision Services
You can Create a RuleApp, add RuleSet to a RuleApp by provinding a Ruleset Archive.
Decision Warehouse
Diagnostics
Server Info
In WebLogic console, view the JNDI tree and you will see this:
Binding Name: eis.XUConnectionFactory
Class: ilog.rules.res.xu.cci.IlrXUConnectionFactory
Unfortunately the JRules manual says:
"EJB3 bindings are supported for the JBoss 4.2/5.0, WebSphere 7;0 application servers."
which doesn't sound good if you use WebLogic.
Anyway ilog/rules/res/xu/cci/IlrXUConnectionFactory.class is in these 2 JARs:
C:\Program Files\IBM\WebSphereILOGJRules702\executionserver\lib\jrules-res-execution.jar:
C:\Program Files\IBM\WebSphereILOGJRules702\executionserver\lib\jrules-res-session-java.jar:
Here
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0m2/index.jsp?topic=/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global1674.html
it mentions:
"how to execute a simple stateless rule session on a Java EE application server...by using a Java client."
and here
http://publib.boulder.ibm.com/infocenter/brjrules/v7r0m2/index.jsp?topic=/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global308.html
a promising tutorial on how to invoke JRules from WebLogic Workshop.
WIP....
Wednesday, May 26, 2010
OSB and EJB 3.0 Client Jar File
Now, we want to expose an EJB 3.0 Stateless Session Bean in a Business Service in OSB11.
Create an EJB 3.0 Project, and ASSOCIATE IT to a EAR, and enable generation of EJB Client Jar.
The EJB will look like this:
package com.lassi.mejb;
import javax.ejb.Stateless;
/**
* Session Bean implementation class LassiEJB
*/
@Stateless(mappedName="LassiEJB")
public class LassiEJB implements LassiEJBRemote, LassiEJBLocal {
/**
* Default constructor.
*/
public LassiEJB() {
// TODO Auto-generated constructor stub
}
@Override
public String hello(String message) {
System.out.println("message=" + message);
return "hello " + message;
}
@Override
public String helloLocal(String message) {
System.out.println("messagelocal=" + message);
return "hellolocal " + message;
}
}
and the interfaces:
package com.lassi.mejb;
import javax.ejb.Remote;
@Remote
public interface LassiEJBRemote {
String hello(String message);
}
and
package com.lassi.mejb;
import javax.ejb.Local;
@Local
public interface LassiEJBLocal {
String helloLocal(String message);
}
To generate the Client EJB Jar, just export the EAR project as an EAR, then unzip it.
You will get a LassiEJBProjectClient.jar in APP-INF/lib.
Otherwise you can right-click on the EJB project, choose Java EE Tools and Generate EJB Client JAR.
Make sure that your Local and Remote interfaces are created in the EJBClient project, otherwise your EJB Client JAR will contain only the manifest.mf file and you will be very disappointed.
THIS EJB Client JAR is the JAR you need to import into OSB.
To find the JNDI name of your EJB click on the WLServer in the console and look into "View JNDI tree".
It should be something like LassiEARLassiEJBProject_jarLassiEJB_Home
Also, in OSB create a JNDI provider with t3://localhost:7001 and call it myjndiprovider
Create a Business Service, Transport Typed,
the URI will be like ejb:myjndiprovider:LassiEJB#com.lassi.mejb.LassiEJBRemote
In the Business Interface you can choose the Local or the Remote interface (of course if you choose Local it will be faster! But if you use the JNDI name of the Remote interface it will not work... I presume ???? )....
At the end, if you get a
java.lang.ClassCastException: weblogic.ejb.container.internal.StatelessEJBHomeImpl
or a
java.lang.ClassCastException: $Proxy224
at com.bea.wli.sb.transports.ejb.Jws.hellopierrelocal(Unknown Source)
most likely it means you are binding to the wrong JNDI name...
Create an EJB 3.0 Project, and ASSOCIATE IT to a EAR, and enable generation of EJB Client Jar.
The EJB will look like this:
package com.lassi.mejb;
import javax.ejb.Stateless;
/**
* Session Bean implementation class LassiEJB
*/
@Stateless(mappedName="LassiEJB")
public class LassiEJB implements LassiEJBRemote, LassiEJBLocal {
/**
* Default constructor.
*/
public LassiEJB() {
// TODO Auto-generated constructor stub
}
@Override
public String hello(String message) {
System.out.println("message=" + message);
return "hello " + message;
}
@Override
public String helloLocal(String message) {
System.out.println("messagelocal=" + message);
return "hellolocal " + message;
}
}
and the interfaces:
package com.lassi.mejb;
import javax.ejb.Remote;
@Remote
public interface LassiEJBRemote {
String hello(String message);
}
and
package com.lassi.mejb;
import javax.ejb.Local;
@Local
public interface LassiEJBLocal {
String helloLocal(String message);
}
To generate the Client EJB Jar, just export the EAR project as an EAR, then unzip it.
You will get a LassiEJBProjectClient.jar in APP-INF/lib.
Otherwise you can right-click on the EJB project, choose Java EE Tools and Generate EJB Client JAR.
Make sure that your Local and Remote interfaces are created in the EJBClient project, otherwise your EJB Client JAR will contain only the manifest.mf file and you will be very disappointed.
THIS EJB Client JAR is the JAR you need to import into OSB.
To find the JNDI name of your EJB click on the WLServer in the console and look into "View JNDI tree".
It should be something like LassiEARLassiEJBProject_jarLassiEJB_Home
Also, in OSB create a JNDI provider with t3://localhost:7001 and call it myjndiprovider
Create a Business Service, Transport Typed,
the URI will be like ejb:myjndiprovider:LassiEJB#com.lassi.mejb.LassiEJBRemote
In the Business Interface you can choose the Local or the Remote interface (of course if you choose Local it will be faster! But if you use the JNDI name of the Remote interface it will not work... I presume ???? )....
At the end, if you get a
java.lang.ClassCastException: weblogic.ejb.container.internal.StatelessEJBHomeImpl
or a
java.lang.ClassCastException: $Proxy224
at com.bea.wli.sb.transports.ejb.Jws.hellopierrelocal(Unknown Source)
most likely it means you are binding to the wrong JNDI name...
Tuesday, May 25, 2010
OSB: what is deployed in the OSB domain?
FMW Welcome Page Application:
C:/bea11/oracle_common/modules/oracle.jrf_11.1.1/fmw-welcome.ear
this is the Fusion MiddleWare welcome page (???? what is this exactly?)
DMS Application
C:/bea11/oracle_common/modules/oracle.dms_11.1.1/dms.war
DMS is Dynamic Monitoring System
(The Oracle Dynamic Monitoring Service (DMS) consists of a small set of simple Sensor classes that help Java programmers to measure important events and status values in their applications.)
http://download.oracle.com/docs/cd/B10464_05/core.904/b12020/oracle/dms/instrument/DMSConsole.html
wsil-wls
C:/bea11/oracle_common/modules/oracle.webservices_11.1.1/wsil-wls.ear
(WSIL is the Web Service Inspection Language)
FileAdapter
C:/bea11/Oracle_OSB11/soa/connectors/FileAdapter.rar
DbAdapter
C:/bea11/Oracle_OSB11/soa/connectors/DbAdapter.rar
JmsAdapter
C:/bea11/Oracle_OSB11/soa/connectors/JmsAdapter.rar
AqAdapter
C:/bea11/Oracle_OSB11/soa/connectors/AqAdapter.rar
FtpAdapter
C:/bea11/Oracle_OSB11/soa/connectors/FtpAdapter.rar
SocketAdapter
C:/bea11/Oracle_OSB11/soa/connectors/SocketAdapter.rar
MQSeriesAdapter
C:/bea11/Oracle_OSB11/soa/connectors/MQSeriesAdapter.rar
OracleAppsAdapter
C:/bea11/Oracle_OSB11/soa/connectors/AppsAdapter.rar
OracleBamAdapter
C:/bea11/Oracle_OSB11/soa/connectors/OracleBamAdapter.rar
ALSB Cluster Singleton Marker Application
C:/bea11/Oracle_OSB11/lib/common/clustersingletonmarker.ear
Its listener is com.bea.wli.sb.init.MarkerAppListener
which is in sb-kernel-wls.jar
ALSB Domain Singleton Marker Application
C:/bea11/Oracle_OSB11/lib/common/domainsingletonmarker.ear
The ALSB Domain Singleton Marker Application is responsible for the collection and aggregation of data from all managed servers in the domain.
Its listener is com.bea.wli.sb.init.MarkerAppListener
which is in sb-kernel-wls.jar and which does absolutely nothing.
ALSB Framework Starter Application
C:/bea11/Oracle_OSB11/lib/common/frameworkstarter.ear
ALSB Coherence Cache Provider
C:/bea11/Oracle_OSB11/lib/coherence.ear
XBus Kernel
C:/bea11/Oracle_OSB11/lib/kernelEar
with subdeployment
XBus HTTP Transport Webapp
/httpTransport
ALSB UDDI Manager
C:/bea11/Oracle_OSB11/lib/uddiEar
ALSB Subscription Listener
C:/bea11/Oracle_OSB11/lib/uddi_subscription
JMS Reporting Provider
C:/bea11/Oracle_OSB11/lib/common/jmsreportprovider.ear
Message Reporting Purger
C:/bea11/Oracle_OSB11/lib/common/msgpurger.ear
...... more to come.... I want to discover who is who...and who does what...
C:/bea11/oracle_common/modules/oracle.jrf_11.1.1/fmw-welcome.ear
this is the Fusion MiddleWare welcome page (???? what is this exactly?)
DMS Application
C:/bea11/oracle_common/modules/oracle.dms_11.1.1/dms.war
DMS is Dynamic Monitoring System
(The Oracle Dynamic Monitoring Service (DMS) consists of a small set of simple Sensor classes that help Java programmers to measure important events and status values in their applications.)
http://download.oracle.com/docs/cd/B10464_05/core.904/b12020/oracle/dms/instrument/DMSConsole.html
wsil-wls
C:/bea11/oracle_common/modules/oracle.webservices_11.1.1/wsil-wls.ear
(WSIL is the Web Service Inspection Language)
FileAdapter
C:/bea11/Oracle_OSB11/soa/connectors/FileAdapter.rar
DbAdapter
C:/bea11/Oracle_OSB11/soa/connectors/DbAdapter.rar
JmsAdapter
C:/bea11/Oracle_OSB11/soa/connectors/JmsAdapter.rar
AqAdapter
C:/bea11/Oracle_OSB11/soa/connectors/AqAdapter.rar
FtpAdapter
C:/bea11/Oracle_OSB11/soa/connectors/FtpAdapter.rar
SocketAdapter
C:/bea11/Oracle_OSB11/soa/connectors/SocketAdapter.rar
MQSeriesAdapter
C:/bea11/Oracle_OSB11/soa/connectors/MQSeriesAdapter.rar
OracleAppsAdapter
C:/bea11/Oracle_OSB11/soa/connectors/AppsAdapter.rar
OracleBamAdapter
C:/bea11/Oracle_OSB11/soa/connectors/OracleBamAdapter.rar
ALSB Cluster Singleton Marker Application
C:/bea11/Oracle_OSB11/lib/common/clustersingletonmarker.ear
Its listener is com.bea.wli.sb.init.MarkerAppListener
which is in sb-kernel-wls.jar
ALSB Domain Singleton Marker Application
C:/bea11/Oracle_OSB11/lib/common/domainsingletonmarker.ear
The ALSB Domain Singleton Marker Application is responsible for the collection and aggregation of data from all managed servers in the domain.
Its listener is com.bea.wli.sb.init.MarkerAppListener
which is in sb-kernel-wls.jar and which does absolutely nothing.
ALSB Framework Starter Application
C:/bea11/Oracle_OSB11/lib/common/frameworkstarter.ear
ALSB Coherence Cache Provider
C:/bea11/Oracle_OSB11/lib/coherence.ear
XBus Kernel
C:/bea11/Oracle_OSB11/lib/kernelEar
with subdeployment
XBus HTTP Transport Webapp
/httpTransport
ALSB UDDI Manager
C:/bea11/Oracle_OSB11/lib/uddiEar
ALSB Subscription Listener
C:/bea11/Oracle_OSB11/lib/uddi_subscription
JMS Reporting Provider
C:/bea11/Oracle_OSB11/lib/common/jmsreportprovider.ear
Message Reporting Purger
C:/bea11/Oracle_OSB11/lib/common/msgpurger.ear
...... more to come.... I want to discover who is who...and who does what...
Labels:
osb11
OSB Local Transport with Java Request Message Type
I am invoking a Proxy Service defined as
"Local Transport with Java Request Message Type and Java Response Message Type"
and, not matter whan I specify as a payload, I get a:
BEA-382054 :
The documentation says:
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15034/Router.html
BEA-382054
but the OSB11 documentation doesn't mention Java Request Message Type... so I am not sure what should the java-content should look like....
This http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656 might give some clues... in fact you are supposed to have in the body an element
<java-content ref="cid:kkkkeeeeyyyy"/>
"Local Transport with Java Request Message Type and Java Response Message Type"
and, not matter whan I specify as a payload, I get a:
BEA-382054 :
| Expected [[http://www.bea.com/wli/sb/context]java-content] element under $body is missing or invalid |
The documentation says:
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15034/Router.html
BEA-382054
Error: Expected [[http://www.bea.com/wli/sb/context]java-content] element under $body is missing or invalid
Description | Services of Messaging Type : Java are expected to contain a valid [[http://www.bea.com/wli/sb/context]java-content] child element under $body. |
Action | Make sure the contents of $body conforms to expected format. One can use Log action to log and examine the contents of any message context variable, including $body |
but the OSB11 documentation doesn't mention Java Request Message Type... so I am not sure what should the java-content should look like....
This http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656 might give some clues... in fact you are supposed to have in the body an element
<java-content ref="cid:kkkkeeeeyyyy"/>
Labels:
osb11
Subscribe to:
Posts (Atom)