Schedule Java Service
Hi,
We need to create a service to purge the inbox and need to schedule to execute once in every day.
We got sample code to purge inbox using enterprise sdk. Now we have to schedule it.
Please guide on how to schedule a java service/applicaiton in BO.
Regards
Baby
Hi Baby,
You can try using a Java Program Object.
You can refer to Chapter 10 under "Program object management" of the [BusinessObjects Enterprise XI Release 2 Administrator's Guide|http://help.sap.com/businessobject/product_guides/boexir2/en/xir2_bip_Admin_en.pdf].
Hope this helps.
Regards,
Dan
Similar Messages
-
Dear all,
How could I turn the following java application into a service running under Linux and make it started automatically when the system is restarted using Java Service Wrapper?
The instructions on the Java Service Wrapper website is too complex for me to follow. The application below just write the current time to a file every 5 seconds.
If possible, please give me some step by step instruction about how to configure, install and verify the results.
Thanks
Yu
package timertest;
import java.util.Timer;
public class Main {
Timer timer;
public Main(int seconds) {
timer = new Timer();
//timer.schedule(new ReminderTask(),seconds * 1000, seconds * 1000);
ReminderTask task = new ReminderTask();
timer.scheduleAtFixedRate(task,seconds * 1000, seconds * 1000);
public static void main(String[] args) {
System.out.println("About to schedule task.");
new Main(5);
System.out.println("Task scheduled.");
package timertest;
import java.util.TimerTask;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.lang.Thread;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.*;
public class ReminderTask extends TimerTask {
public synchronized void run() {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
try {
// Create file
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
out.write(dateFormat.format(new Date()));
//Close the output stream
out.close();
} catch (Exception e) {//Catch exception if any
System.err.println("Error: " + e.getMessage());
}I suggest you read how to create a startup script in Linux. It doesn't matter that you program is written in java.
[http://www.google.co.uk/search?q=linux+startup+scripts] -
Java Services In Business Connector supported by XI ?
I am working with the java services of BC and want to convert it into XI.
My question is -the webMethods defined in the java services of BC are accepted by XI or not?
eg. the code in java services of BC is
IDataCursor pipelineCursor = pipeline.getCursor();
This line will be accepted by the XI when imported or will show error?
As (IDataCursor) is BC propriety thing.
From where the meaning of the code written in java services of BC can be obtained.
eg.
String value = configProp.getProperty(configKey, defaultConfigValue);
Here what does getProperty method do?
Thanx.Hi,
my apologies, don't fully understand your question. Are you asking what is the XML structure that a BC Java service can consume?
If that is the question then the answer is: A BC Java service can not consume XML, it consumes IData / IValues objects.
So your question should probably be: How do we build IValues / IData objects from an InputStream?
Answer: Use a Dom or SAX parser and build the corresponding IValues / IData object maps out of that. This is accurately what we have done (+ implemented our own IValues / IData libraries so that we don't use any built-in BC classes in PI to avoid any licensing issues).
The key is to understand how IValues / IData are implemented and how to deal with XML in input / output streams.
We only use this solution internally with our BC2XI product (when requested by the customer) and unfortunately don't provide the libraries separately.
Good luck.
Cheers
Kalle -
Delivery Schedule for Service Item
Hi folks!
Can anyone guide me, how to create delivery schedule for Service item in Purchase Order.
Regards.If it is an external service (Item category D), you cannot enter delivery schedule for individual services.
Lakshman -
How to monitor a java service in windows environment
Hi all,
I have a 5 java services running on a windows box.
I want to monitor one of those. This service is called "appnew " and appnew interacts with the oracle database.
If it is running normally the application name as seen in the task manager is "appnew running" whenever there is some runtime exception the name changes to "appnew error".
now I want to develop some external tool which can send me alert emails when we get runtime exceptions and the service name changes to
"appnew error".
I appreciate your help.
Thanks in advance.The code you are using to change the process name to "appnew error" is the place you want to put your call to an e-mail launch.
-
Running a java service on linux (Redhat)
I can create a basic script to run my java service, I can stop, and restart it from the command line when logged in. I have installed the script as a service. However, when I reboot, the service will not start. I have set it to be the very last thing to start on boot-up. I'm thinking it may have something to do with the fact that when I run a java program, it does not bring me back to the command line, it just 'hangs' until it is completed, and this particular java program will obviously hang indefinitely as it is a service.
Any help would be GREATLY appreciated.
Thanks,
PAUL.Why not start it in the background? (a trailing ampersand)
kind regards,
Jos -
Java Service Wrapper service is not being listed in the list of services
I wrote a sample program which uses Java Service Wrapper. But it's not being listed as a Service in the list of Windows' Services. Any ideas why?
Thanks.Hi Amar,
need your help. i am facing the same issue.
how did you resolved it . please let us know.
Thanks,
Santosh -
Intermittent problem in Coldfusion 9, BlazeDS with Java Service class and CFCProxy
If that title doesn't scare you, you might be able to help.
I believe there is a bug in Coldfusion 9's version of CFCProxy.
Tech Stack:
Flex Application
BlazeDS (stock with CF9)
Java Service class (java-amf BlazeDS endpoint)
Coldfusion business tier, invoked by the Java Service class using CFCProxy
Tomcat 6 on Java 1.6
Linux or Windows servers, both exhibit same behavior
SQL Server database
Problem:
When Flex calls a Java service method through BlazeDS that invokes a Coldfusion CFC through CFCProxy, and the method called in the Coldfusion CFC includes a large query (10 fields, 1000+ records returned), we intermittently (1 out of ~5 times) receive the following exception:
java.lang.NullPointerException
at coldfusion.runtime.NeoPageContext.popBody(NeoPageContext.java:1925)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:57)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:437)
at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:56)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:281)
at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:193)
at com.lampo.mapping.service.MapToolWebService.makeCfcProxyCall(MapToolWebService.java:1326)
at com.lampo.mapping.service.MapToolWebService.getTerritoryList(MapToolWebService.java:609)
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 flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:418)
at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)
at coldfusion.flex.ColdfusionMessageBrokerServlet.service(ColdfusionMessageBrokerServlet.jav a:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Attempts to diagnose:
These things remove the problem:
CF8 works perfectly with the identical code, never fails.
Calling the same Coldfusion CFC method with the large query (10 fields, 1000+ records returned) from another CFC 100+ times never fails.
Using a Coldfusion service class (a "my-cfamf" BlazeDS endpoint) never fails. However, we need to use a Java service class because we are using ~40 Java value objects (VOs) that correspond to ~40 auto-generated Actionscript VOs. BlazeDS won't correctly deserialize the Actionscript VOs into the Java VOs with a Coldfusion service class.
If I replace the large query with a Sleep(5000) instead, it never fails.
These things don't remove the problem:
Using the latest Microsoft JDBC driver doesn't help.
Even if the Coldfusion method returns an empty resultset (i.e., just calls the query and doesn't do any other work or return anything), the call still fails intermittently.
If the Coldfusion CFC with the method in question is instantiated and stored in SERVER scope as a singleton across multiple requests with CFCProxy, doesn't help.
Different large (1000+ record queries) all fail in the same way.
Caching the query doesn't help
Changes in the datasource configuration doesn't help
Using the older version of BlazeDS doesn't help
With all of these tests, I believe it comes down to a problem in the combination between CFCProxy and large queries. There may be more to it, but that is what we've narrowed it down to.
Any insight would be very welcome.Hi Frank
The page is ADF bound, I've added the page source and the adfc-config source below :
Page
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:commandButton text="commandButton 1" id="cb1"
actionListener="#{test.testws}"/>
</af:form>
</af:document>
</f:view>
</jsp:root>adfc-config
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<view id="view1">
<page>/view1.jspx</page>
</view>
<managed-bean id="__4">
<managed-bean-name id="__3">test</managed-bean-name>
<managed-bean-class id="__2">ch.mit.test.test</managed-bean-class>
<managed-bean-scope id="__1">request</managed-bean-scope>
</managed-bean>
</adfc-config>It seems to be the same sort of problem as in Re: Error in ADF Web Service Connection
Regards
Paul -
BI Scheduler Java Jobs not working with 11.1.1.6
Hello,
I wrote a scheduler java job following the documentation found here
http://docs.oracle.com/cd/E14571_01/bi.1111/e10541/schedjavajob.htm#CJHCFIID
It worked fine on OBIEE 11.1.1.3 and 11.1.1.5 but now i made a fresh installation of OBIEE 11.1.1.6.0 and it does't work anymore.
When i try to run the job from job manager the nqscheduler.exe process starts taking 50% of CPU and nothing happens
The steps i made after installing OBIEE are:
1. copy the jar file in ORACLE_HOME\bifoundation\javahost\lib
2. edit JavaHost configuration file
<Scheduler>
<Enabled>True</Enabled> <DefaultUserJarFilePath>E:\<ORACLE_HOME>\bifoundation\javahost\lib</DefaultUserJarFilePath>
</Scheduler>
Thanks in Advance,
Jonnithanx this is the solution. With this construct
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java">
<xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:variable name="counter" select="java:java.util.Vector.new()"/>
<xsl:variable name="temp1" select="java:add($counter,'1')"/>
<xsl:variable name="temp2" select="java:add($counter,'2')"/>
<xsl:variable name="temp3" select="java:add($counter,'3')"/>
<xsl:variable name="temp4" select="$temp3"/>
<xsl:value-of select="java:size($counter)"/>
<xsl:value-of select="java:toString($counter)"/>
</xsl:template>
</xsl:stylesheet>
at least the '3' is added to the vector. -
Workflow step (Approve Action) calling custom Java Service and "passing params"
Good Afternoon, Fellow Coders!
Normally I research and do proof of concepts until I find a solution but given super tight deadlines, I just don't have time - so I need your help.
I am trying to have an Workflow Approve Action (Workflow Exit Event idocScript call) call a Custom Component (Java Service) AND "pass" some kind of parameters (bare minimum dDocName)
In a perfect world it would be as simple as: processContentInfo(String dDocName, String xMyCode1, String xMyCode2);
But since I am calling the Java Service from idocScript (via executeService) I cannot directly pass params via the API.
Is there a simple way to do this??
It seems like if you can't directly pass params you could at least set them in the managed container (m_binder) and just know to pick them up on the Java side via some DataBinder like m_binder.getLocal(
Am I missing a simple idocScript function that will let you do this?
Note: I am NOT executing the Service from a URL so the normal ?param1¶m2 -> m_binder.getLocal solution is no good.
Also, Bex's book warns about Service Classes "not easily being able to call other UCM Services".... My Custom Service needs to do exactly that (as well as JDBC and other stuff). Is this really an issue??
Seems like as long as I have dDocName I could use RIDC to hit whatever I want as long as I know how to use a binder, etc - is there some mystic nuance that prevents this? Or was he just saying it's hard UNLESS you know RIDC well??
Any and all quality advice is appreciated! And please, try to give me a detailed answer as opposed to something vague like "try a Service Handler", I need something I can quickly digest.
Thanks in advance!You can set parameters for the service call by setting Idoc Script variables before you call executeService.
<$dDocName="TEST12345"$>
<$param1="09876"$>
<$param2="ABCDEFG"$>
These variables are then available via the service DataBinder.
Here is information about how to execute a service from a custom component. There should not be any issues doing this.
http://www.redstonecontentsolutions.com/5/post/2012/05/executing-a-service-from-aservicehandler.html
http://jonathanhult.com/blog/2012/06/execute-a-service-from-a-java-filter/
Jonathan
http://jonathanhult.com -
RFC adapter not started (Error starting AS Java Service XPI Adapter)
Dear Experts,
We have recently Upgraded our sustem from XI3.0 to PI 7.1, and have encountered a peculiar error in RFC adapter which could not be started
error says: Error starting AS Java Service XPI Adapter: RFC
corresponding instance when started says
Error starting AS Java Service XPI Adapter: RFC on DVEBMGS00
Hence our RFC channels are not functioning
Please help
Regards,
Rana Decan you try to restart XPI Adapter:RFC in NWA. if still it throws error then try to restart java stack.
-
Java Service Launcher Problems
I am trying to get a java application running as a windows service. I have been using java service launcher because it is free and am unable to get the program running. It installs the service fine and if I run jsl -debug or jsl -run then the app executes fine, but if I try to start the service its reports that it cannot be started and then the service gets stuck in Starting. The app recieves messages from another server and uses this info to populate a database.
Thanks,
DI now have the service starting but the app cant seem to connect to the remote computer. It is logging so it must be executing. I have changed the service to run as administartor and restarted the service but it still cant connect.
Thnks,
D -
How to access AM/VO instance from a Java Service class
Hi,
I have a Java service class that is loaded by Java ServiceLoader (http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) at run time, and I need to access database tables inside that service class. So is there any way that I can access AM/VO instances from that Java class in order to read database table? Thanks.
Regards,
K HeinYou can access an application module with the the two methods below:
YOURAppModule mAM;
public void setUpAM()
throws NamingException
try
String AMDefName = "YOUR_APP_DEF_NAME";
Hashtable env = new Hashtable(2);
env.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
ApplicationModule am = null;
InitialContext ic = new InitialContext(env);
ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(AMDefName);
am = home.create();
// Connect the AM to a database connection
String jndiDB = "jdbc/HRDS";
am.getTransaction().connectToDataSource(null, jndiDB, false);
boolean connected = am.getTransaction().isConnected();
mAM = (YOURAppModule) am;
catch (NamingException nex)
// do some error processing
throw nex;
catch (Exception eee)
// do some error processing
throw eee;
public void tearDownAM()
if (mAM != null)
if (mAM .getTransaction().isConnected())
mAM .getTransaction().disconnect();
mAM .remove();
}You find the YOUR_APP_DEF_NAME in your application module under 'Configurations' -> AppModuleJndiName.
Make sure you tear down each AM you set up. Otherwise you are running out of resources pretty fast.
Timo -
Java service call from webdynpro
Hi,
Pls provide me some doc/info on how to call java service from abapwebdynpro platform.
Thanks in advance.Call a web service isn't really a function of WDA. We have the service call wizard, but it only is a code wizard for generating the code to call a proxy class. It doesn't generate the web service proxy. There is nothing special needed for WDA to interact with Web Services. Follow the normal ABAP guides for generating web service proxies and then you can reuse this proxy class in WDA.
-
Problem in filling datagrid with a java service
Hi i have a java service that returns an arrayList of TypeTicketVO ,in the side of java when i tested my service it returns the correct result in the console but in the side of flex data grid is always empty and not filled with data (in fact this code recuperate 2 data field filled by the user and call the java service when the buttun is clicked
this is my mxml :
[Bindable]
var startDate:Date;
[Bindable]
var endDate:Date;
[Bindable]
private var FinalResult:ArrayCollection = new ArrayCollection();
public function getTicketByStatus(evt:ResultEvent):void
FinalResult= evt.result as ArrayCollection;
protected function buttnSta_clickHandler(event:MouseEvent):void
startDate=StartDateField.selectedDate;
endDate=EndDateField.selectedDate;
CountTicketsByStatusResult.addEventListener(ResultEvent.RESULT,getTicketByStatus);
CountTicketsByStatusResult.token = ticketServiceImpl.CountTicketsByStatus(startDate,endDate);
<mx:DataGrid id="dg" x="306" y="91" width="354" height="208" dataProvider="{FinalResult}">
help pleaseHi.
You can add extra path information by using the -extrapath option in your
installNTservice.cmd script.
Regards,
Michael
martin wang wrote:
When I installed a weblogic server as a windows service using installNTservice.cmd,
I found that the system path was not appended to the java.library.path. Here is
the detail:
step 1: went to ...\config\mydomain, run installNTservice.cmd, and the weblogic
server "myServer" was installed as a NT service.
step 2: went to Control Panel -> administrative tools -> services and started
up the service "myserver".
step 3: went to ...\config\mydomain\logs, open Weblogic.log and found that:
java.library.path = C:\bea\wlserver6.0\bin;.;C:\WINNT\System32;C:\WINNT
usually java.library.path should be the above paths plus the system path(which
can be changed in control panel -> system ->advanced -> environment variables
Does any one know why?--
Michael Young
Developer Relations Engineer
BEA Support
Maybe you are looking for
-
We have a site that requires access to a single outside address. No access is required outside to inside. This inside does require certain ports to accessed whcih are listed configed in the attached config. We are unable to access the vendor a
-
How do I copy my old profile folder to a new computer with Firefox 4?
Hey, I saved my old profile folder from my previous Firefox 4 installation on my old computer. I installed FF4 on the new computer. I tried placing the old profile files on the new profile folder, but when I start Firefox, it doesn't show any of my p
-
Adobe Media Encoder CS6 hangs while encoding Quicktime movies
Every day I am enoding 2-3 videos 15-40 min long with AME CS6 and every second day it freezes or slows down to almost zero. The source material is mostly Quicktime ProRes 422 LT 1080 25p or Quicktime XDCAM EX 1080 25p. Target files are H264 videos in
-
Where can i buy a SUPERDRIVE for my powerbook? and other Qs
I just wanted to know if someone out there recommends an online seller from whom to buy a superdrive for my mac, apple doesnt seem to sell these parts independently. also... when did the NEW powerbooks come out? AND what's the difference between the
-
Problem with Silverlight 5, version 4 worked great on my IMAC.
Problem with Silverlight 5, version 4 worked great on my IMAC. Since I updated all my movies shutter or they stop to refresh. No one from Netflix or Microsoft can solve this problem. Please advise if there is a fix, maybe drop the silverlight plug