For Oracle Service Bus 10.3 & 11g you can use the ANT / WLST deployment scripts provided by Oracle. With these scripts you can make an export of a project from sbconsole and make a deployment / configuration plan and you can import a project jar to the sbconsole.
I made some changes to these scripts so it only needs one property file, you don't need the import or export.properties files. The second change I made is support for making an export jar from the OSB workspace ( OEPE environment ). Very important to do this on a copy of your workspace or use subversion because you need to delete the .metadata folder for a successful export. ( you will loose all your workspace settings )
Here is the build.properties.
The ANT build.xml
When you want to run the ANT task from CMD then you need these environment variables
You can use these ANT tasks
ant exportFromWorkspace ( do this on a copy of your OEPE workspace )
ant importToOSB
ant exportFromOSB
Or you can run these task in JDeveloper then you need to update these classpath entries for ANT
And run your ANT task from JDeveloper.
Download the source code on my github https://github.com/biemond/soa_tools

Hi,
ReplyDeleteI have problem:(
we are planing to have the osb project in SVN.There are multiple user who will check in their proxy services,business service n all.
What i want to do is check out this OSB artifacts from svn and deploy it on a server..which has to be automated.
The problem here is i cannot use ur export from workspace as i will not have .metadata n all.
So how will i do this automation...I am really confuse..
Please help me ,ie how will i implement this senario...
Thanks
Rohan
Hi,
ReplyDeletewith the exportFromWorkspace ANT task, you don't need to have a .metadata folder, better not to have this because this will crash the export.
just let Continious Integration do a checkout on a temp folder and exportFromWorkspace will delete this .metedata folder and you got an OSB export.
hope this helps
Hi Edwin,
ReplyDeletecan you elaborate on your point about deleting the .metadata folder in order to do a successful export?
I am using more or less the same scripts, but I can make an export of the sources withiout first deleting the .metadata folder. I did some extra checks (apply changes, import after export etc) but I do not run into any problem..
Regards,
- Tom
Hi Tom,
ReplyDeleteI have to do it else I get strange java errors without a glue what's wrong with it.
[java]
[java] Synchronizing "OSB Configuration"...
[java] Error during configuration jar export.
[java] Exporting to c:/temp/sbconfig.jar...
BUILD FAILED
C:\projecten\workspace\11g_prod\osb_deployment\Osb\build.xml:58: Java returned: 101
When I delete this metadata folder then the export utility rebuilds the projects structure and the export is successful.
When I take a look at the Oracle doc, Then I see that Oracle do the same.
http://download.oracle.com/docs/cd/E14571_01/relnotes.1111/e10132/osb.htm#CJAJDHFF
thanks
I am getting the following exception while trying to export from OSB
ReplyDelete----------
[wlst] File specified export.py does not exist
[wlst] java.lang.IllegalStateException: File specified export.py does not e
xist
[wlst] Exception in thread "main" java.lang.IllegalStateException: java.lan
g.IllegalStateException: File specified export.py does not exist
Hi,
ReplyDeletethe export.py is located in the workspace zip and in this folder osb_deployment/Osb.
thanks
Sorry but i searched my entire OSB11gR1 installation forlder but couldnt find workspace.zip folder. Any pointer as where can i find it.
ReplyDeleteHi,
ReplyDeleteI mean the download link under this blogpost.
thanks
I am running this from the command line and when the export is processing I get the following error
ReplyDelete[java] java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensionRegistry
Hi,
ReplyDeleteyou can add this jar to jdeveloper or to the bat file.
do you have custom java in it. In my testcases I dont need this class or you can try to generate a weblogic full client instead of the weblogic.jar
thanks
I did, I am using classpath refid to add jars to the process and I double checked it was bringing it in, but I still get the error
ReplyDeleteI figured out my issue, check out
ReplyDeletehttp://cn.forums.oracle.com/forums/thread.jspa?threadID=943099
which is basically added...
Add system property "com.bea.plateng.common.util.logging.useJDKlogger" set to "true" for configexport task, so that ANT target body look like:
\[...]
I got this working successfully. I had to make a few minor changes.
ReplyDeleteThere is an issue when the project is deployed it deletes the System which causes issues with the Gobal Settings and causes everything to error...
The Console has encountered an exception during the execution of an action. Details of the exception are displayed below. Console Exception
Message com.bea.wli.config.component.NotFoundException: Validation failed for Operations System/Operator Settings/GlobalOperationalSettings: Referenced component (Operations System/Operator Settings/GlobalOperationalSettings) not found.
Type com.bea.wli.config.component.NotFoundException
Hi,
ReplyDeleteThat why I make a OSB export from a subversion export and not doing it in the OSB workspace.
and never commit this.
thanks
Hello Edwin,
ReplyDeleteQuick Question...
Are there any pure ant tasks for OSB?
I've been using BEA/Oracle Weblogic for a long time, and the ant tasks provided with Weblogic are very usefull. Basically all my app use ant and I would love to keep the same approach for my new OSB apps.
Thank you.
Hi,
ReplyDeletenot pure ANT, you can call wlst from ANT. Maybe in the next big release when it move to JDeveloper
thanks
Hi,
ReplyDeleteI have the exported sbconfig.jar generated properly and is getting imported in my local OSB11g environment properly. However when I try to do the export and import it in a remote environment, I get the following error:
[wlst] DomainRuntime MBeanServer is not enabled on a Managed Server.
[wlst]
[wlst] ALSB Admin Server listening on : http://xxxx.com:50087
[wlst] Created Session SessionScript1295650634270
[wlst]
[wlst] sessionMBean: None
[wlst] Unexpected Error: exceptions.AttributeError
[wlst] Unexpected Error: exceptions.AttributeError
[wlst] No stack trace available.
[wlst] Traceback (innermost last):
[wlst] File "/home/bld/xxx/xyz/osb/deploy/scripts/delimport.py", line 70, in ?
[wlst] File "/home/bld/xxx/xyz/osb/deploy/scripts/delimport.py", line 24, in removeFromALSBDomain
[wlst] File "/home/bld/xxx/xyz/osb/deploy/scripts/delimport.py", line 64, in getSessionManagementMBean
[wlst] AttributeError: 'NoneType' object has no attribute 'createSession'
The significant difference I could find between my local env and the remote env is that I just have an adminserver running in my local and the remote has and adminserver and a managedserver running. I am trying to do the remote deployment onto the managed server. Please advise.
Thank you.
Hi,
ReplyDeletecan you deploy against the adminserver, maybe that will work.
thnaks.
A few questions on this remote deployment issue as follows for which I seek your expert advise on the same.
ReplyDelete1. Though the managedserver port is different from the adminserver, I believe I should use the adminserver port to deploy the sbconfig.jar onto the managed server. Am I right?
2. By any chances, should I add some code to register the managedserver for deploying the sbconfig.jar onto this managedserver.
Thank you.
Hi Edwin,
ReplyDeletevery very useful blog. Keep doign the nice job.
Just a small question:
what is the text editor you are using for the code shown in your screenshots?
I mean the one with the numbered lines and the green vertical line on the left.
Kind Regards,
Loukas
Hi,
ReplyDeletethat is google syntaxhighlighter.
now moved to
http://alexgorbatchev.com/SyntaxHighlighter/
good luck
Hi Edwin,
ReplyDeleteThanks for this post, it helps alot! I'm having issues getting the java task to run though. I've tried running the "setDomainEnv.cmd" as you suggest in the readme, but I think the classpath ends up being too long. Here is the error I'm seeing:
java.io.IOException: Cannot run program "D:\tools\WINDOW~1\jre\bin\java.exe" (in directory "D:\workspace\cjcitta_pmd.001.00_int_ci_sandbox\esd01\pmd_app\OSBScripts"
): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
...
Hi,
ReplyDeleteplease check your PATH and other JAVA environment variables. I think this is your problem.
thanks
Hi Edwin,
ReplyDeleteIn order to get this working without the entire middleware suite being installed locally, I had to copy the following directories into a separate lib directory and point my ant script at that: wlst, osb, oepe, and modules. Altogether this lib directory ends up just under 1 gig.
So, it doesn't appear that Oracle yet has a way to build OSB projects from source in an IDE agnostic manner, or am I missing something? Basically we need the ability for a separate team to build and deploy from a machine which does not have weblogic, osb, or eclipse on it.
Please let me know your thoughts!
Thanks,
~sillydino
Hi,
ReplyDeleteThe way Oracle and BEA works with OSB = using the sbconsole web application. They dont use OEPE. in the next major release you can use jdeveloper which also contains wls etc.
thanks
Hi Edwin,
ReplyDeleteThanks for the quick response! In that case I think for the build system we may end up rolling our own ant target that produces an importable jar. This way we can hand over a project to a separate team to be deployed, and that team only needs to have standard java and ant libs, plus a few wlst related ones. Basically we will avoid using the eclipse plugin for building at all.
I'm starting to get the feeling that OEPE is being abandoned by Oracle for JDev? Are you able to confirm this? We've noticed several features missing from OEPE when building Proxy services; for instance, we can't set "service level monitoring" or add "access control" lists to a proxy with an owsm policy on it. Those views that exist inside the sb console (in browser) don't exist in Eclipse. We can hand edit the proxy code to make the changes without Eclipse, but the eclipse plugin won't publish those changes, it just ignores those parts of the source code. So really, having a build-from-source solution will kill two birds with one stone :)
Do you know if these features that are missing in Eclipse are present in JDev? If Oracle is abandoning OEPE, do you recommend switching to JDev now or later?
Thanks,
~sillydino
Hi,
ReplyDeleteI'm starting to get the feeling that OEPE is being abandoned by Oracle for JDev?
Not really, but I think for OSB, SOA and BPM it is. Oracle wants more productivity and full integration with other products. In the next big release OSB IDE will be in jdev.
We've noticed several features missing from OEPE when building
not everything is possible in eclipse and it needs some weblogic configuration, so the sbconsole does this for you.
you can't switch to jdev now. maybe the best way is to work on the sbconsole and make from there an export.
thanks
I have a question:
ReplyDeleteIs there any possibility to export, with exportFromWorkspace, Global Configuration Settings which are located under System like JNDI Providers ?
Thanks
René
Hi Rene,
ReplyDeleteIf i do a test ( in PS3 ) with an alert in a osb project which needs a global smtpserver then I got this smtpserver entry in the sbconfig.jar when I set config.includeDependencies on true. with false then I dont get this in the export.
thanks
Hi I am following your script to create jar file, following is the error i am getting : [java] Synchronizing "Pilot_OSB_Configuration"...
ReplyDelete[java] Initializing toplink project for use by the database adapter.
[java] Exporting to c:/temp/sbconfig.jar...
[java] Error during configuration jar export.
We are having DBAdapters and JCA bindings in my application. Can you suggest on this.
Hi , I am following your scripts to create the jar from the workspace, which ahd DB adapters and JCA binding. and i am getting the following error
ReplyDelete[java] Synchronizing "Pilot_OSB_Configuration"...
[java] Initializing toplink project for use by the database adapter.
[java] Exporting to c:/temp/sbconfig.jar...
[java] Error during configuration jar export.
Hi ,i was able to sort out thte issue, its the problem with a file in the build i got, which is holding to get the jar file created
ReplyDeleteThanks ...
Hi, when try to create a jar from the workspace, though i was able to create a sbconfig.jar file, i am getting the following [Fatal Error] and also its reporting that "Workspace does not contain any projects" do u have nay idea on this error.
ReplyDelete[java] Workspace does not contain any projects; importing project directories in workspace directory...
[java] Importing project located in "OSB Project 1" directory of the workspace...
[java] [Fatal Error] :1:1: Premature end of file.
{java] [Fatal Error] :1:1: Premature end of file.
Hi,
ReplyDeletethat is because I delete the metadata folder in ANT. you can remove this. I did this because sometimes this folder crashes my export.
with this delete your export still works, but for workshop you need this so only do this from subversion.
Edwin,
ReplyDeleteDid/Do you have time to test your scripts against the latest version of OSB? We are facing a huge performance decrease, comparing to the previous version. Creating a config file with JCA Adapters (DB) takes 45 minutes to create. And yes we do not have access to these databases (from our CI server). :-) Look like a timeout issue.
The log shows, lots of:
java] [Fatal Error] :1:1: Premature end of file
Marc
Hi Marc,
ReplyDeleteI checked the export from OEPE, that worked fine without the delete of the metadata folder.
maybe it checks the weblogic server which is not online in your case.
what should I check , export from OEPE , import & export OSB server.
thanks
We solved it:
ReplyDeleteWe increased the "osgi.bundlefile.limit" property from 500 to 1000.
<sysproperty key="
osgi.bundlefile.limit" value="500"/>
Edwin, thank you for these scripts.
ReplyDeleteI was able to use it to publish OSB resources from the command line. I was hoping to use it to integrate it into our CI process.
In fact, this worked great only a week ago. When I tried it again today, it stop working for some reason... I have been trying to determine the root cause without much success.
It simply hangs (I waited up to an hour) after this output:
[java]
[java] Workspace does not contain any projects; importing project directori
es in workspace directory...
[java] Importing project located in "ClaimDataAccessProject" directory of t
he workspace...
[java] Importing project located in "CommentsProject" directory of the work
space...
[java] Importing project located in "CommonResourcesProject" directory of t
he workspace...
[java] Importing project located in "FNOLProject" directory of the workspac
e...
[java] Importing project located in "Synch OSB Configuration" directory of
the workspace...
Is there a way to print out diagnostic message to see what is the problem?
Thanks.
hi,
ReplyDeleteyou can try to remove the delete of the metadata folder, sometimes this is necessary to make an export.
this will skip the making of the projects.
thanks
Hi Edwin,
ReplyDeleteI tried running the steps you have mentioned. But the export jar that I get after executing exportFromWorkspace does not have the OSB entities that I had created in my workspace - business services, proxy services etc. when I try to import the exported file manually into workspace I dont get anything.
Could you please help on that? Thanks!
Hi,
ReplyDeletecheck these parameters
config.subprojects="EJB,Rest"
config.includeDependencies=true
workspace.dir=C:/projecten/workspace/osb11g3
and take a look at the output.
thanks
Thanks Edwin, had figured this out. was missing out on the subprojects parameter. Worked like a charm. thanks for the quick reply though!
ReplyDeleteHello Edwin,
ReplyDeleteCan't we export the customisation file as well? when we exportFromWorkspace?
Hi Edwin,
ReplyDeletewhen i try to deploy the code into my domain using the command importToOSB i am getting this error in my command prompt - Failed to create task or type wlst.
Cause: The name is undefined
Action: Check the spelling
Action: Check that any custom tasks/types have been declared
Action: Check that any / declarations have taken place.
Could you please help on this? Thanks!
Hi,
ReplyDeleteCan't we export the customisation file as well? when we exportFromWorkspace?
that is not possible, only from the OSB server.
thanks
Hi Edwin, i saw that ant in the task exportFromWorkspace create the jar succesfully but the task dont verify that the project compile. Is any way to do that? Thanks
ReplyDeleteHi,
ReplyDeleteFor compiling of java sources you can do it easily in ANT.
For validating OSB artifacts I don't have a solution, I think it is possible but I dont have any information or documentation
thanks
Hi,
ReplyDeleteI tried to export OSB project from worspace using the ant script youo mentioned in Unix machine, but I get the below java error while running the ant. Also the .metadata file is not getting created inside the workspace after running the script.
usrapp $>ant -v exportFromWorkspace
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /usr/java/jdk1.6.0_23/jre
Detected OS: Linux
parsing buildfile /opt/apps/OSBWorkspace/OSBScripts/build/build.xml with URI = file:/opt/apps/OSBWorkspace/OSBScripts/build/build.xml
Project base dir set to: /opt/apps/OSBWorkspace/OSBScripts/build
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
[property] Loading /opt/apps/OSBWorkspace/OSBScripts/build/export.properties
Build sequence for target(s) `exportFromWorkspace' is [exportFromWorkspace]
Complete build sequence is [exportFromWorkspace, import, ]
exportFromWorkspace:
[java] Executing '/usr/java/jdk1.6.0_23/jre/bin/java' with arguments:
[java] '-XX:MaxPermSize=256m'
[java] '-Xmx768m'
[java] '-Dweblogic.home=/opt/apps/wls/wl1033/wlserver_10.3'
[java] '-Dosb.home=/opt/apps/wls/wl1033/osb113'
[java] '-Dosgi.bundlefile.limit=500'
[java] '-Dharvester.home=/opt/apps/wls/wl1033/osb113/harvester'
[java] '-Dosgi.nl=en_US'
[java] '-Dcom.bea.plateng.common.util.logging.useJDKlogger=true'
[java] '-Dsun.lang.ClassLoader.allowArraySyntax=true'
[java] '-jar'
[java] '/opt/apps/wls/wl1033/OEPE/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar'
[java] '-data'
[java] '/opt/apps/OSBWorkspace'
[java] '-application'
[java] 'com.bea.alsb.core.ConfigExport'
[java] '-configProject'
[java] 'TestOSBConfiguration'
[java] '-configJar'
[java] '/opt/apps/OSBWorkspace/out/sbconfig.jar'
[java] '-configSubProjects'
[java] 'GetCustomerAccountHierarchy'
[java] '-includeDependencies'
[java] 'true'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
BUILD FAILED
/opt/apps/OSBWorkspace/OSBScripts/build/build.xml:48: Java returned: 13
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
.........
Total time: 2 seconds
This script perfectly works if I run in windows. The directory permissions in unix box is 777 only. please help me in fixing this.
Thanks
Harini
Hello,
ReplyDeleteThanks for the wonderful blog. I was able to import the OSB project from a jar file using your scripts. I was wondering if there is a way to deploy multiple projects in one shot?
Regards,
Rakhee
Hi,
ReplyDeleteThat should work look at these parameters
config.subprojects="EJB,Rest"
export.project = "EJB,Rest"
import.project = None
You need to use a , between your projects
thanks
I am now able to deploy multiple jar and customization files, however it can be done only by an administrator, an integrationdeployer should be able to do this. I am getting Unexpected error: weblogic.management.NoAccessRuntimeException error when I try any user who is not an administrator. Please suggest. Thanks and regards.
ReplyDeleteI am able to run it using user accounts with integrationdeployers group membership too. Thank you for ur help.
ReplyDeleteHi,
ReplyDeletethe only thing I can see in the linux logging is that it missing org/apache/tools/ant/antlib.xml
did you installed wls,osb and oepe on linux and did you check your java and other environment variables.
thanks
Hi Edwin,
ReplyDeleteThanks a lot for the reply. I have installed wls,osb and oepe in linux. Also verified java and other env varaibles if they point to correct location. I am really stuck with this issue. please kindly help me in getting it fixed.
Thanks
Harini
Hi Edwin,
ReplyDeleteI found the logfile in /configuration folder. I have attached the log message below. It looks like the class com.bea.alsb.core.ConfigExport is not present . Please help me in fixing this.
!SESSION 2011-06-07 01:08:32.223 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application com.bea.alsb.core.ConfigExport -configProject TestOSBConfiguration -configJar /opt/apps/OSBWorkspace/out/sbconfig.jar -configSubProjects GetCustomerAccountHierarchy -includeDependencies true
Command-line arguments: -data /opt/apps/OSBWorkspace -application com.bea.alsb.core.ConfigExport -configProject TestOSBConfiguration -configJar /opt/apps/OSBWorkspace/out/sbconfig.jar -configSubProjects GetCustomerAccountHierarchy -includeDependencies true
!ENTRY org.eclipse.equinox.p2.repository 4 0 2011-06-07 01:08:33.128
!MESSAGE ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.
!ENTRY org.eclipse.osgi 4 0 2011-06-07 01:08:33.177
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "com.bea.alsb.core.ConfigExport" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.datatools.connectivity.console.profile.StorageFileEditor, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator,
.............
Thanks
Harini
Hi,
ReplyDeleteMake sure that the OSB home is set and that you got the right version of the equinox jar located in the eclipse ide plugin folder and that you load the alsb.jar and the configfwk jar in the sh scripts, just like the bat script
Thanks
Hi Edwin,
ReplyDeleteI checked the equinox jar version, its "org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" only. Also ensured that alsb and fwk are in class path. but still could not recover from that error. I have attached my build script below , can u pls chk if anything is wrong in it.
Hi,
ReplyDeleteOk skip ant and go for java. There is a example in the documentation.
Maybe delete the metadata folder
If this don't work make a support call.
Good luck
Hi!
ReplyDeleteI'm using this tutorial, but when I run the ant script I got the following error:
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
I'm using SOA Suite 11.1.1.4.
Thanks in advance.
MartĂn.-
brilliant! thank you so much also for all the answers given in the comments - you should add a "donate" button on your blog :o)
ReplyDeleteI have the same problem as some othere before me have had here:
ReplyDelete[java] Synchronizing "OSBConfiguration"...
[java] Exporting to sbconfig.jar...
[java] Error during configuration jar export.
Tried to clean out the .metadata folder with no success and the output from the script doesn't give me any clues what so ever what might be wrong now...
Hi,
ReplyDeleteCan you check the ant properties settings for the projects settings
do you see any output
check the OSB jars I am using in these scripts , they must exists and must match with your PS version.
Good luck
Hi,
ReplyDeleteUndeploy OSB task is availabe in you script?
Hi,
ReplyDeleteundeploy is not available in my script and I don't know if this is possible. You can need to check the ALSB mbean operations if this is possible
ALSBConfigurationMBean = findService("ALSBConfiguration", "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
thanks
Hi,
ReplyDeleteI had also this error: [java] Error during configuration jar export.
but I solved it. I had a problem in my Oracle service bus Configuration. I had to edit file com.bea.alsb.core.prefs which is in folder .settings of my OSB Configuration.
And I didn't need to delete the .metadata
But I have a question, is it posible to change some variables. When I am deploying .jar using sbconsole I can uncheck options in Advancet Settings : Preserve Enviroment Variables, Preserve Operational Values. Can I change this options when I am deploying using the Ant script?
Thx.
Hi,
ReplyDeleteSorry the export options are very limited or well hidden.
Thanks
Hi Edwin,
ReplyDeleteThanks a lot for the tremendous resource! Is this the oracle recommended/approach for deployment? I didnt find any oracle docs referring to the python scripts? Also, we want to only build the project and apply customization on it so that we could manually deploy it later(i.e stage to prod). do you suggest a regular ANT script to find replace values, since we cant seem to customize the import.py script to replace and then deploy?
any thoughts,
Krishna
Hi,
ReplyDeletehere are some doc references and I think there are some oracle OSB examples which does the same but not so complete.
http://download.oracle.com/docs/cd/E21764_01/doc.1111/e15866/tasks.htm#OSBDV127
http://download.oracle.com/docs/cd/E21764_01/doc.1111/e15866/tasks.htm#OSBDV125
The deployment changes are done after you deploy to the OSB. no need to this now.
thanks
Thanks Edwin for the quick response!I found the samples on oracle.However,our prod deployment process is to package the jar and move to stage folder from which point a deployment team takes over. So, can you recommend best strategy only to build jar by applying customization file? Use a custom ANT task or to tweak import.py script?
ReplyDeleteThanks in advance,
Krishna
Hi,
ReplyDeletethis is a bit strange, because you are changing the jar and this is not the same which is tested.
you can still generate a deployment plan , unzip the jar and make a custom framework which reads and apply the deployment plan.
good luck
Thanks Edwin for making the point! I failed to envision repackaging the jar. We only want to avoid keeping a hot prod deployment script in another env which is prone to be mistakenly used.
ReplyDeleteIf somebody want to know, you can change Preserve enviroment variable option by editing import.py file. line 54 :
ReplyDeletealsbImportPlan.setPreserveExistingEnvValues(false/true)
J/Edwin,
ReplyDeleteIs there a way to create new env variables that are not part of default customization file?
Hi,
ReplyDeleteIf it is an Mbean property or can do it in Ă script then it is possible
Thanks
This comment has been removed by the author.
ReplyDeleteHi Edwin
ReplyDeleteGreat tutorial, got everything working a treat.
One thing I find disappointing is that Oracle requires me to install a whole heap of s/w (that I will never use such as local instances of WLS, OSB etc)just so I can design OSB flows and export them to a remote server. I guess it will be easier once we have a unified IDE - either Jdev or Eclipse - that sits along side SOA 11g. Not holding my breath tho!
Hi,
ReplyDeletein a year you can do it all from jdeveloper 12c. So I think there will be some alignment with the SOA Suite deployment and I heard also some things about everything in maven.
thanks
Hi Edwin,
ReplyDeleteI have nested Osb projects structure and only one Osb Configuration Project. If I use the Eclipse Workspace, I get shortly after next checkout from SVN repository “out of sync” between my workspace and project files. And without Eclipse workspace I’m not able to create temporary workspace with all projects from my nested Osb project structure.
I want to do it without Eclipse GUI, only from Command Line. Do you mean, is there a possibility to refresh the existing Eclipse workspace via org.eclipse.equinox.launcher or to create a temporary workspace from a nested project structure, what actually I would prefer.
Thanks.
Peter.
Hi,
ReplyDeleteyou should not check in your eclipse workspace in svn, leave it out.
Put only your osb projects in subversion. ( these projects needs to be on a different path )
So create a new workspace and import the projects but leave it on that location ( dont import it into your workspace.)
thanks
I am trying export from console using script and getting below error.
ReplyDeleteexportFromOSB:
[wlst] All lines will be trimmed by 11
[wlst] Line: adminUser=sys.argv[1] . Final trim length: 11, String length: 34
[wlst] Line: adminPassword=sys.argv[2] . Final trim length: 11, String length: 38
[wlst] Line: adminUrl=sys.argv[3]. Final trim length: 11, String length: 31
[wlst] Line: exportJar = sys.argv[5]. Final trim length: 11, String length: 34
[wlst] Line: customFile = sys.argv[6]. Final trim length: 11, String length: 35
[wlst] Line: passphrase = "osb". Final trim length: 11, String length: 29
[wlst] Line: project = sys.argv[4]. Final trim length: 11, String length: 32
[wlst] Line: connect(adminUser,adminPassword,adminUrl) . Final trim length: 11, String length: 53
[wlst] Line: domainRuntime(). Final trim length: 11, String length: 26
[wlst] Executing the command line :
[wlst] "C:\Program Files\Java\jre6\bin\java.exe" -Ddebug=true -DfailOnError=true -DexecuteScriptBeforeFile=true -DfileName=exportCustomization.py "-
weblogic.management.scripting.WLSTInterpreterInvoker "${wls.username} ${wls.password} ${wls.server} ${export.pr
ject} ${export.jar} ${export.customFile}"
[wlst] java.lang.NoClassDefFoundError: weblogic/management/scripting/WLSTInterpreterInvoker
[wlst] Caused by: java.lang.ClassNotFoundException: weblogic.management.scripting.WLSTInterpreterInvoker
[wlst] at java.net.URLClassLoader$1.run(Unknown Source)
[wlst] at java.security.AccessController.doPrivileged(Native Method)
[wlst] at java.net.URLClassLoader.findClass(Unknown Source)
[wlst] at java.lang.ClassLoader.loadClass(Unknown Source)
[wlst] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[wlst] at java.lang.ClassLoader.loadClass(Unknown Source)
[wlst] Could not find the main class: weblogic.management.scripting.WLSTInterpreterInvoker. Program will exit.
[wlst] Exception in thread "main"
[wlst] Java Result: 1
Hi,
ReplyDeleteCan you check your classpath and check for the weblogic.jar or generate a wlfullclient and add this.
Thanks
Hi Edwin,
ReplyDeleteI was facing the same problem like MahiMahi above, and added wlfullclient.jar as you mentioned.
However I am getting the same error.
Little more detail -- I am getting a successful result when I am running the ant script from command line.
The problem (this error) arises when I use Hudson to do this.
Any ideas Edwin?
Hi,
ReplyDeleteI was trying to run the ant file using our CI server (hudson). The import is working fine, but the target exportFromWorkspace is not working as expected. I get an error saying that "Exception launching the Eclipse Platform:" This being a separate machine, I had just used the plugin - org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar, as this machine does not have OEPE installed.
My question is - is it necessary to install OEPE on this machine as well, or is there a way to just include the plugins/jars in any directory and give a reference to that directory in my build.xml.
NB: This hudson machine builds the OSB artifacts from our SVN repository.
Hi,
ReplyDeletefor the export you need to install weblogic, osb and oepe.
in the export function I am using some jar of the oepe osb extensions.
don't know if it works with just jars and without oepe and osb installation.
thanks
Hi,
ReplyDeleteDo you have a hudson output and do you run the bat file on the same machine.
thanks
Hi ,
Deletewhen I execute my build.xml it gives me the following error :
[java] Specified OSB Configuration project "../build /IntegrationWorkspace/sbconfig/ExportInfo" not found, config export cannot proceed
[java] Workspace does not contain any projects; importing project directories in workspace directory...
[java] Java Result: 101
Hi,
Deletewhat are your property settings, it is something like this
config.project="OSB Configuration"
config.subprojects="ASynchronous"
workspace.dir=C:/Users/Gebruiker/workspace
this is a bit strange for me
../build /IntegrationWorkspace/sbconfig/ExportInfo
thanks
Hi Edwin,
ReplyDeleteVery helpful post. I am having a problem though. I am using Hudson to call the ant target 'exportFromWorkspace', but the process hangs after creation of sbconfig.jar. It takes almost 4-5 hours for the next target to call the next target. I am using OSB version 11.1.1.5 and OEPE version 11.1.1.7.2 on a Linux box. Following is the output I get:
[java] Workspace does not contain any projects; importing project directories in workspace directory...
[java] Importing project located in "Project_A" directory of the workspace...
[java] Importing project located in "Project_B" directory of the workspace...
[java] Importing project located in "Project_C" directory of the workspace...
[java] Synchronizing "OSB Configuration"...
[java] Exporting to /my_path/sbconfig.jar...
[java] Export complete.
I tried both commenting and uncommenting the delete .metedata folder but to no avail. Please help.
Thanks in advance,
Karthik
Hi,
DeleteDoes it work without hudson and do you have set all the environment variables in hudson, like the temp folder .
hope this helps
[wlst]
Delete[wlst] DomainRuntime MBeanServer is not enabled on a Managed Server.
[wlst]
[wlst]
[wlst] ALSBConfiguration MBean found
[wlst] Mortgage_Broker
[wlst] Export the project Mortgage_Broker
[wlst] Unexpected error: exceptions.AttributeError
[wlst] No stack trace available.
[wlst] Traceback (innermost last):
[wlst] File ".\osb_export.py", line 64, in ?
[wlst] File ".\osb_export.py", line 37, in exportAll
[wlst] AttributeError: 'NoneType' object has no attribute 'exportProjects'
[wlst]
[wlst] Exception in thread "Main Thread" java.lang.IllegalStateException: Traceback (innermost last):
[wlst] File ".\osb_export.py", line 64, in ?
[wlst] File ".\osb_export.py", line 37, in exportAll
[wlst] AttributeError: 'NoneType' object has no attribute 'exportProjects'
[wlst]
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.printError(WLSTInterpreterInvoker.java:110)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.executePyScript(WLSTInterpreterInvoker.java:103)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.main(WLSTInterpreterInvoker.java:27)
???