Datum exception (again!)

Hello,
I'm still getting the datum exception that someone mentioned
a while back:
D:\OracleXSU\sample>java samp1
Exception in thread "main" java.lang.NoClassDefFoundError:
oracle/sql/datum at
oracle.xml.sql.query.OracleXMLQuery.<init><OracleXMLQuery.java:13
3>
at samp1.main(samp1.java:32)
I have tried both jdk1.2 and jdk1.1.8; I am using the Oracle
JDBC drivers that come with oracle 8i. I have looked through
various .jar files and cannot find the oracle.sql.datum class.
Does anyone have any ideas?
Help!
Jared
null

Hi Jared,
Did u set the CLASSPATH to point correctly to the JDK1.1.8
executables? The oracle.sql.Datum is not present in the 8.0.x
versions but is present in the 8.1.x JDBC drivers. I think the
problem comes if u are trying to use the JDK 2.0.
Could u please check that? Also which database version are u
using?
Thx
Oracle XML team
Jared MacDonald (guest) wrote:
: Hello,
: I'm still getting the datum exception that someone mentioned
: a while back:
: D:\OracleXSU\sample>java samp1
: Exception in thread "main" java.lang.NoClassDefFoundError:
: oracle/sql/datum at
oracle.xml.sql.query.OracleXMLQuery.<init><OracleXMLQuery.java:13
: 3>
: at samp1.main(samp1.java:32)
: I have tried both jdk1.2 and jdk1.1.8; I am using the Oracle
: JDBC drivers that come with oracle 8i. I have looked through
: various .jar files and cannot find the oracle.sql.datum class.
: Does anyone have any ideas?
: Help!
: Jared
Oracle Technology Network
http://technet.oracle.com
null

Similar Messages

  • How do I permanently set a popup exception. I can set an exception, but everytime I leave FF and connect again, I have to set the exception again.

    How do I permanently set a popup exception. I can set an exception, but every time I leave FF and connect again, I have to set the exception again. Can I set it once on a permanent basis?

    In case you are using "Clear history when Firefox closes":
    *do not clear Site Preferences
    *Tools > Options > Privacy: History: [X] Clear history when Firefox closes > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

  • Firefox keeps saying the connection is untrusted... I save the exception, yet it NEVER works, everytime I use the same websites I have to "save the exception" again! What can I do to stop this, I'm about to throw in the towel!

    I used certain secured websites every day. And every day, I get the same old "connection is untrusted" messages, on every one of those websites. I do know the "add exception" thing, and I do add the exception for said websites... yet every time I start a new sessions, the exception hasn't been stored, and I have to do it all over again. It's getting really frustrating to use Firefox, since I am sick and tired of adding exceptions that aren't getting stored. I haven't added any new add-ons, only thing I have is Mc-Afee Site Advisor , and I had the same problem before I had to upgrade my Windows XP to Windows 7. One day it was working fine, then it started giving me trouble out of nowhere without new software or extension or anything being added. Nothing I've found online works, and I'm desperate for an answer.

    You can retrieve the certificate and check who issued the certificate.
    * Click the link at the bottom of the error page: "I Understand the Risks"
    Let Firefox retrieve the certificate: "Add Exception" -> "Get Certificate".
    * Click the "View..." button to inspect the certificate and check who is the issuer.

  • Struts Exception Again!!!! Help plz.........

    Hello again,
    Hope this time i'll get some response regarding my error in a simple struts exception.........i've an application in which i've main page i.e "index.jsp", frm this page i've a html link tag fwdin to another jsp page i.e "search.jsp".Now when i click on the link at my index.jsp page i'm getting the following exception:-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented
    it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /search.jsp(44,26) equal symbol
    expected
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHan
    dler.java:39)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.jav
    a:407)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.jav
    a:90)
    org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:193)
    org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:143)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1328)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
         org.apache.jasper.compiler.Parser.parseBody(Parser.java:1789)
    org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
         org.apache.jasper.compiler.Parser.parse(Parser.java:126)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.ja
    va:220)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java
    :101)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j
    ava:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
    ava:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja
    va:1069)
    org.apache.struts.action.RequestProcessor.internalModuleRelativeForward
    (RequestProcessor.java:1012)
    org.apache.struts.action.RequestProcessor.processValidate(RequestProces
    sor.java:980)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
    :255)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache
    Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27
    Plz help me by telling what kind of equal symbol is expected by the application and where possibly it can be????????i've only 2 reference for "search.jsp" tht too in struts-config.xml file...........

    here's the search.jsp file:-
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html>
    <head>
    <title>Gaurav, Human Resource Portal</title>
    </head>
    <body>
    <font size="+1"><b>Gaurav, Human Resource Portal - search.jsp</b></font>
    <hr width="100%" noshade="true">
    <html:errors/>
    <html:form action="/search">
         <table>
              <tr>
                   <td align="right"><bean:message key="label.search.name"/>:</td>
                   <td><html:text property="name"/></td>
              </tr>
              <tr>
                   <td></td>
                   <td>--- or ---</td>
              </tr>
              <tr>
                   <td align="right"><bean:message key="label.search.ssNum"/>:</td>
                   <td><html:text property="ssNum"/> (xxx-xx-xxxx)</td>
              </tr>
              <tr>
                   <td></td>
                   <td><html:submit/></td>
              </tr>
         </table>
    </html:form>
    <logic:present name="searchForm" property="results">
         <hr width="100%" size="1" noshade="true">
         <bean:size id="size" name"searchForm" property="results"/>
              <logic:equal name="size" value="0">
                   <center><font color="red"><b>No Employees Found</b></font></center>
              </logic:equal>
              <logic:greaterThan name="size" value="0">
                   <table border="1">
                        <tr>
                             <th>Name</th>
                             <th>Social Security number</th>
                        </tr>
                        <logic:iterate id="result" name="searchForm" property="results">
                        <tr>
                             <td><bean:write name="result" property="name"/></td>
                             <td><bean:write name="result" property="ssNum"/></td>
                        </tr>
                        </logic:iterate>
                   </table>
              </logic:greaterThan>
    </logic:present>
    </body>
    </html>

  • Exception again but not previous

    Hi
    now the given example is running well
    my code is creating this error or exception
    Exception:
    java.sql.SQLException: ORA-00917: missing comma
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java, Compiled Code)
         at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java, Compiled Code)
         at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java, Compiled Code)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java, Compiled Code)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java, Compiled Code)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java, Compiled Code)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java, Compiled Code)
         at fileSave.insertNewPhoto(filesave.java:69)
         at demo.jsp._docInsert._jspService(_docInsert.java:154)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java, Compiled Code)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java, Compiled Code)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java, Compiled Code)
         at oracle.jsp.JspServlet.internalService(JspServlet.java, Compiled Code)
         at oracle.jsp.JspServlet.service(JspServlet.java, Compiled Code)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
         at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
         at java.lang.Thread.run(Thread.java:479)

    <%@ page language="java" %>
    <%@ page import="fileSave" %>
    <%@ page import="oracle.ord.im.OrdHttpJspResponseHandler" %>
    <%@ page import="oracle.ord.im.OrdHttpUploadFormData" %>
    <%@ page import="oracle.ord.im.OrdHttpUploadFile" %>
    <jsp:useBean id = "docb" scope = "page" class = "fileSave"/>
    <jsp:useBean id = "handler" scope = "page" class = "oracle.ord.im.OrdHttpJspResponseHandler"/>
    <jsp:useBean id = "formData" scope = "page"
    class = "oracle.ord.im.OrdHttpUploadFormData"/>
    <%
    String doc_id;
    String to;
    String from;
    String sub;
    String desc;
    OrdHttpUploadFile uploaddoc = null;
    try
    formData.setServletRequest(request);
    if (!formData.isUploadRequest())
    %>
    <jsp:forward page = "docload.jsp"/>
    <%
    return ;
    formData.parseFormData();
    to = formData.getParameter("to");
    from = formData.getParameter("from");
    sub = formData.getParameter("sub");
    desc = formData.getParameter("desc");
    uploaddoc = formData.getFileParameter("doc");
    if (uploaddoc == null ||
    uploaddoc.getOriginalFileName() == null ||
    uploaddoc.getOriginalFileName().length() == 0)
    %>
    <jsp:forward page = "docload.jsp?error = Please + give + doc + name."/>
    <%
    return;
    if (uploaddoc.getContentLength() == 0)
    %>
    <jsp:forward page = "loaddoc.jsp?error = Please + give + File. "/>
    <%
    return ;
    //docb.setDoc_id(doc_id);
    docb.setTo(to);
    docb.setFrom(from);
    docb.setSub(sub);
    docb.setDesc(desc);
    docb.insertNewPhoto(uploaddoc);
    finally
    //docb.release();
    // formData.release();
    %>
    <html>
    <head>
    <title>File Insertion jsp page</title>
    </head>
    <body>
    <h3>Document load page</h3>
    </body>
    </html>
    fileSave code is here
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.ServletException;
    import oracle.jdbc.driver.*;
    import oracle.ord.im.OrdDoc;
    import oracle.ord.im.OrdHttpUploadFile;
    import oracle.ord.im.OrdMediaUtil;
    public class fileSave
         private final static String EMPTY_DOC = "ordsys.ordDoc.init()";
         private OracleConnection conn;
         private OraclePreparedStatement stmt;
         private OracleResultSet rset;
         private static Stack connStack = new Stack();
         private static boolean driverLoaded = false;
         String doc_id;
         String to;
         String from;
         String sub;
         String desc;
         OrdDoc doc;
         public void selectTable() throws SQLException
              if (conn == null)
                   getConnection();
                   stmt = (OraclePreparedStatement)conn.prepareStatement(
                                  "select * from doc_table");
                   rset =(OracleResultSet)stmt.executeQuery();
         public void selectRowByDoc_id(String doc_id) throws SQLException
                   if (conn == null)
                             getConnection();
                   stmt = (OraclePreparedStatement)conn.prepareStatement(
                                                                     "select * from doc_table where doc_number = ?");
                        stmt.setString(1, doc_id);
                        rset = (OracleResultSet)stmt.executeQuery();
         public boolean fetch() throws SQLException
                   if (rset.next())
                        doc_id = rset.getString(1);
                        to = rset.getString(2);
                        from = rset.getString(3);
                        sub = rset.getString(4);
                        desc = rset.getString(5);
                        doc = (OrdDoc)rset.getCustomDatum(6,OrdDoc.getFactory() );
                             return true;
                             else
                             rset.close();
                             stmt.close();
                             return false;
    public void insertNewPhoto(OrdHttpUploadFile uploaddoc)
    throws SQLException, ServletException, IOException
    if (conn == null)
         getConnection();
                             conn.setAutoCommit(false);
              OraclePreparedStatement stmt =     
                                            (OraclePreparedStatement)conn.prepareStatement(          
         "select doc_sequence.nextval from dual" );
    OracleResultSet rset = (OracleResultSet)stmt.executeQuery();
         if (!rset.next() )     {
         throw new ServletException( "new ID not found" );
              String doc_id = rset.getString( 1 );     
    rset.close();
    stmt.close();
    stmt = (OraclePreparedStatement)conn.prepareStatement(
    "insert into doc_table(doc_number, to_user, from_user,subject, description, doc)" +
                                       "values(?,?,?,?,?,ORDSYS.ORDDoc.init())");
                             stmt.setString(1,doc_id);
                             stmt.setString(2,to);
                             stmt.setString(3,from);
                             stmt.setString(4,sub);
                             stmt.setString(5,desc);
                             stmt.executeUpdate();
                             stmt.close();
                             stmt = (OraclePreparedStatement)conn.prepareStatement(
                        "select doc from doc_table where doc_number = ? for update");
                             stmt.setString(1, doc_id);
                             rset = (OracleResultSet)stmt.executeQuery();
                             if (!rset.next())
         throw new ServletException("new row not found in table");
    doc = (OrdDoc)rset.getCustomDatum(1,OrdDoc.getFactory());
    rset.close();
    stmt.close();
    uploaddoc.loadDoc(doc);
    stmt = (OraclePreparedStatement)conn.prepareStatement(
    "update doc_table set doc = ? where doc_number = ? ");
    stmt.setCustomDatum(1,doc);
    stmt.setString(2,doc_id);
    stmt.execute();
    stmt.close();
    conn.commit();
    public void release() throws SQLException
    if (rset != null)
    rset.close();
    rset = null;
    if (stmt != null)
    stmt.close();
    rset = null;
    if (conn != null)
    freeConnection(conn);
    conn = null;
    public String getDoc_id()
    return doc_id;
    public void setDoc_id(String doc_id)
    this.doc_id = doc_id;
    public String getTo()
    return to;
    public void setTo(String to)
    this.to = to;
    public String getFrom()
    return from;
    public void setFrom(String from)
    this.from = from;
    public String getSub()
    return sub;
    public void setSub(String sub)
    this.sub = sub;
    public String getDesc()
    return desc;
    public void setDesc(String desc)
    this.desc = desc;
    public OrdDoc getDoc()
    return doc;
    public void setDoc(OrdDoc doc)
    this.doc = doc;
    private Connection getConnection()
    throws SQLException
    //Connection conn = null;
    synchronized(connStack)
    if(!driverLoaded)
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    driverLoaded = true;
    if (connStack.empty())
                                       conn =(OracleConnection)DriverManager.getConnection
                   ("jdbc:oracle:oci8:@", "kashif", "raojee");
                                            try
                                            OrdMediaUtil.imCompatibilityInit(conn);
                                            catch (Exception e)
                                            throw new SQLException(e.toString());
                                                 else
    conn = (OracleConnection)connStack.pop();
    conn.setAutoCommit(true);
    return conn;
    private void freeConnection(Connection conn)
    if(conn != null)
    synchronized(connStack)
    connStack.push(conn);

  • Exception again???help

    Hi guyz ,
    I have something till now also not clear.
    What is the benefit of exception ,refer to this 2 codes.
    By looking at the code ,second code is much more shorter and easy to understand but doing the same thing as the first code where using exception.So ,what are the benefits.
    Refer to the first code ,is defining like this can code reuse of the exception class(DivisionByZeroException) or exception grouping for the "code reuse and data abstraction purpose"?
    First Code
    ==========
    class DivisionByZeroException extends Exception {                      // (1)
    public DivisionByZeroException(String msg) { super(msg); }
    public class DivisionByZero6 {
    public void division() throws DivisionByZeroException {            // (2)
    int num1 = 10;
    int num2 = 0;
    if (num2 == 0) throw new DivisionByZeroException("/ by 0"); // (3)
    System.out.println(num1 + " / " + num2 + " = " + (num1 / num2));
    System.out.println("Returning from division.");
    public static void main(String args[]) {
    try {                                                         // (4)
    new DivisionByZero6().division();
    } catch (DivisionByZeroException e) {                         // (5)
    System.out.println("In main, dealt with " + e);
    } finally {                                                   // (6)
    System.out.println("Finally done in main.");
    System.out.println("Returning from main."); // (7)
    Second Code
    ===========
    public class DivisionByZero6 {
    public void division(){            // (2)
    int num1 = 10;
    int num2 = 0;
    if ( num2 != 0)
    System.out.println(num1 + " / " + num2 + " = " + (num1 / num2));
    System.out.println("Returning from division.");
    else
    {System.out.println("Deal with division by / by 0");} // (3)
    public static void main(String args[])
    new DivisionByZero6().division();
    System.out.println("Returning from main."); // (7)

    Hi ,
    I understand the purpose of exception is for the robustness of data valitidy especially critical application .What i do not understand is why handling run time error must use java rules which is exception and run time error able to handle others simpler ways like some comparison syntax ..
    Hope you understand my question....

  • ClassCast Exception Again

    The problem follows:
              I have session bean (all classes are in the example package) MySession.
              From some Java Bean I access my session bean like this:
              Context ic = new InitialContext();
              Object objref = ic.lookup("MySessionJNDI");
              mySessionHome = (example.MySessionHome)
              PortableRemoteObject.narrow(objref, example.MySessionHome.class);
              But, after this line I get the exception:
              java.lang.ClassCastException: example.MySessionEJBHomeImpl_ServiceStub
              Can anyone help me?
              Peter.
              

    I am so sory, but this did not help.
              Do you have some other idea what might be a problem?
              Thanks.
              "Sajan" <[email protected]> wrote in message
              news:[email protected]...
              >
              > hi peter,
              > what I can guess u need to provide few details to as parameter
              > to InitialContext(*****);
              > I am writing few lines here,
              >
              > Properties h = new Properties();
              > h.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
              > h.put(Context.PROVIDER_URL, "t3://localhost:7001");
              > h.put(Context.SECURITY_PRINCIPAL, "system");
              > h.put(Context.SECURITY_CREDENTIALS , "password");
              >
              > Context ctx = new InitialContext(h);
              > Object obj = (Object)ctx.lookup("MySessionJNDI");
              > MySesHome home = (MySesHome)PortableRemoteObject.narrow(obj,
              MySesHome.class);
              >
              >
              > after this u can get reference to remote interface as
              > MySesRemote remot = home.create()
              >
              > hope this works,
              > bye
              > sajan
              >
              > "Peter" <[email protected]> wrote:
              > >The problem follows:
              > > I have session bean (all classes are in the example package)
              MySession.
              > > From some Java Bean I access my session bean like this:
              > > Context ic = new InitialContext();
              > > Object objref = ic.lookup("MySessionJNDI");
              > > mySessionHome = (example.MySessionHome)
              > >PortableRemoteObject.narrow(objref, example.MySessionHome.class);
              > >But, after this line I get the exception:
              > > java.lang.ClassCastException:
              example.MySessionEJBHomeImpl_ServiceStub
              > > ....
              > >
              > >Can anyone help me?
              > >
              > >Peter.
              > >
              > >
              >
              

  • Serious Exception again

    I found serious exception and don't know how to take care of it (the message between the tag)
    <exception>
    Assertion failed: t->numPointers == 0 , file ../../../src/share/native/sun/awt/font/t2k/tsimem.c,line 92
    exception system: exiting due to multiple internal errors:
    exception dispatch or unwind stuck in infinite loop
    exception dispatch or unwind stuck in infinite loop
    </exception>
    Thanks for your help ....

    You need to post the code that caused the exception along with what JDK youre using

  • Serialization Exception Again

    I was able to get my HTTPS web service to communicate with my clients, but now
    when I try to connect to the web service (type=document), I get this error:
    [java] 3) testQuoteStubs(com.arrow.arrowsoap.client.QuoteServiceClientTest)
    junit.framework.AssertionFailedError: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class weblogic.apache.xerces.dom.DeferredDocumentImpl
    TypeMapping=TYPE
    MAPPING SIZE=3
    [java] ENTRY 1:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:ProcessResponse
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    b957ea
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    3aff84
    [java] ENTRY 2:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:Process
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    15d4de6
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    a53de4
    [java] ENTRY 3:
    [java] class: java.lang.Object
    [java] xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    827968
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    1f0b7d3
    [java] at com.arrow.arrowsoap.client.QuoteServiceClientTest.testQuoteSt
    ubs(QuoteServiceClientTest.java:98)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    sorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    hodAccessorImpl.java:25)
    Attached is the WSDL for the service.
    The type-mapping file looks like:
    <wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:ProcessResponse"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:Process"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry class-name="java.lang.Object"
    type="xsd:anyType"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    </wsdd:type-mapping>
    Any ideas?? Am I missing something from my classpath?? I am running the tests
    using the WL 8.1 ANT installation and using this as my WL classpath (my own jars
    are added first in the path and are omitted here):
              <pathelement path="${weblogic.home}/lib/webserviceclient.jar"/>
              <pathelement path="${weblogic.home}/lib/weblogic_sp.jar"/>
              <pathelement path="${weblogic.home}/lib/weblogic.jar"/>
    Thanks
    -- jake
    [QuoteService.wsdl]

    Hi Karen,
    My suggestion is to separate the issues (serialization failures and
    SSL). Make sure your app works OK using http trasport. For SSL, RU
    using the WLSSLAdapter for the client as described in the docs [1]? One
    or 2way SSL? What version of WLS?
    Thanks,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
    Karen Yuan wrote:
    >
    Hi Bruce,
    I was also getting the SerializationException when I tried to connect from my
    weblogic web
    service client to my HTTPS webMethods web service (SOAP-RPC protocol). Then I
    included
    webserviceclient+ssl.jar client runtime JAR file on both of my client and server
    sides and re-ran
    my test. I still got the same error:
    Exception in thread "main" java.rmi.RemoteException: web service invoke failed:
    javax.xml.soap.SOAPException: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup
    failure on class=class java.io.StringReader TypeMapping=TYPEMAPPING SIZE=2
    ENTRY 1:
    class: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInput
    xsd_type: ['http://com/freddiemac/ImportLoan/FileUploadHttpsStreamClient/WS_1/i
    mportLoanSubmitStream']:lcl0:__callServletInput
    ser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInputCodec@7eb366
    deser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInputCodec@33f0de
    ENTRY 2:
    class: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutput
    xsd_type: ['http://com/freddiemac/ImportLoan/FileUploadHttpsStreamClient/WS_1/i
    mportLoanSubmitStream']:lcl0:__CallServletOutput
    ser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutputCodec@ab444
    deser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutputCodec@c0f1ec; nested exception is:
    .... more
    Any suggestions?
    Thanks,
    Karen
    Bruce Stephens <[email protected]> wrote:
    Hi Jacob,
    From your post it was not clear was working and what was changed. Could
    you clarify. Note, for the standalone client app using SSL, you will
    need to include webserviceclient+ssl.jar client runtime JAR file,
    described in the docs [1].
    Thanks,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
    Jacob Anderson wrote:
    I was able to get my HTTPS web service to communicate with my clients,but now
    when I try to connect to the web service (type=document), I get thiserror:
    [java] 3) testQuoteStubs(com.arrow.arrowsoap.client.QuoteServiceClientTest)
    junit.framework.AssertionFailedError: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class weblogic.apache.xerces.dom.DeferredDocumentImpl
    TypeMapping=TYPE
    MAPPING SIZE=3
    [java] ENTRY 1:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:ProcessResponse
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    b957ea
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    3aff84
    [java] ENTRY 2:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:Process
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    15d4de6
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    a53de4
    [java] ENTRY 3:
    [java] class: java.lang.Object
    [java] xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    827968
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    1f0b7d3
    [java] at com.arrow.arrowsoap.client.QuoteServiceClientTest.testQuoteSt
    ubs(QuoteServiceClientTest.java:98)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    sorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    hodAccessorImpl.java:25)
    Attached is the WSDL for the service.
    The type-mapping file looks like:
    <wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:ProcessResponse"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:Process"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry class-name="java.lang.Object"
    type="xsd:anyType"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    </wsdd:type-mapping>
    Any ideas?? Am I missing something from my classpath?? I am runningthe tests
    using the WL 8.1 ANT installation and using this as my WL classpath(my own jars
    are added first in the path and are omitted here):
    <pathelement path="${weblogic.home}/lib/webserviceclient.jar"/>
    <pathelement path="${weblogic.home}/lib/weblogic_sp.jar"/>
    <pathelement path="${weblogic.home}/lib/weblogic.jar"/>
    Thanks
    -- jake
    Name: QuoteService.wsdl
    QuoteService.wsdl Type: ACT Project (text/xml)
    Encoding: base64

  • Again: SqlException - Creating a ViewObject

    Hi Gary!
    I tried the same with an simple viewobject definition. I chose
    only one attribute and in my select statement I selected only
    this one attribute. The test query option on the wizzard tells
    that the query is valid. But when I then go to the next
    step "Attribute Mappings" I get the same error message again
    with the "where 1=2".
    The strange thing is that when I choose "Test" from the context
    menu of my Application module, there is no problem with the view
    object. Its values can be shown.
    But when I execute the Business Components Dataform Applet, I
    built with the wizzard, I get these errors:
    DAC-511: ResultSetInfo: could not execute the query.
    JBO-29000: Unexpected exception caught:
    java.lang.ClassCastException, msg=null Therefore I think that the error comes from the viewobject and
    its query. It might be that another reason for the error is that
    connect to the mysql database and not to oracle. But why can I
    see the data with the Tester and not with my generated applet?
    Perhaps do you know what is diffrent in the configuration of
    the "Tester".
    I am looking forward to hearing from you soon
    Stefanie
    PS: I use Jdeveloper 3.2
    PPS: Here is the Exception again:
    java.sql.SQLException: Syntax error or access violation: You
    have an error in your SQL syntax near 'SELECT * FROM pdalle)
    where 1=2' at line 1
    java.sql.ResultSet
    org.gjt.mm.mysql.PreparedStatement.executeQuery()
    java.lang.Exception
    oracle.jbo.dt.ui.view.VOClausePanel.testSQL()
    java.lang.Exception
    oracle.jbo.dt.ui.view.VOClausePanel.testAction()
    void oracle.jbo.dt.ui.view.VOClausePanel.actionPerformed
    (java.awt.event.ActionEvent)
    void javax.swing.AbstractButton.fireActionPerformed
    (java.awt.event.ActionEvent)
    void
    javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
    (java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.fireActionPerformed
    (java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.setPressed(boolean)
    void
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased
    (java.awt.event.MouseEvent)
    void java.awt.Component.processMouseEvent
    (java.awt.event.MouseEvent)
    void java.awt.Component.processEvent(java.awt.AWTEvent)
    void java.awt.Container.processEvent(java.awt.AWTEvent)
    void java.awt.Component.dispatchEventImpl
    (java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl
    (java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.LightweightDispatcher.retargetMouseEvent
    (java.awt.Component, int, java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.processMouseEvent
    (java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.dispatchEvent
    (java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl
    (java.awt.AWTEvent)
    void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
    boolean java.awt.EventDispatchThread.pumpOneEvent()
    void java.awt.EventDispatchThread.pumpEvents
    (java.awt.Conditional)
    void java.awt.EventDispatchThread.run()

    I'm still working on issues with MySQL and postgreSQl databases and drivers, but I do have some answers that nobody probably wants to hear. Note that I'm testing with JDev 9i beta on Linux and have duplicated all issues on JDev 9i RC on WindowsNT.
    1) To fix the 'no suitable driver' error, the problem is that the driver is not getting registered by JDev or its BC4J for some reason. You can force JDev to register it by adding to the jdev script (in Linux, I'm sure its similar for Windows) "-J-Djdbc.drivers=org.gjt.mm.mysql.Driver" - this passes the -D parm through to java which tells it to set the system parameter jdbc.drivers, which in turn will auto-register the driver. The same kind of thing can be done for generated BC4J code, except you'll have to let JDev compile and build and fail to run, copy the java run line to and editor, add the -D parm like above, take off the -H parm at the end (won't work with it) and then run that line outside of JDev. Make sure that the -D parm is added before the class being run or it won't work (I add it at the beginning, right after java).
    2) The problem with testing/changing BC4J View appears to be because BC4J code is using a sub-select that it creates to test and MySQL can't handle sub-selects (subqueries) at this time. If you put debugging code in the driver's PreparedStatement.<init> (the constructor) to display the 'sql' string, you'll see it produces something like
    select * from (SELECT Emp."name" AS name FROM emp Emp) WHERE 1=2
    I think its trying to just get a resultset that will pass compile but retrieves 0 rows (that's enough to test and check columns returned). Also, I had it fail on the Emp."name" because it wouldn't take double quotes. I got the subselect only after changing the query to be Emp.'name'
    3) Even if you get past the above issues, on trying to save in a default-created JClient application of 1 table/form, I found that it generates a sql statement "SAVEPOINT B0_0" to set savepoints before doing the commit... and MySQL does not support Savepoints.
    PostgreSQL - same kind of problems.
    The driver that comes with postgreSQL distribution lacks lots of JDBC 2 features (rather it has them, but they return false or nulls instead of valid information). It lacks DatabaseMetaData information on indexes, updateable resultsets, RowIdentifier (required by BC4J in order for it to get a unique identifier for a table/row).
    The JXdbCon driver has lots more features, but I am still having problems with it that I haven't figured out yet. Even if it ends up working, postgreSQL does not support Savepoints any more than MySQl (though i am thinking about changing the driver to ignore calls to Savepoint just to see what else might be missing). Its syntax for subselects is also slightly different, which might be a problem (it needs an 'AS <alias>' at the end of the subselect outside the ')' but before the WHERE).
    It appears that the Open Source drivers are nice for many purposes, but lacking in full JDBC 2 compliance that commercial drivers might have (assuming the databases themselves could handle all the issues, which they can't at this time).
    Not good news, but at least it answers some of the questions I've seen posted in the forums.

  • Weird exception in 12c (ORA-01461: can bind a LONG value only for insert into a LONG column)

    I have a Windows app that accesses an Oracle 12c database via ODBC (the driver version is 12.01.00.01).
    I have a table that has a key column named REGION_ID (NVARCHAR2(9)), and about a dozen other columns, three of which are named REGION1, REGION2, and REGION3, all of type NVARCHAR2(40).
    When I try to insert a string into the REGION1 field that's greater than 9 characters (the length of REGION_ID), I get an ORA-01461 error ('Can bind a LONG value only for insert into a LONG column). If I define the length of REGION_ID to be NVARCHAR2(15), then I can add strings to the REGION1 field with a length up to 15 before I get the ORA-01461 exception again. Oddly, if I change the REGION1 column name to REGIONONE, I do not get any errors, and everything works fine. It's almost as if the column name REGION1 is being confused with REGION_ID behind the scenes.
    Any ideas? I’m using SQLBindParameter to bind the columns, and all of the calls succeed. I get the exception when I execute the insert statement. This same code worked for previous versions of Oracle (11g, 10g, and 9i). And if I use an 11g client driver against the 12c server, I do not get the exception.
    Thanks!

    Sorry, I was just now able to install the patch for bug 18232462, and it did indeed solve the issue I described above. Thanks!

  • SAML assertion exceptions within EJB

    Okay, I'll try to keep this simple:<br /><br />We are implementing the standard LC Java API's for rendering forms (using the FormsServiceClient) and then transforming the rendered content to PDF/A using the outputClient. Since we have a lot of simultaneous requests the logic is implemented within a stateless session EJB. <br /><br />I instantiate the ServiceClientFactory within the EJB's init() method and then store the ServiceClientFactory reference as a class variable so that on subsequent business method invocations, the same ServiceClientFactory object can be reused (without going throug the overhead of instantiating one on each req). (Note that on each request, I create a new FormsServiceClient or OutputClient using the SAME ServiceClientFactory object). I have some questions/concerns:<br /><br />1) Is this form of reuse of the ServiceClientFactory object okay?<br /><br />2) We keep getting the following error:<br />><i>" <Warning> <com.adobe.idp.common.errors.exception.IDPLoggedException> <000000> <UserM:GENERIC_WARNING: [Thread Hashcode: 668113225] | [AuthenticationManagerBean] errorCode:12804 errorCodeHEX:0x3204 message:Could not validate SAML Token --- Assertion is not valid. Current time is greater than NOTonOrAfter time specified in the Assertion>"</i><br /><br />After a simple restart of the EJB, the error goes away. How can this be fixed? What's causing this?<br /><br />Any help would be much appreciated!

    PROBLEM
    Using the same instance of ServiceClientFactory to remotely invoke the services exposed by the LiveCycle container can lead to
    exception related to assertion expiry
    Solution
    To handle the timeout use the ThrowHandler mechanism provided by the ServiceClientFactory framework
    Detailed explanation
    LiveCycle provides a client sdk for java based client to invoke its services remotely.
    An invocation involves Creation of a ServiceClientFactory instance Setting the user credential in thefactory instance Pass that factory to a service client or use that to create InvocationRequest directly
    Use the client to make the actual request.
    For more details refer to Invoking
    LiveCycle ES Using the Java API .
    A ServiceClientFactory instance once created is valid for a ceratin
    period of time which is by default 120 min. if the same instance is used to invoke beyond this period then it would lead to an exception stating that
    the session has expired [com.adobe.idp.um.api.impl.AuthenticationManagerImpl]
    errorCode:16421 errorCodeHEX:0x4025 message:Could not validate SAML
    Token --- Assertion has expired and hence not valid for user
    [administrator@DefaultDom]. Its valid till time [Thu Oct 22
    17:07:53 IST
    2009] was found to be before the current time [Thu Oct
    22 17:58:18 IST 2009]
    This is not an issue if the ServiceClientFactory instance is used for short duration. However if you are going to perform a long
    running task like converting large number of documents to pdf ,applying policies to them etc then it would be an issue.
    Session Expiry
    Before fxing the issue some info on what is session expiry.
    When you use a ServiceClientFactory instance to invoke the service following fow happens
    You set the credentials in the properties and invoke theservice
    LiveCycle on server side validates the credentials and issues a Context. It is sort of a ticket which can be reused later instead of the actual credentials.
    Upon receiving the response from the server the ServiceClientFactory instance deletes its own copy of credentials and instead stores the Context For later invocations this Context instance is passed instead of the user credentials
    This whole fow is done to ensure that user's credentials are not sent for each remote call thus improving the security.
    For more information on Context refer to
    User Identity in LiveCycle .
    Solution
    To fx this issue you would have to re authenticate to LiveCycle and get the Context reissued. the best way to do that is to make use of the ThrowHandler provided by the ServiceClientFactory framework
    STEP1 -  Create a Throwhandler
    * This ThrowHandler caches the user credentials and uses them
    to refresh the Context in the
    * ServiceClientFactory upon expiry.
    private static class SimpleTimeoutThrowHandler implements
    ThrowHandler {
    private String username;
    private String password;
    public SimpleTimeoutThrowHandler(String username, String
    password) {
    this.username = username;
    this.password = password;
    public boolean handleThrowable(Throwable t, ServiceClient
    sc,
    ServiceClientFactory scf, MessageDispatcher md,
    InvocationRequest ir, int numTries) throws
    DSCException {
    if(timeoutError(t)){
    //The call to AuthenticationManager do not require
    authentication so the default properties
    //are suffcient
    AuthenticationManager am =
    new
    AuthenticationManagerServiceClient(ServiceClientFactory.createInstance(getDefaultPropertie s()));
    AuthResult ar = null;
    try {
    ar =
    am.authenticate(username,password.getBytes());
    } catch (UMException e) {
    throw new IllegalStateException(e);
    Context ctx = new Context();
    ctx.initPrincipal(ar);
    //Refresh the ServiceClientFactory instance with
    the new context
    scf.setContext(ctx);
    logger.info("Refreshed the context associated with
    ServiceCLientFactory");
    //Now tell SCF to try the invocation again
    return true;
    //Check so that we do not wrap the exception again
    if(t instanceof DSCException)
    throw (DSCException)t;
    if(t instanceof RuntimeException)
    throw (RuntimeException)t;
    // how is it possible to get this far?
    throw new IllegalStateException(t);
    private boolean timeoutError(Throwable t) {
    if(!(t.getCause() instanceof UMException)){
    return false;
    UMException ue = (UMException) t.getCause();
    //Check that UMException is due to the
    assertion/context expiry
    if(UMConstants.ErrorCodes.E_TOKEN_INVALID ==
    ue.getErrCode()){
    return true;
    return false;
    This ThrowHandler would be invoked by the ServiceClientFactory upon receiving any exception. The handler would then determine if its a timeout related exception and then would refresh the Context associated with the factory instance and tells it to retry the invocation.
    STEP - 2 Register the handler
    ServiceClientFactory.installThrowHandler(new
    SimpleTimeoutThrowHandler(username, password));
    Note: The handler should be registered only once in the application
    STEP 3 - Perform your invocation
    Following sample would try to apply policies on all the fles present in a directory
    Properties p = getDefaultProperties();
    p.setProperty(DSC_CREDENTIAL_USERNAME, username);
    p.setProperty(DSC_CREDENTIAL_PASSWORD, password);
    ServiceClientFactory scf =
    ServiceClientFactory.createInstance(p);
    //Now do some long running operation
    String inputDirName ="path-to-input-dir";
    String outDirName = "path-to-out-dir";
    String policyName = "the-policy-name";
    File inDir = new File(inputDirName);
    File outDir = new File(outDirName);
    RightsManagementClient rmClient = new
    RightsManagementClient(scf);
    DocumentManager docManager = rmClient.getDocumentManager();
    //Iterate over all the pdf in the inDir and apply the
    policies. If this takes a
    for(File pdfFile : inDir.listFiles()){
    Document inDoc = new Document(pdfFile, false);
    Document securedDoc = docManager.applyPolicy(inDoc,
    pdfFile.getName(), null, policyName, null, null);
    securedDoc.copyToFile(new
    File(outDir,pdfFile.getName()));
    Now the invocation would complete even if it takes a long time. if any session expiry occurs then our ThrowHandler would take care of that.
    here's a sample:
    TimeOutSample.zip

  • Exception: "Could not validate SAML Token"

    We have an evaluation system setup that we are using to generate PDF from PS. We're connecting via the EJB client, and typically have had no problems. Until today. At some point today we began seeing exceptions being thrown on the client:
    Caused by: com.adobe.idp.um.api.UMException | [com.adobe.idp.um.api.impl.AuthenticationManagerImpl] errorCode:16421 errorCodeHEX:0x4025 message:Could not validate SAML Token --- Assertion has expired and hence not valid for user [administrator@DefaultDom]. Its valid till time [Tue Feb 04 10:58:45 MST 2014] was found to be before the current time [Tue Feb 04 16:04:41 MST 2014]
    Simply bouncing the app server where the client code is running solved the problem, however we'd like to better understand what is going on and why. Nothing that I can find in the docs seems to indicate the cause/solution, and possible solutions have links that appear to no longer function: http://cookbooks.adobe.com/post_Renewing_the_context_to_handle_session_expiry-16410.html
    Any suggestions and/or insight would be greatly appreciated. Thanks!

    PROBLEM
    Using the same instance of ServiceClientFactory to remotely invoke the services exposed by the LiveCycle container can lead to
    exception related to assertion expiry
    Solution
    To handle the timeout use the ThrowHandler mechanism provided by the ServiceClientFactory framework
    Detailed explanation
    LiveCycle provides a client sdk for java based client to invoke its services remotely.
    An invocation involves Creation of a ServiceClientFactory instance Setting the user credential in thefactory instance Pass that factory to a service client or use that to create InvocationRequest directly
    Use the client to make the actual request.
    For more details refer to Invoking
    LiveCycle ES Using the Java API .
    A ServiceClientFactory instance once created is valid for a ceratin
    period of time which is by default 120 min. if the same instance is used to invoke beyond this period then it would lead to an exception stating that
    the session has expired [com.adobe.idp.um.api.impl.AuthenticationManagerImpl]
    errorCode:16421 errorCodeHEX:0x4025 message:Could not validate SAML
    Token --- Assertion has expired and hence not valid for user
    [administrator@DefaultDom]. Its valid till time [Thu Oct 22
    17:07:53 IST
    2009] was found to be before the current time [Thu Oct
    22 17:58:18 IST 2009]
    This is not an issue if the ServiceClientFactory instance is used for short duration. However if you are going to perform a long
    running task like converting large number of documents to pdf ,applying policies to them etc then it would be an issue.
    Session Expiry
    Before fxing the issue some info on what is session expiry.
    When you use a ServiceClientFactory instance to invoke the service following fow happens
    You set the credentials in the properties and invoke theservice
    LiveCycle on server side validates the credentials and issues a Context. It is sort of a ticket which can be reused later instead of the actual credentials.
    Upon receiving the response from the server the ServiceClientFactory instance deletes its own copy of credentials and instead stores the Context For later invocations this Context instance is passed instead of the user credentials
    This whole fow is done to ensure that user's credentials are not sent for each remote call thus improving the security.
    For more information on Context refer to
    User Identity in LiveCycle .
    Solution
    To fx this issue you would have to re authenticate to LiveCycle and get the Context reissued. the best way to do that is to make use of the ThrowHandler provided by the ServiceClientFactory framework
    STEP1 -  Create a Throwhandler
    * This ThrowHandler caches the user credentials and uses them
    to refresh the Context in the
    * ServiceClientFactory upon expiry.
    private static class SimpleTimeoutThrowHandler implements
    ThrowHandler {
    private String username;
    private String password;
    public SimpleTimeoutThrowHandler(String username, String
    password) {
    this.username = username;
    this.password = password;
    public boolean handleThrowable(Throwable t, ServiceClient
    sc,
    ServiceClientFactory scf, MessageDispatcher md,
    InvocationRequest ir, int numTries) throws
    DSCException {
    if(timeoutError(t)){
    //The call to AuthenticationManager do not require
    authentication so the default properties
    //are suffcient
    AuthenticationManager am =
    new
    AuthenticationManagerServiceClient(ServiceClientFactory.createInstance (getDefaultProperties()));
    AuthResult ar = null;
    try {
    ar =
    am.authenticate(username,password.getBytes());
    } catch (UMException e) {
    throw new IllegalStateException(e);
    Context ctx = new Context();
    ctx.initPrincipal(ar);
    //Refresh the ServiceClientFactory instance with
    the new context
    scf.setContext(ctx);
    logger.info("Refreshed the context associated with
    ServiceCLientFactory");
    //Now tell SCF to try the invocation again
    return true;
    //Check so that we do not wrap the exception again
    if(t instanceof DSCException)
    throw (DSCException)t;
    if(t instanceof RuntimeException)
    throw (RuntimeException)t;
    // how is it possible to get this far?
    throw new IllegalStateException(t);
    private boolean timeoutError(Throwable t) {
    if(!(t.getCause() instanceof UMException)){
    return false;
    UMException ue = (UMException) t.getCause();
    //Check that UMException is due to the
    assertion/context expiry
    if(UMConstants.ErrorCodes.E_TOKEN_INVALID ==
    ue.getErrCode()){
    return true;
    return false;
    This ThrowHandler would be invoked by the ServiceClientFactory upon receiving any exception. The handler would then determine if its a timeout related exception and then would refresh the Context associated with the factory instance and tells it to retry the invocation.
    STEP - 2 Register the handler
    ServiceClientFactory.installThrowHandler(new
    SimpleTimeoutThrowHandler(username, password));
    Note: The handler should be registered only once in the application
    STEP 3 - Perform your invocation
    Following sample would try to apply policies on all the fles present in a directory
    Properties p = getDefaultProperties();
    p.setProperty(DSC_CREDENTIAL_USERNAME, username);
    p.setProperty(DSC_CREDENTIAL_PASSWORD, password);
    ServiceClientFactory scf =
    ServiceClientFactory.createInstance(p);
    //Now do some long running operation
    String inputDirName ="path-to-input-dir";
    String outDirName = "path-to-out-dir";
    String policyName = "the-policy-name";
    File inDir = new File(inputDirName);
    File outDir = new File(outDirName);
    RightsManagementClient rmClient = new
    RightsManagementClient(scf);
    DocumentManager docManager = rmClient.getDocumentManager();
    //Iterate over all the pdf in the inDir and apply the
    policies. If this takes a
    for(File pdfFile : inDir.listFiles()){
    Document inDoc = new Document(pdfFile, false);
    Document securedDoc = docManager.applyPolicy(inDoc,
    pdfFile.getName(), null, policyName, null, null);
    securedDoc.copyToFile(new
    File(outDir,pdfFile.getName()));
    Now the invocation would complete even if it takes a long time. if any session expiry occurs then our ThrowHandler would take care of that.
    here's a sample:
    TimeOutSample.zip

  • Start of root element expected. (again...)

    Hi,
    i was trying to parse an xml document inside an HttpServletRequest(req) like this:
    parser.parse(req.getInputStream()) and i got this exception:"Start of root element expected",
    i solved it doing this:
    InputStream input = req.getInputStream();
    StringBuffer sb = readingInput(input);
    StringReader sr = new StringReader(sb.toString());
    parser.parse(sr);
    My problem now is that i need to do it several times, and if i do it more than one time i get the same exception again, doesn't matter if i close the Streams or not...
    this is working with severals xml parsers, the xml sintax is correct, i really need to know what's going wrong with this,
    any ideas?
    thanks,
    Laura

    Looks like a corrupted file issue. Please transfer the file from instance again as ascii and try.
    --Shiv                                                                                                                                                                                                                       

  • Handling an input mismatch exception

    I have written the following code to calculate tax payments based on income and filing status :
    import java.util.Scanner;
    public class computeTax {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            // prompt for filing status
            System.out.println("enter '0' for single filer,");
            System.out.println("enter '1' for married filing jointly or qualified widow(er),");
            System.out.println("enter '2' for married filing separately,");
            System.out.println("enter '3' for head of household.");
            while (true) {
            System.out.println("what is your filing status?");
             int status = input.nextInt();
                    if (status == 0) {
                    System.out.println("you're a single filer.  What is your income?");
                    double income = input.nextDouble();
                    //double income;
                        if (0 <= income && income <= 8350) {
                            System.out.println("Your tax bill is : $ " + income*0.1);
                        } else if (8351 <= income && income <= 33950) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((income-8350)*0.15)
                        } else if (33951 <= income && income <= 68525) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)       
                            + ((income-33950)*0.25)
                        } else if (68526 <= income && income <= 104425) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((82250-33950)*0.25)
                            + ((income-82250)*0.28)
                        } else if (104426 <= income && income <= 186475) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((82250-33950)*0.25)
                            + ((171550-82250)*0.28)
                            + ((income-171550)*0.33)
                        } else if (186476 <= income) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((82250-33950)*0.25)
                            + ((171550-82250)*0.28)
                            + ((372950-171550)*0.33)
                            + ((income-372950)*0.35)
                        break;
                    } else if (status == 1){
                        System.out.println("you're married filing jointly or qualified widow(er). What is your income?");
                        double income = input.nextDouble();
                        //double income;
                        if (0 <= income && income <= 16700) {
                            System.out.println("Your tax bill is : $ " + income*0.1);
                        } else if (16701 <= income && income <= 67900) {
                            System.out.println("Your tax bill is : $ " +
                            ( (16700*0.1)
                            + ((income-16700)*0.15)
                        } else if (67901 <= income && income <= 137050) {
                            System.out.println("Your tax bill is : $ " +
                            ( (16700*0.1)
                            + ((67900-16700)*0.15)       
                            + ((income-67900)*0.25)
                        } else if (137051 <= income && income <= 208850) {
                            System.out.println("Your tax bill is : $ " +
                            ( (16700*0.1)
                            + ((67900-16700)*0.15)
                            + ((137050-67900)*0.25)
                            + ((income-137050)*0.28)
                        } else if (208051 <= income && income <= 372950) {
                            System.out.println("Your tax bill is : $ " +
                            ( (16700*0.1)
                            + ((67900-16700)*0.15)
                            + ((137050-67900)*0.25)
                            + ((208850-137050)*0.28)
                            + ((income-208850)*0.33)
                        } else if (372951 <= income) {
                            System.out.println("Your tax bill is : $ " +
                            ( (16700*0.1)
                            + ((67900-16700)*0.15)
                            + ((137050-67900)*0.25)
                            + ((208850-137050)*0.28)
                            + ((372950-208850)*0.33)
                            + ((income-372950)*0.35)
                        break;
                    } else if (status == 2){
                        System.out.println("you're married filing separately. What is your income?");
                        double income = input.nextDouble();
                        //double income;
                        if (0 <= income && income <= 8350) {
                            System.out.println("Your tax bill is : $ " + income*0.1);
                        } else if (8351 <= income && income <= 33950) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((income-8350)*0.15)
                        } else if (33951 <= income && income <= 68525) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)       
                            + ((income-33950)*0.25)
                        } else if (68526 <= income && income <= 104425) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((68525-33950)*0.25)
                            + ((income-104425)*0.28)
                        } else if (104426 <= income && income <= 186475) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((68525-33950)*0.25)
                            + ((104425-68525)*0.28)
                            + ((income-104425)*0.33)
                        } else if (186476 <= income) {
                            System.out.println("Your tax bill is : $ " +
                            ( (8350*0.1)
                            + ((33950-8350)*0.15)
                            + ((68525-33950)*0.25)
                            + ((104425-68525)*0.28)
                            + ((186475-104425)*0.33)
                            + ((income-186475)*0.35)
                            break;
                } else if (status == 3){
                    System.out.println("you're a head of household. What's your income?");
                    double income = input.nextDouble();
                        if (0 <= income && income <= 11950) {
                            System.out.println("Your tax bill is : $ " + income*0.1);
                        } else if (11951 <= income && income <= 45500) {
                            System.out.println("Your tax bill is : $ " +
                            ( (11950*0.1)
                            + ((income-11950)*0.15)
                        } else if (45501 <= income && income <= 117450) {
                            System.out.println("Your tax bill is : $ " +
                            ( (11950*0.1)
                            + ((45500-11950)*0.15)       
                            + ((income-45500)*0.25)
                        } else if (117451 <= income && income <= 190200) {
                            System.out.println("Your tax bill is : $ " +
                            ( (11950*0.1)
                            + ((45500-11950)*0.15)
                            + ((117450-45500)*0.25)
                            + ((income-117450)*0.28)
                        } else if (190201 <= income && income <= 372950) {
                            System.out.println("Your tax bill is : $ " +
                            ( (11950*0.1)
                            + ((45500-11950)*0.15)
                            + ((117450-45500)*0.25)
                            + ((190200-117450)*0.28)
                            + ((income-190200)*0.33)
                        } else if (372951 <= income) {
                            System.out.println("Your tax bill is : $ " +
                            ( (11950*0.1)
                            + ((45500-11950)*0.15)
                            + ((117450-45500)*0.25)
                            + ((190200-117450)*0.28)
                            + ((372950-190200)*0.33)
                            + ((income-372950)*0.35)
                            break;
                        } else {
                            System.out.println("please type the right answer");
    The while loop initiated on line 21 is there so that in case the wrong input is given at the prompt given in line 24, the program outputs "please type the right answer" with the command on line 254 before looping back to line 24 and prompting the user to enter his status number.  The program works as long as the input at line 28 is an integer.  Not surprisingly if the erroneous input here is not an integer, the program outputs the following error message :
    Exception in thread "main" java.util.InputMismatchException
        at java.util.Scanner.throwFor(Scanner.java:909)
        at java.util.Scanner.next(Scanner.java:1530)
        at java.util.Scanner.nextInt(Scanner.java:2160)
        at java.util.Scanner.nextInt(Scanner.java:2119)
        at computeTax.main(computeTax.java:28
    To try to solve this I used the Try / Catch technique with the following version of the code :
    import java.util.Scanner;
    public class computeTax {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            // prompt for filing status
            System.out.println("enter '0' for single filer,");
            System.out.println("enter '1' for married filing jointly or qualified widow(er),");
            System.out.println("enter '2' for married filing separately,");
            System.out.println("enter '3' for head of household.");
            while (true) {
                try {
                System.out.println("what is your filing status?");
                 int status = input.nextInt();
                        if (status == 0) {
                        System.out.println("you're a single filer.  What is your income?");
                        double income = input.nextDouble();
                        //double income;
                            if (0 <= income && income <= 8350) {
                                System.out.println("Your tax bill is : $ " + income*0.1);
                            } else if (8351 <= income && income <= 33950) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((income-8350)*0.15)
                            } else if (33951 <= income && income <= 68525) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)       
                                + ((income-33950)*0.25)
                            } else if (68526 <= income && income <= 104425) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((82250-33950)*0.25)
                                + ((income-82250)*0.28)
                            } else if (104426 <= income && income <= 186475) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((82250-33950)*0.25)
                                + ((171550-82250)*0.28)
                                + ((income-171550)*0.33)
                            } else if (186476 <= income) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((82250-33950)*0.25)
                                + ((171550-82250)*0.28)
                                + ((372950-171550)*0.33)
                                + ((income-372950)*0.35)
                            break;
                        } else if (status == 1){
                            System.out.println("you're married filing jointly or qualified widow(er). What is your income?");
                            double income = input.nextDouble();
                            //double income;
                            if (0 <= income && income <= 16700) {
                                System.out.println("Your tax bill is : $ " + income*0.1);
                            } else if (16701 <= income && income <= 67900) {
                                System.out.println("Your tax bill is : $ " +
                                ( (16700*0.1)
                                + ((income-16700)*0.15)
                            } else if (67901 <= income && income <= 137050) {
                                System.out.println("Your tax bill is : $ " +
                                ( (16700*0.1)
                                + ((67900-16700)*0.15)       
                                + ((income-67900)*0.25)
                            } else if (137051 <= income && income <= 208850) {
                                System.out.println("Your tax bill is : $ " +
                                ( (16700*0.1)
                                + ((67900-16700)*0.15)
                                + ((137050-67900)*0.25)
                                + ((income-137050)*0.28)
                            } else if (208051 <= income && income <= 372950) {
                                System.out.println("Your tax bill is : $ " +
                                ( (16700*0.1)
                                + ((67900-16700)*0.15)
                                + ((137050-67900)*0.25)
                                + ((208850-137050)*0.28)
                                + ((income-208850)*0.33)
                            } else if (372951 <= income) {
                                System.out.println("Your tax bill is : $ " +
                                ( (16700*0.1)
                                + ((67900-16700)*0.15)
                                + ((137050-67900)*0.25)
                                + ((208850-137050)*0.28)
                                + ((372950-208850)*0.33)
                                + ((income-372950)*0.35)
                            break;
                        } else if (status == 2){
                            System.out.println("you're married filing separately. What is your income?");
                            double income = input.nextDouble();
                            //double income;
                            if (0 <= income && income <= 8350) {
                                System.out.println("Your tax bill is : $ " + income*0.1);
                            } else if (8351 <= income && income <= 33950) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((income-8350)*0.15)
                            } else if (33951 <= income && income <= 68525) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)       
                                + ((income-33950)*0.25)
                            } else if (68526 <= income && income <= 104425) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((68525-33950)*0.25)
                                + ((income-104425)*0.28)
                            } else if (104426 <= income && income <= 186475) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((68525-33950)*0.25)
                                + ((104425-68525)*0.28)
                                + ((income-104425)*0.33)
                            } else if (186476 <= income) {
                                System.out.println("Your tax bill is : $ " +
                                ( (8350*0.1)
                                + ((33950-8350)*0.15)
                                + ((68525-33950)*0.25)
                                + ((104425-68525)*0.28)
                                + ((186475-104425)*0.33)
                                + ((income-186475)*0.35)
                                break;
                    } else if (status == 3){
                        System.out.println("you're a head of household. What's your income?");
                        double income = input.nextDouble();
                            if (0 <= income && income <= 11950) {
                                System.out.println("Your tax bill is : $ " + income*0.1);
                            } else if (11951 <= income && income <= 45500) {
                                System.out.println("Your tax bill is : $ " +
                                ( (11950*0.1)
                                + ((income-11950)*0.15)
                            } else if (45501 <= income && income <= 117450) {
                                System.out.println("Your tax bill is : $ " +
                                ( (11950*0.1)
                                + ((45500-11950)*0.15)       
                                + ((income-45500)*0.25)
                            } else if (117451 <= income && income <= 190200) {
                                System.out.println("Your tax bill is : $ " +
                                ( (11950*0.1)
                                + ((45500-11950)*0.15)
                                + ((117450-45500)*0.25)
                                + ((income-117450)*0.28)
                            } else if (190201 <= income && income <= 372950) {
                                System.out.println("Your tax bill is : $ " +
                                ( (11950*0.1)
                                + ((45500-11950)*0.15)
                                + ((117450-45500)*0.25)
                                + ((190200-117450)*0.28)
                                + ((income-190200)*0.33)
                            } else if (372951 <= income) {
                                System.out.println("Your tax bill is : $ " +
                                ( (11950*0.1)
                                + ((45500-11950)*0.15)
                                + ((117450-45500)*0.25)
                                + ((190200-117450)*0.28)
                                + ((372950-190200)*0.33)
                                + ((income-372950)*0.35)
                                break;
                            } else {
                                System.out.println("please type the right answer");
                        } catch (java.util.InputMismatchException ex){
                            System.out.println("Input Mismatch Exception ");
    I have put the try / catch structure inside the while loop.  The input error is now dealt with but when a non integer input is entered at the status prompt, the program enters an infinite loop like so  :
    Input Mismatch Exception
    what is your filing status?
    Input Mismatch Exception
    what is your filing status?
    Input Mismatch Exception
    what is your filing status?
    Input Mismatch Exception
    etc
    etc
    etc...
    The problem here is that the program no longer stops at the status prompt on line 27.
    Can anyone suggest a way of overriding the input mismatch error thing and looping back to a status prompt that actually stops and waits for the input?
    Thanks

    Thanks for your reply.
    Your idea of compartmentalization sounds a good idea.
    By the way, I found a solution to the infinite loop  Check out :
    http://stackoverflow.com/questions/3572160/infinite-looptry-catch-with-exceptions.
    In particular :
    "......if the next token is not an int, it throws the InputMismatchException, but the token stays there. So on the next iteration of the loop, reader.nextInt() reads the same token again and throws the exception again. What you need is to use it up. Add a reader.next() inside your catch to consume the token, which is invalid and needs to be discarded."
    In the case of my code I substitute "reader.next()" with "input.next()" :
    } catch (java.util.InputMismatchException ex){
    System.out.println("Input Mismatch Exception ");
    input.next();

Maybe you are looking for

  • Error creating accounting document for a credit note

    Hi All, I am facing an issue while creating an accounting document for the credit note created. The scenario is as follows: Created a credit memo --> created credit note --> create accounting document While creating accounting document, i'm getting a

  • Printing chinese text in a smartform.

    Whenever, I try to write chinese text in the smrtform, some weird characters appear. How can I paste chinese text in the smartform. Please provide me a solution. Moderator message: please do some research before asking. [Rules of engagement|http://wi

  • Macbook compatibility with big screen tv's

    I just bought a 2ghz macbook. I'm looking at a vizio 42 inch television at costco which has an hdmi input. I spoke to two apple reps. 1st rep said that anyway I connect my macbook to a bigscreen I will have very poor picture quality and it's not wort

  • How to disable PanelAccordion overflow action?

    Hello all, I am using jdeveloper 11.1.1.2.0. I created a dynamic menu with PanelAccordion using ShowDetailItem. I put the PanelAcordion in a scrollable PanelGroupLayout. Here is my code: <af:panelGroupLayout id="pt_pgl8" layout="scroll"> <af:panelAcc

  • Copy Express Addon Install

    dear friends, I am getting an error when i try to install copy express addon. The error is cannot load dll:AddOnInstallapi. Please help