OSB: Passing environment specific properties to JAR resource.
Hi,
My scenario is as follows.
As part of our proxy service message processing, we make a LDAP lookup which is done via a java callout to a static method which does the ldap call.
Atm the ldap url & other properties are hard coded in the java class, but we need to make this configurable as these values differ in each environment.
What is the best way to solve the above problem? property files? some sort of XML config?
Our Environment: OSB 10.3, workshop 10.3, jdk 1.6.0_05.
P.S We release a single package containing the sbconfig.jar which is deployed on all environments and a environment specific package which contains the customization file for that environment.
atheek1 wrote:
How do I do this? I was not aware that we could modify the xquery references in message flow. Is this even possible?You are not modifying xquery resource. OSB provides a feature called Customisation file to modify values and references specific to that environment when you do a deployment to that environment. There are different customisation types within the customisation file and you need to use reference customisation so that the proxy service refers to the correct env specific property file.
Google 'customisation file' if you are new to this.Thanks, I figured that out.
But this means that in the first global build of the sbconfig.jar I have to include the xquery files for all environments. And in the customization process I change the reference in the proxy service to the proper environment specific xquery file.
This seems a bit clunky, as the xquery files for all environments would be deployed on the server. Ideally we should only ever include the xquery for that particular environment.
Is there any other way to accomplish this?
Can we define a JNDI provider that points to a ldap configuration?
Similar Messages
-
OSB JAR Resources for Java callout in Cluster
Hi,
I have a JAR Resource, which has one simple java class with one static method. I invoke this method using Java Callout in my proxy service.
This all works fine if I am in single node environment, when I move to Cluster two node environment, I export the current single node config and import in cluster config, all services work fine except that JAR is available but I cannot access any methods and when I click on this JAR Resource it says "JAR Resource not found". Is there a special consideration for moving custom JARs to OSB Cluster.
Please can someone provide some details on this, greatly appreciate.
thanks
KDHere are some more details, basically I have a JAR which has methods, so I created a JAR resource in cluster, and it uploads my jar successfully. I see a resource name now, when I click on this resource it says "resource not found".
If I do the same exact steps in non-clustered environment, it just works fine without problems.
In cluster configuration I went to each node including admin and verified that .ar file is there.
If I export now what I have in cluster, the exported configuration JAR does have a mycustomjar.Archive file. But I am not able to access it in console.
Also I want to say thanks for helping me, please let me know what I can verify more.
thanks
KD -
Hi All,
I'am using Oracle Service Bus 10gR3 on Solaris server. I have two problems related boths to OSB JavaCallout.
1) When I import a jar file on OSB through SBConsole I obtain that JAR is successfully uploaded, but when I try to view the methods in JAR file through SBConsole, I got the error "Resource Not Found".
2) When I try to performe a Javacallout i got the following error :
Error opening /jsp/resources/archive/ArchiveBrowser.jsp.
The source of this error is java.lang.NullPointerException at jsp_servlet._jsp._resources._archive.__archivebrowserdetails._jspService(__archivebrowserdetails.java:101) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.apache.beehive.netui.pageflow.PageFlowPageFilter.continueChainNoWrapper(PageFlowPageFilter.java:455) at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:128) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163) at jsp_servlet._jsp._resources._archive.__archivebrowser._jspService(__archivebrowser.java:978) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.apache.beehive.netui.pageflow.PageFlowPageFilter.continueChainNoWrapper(PageFlowPageFilter.java:455) at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:128) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestDispatcher.include(ScopedRequestDispatcher.java:119) at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:552) at com.bea.netuix.servlets.controls.content.NetuiContent.beginRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62) at jsp_servlet._framework._skeletons._wliconsole.__flowlayout._jspService(__flowlayout.java:271) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62) at jsp_servlet._framework._skeletons._wliconsole.__gridlayout._jspService(__gridlayout.java:312) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62) at jsp_servlet._framework._skeletons._wliconsole.__flowlayout._jspService(__flowlayout.java:271) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62) at jsp_servlet._framework._skeletons._wliconsole.__gridlayout._jspService(__gridlayout.java:312) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258) at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
I should need some suggestions.
Regards,
Oracle Service Bus DeveloperRe: Not able to import extarnal jar(java code) in OSB10.3
See if this is of any help
Manoj -
Location of application-specific properties files
I am using Tomcat 4.0.3 under WinXP Pro, and I am trying to get my
application to "find" an application-specific properties file. I am having problems trying to determine which directory to put this file in.
Here is the Java code I am using for this class:
import java.util.Properties;
import java.io.FileInputStream;
public class ForumProperties extends Properties {
private static final String DEFAULT_FILENAME = "/WEB-INF/classes/mystuff.properties";
private static ForumProperties globalProps;
private ForumProperties() {
private ForumProperties(String fileName) throws Exception {
this();
load(new FileInputStream(fileName));
public static ForumProperties getInstance() throws Exception {
try {
if (globalProps == null)
globalProps = new ForumProperties(DEFAULT_FILENAME);
} catch (Exception ex) {
ex.printStackTrace(System.out);
throw new Exception("Error loading properties file");
return globalProps;
}I have put the properties file in just about every directory I can think of to try and find out where it's supposed to be, but I can't get it to work. I can put the file into the "user.home" System property (which turns out to be C:\Documents and Settings\Administrator) and have it pick it up, but I would prefer to put the file into the path of the application.
I have tried four different methods to load this file:
1. load(new FileInputStream(fileName)); (same as above)
2. load(Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName));
3. load(this.getClassLoader().getResourceAsStream(fileName));
4. load(getServletContext().getResourceAsStream(fileName));
All of them fail for not finding the file except #4, but that's not the
optimal solution as it requires a servlet context, which for "genericness of code reasons", I DON'T want to do.
As an aside, I pulled the "java.class.path" from the System properties to see where it's pointing, and all it has in it is
"<CATALINA_HOME>\bin\bootstrap.jar" with no other paths included.
Is there an attribute or something in the server.xml or web.xml file I am forgetting to set, or another approach I should be taking?
BobSee if this code fragment helps.
String MAIN_FILE_PATH = "./BlueGnome/demos/Properties/DemoPropertiesFile.properties";
java.net.URL url = ClassLoader.getSystemClassLoader().getResource(MAIN_FILE_PATH);
System.out.println("PATH: resolved name = " + url);
// Get the file.
// We could just use FileInputStream here. Then we would have
// to provide a path that was meaningful to the system like
// c:\java\BlueGnome\demos\Properties\DemoPropertiesFile.properties
// Doing it this way allows us to use generic directory
// seperators and allows for it to search for the file using
// the CLASSPATH. That also allows for it to be in a jar file.
java.io.InputStream is;
is = ClassLoader.getSystemClassLoader().getResourceAsStream(MAIN_FILE_PATH);
if (is == null)
throw new Exception("Resource File "
+ MAIN_FILE_PATH + " not found.");
aProperties.load(is); -
Need sample ALSB project migration to OSB 11g environment
Hi
I'm looking for sample ALSB project migration to OSB 11g environment and as well as steps to automate deployment of OSB 11g projects by using WLST
Can some one please help me out in regards to the same
Thanks
Ram.SPlease find the build.xml
<?xml version="1.0" encoding="windows-1252" ?>
<project name="ConfigExport">
<property file="./build.properties"/>
<property name="metadata.dir" value="${workspace.dir}/.metadata"/>
<property name="domain.export.script" value="export.py" />
<property name="domain.import.script" value="import.py" />
<path id="library.osb">
<fileset dir="${osb.home}/modules">
<include name="com.bea.common.configfwk_1.6.0.0.jar"/>
<include name="com.bea.core.xml.xmlbeans_2.2.0.0_2-5-1.jar"/>
</fileset>
<fileset dir="${weblogic.home}/server/lib">
<include name="weblogic.jar"/>
</fileset>
<fileset dir="${osb.home}/lib">
<include name="alsb.jar"/>
</fileset>
</path>
<taskdef name="wlst"
classpathref="library.osb"
classname="weblogic.ant.taskdefs.management.WLSTTask"/>
<target name="exportFromOSB">
<wlst fileName="${domain.export.script}" debug="true" failOnError="false" classpathref="library.osb"
arguments="${wls.username} ${wls.password} ${wls.server} ${export.project} ${export.jar} ${export.customFile}">
<script>
adminUser=sys.argv[1]
adminPassword=sys.argv[2]
adminUrl=sys.argv[3]
exportJar = sys.argv[5]
customFile = sys.argv[6]
passphrase = "osb"
project = sys.argv[4]
connect(adminUser,adminPassword,adminUrl)
domainRuntime()
</script>
</wlst>
</target>
<target name="importToOSB">
<wlst fileName="${domain.import.script}" debug="true" failOnError="false" classpathref="library.osb"
arguments="${wls.username} ${wls.password} ${wls.server} ${import.project} ${import.jar} ${import.customFile}">
<script>
adminUser=sys.argv[1]
adminPassword=sys.argv[2]
adminUrl=sys.argv[3]
passphrase = "osb"
project=sys.argv[4]
importJar=sys.argv[5]
customFile=sys.argv[6]
connect(adminUser,adminPassword,adminUrl)
domainRuntime()
</script>
</wlst>
</target>
<target name="exportFromWorkspace">
<!--delete failonerror="false" includeemptydirs="true"
dir="${metadata.dir}"/-->
<java dir="${osb.home}/lib" classpathref="library.osb"
jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
fork="true" failonerror="true" maxmemory="768m">
<jvmarg line="-XX:MaxPermSize=256m"/>
<arg line="-data ${workspace.dir}"/>
<arg line="-application com.bea.alsb.core.ConfigExport"/>
<arg line="-configProject ${config.project}"/>
<arg line="-configJar ${config.jar}"/>
<arg line="-configSubProjects ${config.subprojects}"/>
<arg line="-includeDependencies ${config.includeDependencies}"/>
<sysproperty key="weblogic.home" value="${weblogic.home}"/>
<sysproperty key="osb.home" value="${osb.home}"/>
<sysproperty key="osgi.bundlefile.limit" value="500"/>
<sysproperty key="harvester.home" value="${osb.home}/harvester"/>
<sysproperty key="osgi.nl" value="en_US"/>
<sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
<sysproperty key="osgi.bundlefile.limit" value="750"/>
<sysproperty key="middleware.home" value="${fmw.home}"/>
</java>
</target>
</project>
With the target:importToOSB,I was able to successfully import into OSB11g environment
but with target:exportFromOSB or exportFromWorkspace I'm unable to export from OSB11g environment
to my local directory
So my intention is to get the OSB11g exported into my local directory
Can you please help me out in getting this resolved
Thanks
RS -
Web Start : JAR resources in JNLP file are not signed by same certificate
What does this error mean exactly?
All the jars in this JNLP file are signed by the same certificate it's just that some of them are also signed by another certificate.
According to this closed/fixed bug : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4928787
Web Start should not be rejecting jars due to multiple signers???
Is this a regression in 1.6? or was this never actually fixed?
I can make this work by not signing these 'presigned' jars and putting them into extension JNLP files but this is less than desirable.
Some reasons for not using the extension JNLP:
-- Avoid this bug (which is also marked closed but not fixed) --> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6566071
-- I would like to sign all the jars I deliver with my own certificate.
-- I would also like to give my clients the ability so sign the jars themselves (their own certificate) after they certify the application for distribution throughout their organization.Thanks for responding.
Here is an example that will show the problem. If you want to try yourself:
NanoHTTPD.java is from here -> [http://elonen.iki.fi/code/nanohttpd/|http://elonen.iki.fi/code/nanohttpd/]
C:\test>java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is CCC7-E05D
Directory of C:\test
04/10/2008 12:34 PM <DIR> .
04/10/2008 12:34 PM <DIR> ..
04/10/2008 11:04 AM 130 hello.java
04/10/2008 11:30 AM 500 hello.jnlp
04/10/2008 11:06 AM 89 hellohelper.java
04/10/2008 09:52 AM 20,547 NanoHTTPD.java
4 File(s) 21,266 bytes
2 Dir(s) 26,292,060,160 bytes free
C:\test>type hello.java
public class hello
public static void main(String[] args)
System.out.printf("Hello %s\n",hellohelper.getString());
C:\test>type hellohelper.java
public class hellohelper
public static String getString()
return "World";
C:\test>type hello.jnlp
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost/" href="" >
<information>
<title>hello</title>
<vendor>hello</vendor>
<description>hello</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6" />
<jar href="hello.jar"/>
<jar href="hellohelper.jar"/>
</resources>
<application-desc main-class="hello"/>
</jnlp>
C:\test>javac *.java
Note: NanoHTTPD.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: NanoHTTPD.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\test>jar cvf hello.jar hello.class
added manifest
adding: hello.class(in = 524) (out= 332)(deflated 36%)
C:\test>jar cvf hellohelper.jar hellohelper.class
added manifest
adding: hellohelper.class(in = 283) (out= 212)(deflated 25%)
C:\test>keytool.exe -genkey -alias hello1 -keystore hello1keys.jks -dname cn=hello1 -storepass hello1 -keypass hello1
C:\test>keytool.exe -genkey -alias hello2 -keystore hello2keys.jks -dname cn=hello2 -storepass hello2 -keypass hello2
C:\test>jarsigner -keystore hello1keys.jks -keypass hello1 -storepass hello1 hellohelper.jar hello1
Warning:
The signer certificate will expire within six months.
C:\test>jarsigner -keystore hello1keys.jks -keypass hello1 -storepass hello1 hello.jar hello1
Warning:
The signer certificate will expire within six months.
C:\test>start java -cp . NanoHTTPD
C:\test>javaws hello.jnlpAt this point click accept to trust the code and the program runs. Here is the console output:
Java Web Start 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\4381
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
Hello WorldNow for second signature, and run again:
C:\test>jarsigner -keystore hello2keys.jks -keypass hello2 -storepass hello2 hellohelper.jar hello2
Warning:
The signer certificate will expire within six months.
C:\test>javaws hello.jnlpThis time it fails. Console output:
Java Web Start 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\4381
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
#### Java Web Start Error:
#### JAR resources in JNLP file are not signed by same certificateTo verify jars:
C:\test>jarsigner -verify -verbose -certs hello.jar
135 Thu Apr 10 12:39:26 CDT 2008 META-INF/MANIFEST.MF
256 Thu Apr 10 12:39:26 CDT 2008 META-INF/HELLO1.SF
770 Thu Apr 10 12:39:26 CDT 2008 META-INF/HELLO1.DSA
0 Thu Apr 10 12:37:36 CDT 2008 META-INF/
sm 524 Thu Apr 10 12:37:04 CDT 2008 hello.class
X.509, CN=hello1
[certificate will expire on 7/9/08 12:38 PM]
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope
jar verified.
Warning:
This jar contains entries whose signer certificate will expire within six months.
C:\test>jarsigner -verify -verbose -certs hellohelper.jar
141 Thu Apr 10 12:38:56 CDT 2008 META-INF/MANIFEST.MF
262 Thu Apr 10 12:41:30 CDT 2008 META-INF/HELLO2.SF
770 Thu Apr 10 12:41:30 CDT 2008 META-INF/HELLO2.DSA
262 Thu Apr 10 12:38:56 CDT 2008 META-INF/HELLO1.SF
770 Thu Apr 10 12:38:56 CDT 2008 META-INF/HELLO1.DSA
0 Thu Apr 10 12:37:44 CDT 2008 META-INF/
sm 283 Thu Apr 10 12:37:04 CDT 2008 hellohelper.class
X.509, CN=hello2
[certificate will expire on 7/9/08 12:38 PM]
X.509, CN=hello1
[certificate will expire on 7/9/08 12:38 PM]
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope
jar verified.
Warning:
This jar contains entries whose signer certificate will expire within six months.Why does javaws say: "JAR resources in JNLP file are not signed by same certificate" when clearly they are both signed by the same certificate (the one aliased by CN=hello1)? -
Application specific properties file
Hello
Can any body help me how to build application specific properties file
so that we can have independent application specific server with its own
java class path environment.I read the procedure in beasys manuals but i
could'nt understand clearly.
Setting application-specific properties
The weblogic.properties file is only accessible by WebLogic; that is,
you can't add application-specific properties to the weblogic.properties
file and expect that they will be read at startup time. However, you can
set properties for your own application by creating a separate
properties file. This file can be created and used in two ways:
Put your application-specific properties file in the same directory as
your weblogic.properties file. You can then use the following code to
access the properties:
Properties props = new Properties();
String propertiesName = "myapp.properties";
T3ServicesDef services =
T3Services.getT3Services();
String location =
services.config().getProperty("weblogic.system.home") +
java.io.File.separator + propertiesName;
props =
props.load(new DataInputStream(new FileInputStream(location)));
Thanks in advance
Ravi
Hi, Ravi.
I think I am "WeiG".
Basically, you can not put your own properties on weblogic.properties. Every
property in weblogic.properties managed by WLAS is pre-registered in WLAS
internally. WLAS will print "Fund undefined property ...." messages for the
un-registered property in weblogic.properties files.
To use your application-specific properties, the paragraph you read suggests
you create your own file, put it in $WL_HOME, and use the example code to
read your own file.
Hope it helps.
Cheers - Wei
Ravi <[email protected]> wrote in message
news:[email protected]...
> Hi Purdy
>
> Who is WeiG,can you tell me please
>
> Thanks
> Ravi
>
> Cameron Purdy wrote:
>
> > I know that WeiG has answered this before ... try to ask Wei directly.
> >
> > --
> >
> > Cameron Purdy
> > http://www.tangosol.com
> >
> > "Ravi" <[email protected]> wrote in message
> > news:[email protected]...
> > > Hello
> > >
> > > Can any body help me how to build application specific properties file
> > > so that we can have independent application specific server with its
own
> > > java class path environment.I read the procedure in beasys manuals but
i
> > > could'nt understand clearly.
> > >
> > > ************************
> > > Setting application-specific properties
> > > The weblogic.properties file is only accessible by WebLogic; that is,
> > > you can't add application-specific properties to the
weblogic.properties
> > > file and expect that they will be read at startup time. However, you
can
> > > set properties for your own application by creating a separate
> > > properties file. This file can be created and used in two ways:
> > >
> > > Put your application-specific properties file in the same directory as
> > > your weblogic.properties file. You can then use the following code to
> > > access the properties:
> > >
> > > Properties props = new Properties();
> > > String propertiesName = "myapp.properties";
> > >
> > > T3ServicesDef services =
> > > T3Services.getT3Services();
> > > String location =
> > > services.config().getProperty("weblogic.system.home") +
> > > java.io.File.separator + propertiesName;
> > > props =
> > > props.load(new DataInputStream(new FileInputStream(location)));
> > >
> > > ****************************
> > >
> > >
> > >
> > >
> > > Thanks in advance
> > > Ravi
> > >
>
-
Pass a object from one jar to another jar file
I have a common jar file which will communicate to the server for data validation purpose.But after validation it has to invoke different different jar file based on its response from the server.So, I might have a object which has to pass from the common jar file to a specific jar file.So, I like to know what will be the best procedure to achieve it.
Please help me out.arpitak wrote:
Yes,jar file holds class files.one of class files wants to trigger a method of a class file which resides in different jar file.this is the situation I tried to describe.Let consider there are three jar files like JAR A,JAR B ,JAR C.Here JAR A is a common jar where other two jar could be used as a plug in. So based on the condition any one of them (JARS) will be triggered by the common jar(JAR A).this is the situation.The class file of JAR A will trigger some method or main method of the JAR B/JAR C.So,here how could I pass a object from one jar to another is my main question.
Is it clear now?
I need a solution for this very urgently.Are you looking for a plug-in framework? That is, dynamically discovering and loading plugins. I am not experienced in developing or using plugins. However Googling "java plugin" brings up JPF.
If you just have multiple jars that have different classes, the JVM will load the appropriate classes if it can find the jars through the standard classloader on the classpath or through a customer classloader. -
Frequent - "JAR resources in JNLP file are not signed by same certificate"
Hi Experts,
I am not able to open ESR and ID. I am facing "JAR resources in JNLP file are not signed by same certificate" issue. I have gone through SDN forums and solved this issue by deleting the javaws cache and clicking on Restore Archives and Generate New Signature button in the Administrator -> "Java Web Start Administration".
But my issue is...I have to do this every time when I log into the system. I am using J2SE Development Kit 5.0 and J2SE Runtime Environment Kit 5.0.
Also it is taking around 5 minutes to open ESR.
Thanks,
Phani Akella.Hi,
I have downloaded Jdk6.0 and jre 6.0 and installed it in my system. I am not able to start java webstart using the command javaws in cmd. Any suggestions? I have un-installed jdk 6.0 and installed jdk and jre 5.0. Now I am facing below issues.
I am able to log into ID but not ESR. Screenshot shows only 9112 kb of files are downloaded for ESR.
[ESR Issues|http://www.flickr.com/photos/49754947@N07/?s] -
Environment dependent properties
Hi,
In the past, I have created an application (outside NWDI) that connects to an ABAP stack. The connection parameters were stored in an XML file inside the deployable archive. The XML file was adjusted before deployment, depending on target environment (DEV, QA or PROD).
This approach is not possible using NWDI. What's the best practice to support this kind of environment specific data on a Java stack?
In ABAP I would create a Z-table for the properties and generate a table maintainer for SM31, but creating tables and surely creating maintenance GUI on the Java stack is taking too much time imo. Afaik there is no se16/sm31 for Java tables.
For example, isn't there a portal service that can read custom properties that are editable in Visual Admin?
Thanks,
JeroenHi pascal,
Thanks for your reply. It's a portal service connecting to an ABAP gateway to register itself as a JCo service. It also logs in to the ABAP system. I'll investigate if the system landscape service is flexible enough to store all the needed parameters (e.g. logon credentials).
Regards,
Jeroen -
Adapter development: binary data and adapter specific properties?
Hi,
We have succesfully developed our own SFTP adapter based on the J2SSH Maverick library (http://www.sshtools.com/showMaverick.do) and the sample file adapter that comes with XI.
There are 2 features we would like to implement as well, but lack the necessary documentation and sample code.
<b>1st Binary data</b>
We do not succeed in transporting binary data via our SFTP adapter (both text and xml go fine). While debugging, we see that the binary data are correctly picked up, but the actual payload appearing in message monitoring is much larger. When we write the message to a file again, the data have changed (size has e.g. increased importantly from 127180 bytes to 218198 bytes). According to the sample adapter code, the contenttype "application/octet-stream" should be specified. But the standard XI file adapter itself seems to specify "application/octet-stream".
<b>2nd Adapter specific properties (DynamicConfiguration)</b>
How can we set adapter specific properties in our own adapter code? Where are the Java docs of the API? Is this somewhere documented?
If you would have more information (or pointers), please post it as a response to this message.
Kind regards, Guy Crets
<b>Code snippet:</b>
XIMessageFactoryImpl mf = new XIMessageFactoryImpl();
Message msg = mf.createMessageRecord(fromParty, toParty, fromService, toService, action, actionNS);
msg.setDeliverySemantics(DeliverySemantics.ExactlyOnce);
// In case of XML documents it is not necessary to set the contentType or encoding
// But: take care that the encoding definiton in the XML document corresponds to the encoding used
if (msgText.indexOf("<?xml") != -1)
// Check whether the payload is a XML document. If not, treat it as binary to demonstrate how
// binary main documents work
// First create a XML Payload
XMLPayload xp = null;
xp = msg.createXMLPayload();
xp.setText(msgText);
xp.setName("MainDocument");
xp.setDescription("XI AF Sample Adapter Input: XML document as MainDocument");
msg.setDocument(xp);
// In case of binary documents use the Payload super class methods to fill the XMLPayload object
else
// Check whether the payload is a XML document. If not, treat it as binary to demonstrate how
// binary main documents work
// First create a XML Payload
XMLPayload xp = null;
xp = msg.createXMLPayload();
//xp.setContentType("application/octet-stream");
xp.setContentType("application/xml");
xp.setName("MainDocument");
xp.setDescription("XI AF Sample Adapter Input: Binary as MainDocument");
xp.setContent(msgData);
// Finally set the main document in the message
msg.setDocument(xp);
TRACE.debugT(SIGNATURE, XIAdapterCategories.CONNECT_AF, "Message object created and filled.");
ModuleData md = new ModuleData();
md.setPrincipalData(msg);Hello Moorthy,
I know this part of the documentation.
So I set the indicator within the communication channel.
Now, I have to fill the dynamic configuration during my mapping. My code looks like following:
DynamicConfigurationKey keyURL = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", <b>XXXXX</b>);
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) param.get (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// set value
conf.put(keyURL, url);
So what has to be filled instead of XXXXX ?
Regards,
Marc -
Replace environment specific values in xsl file.
My xml has source and target, whose values depend on the enviroment. I have used "Set Text" to assign the values for these elements. I am using SOA 11g, bpel process.
But since these are environment specific, I need to change them when porting to different env. I read that "SOAConfigPlan" wouldn't
work on xslt.
How can I achieve this?
Edited by: user10367892 on Oct 8, 2010 3:45 PMMy xml has source and target, whose values depend on the enviroment. I have used "Set Text" to assign the values for these elements. I am using SOA 11g, bpel process.
But since these are environment specific, I need to change them when porting to different env. I read that "SOAConfigPlan" wouldn't
work on xslt.
How can I achieve this?
Edited by: user10367892 on Oct 8, 2010 3:45 PM -
How to pass environment variables to adf application?
Hi,
I Created form function with this settings to open my adf application:
Type : SSWA plsql function
Maint Mode = None
Context : Resp
Web HTML : test.jsp
Web host: 192.168.1.30:8890
This works fine. But how can I pass environment variables as parameters?
I like to pass username and org_id.
Thanks in advanceKdeGraaf,
Sounds real interestign what you are saying. But I don't know what you mean with:"the application server name appended till html folder($COMMON_TOP/html) "
Basically if u make a SSWA jsp function with only jsp name say A.jsp.At runtime the url is automatically converted tohttp://<application server>:<port number>/OA_HTML/A.jsp
By the way $COMMON_TOP/html folder is the location for all jsps' in EBS.
Where can I find some information about making a OAF page wrapper? Because I have totaly now experience with OAF.
Make a OAF page, say page A, in process request of page get all the context data say, responsibility, org etc, and set it in http session.Then redirect the flow to ur ADF application page. If ur new and have no knowledge how do we build a page in OAF, u can download OAF developers guide from metalink. Search old threads u would get get the metalink id.--Mukul -
Multi-Provider Provider-Specific Properties for Navigational Attributes
Experts,
I need to over-ride the naming for a navigational attribute in a multi-provider.
For non-navigational attributes you simply use the Provider-Specific Properties. This selection is not available for navigational attributes.
Is there a different way to apply alternative naming to navigational attributes in a Mult-Provider without affecting the global definition in the base cube.
Thanks in advanceNo - the users want their own verions of the name as default
Thanks for the reply -
How can I pass environment variables to the child process?
How can I pass environment variables to the child process? This is what I tried and it didn't work.
static public void main (String[] args) throws Exception {
ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
Map<String, String> map = b.environment();
map.put("custom.property", "my value");
b.redirectErrorStream(true);
Process p = b.start();
BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
String line = null;
while (null != (line = reader.readLine())) {
System.out.println(line);
public static void main(String[] args) {
System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
}and the result is:
The value of custom.property is : nullComplete test:
static public void main (String[] args) throws Exception {
ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
Map<String, String> map = b.environment();
map.put("custom.property", "my environment value");
b.redirectErrorStream(true);
Process p = b.start();
BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
String line = null;
while (null != (line = reader.readLine())) {
System.out.println(line);
public static void main(String[] args) {
System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));
}
Maybe you are looking for
-
As the question says, I cannot read the content in the right frame in Google Reader. This was also a problem when I was using Firefox 9.0.1. It was definitely not a problem prior to the Christmas holidays, so I don't know if it has something to do wi
-
G5 Quad kernel panic at 10.4 server boot
I just took G5 Quad out of box, checked everything out, downloaded updates. No problem. But I need 10.4 Server running on this machine. Booted 2 differnt 10.4 Server Dvd's and the unit kernel panics every time. Zapped PRAM. No Avail???? What do I do
-
Always first item from the punchout catalog will get missed in SRM cart
Hi All, Recently we have configured the vendor punch-out catalog in our SRM system. We are able to get in to their catalog and able to select the items. However we have observed the following. 1) When we select 3 items from the list we get only 2 ite
-
Cannot connect to remote server
When trying to make connection to remote server, I receive a message, "FTP, error, cannot make connection to host-Logon and Password are incorrect... However, settings are correct as I could get on in the past and when testing for remote site in site
-
Facetime app is missing in ipad air
Hi There, I'm living in Saudi Arabia & I noticed that FaceTime is missing in the settings as well as the FaceTime App Icon in the the springboard after updating the iOS. I tried to fix it by restoring my ipad air but it's fruitless. Is there any solu