Invalid owner exception.

Hi all:
If I execute this application I get the next exception when invoke the second Sample method from main.
oracle.jbo.InvalidOwnerException: JBO-25302: Component object MyView has no parent
oracle.jbo.server.ApplicationModuleImpl oracle.jbo.server.ComponentObjectImpl.getRootApplicationModule()
oracle.jbo.server.DBTransaction oracle.jbo.server.ViewObjectImpl.getDBTransaction()
void oracle.jbo.server.ViewObjectImpl.addRowSet(oracle.jbo.server.ViewRowSetImpl)
oracle.jbo.server.ViewRowSetImpl oracle.jbo.server.ViewObjectImpl.createViewRowSet(java.lang.String, boolean)
oracle.jbo.server.ViewRowSetImpl oracle.jbo.server.ViewObjectImpl.getDefaultRowSet()
void oracle.jbo.server.ViewObjectImpl.executeQuery()
java.util.Vector SampleImpl.getData()
java.lang.String SAmple.g()
void Sample.main(java.lang.String[])
If I modify the getData method in the application module and I insert this line at top it works:
public String getData() {
//********** This is the inserted line *********///
MyView = (MyViewImpl)findViewObject("MyView");
getMyView().executeQuery(); // Any query.
MyViewRowImpl row = (MyViewRowImpl)getMyView().first();
if(row != null) return row.getSomeAttribute();
return "no data";
Is there any other solution?? Any PoolMgr config parameter lost???
Here is the code.
public class Sample {
ApplicationPool pool = null;
public Sample() throws Exception {
String am = "sample.MyApplicationModule";
String jdbc = "jdbc:oracle:thin:login/pwd@machine:1521:sid";
if(!PoolMgr.getInstance().isPoolCreated(name + connectionString)) {
Hashtable env = new Hashtable(2);
env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
PoolMgr.getInstance().createPool(am + jdbc, am, jdbc, env);
pm = PoolMgr.getInstance().getPool(am + jdbc);
public String getData() {
MyApplicationModule am = null;
try {
am = (MyApplicationModule)pm.checkout();
return am.getData(); // From a MyViewObject class
} catch (Exception e) {
return e.getMessage();
} finally {
pm.checkin(am);
public static void main(String[] args) throws Exception {
Sample s = new Sample();
System.out.println(s.getData());
Sample s1 = new Sample();
System.out.println(s.getData());
This is my application module.
public class SampleImpl
extends oracle.jbo.server.ApplicationModuleImpl
implements common.Sample {
protected MyViewImpl MyView;
public SampleImpl() {
public MyViewImpl getMyView() {
if (MyView == null) {
MyView = (MyViewImpl)findViewObject("MyView");
return MyView;
public String getData() {
getMyView().executeQuery(); // Any query.
MyViewRowImpl row = (MyViewRowImpl)getMyView().first();
if(row != null) return row.getSomeAttribute();
return "no data";
Thanks in advance.
Joaquin.
null

I had a similar problem, maybe you should have a look at the corrsponding post:
http://technet.oracle.com:89/ubb/Forum2/HTML/006553.html
especially john Smiljanic's response posted March 01...
Hope this helps, Remi

Similar Messages

  • ADF Create form : Invalid owner exception

    hi
    i hve a master details form
    i hve to insert in to three more tables
    i created Eo's and Vo's for each and the association and links were created accordingly
    i want this form as a single page
    ie
    now i have to treat every view object as seperate one in the page
    i need to keep one create button for each view object to initialize the create page
    i tried to do with invoke action in executables
    now i am getting an error while initing the second create form
    *oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity: detail entity EO_ActivityDt, row key oracle.jbo.Key[-7 ].*
    is it possible prepare a create form from multiple table together with single create action
    pls advice
    thanks

    try chaging the pre-allocation size value (toplink map->Database Info tab->Sequencing).
    If you are using Oracle db, also make sure that you database sequence increment and TopLink sequence preallocation sizes are the same.
    For more info refer to http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/prjdaun007.htm
    Re: Toplink Sequence - Preallocation in Oracle
    Hope this helps,
    Anuj

  • Invalid Number exception

    Hi experts,
    I have a very strange problem. I have a query to which I am binding a value. The datatype of the value is number. Whenever I am executing the VO for the second time it is throwing ORA-01722: invalid number exception. The value that is being bound is 100% number. The JDBC version I am using is 9.2.0.6.0
    It is reproducible in instance and JDeveloper.
    I have no clue why it is happening. Appreciate if someone can give some pointers.
    Error stack:
    [1814] SELECT mcixv.customer_number CustomerNumber,
    mcixv.customer_name CustomerName,
         aav.concatenated_address ShipToLocation
    FROM mtl_customer_item_xrefs_v mcixv,
    ic_item_mst iim ,
         mtl_system_items msi,
         ar_addresses_v aav,
         hz_site_uses_v hsv
    WHERE hsv.primary_flag = 'Y'
    AND hsv.bill_to_location IS NOT NULL
    AND hsv.site_use_code = 'SHIP_TO'
    AND aav.address_id = hsv.address_id
    AND mcixv.customer_id = aav.customer_id
    AND mcixv.inactive_flag= 'N'
    AND mcixv.concatenated_segments = iim.item_no
    AND mcixv.inventory_item_id = msi.inventory_item_id
    AND msi.organization_id = xxtmg_ul_common_utils.get_organization_id
    AND msi.segment1 = iim.item_no
    AND xxtmg_an_process_utils.get_price_list_uom(mcixv.customer_number,iim.item_id) = 'Y'
    AND iim.item_id = :1
    group by mcixv.customer_number, mcixv.customer_name,aav.concatenated_address[1815] Binding param 1: 4084[1816] ViewObject close single-use prepared statements[1817] QueryCollection.executeQuery failed...[1818] java.sql.SQLException: ORA-01722: invalid number
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)     at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)     at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)     at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)     at oracle.jdbc.ttc7.TTC7Protocol.executeFetch(TTC7Protocol.java:1005)     at oracle.jdbc.dbaccess.DBAccess.executeFetchNeedDefines(DBAccess.java:283)     at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2673)     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)     at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)     at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)     at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)     at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)     at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3347)     at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)     at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4495)     at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)     at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)     at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)     at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3311)     at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3298)     at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:444)     at tempel.oracle.apps.xxtmg.an.scaleaudit.server.checkCustomersPresentVOImpl.initQuery(checkCustomersPresentVOImpl.java:22)     at tempel.oracle.apps.xxtmg.an.scaleaudit.server.ScaleAuditAMImpl.validateNonFurnSublot(ScaleAuditAMImpl.java:762)     at tempel.oracle.apps.xxtmg.an.scaleaudit.server.webui.ScaleAuditCO.processFormRequest(ScaleAuditCO.java:1005)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:804)     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1157)     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)     at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)     at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)     at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2632)     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1658)     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)     at OA.jspService(OA.jsp:40)     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)     at java.lang.Thread.run(Thread.java:534)[1819] checkCustomersPresentVO1>#q old SQLStmtBufLen: 933, actual=903, storing=933[1820] SELECT mcixv.customer_number CustomerNumber,
    mcixv.customer_name CustomerName,
         aav.concatenated_address ShipToLocation
    FROM mtl_customer_item_xrefs_v mcixv,
    ic_item_mst iim ,
         mtl_system_items msi,
         ar_addresses_v aav,
         hz_site_uses_v hsv
    WHERE hsv.primary_flag = 'Y'
    AND hsv.bill_to_location IS NOT NULL
    AND hsv.site_use_code = 'SHIP_TO'
    AND aav.address_id = hsv.address_id
    AND mcixv.customer_id = aav.customer_id
    AND mcixv.inactive_flag= 'N'
    AND mcixv.concatenated_segments = iim.item_no
    AND mcixv.inventory_item_id = msi.inventory_item_id
    AND msi.organization_id = xxtmg_ul_common_utils.get_organization_id
    AND msi.segment1 = iim.item_no
    AND xxtmg_an_process_utils.get_price_list_uom(mcixv.customer_number,iim.item_id) = 'Y'
    AND iim.item_id = :1
    group by mcixv.customer_number, mcixv.customer_name,aav.concatenated_addressJBO-27122: SQL error during statement preparation. Statement: SELECT mcixv.customer_number CustomerNumber,
    mcixv.customer_name CustomerName,
         aav.concatenated_address ShipToLocation
    FROM mtl_customer_item_xrefs_v mcixv,
    ic_item_mst iim ,
         mtl_system_items msi,
         ar_addresses_v aav,
         hz_site_uses_v hsv
    WHERE hsv.primary_flag = 'Y'
    AND hsv.bill_to_location IS NOT NULL
    AND hsv.site_use_code = 'SHIP_TO'
    AND aav.address_id = hsv.address_id
    AND mcixv.customer_id = aav.customer_id
    AND mcixv.inactive_flag= 'N'
    AND mcixv.concatenated_segments = iim.item_no
    AND mcixv.inventory_item_id = msi.inventory_item_id
    AND msi.organization_id = xxtmg_ul_common_utils.get_organization_id
    AND msi.segment1 = iim.item_no
    AND xxtmg_an_process_utils.get_price_list_uom(mcixv.customer_number,iim.item_id) = 'Y'
    AND iim.item_id = :1
    group by mcixv.customer_number, mcixv.customer_name,aav.concatenated_addressoracle.apps.fnd.framework.OAException: JBO-27122: SQL error during statement preparation. Statement: SELECT mcixv.customer_number CustomerNumber,
    mcixv.customer_name CustomerName,
         aav.concatenated_address ShipToLocation
    FROM mtl_customer_item_xrefs_v mcixv,
    ic_item_mst iim ,
         mtl_system_items msi,
         ar_addresses_v aav,
         hz_site_uses_v hsv
    WHERE hsv.primary_flag = 'Y'
    AND hsv.bill_to_location IS NOT NULL
    AND hsv.site_use_code = 'SHIP_TO'
    AND aav.address_id = hsv.address_id
    AND mcixv.customer_id = aav.customer_id
    AND mcixv.inactive_flag= 'N'
    AND mcixv.concatenated_segments = iim.item_no
    AND mcixv.inventory_item_id = msi.inventory_item_id
    AND msi.organization_id = xxtmg_ul_common_utils.get_organization_id
    AND msi.segment1 = iim.item_no
    AND xxtmg_an_process_utils.get_price_list_uom(mcixv.customer_number,iim.item_id) = 'Y'
    AND iim.item_id = :1
    group by mcixv.customer_number, mcixv.customer_name,aav.concatenated_address[1821] OAApplicationPoolImpl.setConnectionReleaseLevel was called with isReleased = true, isReserved = true[1822] setConnectionReleaseLevel - Set connection release level to 1JRAD_PERF : /tempel/oracle/apps/xxtmg/an/scaleaudit/webui/ScaleAuditPG - preparePage : 10045msJRAD_PERF : /tempel/oracle/apps/xxtmg/an/scaleaudit/webui/ScaleAuditPG - renderDocument : 70ms

    I'm just trying to rule out the possiblity of unsynchronized load balanced servers because the issue begaviour is not pointing to code as such otherwise it shouldn't have been happening in a random way. Have you put the trace and seen the value of parameter which is getting binded at the time the error is getting generated.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Invalid Class Exception problem

    Hi whenever i try to run this method from a different class to the one it is declared in it throws invalid class exception, (in its error it says the class this method is written in is the problem) yet when i run it from its own class in a temporary main it works fine, perhaps someone can see the problem in the method code. All its doing is reading from a few different txt files, deserializing the objects and putting them into arraylists for future access.
    public void readCourseData()
              CourseArrayLengths cal;
              try
                   FileInputStream fis = new FileInputStream("arraylengths.txt");
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   cal = ((CourseArrayLengths) ois.readObject());     
                   ois.close();
                   FileInputStream fis1 = new FileInputStream("units.txt");
                   ObjectInputStream ois1 = new ObjectInputStream(fis1);
                   for(int i=0;i<cal.getUnitArrayLength();i++)
                        units.add((Unit) ois1.readObject());
                   ois1.close();
                   FileInputStream fis2 = new FileInputStream("sections.txt");
                   ObjectInputStream ois2 = new ObjectInputStream(fis2);
                   for(int i=0;i<cal.getSectionArrayLength();i++)
                        sections.add((Section) ois2.readObject());
                   ois2.close();
                   FileInputStream fis3 = new FileInputStream("files.txt");
                   ObjectInputStream ois3 = new ObjectInputStream(fis3);
                   for(int i=0;i<cal.getFileArrayLength();i++)
                        files.add((Filetype) ois3.readObject());
                   ois3.close();
              catch(FileNotFoundException exception)
              System.out.println("The File was not found");
              catch(IOException exception)
              System.out.println(exception);
              catch(ClassNotFoundException exception)
              System.out.println(exception);
         }

    import java.util.ArrayList;
    import java.io.*;
    import javax.swing.*;
    public class Unit implements Serializable
    ArrayList units = new ArrayList();
    ArrayList sections = new ArrayList();
    ArrayList files = new ArrayList();
    String unitName;
    int sStart=0,sEnd=0,sIndex=0,fIndex=0,subIndex=0;
         public Unit(String unitNamec,int sStartc,int sEndc)
              unitName = unitNamec;
              sStart = sStartc;
              sEnd = sEndc;
         public Unit()
         public String getUnitName()
              return unitName;
         public Unit getUnit(int i)
              return (Unit)units.get(i);
         public Section getSection(int i)
              return (Section)sections.get(i);
         public ArrayList getUnitArray()
              return units;
         public int getSectionStart()
              return sStart;
         public int getSectionEnd()
              return sEnd;
         public void setSectionStart(int i)
              sStart = i;
         public void setSectionEnd(int i)
              sEnd = i;
         public void addUnit(String uName)
              units.add(new Unit(uName,sections.size(),sIndex));
              sIndex++;
         public void addSection(String sName,Unit u)
              //problem lies with files.size()
              sections.add(new Section(sName,files.size(),files.size()));
              u.setSectionEnd(u.getSectionEnd()+1);
              //fIndex++;
         public void addFile(String fName,File fPath,Section s)
              files.add(new Filetype(fName,fPath));
              s.setFileEnd(s.getFileEnd()+1);
         public void display(Unit u)
              System.out.println(u.getUnitName());
              for(int i=u.getSectionStart();i<u.getSectionEnd();i++)
                   System.out.println(((Section)sections.get(i)).getSectName());
                   for(int j=((Section)(sections.get(i))).getFileStart();j<((Section)(sections.get(i))).getFileEnd();j++)
                        System.out.println(((Filetype)files.get(j)).getFileName());
         public void writeCourseData()
         //writes 3 arrays to 3 different files
    try
    FileOutputStream fos = new FileOutputStream("units.txt");
    ObjectOutputStream oos = new ObjectOutputStream(fos);
         for(int i=0;i<units.size();i++)
         oos.writeObject((Unit)units.get(i));
         oos.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    try
    FileOutputStream fos = new FileOutputStream("sections.txt");
    ObjectOutputStream oos = new ObjectOutputStream(fos);
         for(int i=0;i<sections.size();i++)
         oos.writeObject((Section)sections.get(i));
         oos.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    try
    FileOutputStream fos = new FileOutputStream("files.txt");
    ObjectOutputStream oos = new ObjectOutputStream(fos);
         for(int i=0;i<files.size();i++)
         oos.writeObject((Filetype)files.get(i));
         oos.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    try
    FileOutputStream fos = new FileOutputStream("arraylengths.txt");
    ObjectOutputStream oos = new ObjectOutputStream(fos);
         oos.writeObject(new CourseArrayLengths(units.size(),sections.size(),files.size()));
         oos.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
         public void readCourseData()
              CourseArrayLengths cal;
              try
                   FileInputStream fis = new FileInputStream("arraylengths.txt");
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   cal = ((CourseArrayLengths) ois.readObject());     
                   ois.close();
                   FileInputStream fis1 = new FileInputStream("units.txt");
                   ObjectInputStream ois1 = new ObjectInputStream(fis1);
                   for(int i=0;i<cal.getUnitArrayLength();i++)
                        units.add((Unit) ois1.readObject());
                   ois1.close();
                   FileInputStream fis2 = new FileInputStream("sections.txt");
                   ObjectInputStream ois2 = new ObjectInputStream(fis2);
                   for(int i=0;i<cal.getSectionArrayLength();i++)
                        sections.add((Section) ois2.readObject());
                   ois2.close();
                   FileInputStream fis3 = new FileInputStream("files.txt");
                   ObjectInputStream ois3 = new ObjectInputStream(fis3);
                   for(int i=0;i<cal.getFileArrayLength();i++)
                        files.add((Filetype) ois3.readObject());
                   ois3.close();
              catch(FileNotFoundException exception)
              System.out.println("The File was not found");
              catch(IOException exception)
              System.out.println(exception);
              catch(ClassNotFoundException exception)
              System.out.println(exception);
         /*public static void main(String args[])
              Unit u1 = new Unit();
              u1.addUnit("Cmps2a22");
              u1.addSection("Section1",u1.getUnit(0));
              //u1.addSubSection("Subsect1",u1.getSection(0));
              u1.addFile("File1",null,u1.getSection(0));
              u1.addFile("File2",null,u1.getSection(0));
              u1.addSection("Section2",u1.getUnit(0));
              u1.addFile("NF",null,u1.getSection(1));
              u1.addFile("NF2",null,u1.getSection(1));
              u1.addFile("NF3",null,u1.getSection(1));
              u1.addSection("Section3",u1.getUnit(0));
              u1.addFile("NF",null,u1.getSection(2));
              u1.addFile("NF2",null,u1.getSection(2));
              u1.addFile("NF4",null,u1.getSection(2));
              u1.display(u1.getUnit(0));
              u1.writeCourseData();
              u1.readCourseData();
              u1.display(u1.getUnit(0));
    import java.util.ArrayList;
    import java.io.*;
    public class Section implements Serializable
    private String sectName,subSectName;
    private int fpStart=0,fpEnd=0,subSectStart=0,subSectEnd=0;
    private Section s;
    private boolean sub;
         public Section(String sectNamec,int fpStartc,int fpEndc,int subSectStartc,int subSectEndc,Section sc,boolean subc)
              sectName = sectNamec;
              fpStart = fpStartc;
              fpEnd = fpEndc;
              subSectStart = subSectStartc;
              subSectEnd = subSectEndc;
              s = sc;
              sub = subc;
         public Section(String sectNamec,int fpStartc,int fpEndc)
              sectName = sectNamec;
              fpStart = fpStartc;
              fpEnd = fpEndc;
         public Section getParent()
              return s;
         public boolean isSub()
              return sub;
         public String getSubName()
              return subSectName;
         public int getSubStart()
              return subSectStart;
         public int getSubEnd()
              return subSectEnd;
         public void setSubStart(int i)
              subSectStart = i;
         public void setSubEnd(int i)
              subSectEnd = i;
         public int getFileStart()
              return fpStart;
         public int getFileEnd()
              return fpEnd;
         public String getSectName()
              return sectName;
         public void setFileStart(int i)
              fpStart = i;
         public void setFileEnd(int i)
              fpEnd = i;
         public void addSection(String sectName)
         /*public static void main(String args[])
    import java.io.*;
    public class Filetype implements Serializable
         private String name;
         private File filepath;
         public Filetype(String namec, File filepathc)
              name = namec;
              filepath = filepathc;
         public String getFileName()
              return name;
         public File getFilepath()
              return filepath;
    import java.io.*;
    public class CourseArrayLengths implements Serializable
    private int ul,sl,fl;
         public CourseArrayLengths(int ulc,int slc,int flc)
              ul = ulc;
              sl = slc;
              fl = flc;
         public int getUnitArrayLength()
              return ul;
         public int getSectionArrayLength()
              return sl;
         public int getFileArrayLength()
              return fl;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.ArrayList;
    import java.io.*;
    public class OrganiserGui implements ActionListener
    int width,height;
    JFrame frame;
         public OrganiserGui()
              width = 600;
              height = 500;
         public void runGui()
              //Frame sizes and location
              frame = new JFrame("StudentOrganiser V1.0");
    frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
              frame.setSize(width,height);
              frame.setLocation(60,60);
              JMenuBar menuBar = new JMenuBar();
              //File menu
              JMenu fileMenu = new JMenu("File");
              menuBar.add(fileMenu);
              fileMenu.addSeparator();
              JMenu addSubMenu = new JMenu("Add");
              fileMenu.add(addSubMenu);
              JMenuItem cwk = new JMenuItem("Coursework assignment");
              addSubMenu.add(cwk);
              JMenuItem lecture = new JMenuItem("Lecture");
              lecture.addActionListener(this);
              addSubMenu.add(lecture);
              JMenuItem seminar = new JMenuItem("Seminar sheet");
              addSubMenu.add(seminar);
              //Calendar menu
              JMenu calendarMenu = new JMenu("Calendar");
              menuBar.add(calendarMenu);
              calendarMenu.addSeparator();
              JMenu calendarSubMenu = new JMenu("Edit Calendar");
              calendarMenu.add(calendarSubMenu);
              JMenuItem eventa = new JMenuItem("Add/Remove Event");
              eventa.addActionListener(this);
              calendarSubMenu.add(eventa);
              JMenuItem calClear = new JMenuItem("Clear Calendar");
              calClear.addActionListener(this);
              calendarSubMenu.add(calClear);
              JMenu calendarSubMenuView = new JMenu("View");
              calendarMenu.add(calendarSubMenuView);
              JMenuItem year = new JMenuItem("By Year");
              year.addActionListener(this);
              calendarSubMenuView.add(year);
              JMenuItem month = new JMenuItem("By Month");
              month.addActionListener(this);          
              calendarSubMenuView.add(month);
              JMenuItem week = new JMenuItem("By Week");
              week.addActionListener(this);
              calendarSubMenuView.add(week);
              //Timetable menu
              JMenu timetableMenu = new JMenu("Timetable");
              menuBar.add(timetableMenu);
              timetableMenu.addSeparator();
              JMenu stimetableSubMenu = new JMenu("Social Timetable");
              timetableMenu.add(stimetableSubMenu);
              JMenu ltimetableSubMenu = new JMenu("Lecture Timetable");
              timetableMenu.add(ltimetableSubMenu);
              frame.setJMenuBar(menuBar);
    frame.setVisible(true);
         public void actionPerformed(ActionEvent e)
              JMenuItem source = (JMenuItem)(e.getSource());
              System.out.println(source.getText());     
              Calendar c = new Calendar();
              if(source.getText().equalsIgnoreCase("By Year"))
                   System.out.println("INSIDE");
                   c.buildArray();
                   c.calendarByYear(Calendar.calendarArray);     
              if(source.getText().equalsIgnoreCase("Add/Remove Event"))
                   c.eventInput();
              if(source.getText().equalsIgnoreCase("clear calendar"))
                   c.buildYear();
                   c.writeEvent(Calendar.calendarArray);
                   c.buildArray();
              if(source.getText().equalsIgnoreCase("lecture"))
                   System.out.println("Nearly working");
                   //JFileChooser jf = new JFileChooser();
                   //jf.showOpenDialog(frame);
                   FileManager fm = new FileManager();
                   //choose unit to add file to
                   JOptionPane unitOption = new JOptionPane();
                   Unit u = new Unit();
                   u.readCourseData();
                   //u.display(u.getUnit(0));
                   System.out.println((u.getUnit(0)).getUnitName());
                   String[] unitNames = new String[u.getUnitArray().size()];
                   for(int i=0;i<unitNames.length;i++)
                        //unitNames[i] = (((Unit)u.getUnitArray().get(i)).getUnitName());
                        //System.out.println(unitNames);
                        System.out.println((u.getUnit(i)).getUnitName());
                   //unitOption.showInputDialog("Select Unit to add lecture to",unitNames);
                   //needs to select where to store it
                   //fm.openFile(jf.getSelectedFile());
         public static void main(String args[])
              OrganiserGui gui = new OrganiserGui();
              gui.runGui();
    java.io.invalidclassexception: Unit; local class incompatible: stream classdesc serialversionUID = 3355176005651395533, local class serialversionUID = 307309993874795880

  • Invalid Handle Exception-What is the reason?

    I face with "Invalid Handle exception" (SQLException) while using the following code.
    Could anybody tell me the possible reasons/Situation the error rise?
    stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(SQLStmt);
         if(rs!=null){
    ResultSetMetaData rsm = rs.getMetaData();
         int totalcols = rsm.getColumnCount();
         Vector temp;
         while (rs.next()) {
         Vector temp = new Vector();
         for (int i = 1; i <= totalcols; i++) {
              String value = rs.getString(i);
              if (value == null) {
              value = "";
         temp.addElement(value);
         }//for loop ends here
         valueVector.addElement(temp);
         rs.close();
         stmt.close();     
    Thank you all

    Vector temp;
    while (rs.next()) {
    Vector temp = new Vector();Are you sure that this is the code you are running? The reason I ask is that I'm pretty sure that it won't compile, at least under JDK1.4. You should get a compile error something like "temp is already defined".
    If thats not the problem you need to find out on which line the error actually occurs. You can get this from the exception by calling the printStackTrace() method.
    Col

  • Invalid Argument Exception on Java API's DB Close

    When closing the database via the Java API's close method, I am getting an invalid argument exception... how can this be fixed... subsequent access to the DB causes the JVM to crash??
    ERROR: An exception has occurred: java.lang.IllegalArgumentException: Invalid argument
    java.lang.IllegalArgumentException: Invalid argument
    at com.sleepycat.db.internal.db_javaJNI.DbEnv_close0(Native Method)
    at com.sleepycat.db.internal.DbEnv.close0(DbEnv.java:217)
    at com.sleepycat.db.internal.DbEnv.close(DbEnv.java:77)
    at com.sleepycat.db.Environment.close(Environment.java:39)
    at com.sleepycat.dbxml.XmlManager.closeInternal(XmlManager.java:301)
    at com.sleepycat.dbxml.XmlManager.delete(XmlManager.java:33)
    at com.sleepycat.dbxml.XmlManager.close(XmlManager.java:310)
    at com.iconnect.data.adapters.BerkleyXMLDBImpl.insert(BerkleyXMLDBImpl.java:827)
    at com.iconnect.data.DataManagerFactory.insert(DataManagerFactory.java:182)
    at Xindice2Berkley.main(Xindice2Berkley.java:99)

    I had the same problem. I could fix it by carefully calling the delete() function on all those DBXML Xml..xyz objects that you create when you perform queries etc. It seems that those Java objects have some 'shadow' object in the underlying DLL and by calling delete() you free resources that remain otherwise assigned (maybe somebody with a C++ background who programmed this stuff?). Call delete() before the Java object gets out of scope. For instance:
    results = mgr.query(collection,context,null);
    XmlValue value;
    try {
    while ((value = results.next()) != null) {
    XmlValue c = value.getFirstChild();
    String ref = c.getNodeValue();
    c.delete(); c = null;
    value.delete(); value = null;
    catch (Exception e) {
    finally {
    if (results != null) {
    results.delete();
    results = null;
    Once i did this on all possible dbxml objects i used in my code, the java.lang.IllegalArgumentException: Invalid argument disappeared.
    Message was edited by:
    user562374

  • Out Of Memory & Invalid Pointer exceptions on CSV export

    Iu2019m having problems when exporting more than 1 million rows of data to a CSV format.  Iu2019m running the export from C# code (see sample code below).  Depending on the template that I use, I get either a System.OutOfMemoryException or a System.Runtime.InteropServices.COMException (Invalid pointer) error.  See the full error text below.
    This worked fine with Crystal XI but now breaks with Crystal 2008.
    Is this a known problem and are there any workarounds?
    Sample Code:
    ReportDocument rptDoc = new ReportDocument();
    rptDoc.Load("C:\somereport.rpt");
    ExportOptions opts = new ExportOptions();
    opts.ExportDestinationType = ExportDestinationType.DiskFile;
    DiskFileDestinationOptions destOpts = ExportOptions.CreateDiskFileDestinationOptions();
    destOpts.DiskFileName = "C:\outputfile.csv";
    opts.ExportDestinationOptions = destOpts;
    opts.ExportFormatType = ExportFormatType.CharacterSeparatedValues;
    rptDoc.Export(opts);
    Configuration:
    Crystal Reports 2008 (Full Version)
    C#
    .NET 3.5
    VS 2008
    Exceptions:
    System.Runtime.InteropServices.COMException occurred
      Message="Invalid pointer\r"
      Source="Analysis Server"
      ErrorCode=-2147467259
      StackTrace:
           at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
           at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export(ExportOptions options)
    System.OutOfMemoryException occurred
      Message="Exception of type 'System.OutOfMemoryException' was thrown."
      Source="CrystalDecisions.ReportAppServer.Controllers"
      StackTrace:
           at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
           at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export(ExportOptions options)

    Hello Ludek, Thanks for the reply.
    I am using 'Crystal Report Basic For Visual Studio 2008 - version 10.5'  version of the Crystal Report.
    I have 12 columns in my Report. Out of these 12 columns 2 columns display images (one is of size 320X240 and second one is of size 120X240).
    Some description is as :-
         When Report contain 1180 events, and when I export it as .xls( Size - 21, 492 KB i.e near about 22.5 MB) and .pdf ( Size :- 153,961 KB i.e near about 154MB) it get export properly without an error.
         When Report contan 1451 events, and when I export it as .xls (size :- 26,644 KB i.e. Near about 26.6MB) it export properly without an error. But if I try to export it as .pdf it gives " Invalid Pointer" exception.
         When Report contain 2813 events and when I export it as .xls (size :- 13, 957 KB) it get export properly without an error but this xls file does not contain the images. (If you look into size of xls for 1451 Events Report and 2813 Events Report, xls for 2813 Events Report has lower size than 1451 Events Reports, because it does not contain the images.) If I export this Report as .pdf , it gives "Invalid Pointer" exception.
         I used my own code to export the report in various formats.
        What should be done to export the large sized Reports in all possible formats?
    Thanks in advance.
    Edited by: YogeshP on Sep 2, 2009 2:20 PM

  • Invalid Key Exception: Unsupported key type: Sun RSA public key, 1024 bits

    I am trying to retrieve certificates from Microsoft Keystore and extract its keys using SunMSCAPI in jdk 1.6. It gives me an invalid key exception, when I am trying to wrap the Symmetric key (which was previously used to perform AES encryption on data), using RSA algorithm.
    Code snippet:
               // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
                // List the certificates from Microsoft KeyStore using SunMSCAPI.
                      System.out.println("List of certificates found in Microsoft Personal Keystore:");
                       KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
                       ks.load(null, null) ;
                       Enumeration en = ks.aliases() ;
                       PublicKey RSAPubKey = null;
                       Key RSAPrivKey = null;
                       int i = 0;
                       while (en.hasMoreElements()) {
                            String aliasKey = (String)en.nextElement() ;              
                            X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey) ;     
                            String sss = ks.getCertificateAlias(c);
                            if(sss.equals("C5151997"))
                            System.out.println("---> alias : " + sss) ;
                            i= i + 1;
                            String str = c.toString();
                            System.out.println(" Certificate details : " + str ) ;
                          RSAPubKey = c.getPublicKey();
                            RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
                            Certificate[] chain = ks.getCertificateChain(aliasKey);     
                       System.out.println("No of certificates found from Personal MS Keystore: " + i);
                // Encrypt the generated Symmetric AES Key using RSA cipher      
                        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());            
                       rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
                       byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);   
                       System.out.println("Encrypted Symmetric Key :" + new String(encryptedSymmKey));
                       System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
                       // RSA Decryption of Encrypted Symmetric AES key
                       rsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
                       Key decryptedKey = rsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);Output:
    List of certificates found in Microsoft Personal Keystore:
    ---> alias : C5151997
    Certificate details : [
    Version: V3
    Subject: CN=C5151997, O=SAP-AG, C=DE
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    Validity: [From: Mon Jan 24 18:17:49 IST 2011,
                   To: Wed Jan 23 18:17:49 IST 2013]
    Issuer: CN=SSO_CA, O=SAP-AG, C=DE
    SerialNumber: [    4d12c509 00000005 eb85]
    Certificate Extensions: 6
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 07 E5 83 A1 B2 B7 DF 6B 4B 67 9C 1D 42 C9 0D F4 .......kKg..B...
    0010: 35 76 D3 F7 5v..
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E4 C4 2C 93 20 AF DA 4C F2 53 68 4A C0 E7 EC 30 ..,. ..L.ShJ...0
    0010: 8C 0C 3B 9A ..;.
    [3]: ObjectId: 1.3.6.1.4.1.311.21.7 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 30 30 2E 06 26 2B 06 01 04 01 82 37 15 08 82 .00..&+.....7...
    0010: D1 E1 73 84 E4 FE 0B 84 FD 8B 15 83 E5 90 1B 83 ..s.............
    0020: E6 A1 43 81 62 84 B1 DA 50 9E D3 14 02 01 64 02 ..C.b...P.....d.
    0030: 01 1B ..
    [4]: ObjectId: 2.5.29.17 Criticality=false
    SubjectAlternativeName [
    RFC822Name: [email protected]
    [5]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Data_Encipherment
    [6]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    Algorithm: [SHA1withRSA]
    Signature:
    0000: B3 C5 92 66 8D D7 ED 6D 51 12 63 CC F4 52 18 B9 ...f...mQ.c..R..
    0010: B8 A6 78 F7 ED 7D 78 18 DA 71 09 C9 AE C8 49 23 ..x...x..q....I#
    0020: F5 32 2F 0F D1 C0 4C 08 2B 6D 3C 11 B9 5F 5B B5 .2/...L.+m<.._[.
    0030: 05 D9 CA E6 F9 0A 94 14 E7 C6 7A DB 63 FE E5 EC ..........z.c...
    0040: 48 94 8C 0D 77 92 59 DE 34 6E 77 1A 24 FE E3 C1 H...w.Y.4nw.$...
    0050: D8 0B 52 6A 7E 22 13 71 D7 F8 AF D1 17 C8 64 4F ..Rj.".q......dO
    0060: 83 EA 2D 6A CA 7F C3 84 37 15 FE 99 73 1D 7C D1 ..-j....7...s...
    0070: 6D B4 99 09 62 B9 0F 18 33 4C C6 66 7A 9F C0 DB m...b...3L.fz...
    No of certificates found from Personal MS Keystore: 1
    Exception in thread "main" java.security.InvalidKeyException: Unsupported key type: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
         at sun.security.mscapi.RSACipher.init(RSACipher.java:176)
         at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:129)
         at javax.crypto.Cipher.init(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at com.sap.srm.crpto.client.applet.CryptoClass.main(CryptoClass.java:102)
    Edited by: sabre150 on 18-Jul-2011 03:47
    Added [ code] tags to make code readable.

    A bit of research indicates that the classes of the keys obtained by
                          RSAPubKey = c.getPublicKey();
                               RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()are sun.security.rsa.RSAPublicKeyImpl and sun.security.*mscapi*.RSAPrivateKey . It seems that for Cipher objects from the SunMSCAPI provider cannot accept RSA public keys of class sun.security.rsa.RSAPublicKeyImpl and that the SunMSCAPI will only accept RSA private keys of class sun.security.mscapi.RSAPrivateKey.
    This came up under different guise a couple of years ago. It makes sense since encrypting/wrapping with a public key does not represent a security problem (there is nothing secret in any of the encryption operations) when done outside of MSCAPI so one can use any provider that has the capability BUT the decryption/unwrapping must be done with the SunMSCAPI provider which delegates it to the MSCAPI.
    My working test code based on your code implementing this approach is :
            // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
            // List the certificates from Microsoft KeyStore using SunMSCAPI.
            System.out.println("List of certificates found in Microsoft Personal Keystore:");
            KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            PublicKey RSAPubKey = null;
            Key RSAPrivKey = null;
            int i = 0;
            while (en.hasMoreElements())
                String aliasKey = (String) en.nextElement();
                X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey);
                String sss = ks.getCertificateAlias(c);
                if (sss.equals("rsa_key")) // The alias for my key - make sure you change it back to your alias
                    System.out.println("---> alias : " + sss);
                    i = i + 1;
                    String str = c.toString();
                    System.out.println(" Certificate details : " + str);
                    RSAPubKey = c.getPublicKey();
             System.out.println(RSAPubKey.getClass().getName());
                   RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
            System.out.println(RSAPrivKey.getClass().getName());
                    Certificate[] chain = ks.getCertificateChain(aliasKey);
            System.out.println(ks.getProvider().getName());
            System.out.println("No of certificates found from Personal MS Keystore: " + i);
            Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//, ks.getProvider().getName());       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
            byte[] keyBytes =
                1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9
            SecretKey aeskey = new SecretKeySpec(keyBytes, "AES");
            byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);
            System.out.println("Encrypted Symmetric Key :" + Arrays.toString(encryptedSymmKey));
            System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
            // RSA Decryption of Encrypted Symmetric AES key
            Cipher unwrapRsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());       //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            unwrapRsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
            Key decryptedKey = unwrapRsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
            System.out.println("Decrypted Symmetric Key :" + Arrays.toString(decryptedKey.getEncoded())); // Matches the 'keyBytes' above

  • Invalid Key Exception for DES Encryption during cipher initialization.

    All,
    We are trying to implement DES Encryption in IBM Mainframe Z series. The code looks like...
    <code>
    public String encrypt(String input){
    String outputStr = null;
    SecretKeySpec keySpec = null;
    SecretKeyFactory keyFactory = null;
    SecretKey key = null;
    keySpec = new SecretKeySpec(keyPassword.getBytes("ISO-8859-1"), "DES");
    Cipher cipher = Cipher.getInstance("DES","IBMJCE");
    cipher.init(Cipher.ENCRYPT_MODE, key);
    BASE64Encoder encode = new BASE64Encoder();
    output = cipher.doFinal(input.getBytes("ISO-8859-1"));
    outputStr = encode.encode(output);
    </code> with relevant try catch etc.
    However we are getting an exception -
    java.security.InvalidKeyException
    at com.ibm.crypto.provider.DESCipher.engineGetKeySize(Unknown Source)
    at javax.crypto.Cipher.init(Unknown Source)
    The same code is working in Windows.
    Please let us know if there s anything wrong - or there is a work-around.
    JDK Version in Mainframe is 1.4
    Thanks
    Srini

    DES keys are 8 bytes with the Least Significant Bit (LSB) of each byte being used as a parity bit but taking no part in the encryption process. DES keys are binary data and are normally provided as bytes and not as a String object. If 'keyPassword' does not reference a String containing exactly 8 ISO-8859-1 characters then you will get the Invalid Key Exception since the key has to be exactly 8 bytes.
    I have to ask why you don't have exactly 8 characters in your password? The fact that your code talks of passwords and not key-bytes hints that you should maybe be using Password Based Encryption (PBE).

  • Owner Exception for Production Order

    Hi Experts,
    Can we use Owner exception for Production Order Window..?
    I did try with excluded forms, though it is not working.
    We are using SAP 2007A
    Thanks in advance

    Hi Yeni,
    Thanks for the reply,
    But even though I include Production Order in the excluded form in owner exception, it doesn't work.
    Any reason for the same.
    Regards,
    Aditya

  • Invalid Addresses exception

    hi all
    , I am a java mail api neophyte , i tried to use the mail api for sending mail , i succeded in sending mail with in my smtp server, but once i tried to replace the email id of my domain to , gmail or yahoo id the jsp container returned the invalid address exception ,I expect some useful suggestions from the community
    with regards
    joshi ashutosh

    Post the details of the exception. But first, read the JavaMail FAQ,
    you'll probably find the answer in there.

  • 'Invalid cast exception' thrown when AutoCompleteStringCollection assigned to TextBox's AutoCompleteCustomSource property

    Hi,
    I have built a .NET C# wrapper around the User Management module of TestStand.
    When the application works as a standalone Windows Application, there are no exceptions or errors thrown. However, when the dll is integrated with TestStand and called from the FrontEndCallbacks sequence file, I am thrown an 'Invalid cast' exception when AutoCompleteStringCollection is assigned to a textBox's AutoCompleteCustomSource property.
    As previously stated, it works perfectly fine when it's a stand alone application. I am at a loss to figure why this is happening. I would really appreciate if anybody could throw some light on this behaviour.
    Thanks
    Arun 
    Solved!
    Go to Solution.

    Hi Vaibhav,
    By stand alone, I mean that the application can also work as a windows application. However, by making the application into a dll, the application is invoked through TestStand.
    Unfortunately, I cannot the share the original dll for security purposes. However, I have posted a sample dll and the associated pdb file along with the  sequence file.Hope it helps.
    Regards
    Arun
    Attachments:
    AutoComplete.zip ‏11 KB

  • Invalid Handle Exception grr.

    I get this every time i try to update my database. not when i read from it, that goes error free but writing to it, ug. Here's whats goin on:
    the setup for the table is:
    Verb Type
    String Integer
    Con is the Connection that is always successful when used to read data
    the Method FindData returns "Yes" if the verb exists in the table and "No" if it doesn't and yes i have my reasons for making it return a string instead of a boolean
    Command is a Statement: Statement Command = Con.createStatement();
    Update is a String
    i is an int
    if (FindData(Con, Verb).compareTo("No") == 0)
         Update = "insert into [Sheet1$] (Verb, Type) values('"+Verb+"', "+Integer.parseInt(Data)+")";
         System.out.println("Update: "+Update);
         i = Command.executeUpdate(Update);
         if (i == 1) System.out.println("Success!!!"); else System.out.println("Failed");
         Command.close();
         Con.close();
         System.out.println("EXISTS:: "+FindData(Con, Verb));                    
    here's what i get as output:
    ----jGRASP exec: java UpdateData
    Update: insert into [Sheet1$] (Verb, Type) values('Mentir', 1)
    Invalid handle
    ----jGRASP: operation complete.
    Which means it throws an exception at the i = Command.executeUpdate(Update); line and doesn't go further than that.
    Does anyone know what this function even means?
    Does anyone know how to fix this?
    if you need more information pleas let me know
    Thanks, Lateralus

    yep it's an excel driver that allows you to connect to excel databases. here's my getConnection function:
    public static Connection getConnection(String FilePath, String FileName)
         String Driver = "";
         String Url = "";
         String Username = "";
         String Password = "";
         Connection Con = null;
         try
              Driver = "sun.jdbc.odbc.JdbcOdbcDriver";
              Url = "jdbc:odbc:Excel Files;DBQ=";
              Url += FilePath+"\\"+FileName;
              Username = "";
              Password = "";
              Class.forName(Driver); // load JDBC-ODBC driver
              return DriverManager.getConnection(Url, Username, Password);
         catch (Exception e) {System.out.println("getConnection:  "+e.getMessage());}
         return(Con);
    }

  • Invalid URL Exception while opening a file using external window in webdynp

    I am trying open an URL ythru external window on click of button in my webdynpro.
    This is the URl I am trying to open
    File://mww/Documents/Attachments/2008/10/56254/{FD803B0D-157F-47F9-A5A8-C687E1DC6B96}_break.JPG
    if I try to open from a from the browser it works fine but thru webdynpro it is throwing the error.
    mww is another system where the file is residing.
    But I am using the same techniue in other component where I am able to open file from an external window.
    File://mww/Documents/Attachments/2008/10/56254/some.jpg
    The only difference in  the URL is {FD803B0D-157F-47F9-A5A8-C687E1DC6B96}Since this URL is generated by another system I do not have any other aletrnative but I have live with this URL.
    can some body please give some idea how to fix this
    if I use java.net.URLEncoder.encode() then I am not getting any error , buit file is not opening in the browser( external window)
    below is the error stack I am getting.  
    com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=File://mww/Documents/Attachments/2008/10/56254/{FD803B0D-157F-47F9-A5A8-C687E1DC6B96}_break.JPG
    at com.sap.tc.webdynpro.serverimpl.core.url.AbstractURLGenerator.checkURL(AbstractURLGenerator.java:699)
    at com.sap.tc.webdynpro.services.sal.url.core.URLGeneratorInternal.checkURL(URLGeneratorInternal.java:390)
    at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createNonModalExternalWindow(ClientComponent.java:1037)
    at com.gis.dcww.findsrch.AttachmentView.onActionOpen_Attachement(AttachmentView.java:179)
    at com.gis.dcww.findsrch.wdp.InternalAttachmentView.wdInvokeEventHandler(InternalAttachmentView.java:203)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    thanks
    PK

    Hi Armin, Josue
    Thanks for the reply
    Please note I am able to open an external window( browser ) thru my code with "File" protocol.
    I have no issue opening an external window or using File protocol.
    I am able to open an image/doc with a normal URL as follows
    File://mww/documents/image.jpg
    or
    File://mww/document/temp.csv
    But My URL has some system( thru Other applications ) generated charaters in it , I need get the path from DB( which I have done ) and pass this URL to the ExternalNonModalWindow as paramter.
    MY code is opening successfully the external  window for any URL .
    but for URL which has these character { }  is throwing the invalid URL error 
    for the below URL, I am getting the error
    File://mww/Documents/Attachments/2008/10/56254/{FD803B0D-157F-47F9-A5A8-C687E1DC6B96}_break.JPG
    thanks
    PK
    because of the flower bracket it is throwing the error.
    thansk
    PK

  • Invalid Signature Exception in Swift Receiver Channel

    Hi,
    We are using sap swift package for PI.We have BCM signing the file in ECC and PI validating the signature before sending the file out to the bank via the swift broker.
    We have configured as per these notes
    Note 1144603 - BCM: Back-end signature for data medium
    Note 1153053 - BCM: Backend signature for data medium
    Created the FINBRM certificate in STRUST in ECC.
    Deployed this certificate in PI.
    However we still get nvalidSignatureException when we run the interface on the receiver channel.
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.xi.swift.ParserException: com.sap.xi.swift.InvalidSignatureException.
    Any ideas?
    Thanks in advance.
    Ray

    It might be due to certificate not installed properly or invalid or expired certificate. Talk to Basis and verify in keystore that you have the valid certs stored.

Maybe you are looking for