Re: [iPlanet-JATO] Experiencing problem while executing model.

Hi Todd,
Thanks a lot for your input!
In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
column name in the resultset. So I am using this as a column in Jato
Descriptor for Plan_Dt. Now it is working fine.
Thanks and Regards,
Santa.
----- Original Message -----
From: Todd Fast <toddwork@c...>
Sent: Thursday, July 26, 2001 9:50 AM
Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
Santa--
I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
execute of TiledView, it throws an exception describing "PLAN_DT not found
in ResultSet". If you execute this query on the SQL prompt then we getrows
of data. Please could you tell us how the mapping between model and
resultset works ? And what changes do we have to make to execute thisquery.
>>
SELECT PART_NM,NEWTXTDOLL
TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
FROM cpsselect
WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
you provide in your model's column descriptors. It sounds as if you are
providing the column name "PLAN_DT" in a descriptor, and when the model
tries to look up that column in the result set, there is no such columnand
the operation fails.
In order to debug this, you should try running your query with a JDBC
connection, not SQL*Plus or your command-line SQL tool. What you need to
find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
a column name in the resut set. The easiest way to do this is to write a
simple class that does nothing but use your JDBC driver to connect the
database and execute this query. After execution, use theResultSetMetaData
information to find out the column names for the result set. Then, use
these column names in your JATO column descriptors.
Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
I'm sorry, this isn't enough information for me to offer any suggestions.
Using the technique above, determine which columns are coming back in the
result set, and make sure your display fields in the TiledView are boundto
those column names. The problem could be something as simple as a typo in
the field's bound name, or something more complex like the column in the
result set being named something you don't expect.
Another approach might be to alias the columns yourself using the "AS
<alias>" expression, and assign them names that you choose instead ofusing
the names assigned by the database or JDBC driver.
Todd
[email protected]
The Information contained and transmitted by this E-MAIL is proprietary to
Wipro Limited and is intended for use only by the individual or entity to
which
it is addressed, and may contain information that is privileged, confidential
or
exempt from disclosure under applicable law. If this is a forwarded message,
the content of this E-MAIL may not have been sent with the authority of the
Company. If you are not the intended recipient, an agent of the intended
recipient or a person responsible for delivering the information to the named
recipient, you are notified that any use, distribution, transmission,
printing,
copying or dissemination of this information in any way or in any manner is
strictly prohibited. If you have received this communication in error, please
delete this mail & notify us immediately at mailadmin@w...
[Non-text portions of this message have been removed]

Hi Todd,
Thanks a lot for your input!
In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
column name in the resultset. So I am using this as a column in Jato
Descriptor for Plan_Dt. Now it is working fine.
Thanks and Regards,
Santa.
----- Original Message -----
From: Todd Fast <toddwork@c...>
Sent: Thursday, July 26, 2001 9:50 AM
Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
Santa--
I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
execute of TiledView, it throws an exception describing "PLAN_DT not found
in ResultSet". If you execute this query on the SQL prompt then we getrows
of data. Please could you tell us how the mapping between model and
resultset works ? And what changes do we have to make to execute thisquery.
>>
SELECT PART_NM,NEWTXTDOLL
TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
FROM cpsselect
WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
you provide in your model's column descriptors. It sounds as if you are
providing the column name "PLAN_DT" in a descriptor, and when the model
tries to look up that column in the result set, there is no such columnand
the operation fails.
In order to debug this, you should try running your query with a JDBC
connection, not SQL*Plus or your command-line SQL tool. What you need to
find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
a column name in the resut set. The easiest way to do this is to write a
simple class that does nothing but use your JDBC driver to connect the
database and execute this query. After execution, use theResultSetMetaData
information to find out the column names for the result set. Then, use
these column names in your JATO column descriptors.
Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
I'm sorry, this isn't enough information for me to offer any suggestions.
Using the technique above, determine which columns are coming back in the
result set, and make sure your display fields in the TiledView are boundto
those column names. The problem could be something as simple as a typo in
the field's bound name, or something more complex like the column in the
result set being named something you don't expect.
Another approach might be to alias the columns yourself using the "AS
<alias>" expression, and assign them names that you choose instead ofusing
the names assigned by the database or JDBC driver.
Todd
[email protected]
The Information contained and transmitted by this E-MAIL is proprietary to
Wipro Limited and is intended for use only by the individual or entity to
which
it is addressed, and may contain information that is privileged, confidential
or
exempt from disclosure under applicable law. If this is a forwarded message,
the content of this E-MAIL may not have been sent with the authority of the
Company. If you are not the intended recipient, an agent of the intended
recipient or a person responsible for delivering the information to the named
recipient, you are notified that any use, distribution, transmission,
printing,
copying or dissemination of this information in any way or in any manner is
strictly prohibited. If you have received this communication in error, please
delete this mail & notify us immediately at mailadmin@w...
[Non-text portions of this message have been removed]

Similar Messages

  • Problem While Executing T.CODE DP90

    Hi,
      We have Upgrade our system from 4.6C to ECC6.
      We are facing following problem while executing Resource Related Billing request 
      Through Transaction code DP90.
    Process.
    1.     We are creating Sales Order and system will create Service order automatically as per the configuration.
    2.     In service order we have External as well internal operations ,
    Internal operations will be confirmed through IW41, and External Operations we are creating Purchase Requisition then creating PO and MIRO,
    After all Operations confirmed we will make Service order status as technically completed, then we are executing DP90 for Resource Related Billing, System will determine the material, combination of Cost element and Activity Type (Which is configured in T.Code ODP1) For External Operations System is Considering Activity Type for material determination in 4.6c but it is not considering Activity Type for Material Determination in ECC6 for External Operations.
       Please Help me,
    Edited by: D B on Apr 29, 2008 6:13 PM

    Hi Prashanth,
          Thanks for your reply, but all activity are valid in current period, in our Scenario in the old system for External Operations with combination of Activity type and Cost element system is determining material but where as in the new system for external operations it is not considering the Activity type and system is determining the material in the combination of   Cost element and Blank activity type so, we are getting different material in DP90.

  • Facing Problem while executing a command through WLST

    Hi,
    Iam using Weblogic 11g(10.3.2).Whenever I execute the below command in WLST on windows it is working fine.
    reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hostname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idmhost1")
    But whenever i execute the same in Linux,it is throwing the error as below:
    wls:/base_domain/serverConfig> reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hoistname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idm1")
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: reassociateSecurityStore
    Please suggest....
    Regards
    Pavan

    Facing Problem while executing a command through WLST

  • Problem while executing the transaction code FMBV (Reconstruct)

    We are facing a problem while executing the transaction code FMBV
    (Reconstruct Availability Control in Funds Management) in it when we
    execute this transaction system only updates the expenditure which is
    made before technical upgrade from 4.6c to ECC6 EHP6, against the
    Assigned Budget (KBFC budget type) in the Annual Budget Table (BPJA)
    and
    the expenditure which we made after the upgrade, the program just
    ignore
    it. We can also see the expenditure in the standard FBL3N report.
    Please guide us.
    Thanks and Best Regards,

    Dear Abrar
    In your description, you refer to missing update after an upgrade. First of all, see if table FMIT is consistent, as it is the basis for calculating the assigned values during AVC reconstruction.
    Refer to this note:
    977016 FMIT: Missing totals records in Funds Management  And perform following steps:
    1.- Run program RGZZGLUX
    2.- Run program RFFMRC04 to match totals table with line items. A test run after a successful effective run should not find inconsistencies.
    3.- If RFFMRC04 does not show more inconsistencies, run FMBV as final step.
    Note that this reconstruction must be done without any other budgeting/posting activities at the same time, otherwise you may cause  other inconsistencies.
    Please let me know the results.
    Best regards,
    977016 - FMIT: Missing totals records in Funds Management
    Symptom
    After the upgrade to ERP 2004 or higher you realize that the FMIT totals table is no longer updated in Funds Management. You start the RFFMRC04 report to reconstruct the totals, but the report still displays the missing totals after an update run.
    Other Terms
    FMIT, EA-PS, ECC 5.00, ECC 6.00, ECC 7.00
    Reason and Prerequisites
    This problem occurs due to a generation error.
    Solution
    Start the RGZZGLUX report to generate missing source code in FI-SL. Then start the RFFMRC04 report to reconstruct the totals, now another run of the report should no longer display any errors.

  • Facing a small problem while executing WDA application from portal

    Hi Experts,
    I developed web dynpro for ABAP application and placed table UI control, which contains 270 records. Executing from SE80, it is working fine and showing clearly all records.
    This application integrated in portal, while executing this applicaiton from portal, it is working fine and showing all records.
    Here I facing a small problem i.e Pager ( footer area ) of table.
    When the table is displayed there are the small box in the below of the table showing ROWS 244 of 270.
    244 will be available in a small box. this 244 is not showing clearly, while executing from portal ( last digit 4 displying half part only). but 244 showing clearly while executing from SE80.
    Kindly suggest how to resolve this problem.
    Thanks & Regards
    Sridhar

    Hi Gopi Krishna,
    Thanks for your time. From SE80, it is working fine and showing clearly row number. There is no property for increase width of small box, which contains current row number).
    Facing problem while executing from portal.
    Thanks & Regards
    Sridhar

  • BI 7.0 Problem while executing query on Infoset containing Infocubes

    Hi All,
    While executing quey on infoset containing infocubes we are getting following error message.
    EError while reading data; navigation is possible
    EError reading the data of InfoProvider A2PPI103
    EError when generating the SQL statement
    E[IBM][CLI Driver][DB2] DSNT408I SQLCODE = -204, ER ROR:  SAPR3.T00001 IS
    I>> Row: 11 Inc: RAISE_READ_ERROR Prog: CL_RSDRV_VPROV_BASE
    any idea what could be the reason ?

    Hi All,
    it's very interesting the question of HariPrasad because from yesterday i have the same problem in  a similar environment:
    @5C\QError@     Error reading the data of InfoProvider ZC1ITS02
    @5C\QError@     Error when generating the SQL statement
    @5C\QError@     [IBM][CLI Driver][DB2] DSNT408I SQLCODE = -204, ERROR:  SAPBWD.T00002 IS AN UNDEFINED NAME  DSNT41 8I SQLSTATE   = 42704 SQLSTA
    May the SQL generator does'nt work well whit cube and DB2 ??
    If i execute the Infoset with the debbugging option i can see the SQL code:
    ...........FROM "/BIC/PZC1CPROD0" "T00001",
    "T00002"
    WHERE................
    the first table is an infoobject, the second one is the "missing" cube...............
    Hari, did you solve the problem in the meantime ??
    Thank's to all, Ray.

  • Error while executeing model in webdynpro java

    Hi all,
                 i created an application in webdynpro .
    I got the following error while executing the modle.
    thc code is given below
    public void exuteCounterListData( java.lang.String GroupCounterValue )
    //@@begin exuteCounterListData()
    try{
    wdContext.currentZ_Search_Group_Counter_InputElement().modelObject().setPlnnr(GroupCounterValue);
    wdContext.currentZ_Search_Group_Counter_InputElement().modelObject().execute();
    wdContext.nodeOutput().invalidate();
    }catch(Exception e){
    wdComponentAPI.getMessageManager().reportSuccess("CustomContoller - exuteCounterListData - Error - "+e );
    wdComponentAPI.getMessageManager().reportException("CustomContoller - exuteCounterListData - Exception -"+e.getStackTrace(),false);
    //@@end
    the error which i am getting is given below
    " com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Error connecting using JCO.Client: null
    Is there any wrong in my code??or the problem may be in the configarations of JCO
    Regadrs
    Padma N

    i got similar problem and this is how i resolved
    this is because jco connections are Using SSO and the user who is accessing that webdynpro application is not present in the backend system.
    please make sure user is there in the backend system from which you are getting data
    xxxxxxxxxxxxxxxxxx
    Edited by: Armin Reichert on Feb 18, 2008 7:28 PM

  • Problem while executing the web template.

    Hi Experts,
           I have created a web template and while executing it, I received the following error message in the BEx Launcher.
    ERROR MESSAGE:
    " Exception in BI runtime
    Log ID: 0002B3510136CE0500000101000001FC00044748C57DB3F0
    Initial cause
    Message:
    Concurrent call. Connection currently used in another thread.
    Stack trace:
    com.sap.mw.jco.JCO$Exception: (132) JCO_ERROR_CONCURRENT_CALL: Concurrent call. Connection currently used in another thread.
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:3923)
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:3416)
         at com.sap.mw.jco.JCO$Repository.execute(JCO.java:20471)
         at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20810)
    Message:
    JCo exception thrown when connecting to system "DB7CLNT800"
    Stack trace:
    com.sap.ip.bi.base.exception.BIBaseRuntimeException: JCo exception thrown when connecting to system "DB7CLNT800"
         at com.sap.ip.bi.base.application.service.rfcproxy.impl.jco640.Jco640Proxy.createFunction(Jco640Proxy.java:88)
         at com.sap.ip.bi.base.application.service.impl.application.ApplicationSettingsService.initializeProperties(ApplicationSettingsService.java:130)
         at com.sap.ip.bi.base.application.service.impl.application.ApplicationSettingsService.initialization(ApplicationSettingsService.java:124).........       "
          Pls help me to solve this problem.
    With Regards,
    Yokesh Kumar.

    There has been quite some patches lately for the java runtime. Please check if you're up to date.
    Cheers,
    Ron

  • Problem while executing the package

    Hi Guys,
    I am getting the problem while executin the package for 1 of the interface named PRE_SYNC_EX_ARMY_VEH_DEL.
    The source tables are EX_ARMY_VEH_TMP and CONTROL_DEL & target table is CONTROL_DEL
    All the three tables are in the same schema named RTO_STAGE.
    I am looking in the operator as at the first session is in the process(running mode) with "DROP FLOW TABLE" as the message while all other sessions are in the waiting mode related to that interface PRE_SYNC_EX_ARMY_VEH_DEL.The previous interface before it ie PRE_SYNC_AXLE_DEL & PRE_SYNC_AXLE_DELNR is running okk(with all succesful session).
    **In one statement I can summerize that execution of package is halting/stopped at one interface & not showing error in operator(showing running)**
    what would be the problem?
    Thanx
    Edited by: user8849294 on Mar 1, 2010 10:17 PM
    Edited by: user8849294 on Mar 2, 2010 9:36 PM
    Edited by: user8849294 on Mar 2, 2010 9:43 PM

    Hi,
    You didn't mention the exact error.
    Did you check if your interface succeeds outside the Package?
    If yes, have you included any odiFileWait event which's why other tasks are kept in Wait mode?
    In any case, if there's an error, the task with the red-colored icon shows the one with problem. Double-click it & go to the Execution tab to get the exact error

  • MS SQL Server 2005...  Problem while executing stored procedure

    Hi.. all
    I have got a problem with sql server 2005
    When i execute any stored procedure on a remote database using
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    options, it throws SQL Exception with following message
    "A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor."
    Note: Every thing works fine, if I execute the same sp from the PC where sql server is installed, it throws this exception only when i execute sp from a computer different thn one where SQL server is installed.
    Here is d code.
    CallableStatement call = conn.prepareCall( "{call getAttributeLabelValues(?,?,?)}",
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    // set parameters.
    ResultSet rs = call.executeQuery( ) ;
    If I remove options
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    while executin SP, thn every thing works fine.
    here is d exception
    com.microsoft.sqlserver.jdbc.SQLServerException: A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteQuery(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    I will appreciate any help.
    Sudhir
    http://www.jyog.com

    use sql server jdbc driver v1.2..........

  • PLS-00306,problem while executing procedure from oracle e_comerce

    Hi
    I have writen a procedure in oracle.Tere i have a parameter with type varchar2.
    While i registered it in e_comerce i choosed the value set as 15characters.
    When i am runing the program from my ecomerce application it gives an error as below:
    ORACLE error 6550 in FDPSTP
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PO_OUTPUT'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    there is no error when i am executing my procedure in toad/sql+ but this error comes only in e_comerce application.
    PLease tell what is the reason and what can be the solution?

    Hi,
    <p>
    The function has the following parameters:<br>
    function insertj(jnum j.j#%type, jname j.jname%type, city j.city%type)<br>
    where j# is varchar2(5), jname is varchar2(35) and city is varchar2(35)<br>.
    I was trying to insert the following values:<br>
    j#:='J11', jname:='JobName' and city:='Paris'.<br>
    </p>
    <p>
    The procedure just calls this function with the same parameters. It is very strange because it is hard to see what the problem is. The line 10 is return 0 in the function where I believe the error comes from. It starts in the procedure and then goes in the function body, if I am interpreting this right.
    </p>
    <p>
    Any idea?
    </p>
    Thanks!

  • Problem while executing the query

    Hi,
    I have a query when iam trying to execute the query it is giving following error
    Error Summary
    Exception occured while processing the current request; this exception cannot be handled by the application or framework
    If the information on this page does not help you locate and correct the cause of the problem, contact your system administrator
    To facilitate analysis of the problem, keep a copy of this error page Hint: Most Web browsers allow you to select all content, and copy and paste it into an empty document (such as in an email or simple text file)
    Root Cause
    The initial exception that caused the request to fail was:
         Select a valid Date (OR) Fiscal Period (OR) Calendar Month         
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE:      Select a valid Date (OR) Fiscal Period (OR) Calendar Month         
    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:455)
    at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1452)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3979)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3416)
    at com.sap.ip.bi.base.application.service.rfcproxy.impl.jco640.Jco640Proxy.executeFunction(Jco640Proxy.java:267)
    Iam not sure why i could not able to execute this query.I could able to execute and run other queries.
    Please help me..
    thanks in advance

    Hi,
    Please check if you have used any formulae or function modules to derive the fiscal period/month from calday. Maybe the date being assigned is not of the same format as expected due to which the error (input valid date or calmonth or fiscal period) is being generated.
    Regards,
    Manoj

  • Problem while executing a command using exec()

    I'm trying to execute a command on Unix O/S with the help of java program. For this I have used Runtime class available in java.lang. It works fine for some of the basic unix commands like 'ls','cp' but when I tried to execute command "sqlldr userid=<user>/<pwd> control=/u01/dw/snb/log/sp_shd05721_ins_stg_sqlldr.ctl" , then it's not getting executed. Please advise.

    You may be having a problem with the command path, which I don't think Runtime.exec() uses. Try specifying the full path

  • Problem while executing simple java program

    Hi
    while trying to execute a simple java program,i am getting the following exception...
    please help me in this
    java program :import java.util.*;
    import java.util.logging.*;
    public class Jump implements Runnable{
        Hashtable activeQueues = new Hashtable();
        String dbURL, dbuser, dbpasswd, loggerDir;   
        int idleSleep;
        static Logger logger = Logger.getAnonymousLogger();      
        Thread myThread = null;
        JumpQueueManager manager = null;
        private final static String VERSION = "2.92";
          public Jump(String jdbcURL, String user, String pwd, int idleSleep, String logDir) {
            dbURL = jdbcURL;
            dbuser = user;
            dbpasswd = pwd;
            this.idleSleep = idleSleep;
            manager = new JumpQueueManager(dbURL, dbuser, dbpasswd);
            loggerDir = logDir;
            //preparing logger
            prepareLogger();
          private void prepareLogger(){      
            Handler hndl = new pl.com.sony.utils.SimpleLoggerHandler();
            try{
                String logFilePattern = loggerDir + java.io.File.separator + "jumplog%g.log";
                Handler filehndl = new java.util.logging.FileHandler(logFilePattern, JumpConstants.MAX_LOG_SIZE, JumpConstants.MAX_LOG_FILE_NUM);
                filehndl.setEncoding("UTF-8");
                filehndl.setLevel(Level.INFO);
                logger.addHandler(filehndl);
            catch(Exception e){
            logger.setLevel(Level.ALL);
            logger.setUseParentHandlers(false);
            logger.addHandler(hndl);
            logger.setLevel(Level.FINE);
            logger.info("LOGGING FACILITY IS READY !");
          private void processTask(QueueTask task){
            JumpProcessor proc = JumpProcessorGenerator.getProcessor(task);       
            if(proc==null){
                logger.severe("Unknown task type: " + task.getType());           
                return;
            proc.setJumpThread(myThread);
            proc.setLogger(logger);       
            proc.setJumpRef(this);
            task.setProcStart(new java.util.Date());
            setExecution(task, true);       
            new Thread(proc).start();       
         private void processQueue(){       
            //Endles loop for processing tasks from queue       
            QueueTask task = null;
            while(true){
                    try{
                        //null argument means: take first free, no matters which queue
                        do{
                            task = manager.getTask(activeQueues);
                            if(task!=null)
                                processTask(task);               
                        while(task!=null);
                    catch(Exception e){
                        logger.severe(e.getMessage());
                logger.fine("-------->Sleeping for " + idleSleep + " minutes...hzzzzzz (Active queues:"+ activeQueues.size()+")");
                try{
                    if(!myThread.interrupted())
                        myThread.sleep(60*1000*idleSleep);
                catch(InterruptedException e){
                    logger.fine("-------->Wakeing up !!!");
            }//while       
        public void setMyThread(Thread t){
            myThread = t;
        /** This method is only used to start Jump as a separate thread this is
         *usefull to allow jump to access its own thread to sleep wait and synchronize
         *If you just start ProcessQueue from main method it is not possible to
         *use methods like Thread.sleep becouse object is not owner of current thread.
        public void run() {
            processQueue();
        /** This is just another facade to hide database access from another classes*/
        public void updateOraTaskStatus(QueueTask task, boolean success){
            try{         
                manager.updateOraTaskStatus(task, success);
            catch(Exception e){
                logger.severe("Cannot update status of task table for task:" + task.getID() +  "\nReason: " + e.getMessage());       
        /** This is facade to JumpQueueManager method with same name to hide
         *existance of database and SQLExceptions from processor classes
         *Processor class calls this method to execute stored proc and it doesn't
         *take care about any SQL related issues including exceptions
        public void executeStoredProc(String proc) throws Exception{
            try{
                manager.executeStoredProc(proc);
            catch(Exception e){
                //logger.severe("Cannot execute stored procedure:"+ proc + "\nReason: " + e.getMessage());       
                throw e;
         *This method is only to hide QueueManager object from access from JumpProcessors
         *It handles exceptions and datbase connecting/disconnecting and is called from
         *JumpProceesor thread.
        public  void updateTaskStatus(int taskID, int status){       
            try{
                manager.updateTaskStatus(taskID, status);
            catch(Exception e){
                logger.severe("Cannot update status of task: " + taskID + " to " + status + "\nReason: " + e.getMessage());
        public java.sql.Connection getDBConnection(){
            try{
                return manager.getNewConnection();
            catch(Exception e){
                logger.severe("Cannot acquire new database connection: " + e.getMessage());
                return null;
        protected synchronized void setExecution(QueueTask task, boolean active){
            if(active){
                activeQueues.put(new Integer(task.getQueueNum()), JumpConstants.TH_STAT_BUSY);
            else{
                activeQueues.remove(new Integer(task.getQueueNum()));
        public static void main(String[] args){
                 try{
             System.out.println("The length-->"+args.length);
            System.out.println("It's " + new java.util.Date() + " now, have a good time.");
            if(args.length<5){
                System.out.println("More parameters needed:");
                System.out.println("1 - JDBC strign, 2 - DB User, 3 - DB Password, 4 - sleeping time (minutes), 5 - log file dir");
                return;
            Jump jump = new Jump(args[0], args[1], args[2], Integer.parseInt(args[3]), args[4]);
            Thread t1= new Thread(jump);
            jump.setMyThread(t1);      
            t1.start();}
                 catch(Exception e){
                      e.printStackTrace();
    } The exception i am getting is
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe
    Exception in thread "main" ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
    JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820] Please help me.....
    Thanks in advance.....sathya

    I am not willing to wade through the code, but this portion makes me conjecture your using an Oracle connect string instead of a class name.
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe

  • Problem while executing the code( that covert jpeg images to movie)

    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html
    here is the code:
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie3 implements ControllerListener, DataSinkListener {
    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
         System.err.println("- create processor for the image datasource ...");
         p = Manager.createProcessor(ids);
         } catch (Exception e) {
         System.err.println("Yikes! Cannot create a processor from the data source.");
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV")) {
         System.err.println("The output file extension should end with a .mov extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie3 imageToMovie3 = new JpegImagesToMovie3();
         imageToMovie3.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    on executing with the command:
    java JpegImagesToMovie -w <width> -h <height> -f <frame rate per sec.> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...
    comes this......
    Exception in thread"JMF thread:SendEventQueue:com.sun.media.processor.unknown Handler" java.lang.NullPointerException"
    plz help

    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

Maybe you are looking for