NoClassDefFoundError when passing HttpSession

Hello All,
I am getting a NoClassDefFoundError when I start my rmi server.
I am pass an HttpSession as one of the variables of my rmi call.
Everything worked fine until I added the HttpSession variable.
Why do I get this exception ?
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/Ht
tpSession
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
        at java.lang.Class.privateGetPublicMethods(Class.java:2519)
        at java.lang.Class.getMethods(Class.java:1406)
        at sun.rmi.server.Util.getRemoteInterfaces(Util.java:221)
        at sun.rmi.server.Util.getRemoteInterfaces(Util.java:193)
        at sun.rmi.server.Util.createProxy(Util.java:126)
        at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:169)
        at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
        at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:235)
        at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:133)
        at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:119)
        at pE.PEg.<init>(PEgImpl.java:36)
        at pE.PEgServer.<init>(PEgServer.java:10)
        at pEngine.PEgServer.main(PEgServer.java:18)If I add server2_2.jar to my class path, then I get this exception:
java.rmi.ServerError: Error occurred in server thread; nested exception is:
        java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionWhile were at it, let me ask this: My RMI implementation code has some data that it needs to pass to my servlet that is invoked by an third-party server. I due to the sensitive nature of the data, I don't want to stick it in a DB, but pass as session variables, thus I was passing in the session var. A better way to do this?
Edited by: jimcsc on Aug 29, 2008 9:58 AM

I am getting a NoClassDefFoundError when I start my rmi server.That will be because either the server or the Registry or the client doesn't have the class named in the exception in its CLASSPATH.
I am pass an HttpSession as one of the variables of my rmi call.Are HttpSessions really serializable? This sounds like a very odd design.
While were at it, let me ask this: My RMI implementation code has some data that it needs to pass to my servlet that is invoked by an third-party server. I due to the sensitive nature of the data, I don't want to stick it in a DB, but pass as session variables, thus I was passing in the session var.There's something wrong with that description. It seems to me that it is the servlet passing the HttpSession to your RMI server, not the other way around. Assuming the HttpSession implementation is serializable it should work but it's still an odd design. I would get the stuff that you actually need out of the HttpSession and pass that.

Similar Messages

  • Script fails when passing values from pl/sql to unix variable

    Script fails when passing values from pl/sql to unix variable
    Dear All,
    I am Automating STATSPACK reporting by modifying the sprepins.sql script.
    Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
    I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
    From the sprepins.sql script
    variable bid number;
    variable eid number;
    begin
    select begin_snap into :bid from db_snap;
    select end_snap into :eid from db_snap;
    end;
    This fails with the following error:
    DB Name DB Id Instance Inst Num Release Cluster Host
    RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
    :ela := ;
    ERROR at line 4:
    ORA-06550: line 4, column 17:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    &lt;a string literal with character set specification&gt;
    &lt;a number&gt; &lt;a single-quoted SQL string&gt; pipe
    The symbol "null" was substituted for ";" to continue.
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev su
    But when I change the select statements below the report runs successfully.
    variable bid number;
    variable eid number;
    begin
    select '46' into :bid from db_snap;
    select '47' into :eid from db_snap;
    end;
    Even changing the select statements to:
    select TO_CHAR(begin_snap) into :bid from db_snap;
    select TO_CHAR(end_snap) into :eid from db_snap;
    Does not help.
    Please Help.
    TIA,
    Nischal

    Hi,
    could it be the begin_ and end_ Colums of your query?
    Seems SQL*PLUS hs parsing problems?
    try to fetch another column from that table
    and see if the error raises again.
    Karl

  • Problem with empty report parameters when passed to PL/SQL function

    Hi,
    We have come across what appears to be a bug in the JRC. When passing a report parameter to a PL/SQL function as a parameter, empty parameters are changed before being sent to the function. More specifically, an empty string "" ends up as the value "(')" in the PL/SQL function parameter. In our report we print the report parameters on the first page so we know that the parameters are OK before being passed to the database.
    The problem exists for version 12.2.203, 12.2.204 and 12.2.205 of the JRC.
    We have identified a workaround, but it is not exactly elegant: Before executing the report we modify all empty  parameters ("") to " " . In the PL/SQL function, we trim all parameters before using them.
    We call the function using a command object with a sql syntax like this example:
    select * from table (qa_batch_release.get_qa_br('{?p_report_id}','{?p_reg_set_number}','{?p_cr_number}','{?p_change_id_decode}','{?p_country_id}','{?p_mfg_item_no}','{?p_4_no}','{?p_5_no}','{?p_7_no}'))
    The PL/SQL function is a table returning function.
    Best regards, Thor

    Hi Kishore,
    using #COLUMN_VALUE# would probably not make much sense, because normally a report has multiple columns and not just the numeric column which you want to verify if it's negative. But APEX will fire the template condition for each column, because the report template is a column cell template.
    What you can do to make it more generic is to use for example
    #CHECK_AMOUNT#
    in the template and provide a not displayed column in your SQL statement which contains your value which is named CHECK_AMOUNT. For example:
    SELECT NAME
         , BALANCE
         , BALANCE AS CHECK_AMOUNT
    FROM XXX;Because this CHECK_AMOUNT column would be a generic name, you can use this template in all your reports as long as you provide this column.
    Thope that helps
    Patrick

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • NoClassDefFoundError when trying to return a custom Object

    Hi,
    I'm trying to get some system memory info from a Windows machine using Java. I've written the C code and Java code and it all compiles fine. I can also use most of the methods in the two files. I have a problem with one method though. Its a method that is returning an object type that I created that mirrors a windows structure. Below is the code.
    // Java Object to store the data
    package agent.win32;
    public class MemoryInfo{
      int dwLength;
      int dwMemoryLoad;
      int dwTotalPhys;
      int dwAvailPhys;
      int dwTotalPageFile;
      int dwAvailPageFile;
      int dwTotalVirtual;
      int dwAvailVirtual;
      public int get_dwLength() { return dwLength; }
      public int get_dwMemoryLoad() { return dwMemoryLoad; }
      public int get_dwTotalPhys() { return dwTotalPhys; }
      public int get_dwAvailPhys() { return dwAvailPhys; }
      public int get_dwTotalPageFile() { return dwTotalPageFile; }
      public int get_dwAvailPageFile() { return dwAvailPageFile; }
      public int get_dwTotalVirtual() { return dwTotalVirtual; }
      public int get_dwAvailVirtual() { return dwAvailVirtual; }
    // Java Class that uses JNI
    package agent.win32;
    public class NIMSNT {
      //Constructor
      public NIMSNT(){};
      static{
        try{
          System.loadLibrary("NIMSNT");
        catch (java.lang.UnsatisfiedLinkError e) {
          System.out.println (e);
       * check psapi.dll and psapi functions
       * return true if NT process can be enumerate
      public static native boolean Initialize();
       * Description:The EnumProcesses function retrieves the process identifier
       * for each process object in the system
       * return value:the list of process identifiers
       * call psapi function EnumProcesses
      public static native int[] EnumProcesses();
       * Description:The OpenProcess function returns a handle to an existing process object.
       * return value:If the function succeeds, the return value is an open handle to the specified process
       * call kernel32 function OpenProcess
      public static native int OpenProcess(int Pid);
       * Description:The EnumProcessModules function retrieves a handle for each module in the specified process
       * return value:the list of module handles
       * call psapi function EnumProcessModules
      public static native int[] EnumProcessModules(int hProcess);
       * Description:The GetModuleFileNameEx function retrieves the fully qualified path for the specified module
       * return value:the fully qualified path for the specified module
       * call psapi function GetModuleFileNameEx
      public static native String GetModuleFileName(int hProcess,int hModule);
       * Description:The GetModuleBaseName function retrieves the base name of the specified module
       * return value:the base name of the specified module
       * call psapi function GetModuleBaseName
      public static native String GetModuleBaseName(int hProcess,int hModule);
       * Description:function closes an open object handle
       * return value:true if succesfuly
       * call kernel32 function CloseHandle
      public static native boolean CloseHandle(int handle);
       * Description:function gets system memory
       * return value:String
      public static native MemoryInfo GetSystemMemoryInfo();
    // C Structure (defined in windows.h)
    typedef struct _MEMORYSTATUS {
      DWORD dwLength;
      DWORD dwMemoryLoad;
      SIZE_T dwTotalPhys;
      SIZE_T dwAvailPhys;
      SIZE_T dwTotalPageFile;
      SIZE_T dwAvailPageFile;
      SIZE_T dwTotalVirtual;
      SIZE_T dwAvailVirtual;
    } MEMORYSTATUS, *LPMEMORYSTATUS;
    // C code
    #include <windows.h>
    #include <string.h>
    #include "agent_win32_NIMSNT.h"
    #define MaxProcessNumber 10000
    /** Type Definitions                                  **/
    typedef BOOL (WINAPI *ENUMPROCESSES)(
         DWORD * lpidProcess, 
           DWORD cb,            
           DWORD * cbNeeded     
    typedef BOOL (WINAPI *ENUMPROCESSMODULES)(
         HANDLE hProcess,     
         HMODULE * lphModule, 
         DWORD cb,            
         LPDWORD lpcbNeeded   
    typedef DWORD (WINAPI *GETMODULEFILENAMEEXA)(
         HANDLE hProcess,          
         HMODULE hModule,          
         LPTSTR lpstrFileName,     
         DWORD nSize               
    typedef DWORD (WINAPI *GETMODULEBASENAME)(
         HANDLE hProcess,          
         HMODULE hModule,          
         LPTSTR lpstrFileName,     
         DWORD nSize               
    typedef struct _PROCESS_MEMORY_COUNTERS {
        DWORD cb;
        DWORD PageFaultCount;
        DWORD PeakWorkingSetSize;
        DWORD WorkingSetSize;
        DWORD QuotaPeakPagedPoolUsage;
        DWORD QuotaPagedPoolUsage;
        DWORD QuotaPeakNonPagedPoolUsage;
        DWORD QuotaNonPagedPoolUsage;
        DWORD PagefileUsage;
        DWORD PeakPagefileUsage;
    } PROCESS_MEMORY_COUNTERS, *PPROCESS_MEMORY_COUNTERS;
    typedef BOOL (WINAPI *GETPROCESSMEMORYINFO)(
         HANDLE hProcess,
         PPROCESS_MEMORY_COUNTERS ppsmenCounters,
         DWORD cb
    /** Global Variables                                  **/
    ENUMPROCESSES EnumProcesses;
    ENUMPROCESSMODULES EnumProcessModules;
    GETMODULEFILENAMEEXA GetModuleFileNameExA;
    GETMODULEBASENAME GetModuleBaseName;
    GETPROCESSMEMORYINFO GetProcessMemoryInfo;
    /** DLL Entry                                         **/
    BOOL APIENTRY DllMain(HANDLE hInst, DWORD ul_reason_being_called, LPVOID lpReserved){    
         return TRUE;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    Initialize
    * Signature: ()Z
    JNIEXPORT jboolean JNICALL Java_agent_win32_NIMSNT_Initialize(JNIEnv * env,jclass clazz){
         HANDLE hpsapi=LoadLibrary("PSAPI.DLL");
         if (hpsapi==NULL) return FALSE;
         EnumProcesses=(ENUMPROCESSES)GetProcAddress((HINSTANCE)hpsapi,"EnumProcesses");
         GetModuleFileNameExA = (GETMODULEFILENAMEEXA)GetProcAddress((HINSTANCE)hpsapi, "GetModuleFileNameExA");
         GetModuleBaseName = (GETMODULEBASENAME)GetProcAddress((HINSTANCE)hpsapi, "GetModuleBaseNameA");
         EnumProcessModules = (ENUMPROCESSMODULES)GetProcAddress((HINSTANCE)hpsapi, "EnumProcessModules");
         GetProcessMemoryInfo = (GETPROCESSMEMORYINFO)GetProcAddress((HINSTANCE)hpsapi, "GetProcessMemoryInfo");
         if (
              NULL == EnumProcesses          ||
              NULL == GetModuleFileName     ||
              NULL == GetModuleBaseName     ||
              NULL == EnumProcessModules  )
            return FALSE;
         return TRUE;   
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    EnumProcesses
    * Signature: ()[I
    JNIEXPORT jintArray JNICALL Java_agent_win32_NIMSNT_EnumProcesses(JNIEnv * env, jclass clazz){
         DWORD aPids[MaxProcessNumber];
         DWORD cGot;
         jintArray Pids=0;
         if(EnumProcesses(aPids,sizeof(aPids),&cGot)){
              cGot /= sizeof(aPids[0]);
                 Pids= (*env)->NewIntArray(env,cGot);
              (*env)->SetIntArrayRegion(env,Pids,0,cGot,(jint*) aPids);
         return Pids;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    OpenProcess
    * Signature: (IZI)I
    JNIEXPORT jint JNICALL Java_agent_win32_NIMSNT_OpenProcess (JNIEnv * env, jclass clazz,jint Pid){
         return (jint) OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,Pid);
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    EnumProcessModules
    * Signature: (I[I)[I
    JNIEXPORT jintArray JNICALL Java_agent_win32_NIMSNT_EnumProcessModules (JNIEnv * env, jclass clazz, jint hProcess){
         HMODULE hModule[MaxProcessNumber];
         jintArray jModule=0;
         DWORD cGot;    
         if (EnumProcessModules((HANDLE)hProcess,hModule,sizeof(hModule),&cGot)){
              cGot/= sizeof(hModule[0]);
              jModule= (*env)->NewIntArray(env,cGot);
              (*env)->SetIntArrayRegion(env,jModule,0,cGot,(jint*)hModule);
         return jModule;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    GetModuleFileName
    * Signature: (II)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_agent_win32_NIMSNT_GetModuleFileName(JNIEnv * env, jclass clazz, jint hProcess, jint hModule){
         jstring jName=0;
         char FileName[MAX_PATH];
         if(GetModuleFileNameExA((HANDLE)hProcess,(HMODULE)hModule,FileName,sizeof(FileName))!=0){
              jName=(*env)->NewStringUTF(env,FileName);
         return jName;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    GetModuleBaseName
    * Signature: (II)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_agent_win32_NIMSNT_GetModuleBaseName(JNIEnv * env, jclass clazz, jint hProcess, jint hModule){
         jstring jName=0;
         char FileName[MAX_PATH];
         if(GetModuleBaseName((HANDLE)hProcess,(HMODULE)hModule,FileName,sizeof(FileName))!=0){
              jName=(*env)->NewStringUTF(env,FileName);
         return jName;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    CloseHandle
    * Signature: (I)Z
    JNIEXPORT jboolean JNICALL Java_agent_win32_NIMSNT_CloseHandle(JNIEnv * env, jclass clazz, jint handle)
         return CloseHandle((HANDLE) handle);
    * Class:     nims_agent_win32_NIMSNT
    * Method:    GetSystemMemoryInfo
    * Signature: (I)Lagent/win32/MemoryInfo;
    JNIEXPORT jobject JNICALL Java_agent_win32_NIMSNT_GetSystemMemoryInfo(JNIEnv * env, jclass clazz){
         jfieldID jfield;
         jobject jobj=0;
         MEMORYSTATUS stat;
         stat.dwLength = sizeof(stat);
         GlobalMemoryStatus(&stat);
         clazz=(*env)->FindClass(env,"agent.win32.NIMSMemoryInfo");
         if (clazz==0) return 0;
         jobj = (*env)->AllocObject (env,clazz);
         //set NIMSMemoryInfo object field
         // dwLength
         jfield=(*env)->GetFieldID(env,clazz,"dwLength","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwLength);
         // dwMemoryLoad
         jfield=(*env)->GetFieldID(env,clazz,"dwMemoryLoad","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwMemoryLoad);
         // dwTotalPhys
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalPhys","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalPhys);
         // dwAvailPhys
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailPhys","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailPhys);
         // dwTotalPageFile
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalPageFile","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalPageFile);
         // dwAvailPageFile
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailPageFile","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailPageFile);
         // dwTotalVirtual
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalVirtual","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalVirtual);
         // dwAvailVirtual
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailVirtual","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailVirtual);
         return jobj;
    };I can use all of the methods in the Java/C code except for the the last native method   public static native MemoryInfo GetSystemMemoryInfo(); . I get a NoClassDefFoundError when I try to use this method. I have a feeling that I'm just doing something stupid.
    Thanks in advance,
    John

    Yes, exactly. I changed the name of that class and forgot to change it in the c code. Thanks for the feedback.
    Also, if anyone is using this code as an example, you need to change "agent.win32.MemoryInfo" to "agent/win32/MemoryInfo" in the c code. If it is left as "agent.win32.MemoryInfo" you will get a ClassCircularityError when trying to make multiple calls to the NIMSNT.GetSystemMemoryInfo();.

  • Sub Query Error When Passing Dynamic Parameter.

    Dear All, I need help for below query problem.
    I have try below query run no problem when pass a static Parameter into the query but it throw error once i have add in the dynamic parameter:-
    --Sales BatchNum Transaction
    SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T4.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity',
    (SELECT [Quantity] FROM [OIBT] T1 WHERE T1.[ItemCode] = T0.[ItemCode] AND T1.[WhsCode] = T0.[WhsCode] AND T1.[BatchNum]=T0.[BatchNum]) AS 'Stock OnHand'
    FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                      INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                      INNER JOIN [OITW] T4 ON T0.[ItemCode] = T4.[ItemCode] AND T0.[WhsCode] = T4.[WhsCode]
    WHERE T0.[BaseType] = [%0] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T3.[ItmsGrpNam] = [%3]
    GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], T4.[AvgPrice]
    --ORDER BY T0.[ItemCode]
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.[ItemCode], T4.[ItemName],T4.[WhsCode], T4.[BatchNum], ISNULL(T7.[AvgPrice],0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.[Quantity])
    FROM [OIBT] T4 INNER JOIN [OITM] T5 ON T4.[ItemCode] = T5.[ItemCode]
                      INNER JOIN [OITB] T6 ON T5.[ItmsGrpCod] = T6.[ItmsGrpCod]
                      INNER JOIN [OITW] T7 ON T4.[ItemCode] = T7.[ItemCode] AND T4.[WhsCode] = T7.[WhsCode]
    WHERE NOT EXISTS
    ( SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T5.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity'
      FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                        INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                         INNER JOIN [OITW] T5 ON T0.[ItemCode] = T5.[ItemCode] AND T0.[WhsCode] = T5.[WhsCode]
      WHERE T0.[BaseType] = [%1] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T4.[ItemCode]=T0.[ItemCode] AND T4.[WhsCode]=T0.[WhsCode] AND T4.[BatchNum]=t0.[BatchNum] AND T3.[ItmsGrpNam] = [%3]
      GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum],T5.[AvgPrice]
    AND T6.[ItmsGrpNam] = [%3]
    GROUP BY T4.[ItemCode], T4.[ItemName], T4.[WhsCode], T4.[BatchNum], T7.[AvgPrice]
    HAVING SUM(T4.[Quantity]) > 0
    ORDER BY 1, 2, 3, 5 DESC
    I think SAP Query Manager can support the sub-query, kindly advise how to solve or other alternative way to solve this issue.
    Thanks a lot.

    Dear  Thanga Raj K,
    From your solution i can get my expected result, only within your solution you miss out the @ in line 32 for ToDate variable.
    After i have added it, it working perfectly.
    Thanks once again.
    For other user References code(Corrected):-
    Declare @basetype as int
    Declare @FromDate as Datetime
    Declare @ToDate as Datetime
    Declare @ItemGroup as nvarchar(30)
    set @basetype = (select max(s0.BaseType) from IBT1 S0 where s0.BaseType = '[%0]')
    set @FromDate = (select min(S1.DocDate) from IBT1 S1 where S1.DocDate >= '[%1]')
    set @ToDate = (select max(S2.DocDate) from IBT1 S2 where S2.DocDate <= '[%2]')
    set @ItemGroup = (select max(S3.ItmsGrpNam) from OITB s3 where S3.ItmsGrpNam = '[%3]')
    --Sales BatchNum Transaction
    SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T4.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity',
    (SELECT Quantity FROM OIBT T1 WHERE T1.ItemCode = T0.ItemCode AND T1.WhsCode = T0.WhsCode AND T1.BatchNum=T0.BatchNum) AS 'Stock OnHand'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T4 ON T0.ItemCode = T4.ItemCode AND T0.WhsCode = T4.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, T4.AvgPrice
    --ORDER BY T0.ItemCode
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.ItemCode, T4.ItemName,T4.WhsCode, T4.BatchNum, ISNULL(T7.AvgPrice,0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.Quantity)
    FROM OIBT T4 INNER JOIN OITM T5 ON T4.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OITW T7 ON T4.ItemCode = T7.ItemCode AND T4.WhsCode = T7.WhsCode
    WHERE NOT EXISTS
    (SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T5.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T5 ON T0.ItemCode = T5.ItemCode AND T0.WhsCode = T5.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T4.ItemCode=T0.ItemCode AND T4.WhsCode=T0.WhsCode AND T4.BatchNum=t0.BatchNum AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum,T5.AvgPrice
    AND T6.ItmsGrpNam = @ItemGroup
    GROUP BY T4.ItemCode, T4.ItemName, T4.WhsCode, T4.BatchNum, T7.AvgPrice
    HAVING SUM(T4.Quantity) > 0
    ORDER BY 1, 2, 3, 5 DESC

  • How to skip the spaces, ' etc when passing the parameter to srw.run_report?

    Hi, I have got problem with passing parameter to srw.run_report. It seems it doesn't take the special symbols such as space, ', etc.. the statement is like:
    srw.run_report('report=test1 p_name='&#0124; &#0124;:p_title);
    if :p_title is "JOE", there is no problem to pass it, but if the :p_title is "JOE LI", then the value of the parameter can be passed to p_name.
    Does any one know how to skip those special symbols in the string when passing it to srw.run_report. Thank you very much.
    Joe

    Hi,
    Try this :
    srw.run_report('report=test1 p_name='&#0124; &#0124;
    chr(34)&#0124; &#0124;:p_title&#0124; &#0124;chr(34)
    );

  • Error when passing URL from OLAP Universe to WebI

    Hi Experts,
    I am getting 'The Supplier XML is not valid' WebI error when passing a URL from OLAP Universe.
    URL example:
    '<a href="http://www.sap.com">web link</a>'
    I follow Universe Designer Guide:
    - typing above URL into Dimension Select statement
    - selecting Read As Hyperlink in Object Format.
    When I drop this dimension into Result Objects panel in WebI Query and run refresh  'The Supplier XML is not valid' pops up.
    What i am trying to achive is to create a pre-formatted as Hyperlink object (dimension) in WebI to make it available for a user to design ad-hoc reports.
    Please help
    Thanks

    Hi,
    Refer the below forum link for more information:
    Universe object format in Web Intelligence
    I guess you can do some changes in the format of Universe object and use it in Webi.
    -Noor.

  • Error when passing parameters in a link

    Hi:
    i have a report and a form. i've created a link that will point to the form from the report. So i've associated the link to a field of the report and edited it so that a key field in the form will be equal to a value passed from the report's key field. The fact is that passing static values works properly, but when passing parameters from a column it raises an error:
    Error: Unable to parse query (WWV-10200)
    ORA-06550: line 1, column 37:
    PLS-00201: identifier 'NO' must be declared
    ORA-06550: line 1, column 9:
    PL/SQL: Statement ignored (WWV-11230)
    Failed to parse as PORTAL - begin wwv_rptclip.g_row_object :=
    NO(wwv_rptclip.g_row_object) ; end; (WWV-08300)
    Does anybody know how to solve this problem? or why is the error raised?
    Thx.
    Regards. Urko.

    Also, is that a function NO you're trying to use? I'm not sure what that is, so it's possible when Portal tries to parse the sql string and execute it, it's not a recognizable function in the Oracle language or the appropriate grants on that function have not been made to the schema executing the report/form

  • Exception in thread main java.lang.NoClassDefFoundError when Install 11g 2

    Exception in thread main java.lang.NoClassDefFoundError when Install Oracle database 11g release 2 on redhat linux enterprise 5
    My Java Version is 1.6.0_13-b03, can anyone help?
    Error Message as follows:
    准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2009-12-01_11-25-58AM. 请稍候...[oracle@redhatlinux ~]$ Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

    I am getting the same exception. I tried using xhost_+ but it's still not working for me.
    Again, here is the error that I'm receiving when trying to install Oracle 11g:
    Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)
    Thanks in advance for the help!!
    Also, this is all very new to me. So if you could provide a step-by-step answer I would really appreciate it.
    Edited by: user9014123 on Jan 25, 2010 1:40 PM

  • Error: java.lang.NoClassDefFoundError when Automatic Import Service loads

    Hi
    The netware server running NW 6.5sp4a has been reloaded due to hardware
    failure.
    All the data was restored to all volumes.
    When I run zfdstart I get the following error:
    error: java.lang.NoClassDefFoundError when Automatic Import Service loads.
    Help !!!
    Thanks
    Minesh

    [email protected] wrote:
    > error: java.lang.NoClassDefFoundError when Automatic Import Service loads.
    hmm... would say that the zeninstall wasn't correctly done... try
    reinstalling importing..
    Marcus Breiden
    If you are asked to email me information please change -- to - in my e-mail
    address.
    The content of this mail is my private and personal opinion.
    http://www.edu-magic.net

  • NoClassDefFoundError when using URLClassLoader

    Hi,
    I have an applet which tries to load a jar file dynamically. I am giving the code snippet here.
    loader = new URLClassLoader(new URL[] { new URL("http://localhost:4095/jars/dynamicload.jar") });
    m_class = loader.loadClass("loader.DynamicLoadedClass");
    (loader.DynamicLoadedClass) prntr = (loader.DynamicLoadedClass) m_class.newInstance();
    But this is throwing a NoClassDefFoundError when I try to cast the new instance to a DynamicLoadedClass.
    Can anybody help me correct this problem?
    Thanks
    Unni

    It will be happening when your code tries to access loader.DynamicLoadedClass for the cast. When a class accesses another class implicitly it asks the ClassLoader that loaded it for the class. That will presumably be the standard class loader that points to the classpath, and knows nothing about your dynamically loaded class.
    Really if you mention a class to the compiler then there's no point in trying to load it dynamically, since you must already have it locally to do the compilation.
    Usually you know that an dynamically loaded class will conform to some abstract class or interface you have locally, and you cast the new instance to that. That works because standard classloader delegation means your URLClassLoader will take classes from the class path if they are there.

  • NoClassDefFoundError when using ServerErrorListener

    Hi,
    I've got a java-programm using JCo 2.1.6. I wrapped up this programm with the jsl-tool to use that programm as a windows service. Now the connection process stands still when calling addClientPool. Therefore i tried to implement the ServerErrorListener and ServerExceptionListener to check whether I got further information because when I'm running that programm directly all is working well. Now I'm getting a NoClassDefFoundError when starting the programm. I'm a little bit buzzeled what's wrong. What jars do I need to get both listeners?
    Thanks
    Markus

    Hi Markus,
    Both exceptions are located in the jrfc.jar file.
    It can also be the case that one of the exception classes needs another class which is located in another jar, if you get my point. For that you should have a really close look at the log file, what is really causing the noclassdeffounderror.
    Kind regards,
    Peter

  • Parameter type conflict from Toplink 11g when passing ArrayList as input

    When passing ArrayList as an input to a StoredProcedureCall, I am getting the following stacktrace:
    t] Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080121)): oracle.toplink.exceptions.DatabaseException
    [junit] Internal Exception: java.sql.SQLException: Parameter Type Conflict
    [junit] Error Code: 17012
    [junit] Call: BEGIN XL_SP_ASSIGN_EVENTLIST(?, usrName=>?, assignUsrkey=>?, assignGrpkey=>?); END;
    [junit] bind => [null => eventIdList, FOO1, 117, 0]
    [junit] Query: ValueReadQuery()
    [junit] at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:295)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:724)
    [junit] at oracle.toplink.internal.databaseaccess.DatabasePlatform.executeStoredProcedure(DatabasePlatform.java:1627)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:534)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
    Here is my code snippet to pass ArrayList as input parameter :
    StoredProcedureCall spc = new StoredProcedureCall();
    spc.setProcedureName(procedureName);
    spc.addUnamedInOutputArgument("eventIdList", "eventIdList", Types.ARRAY,
    "EVENTIDS", ArrayList.class);
    String argLoggedInUsrName = "usrName";
    String argAssignedUsrKey = "assignUsrkey";
    String argAssignedGrpKey = "assignGrpkey";
    spc.addNamedArgument(argLoggedInUsrName);
    spc.addNamedArgument(argAssignedUsrKey);
    spc.addNamedArgument(argAssignedGrpKey);
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(spc);
    query.addArgument("eventIdList");
    query.addArgument(argLoggedInUsrName);
    query.addArgument(argAssignedUsrKey);
    query.addArgument(argAssignedGrpKey);
    Vector args = new Vector();
    ArrayList eventIdList = new ArrayList();
    eventIdList.add(new Long(50000));
    args.add(eventIdList);
    args.add(loggedInUsrName);
    args.add(assignedUsrKey);
    args.add(assignedGrpKey);
    eventIdList = (ArrayList) session.executeQuery(query, args);
    This code chunk was working with an earlier build. Would really appreciate any inputs on the error seen.
    Please note - the EVENTIDs type in the pl/sql procedure is defined as a VARRAY(100) of NUMBER

    Well I posted a thread several weeks ago...see this thread below
    trying to get used to sql*plus, running and creating a simple procedure
    and someone made comments about the select query leading to sql injection. Now I am trying to understand the true case behind that. I have an idea made it is because of the first concatenation in the parameter or not. Not sure.

  • What type of license should the user be assigned when passing transactions through the DI Server?

    What type of license should the user be assigned when passing transactions through the DI Server?
    We used to assign indirect access licenses to users that were just using the DI Server.  We have one add-on developer that says that the user has to be a Profession license. Current environment is SAP B1 9.0 PL10.  My understanding was that you could have up to 10 users assigned to a single DI Server license.

    Hi,
    From the license guide,
    Indirect Access – has access to any SSP solutions (developed with the SAP Business One DI-API) only. The Indirect Access license is bundled with the DI server. Users who have an Indirect Access license can access a limited number of application forms, but cannot perform any functions with the SAP Business One application. Users who have an Indirect Access license can access an unlimited number of SSP solutions
    Thanks & Regards,
    Nagarajan

Maybe you are looking for

  • I have a wiring plan, but I am not sure if its covered by the FIOS installation.

    I have only ordered FIOS Internet but I am thinking about getting FIOS TV soon. I want to install the Actiontec router next to my TV, so when I get the FIOS TV, I won't have to run a long wire between the router and the box. Also, it will be very clo

  • MBSA and Office 2013 click to run

    Hello, Does anybody know if the click-to-run version of Office 2013 is scan by the MBSA? This page tells us which products but not specifically if CTR is covered: http://technet.microsoft.com/en-US/security/cc184924.aspx Thanks, Carl Carl Barrett | T

  • Problem in updating PA0028-SBJ fields

    Hello Experts,        I have a requirement where i need to check for the values of SBJ01 to SBJ30 and based on the values we have to update correspondign WTF fields. I tried with Do varying but got lost some where and my code is not working.  pl. hel

  • Black bar at bottom of page

    We're trying to embed flash paper in a projector file. Docs print cleanly as flash paper .swf flies from a browser, but when embedded into a projector file, a black bar (about 3/8 ' tall by the width of the paper) appears very close to the bottom edg

  • Windows 8 reports my CD has Acrabat Adobe Reader 7 and there is a compatility issue. How do I read t

    Windows 8 reports my CD has Acrabat Adobe Reader 7 and there is a compatility issue. How do I read the CD? Thank you.