Re: abot loadDataFromFile method

It's not giving you a "null exception", it's giving you a NullPointerException.
PLEASE PLEASE PLEASE don't "interpret" error messages like that, cut and paste them; in far too many cases the details matter. In this case, I read your post 2 hours ago and didn't understand what you were talking about so I didn't reply. Later, I happened to bring it up again by accident, and I figured out you meant NullPointerException
Of course it's giving a NullPointerException. Your code is:
OrdVideo videoproxy=null;
videoproxy.loadDataFromFile("E:\\ATHADU DVD SONGS\\athadu.AVI");You can't call a method of a null object (well, maybe a static method, but that's bad style even if it works, IMHO).
Here's an example of how to do it, taken almost directly from the Oracle interMedia Documentation:
http://download-east.oracle.com/docs/html/B14302_01/ch_websrvtier.htm#sthref124
Please, READ THE FINE MANUAL!
conn.setAutoCommit(false);
// manufacture new interMedia objects by creating storage for them in the DB
String query2 =
  "begin insert into pm.online_media " +
  " (product_id, product_photo, product_audio," +
  " product_video, product_testimonials) values" +
  " (3106, ordimage.init()," +
  " ordaudio.init(), ordvideo.init()," +
  " orddoc.init()) returning product_photo," +   
  " product_audio, product_video," +  
  " product_testimonials into ?, ?, ?, ?;end;";
OracleCallableStatement cstmt =
(OracleCallableStatement) conn.prepareCall(query2);
cstmt.registerOutParameter(1, OrdImage._SQL_TYPECODE,
                               OrdImage._SQL_NAME);
cstmt.registerOutParameter(2, OrdAudio._SQL_TYPECODE,
                               OrdAudio._SQL_NAME);
cstmt.registerOutParameter(3, OrdVideo._SQL_TYPECODE,
                               OrdVideo._SQL_NAME);
cstmt.registerOutParameter(4, OrdDoc._SQL_TYPECODE,
                               OrdDoc._SQL_NAME);
cstmt.execute();
OrdImage imgProxy = (OrdImage)cstmt.getORAData(1,
                     OrdImage.getORADataFactory());
OrdAudio audProxy = (OrdAudio)cstmt.getORAData(2,
                     OrdAudio.getORADataFactory());
OrdVideo vidProxy = (OrdVideo)cstmt.getORAData(3,
                     OrdVideo.getORADataFactory());
OrdDoc docProxy = (OrdDoc)cstmt.getORAData(4,
                     OrdDoc.getORADataFactory());
cstmt.close();
// populate the objects with data from file
String imageFileName = "laptop.jpg";
String audioFileName = "laptop.mpa";
String videoFileName = "laptop.rm";
String docFileName = "laptop.jpg";
imgProxy.loadDataFromFile(imageFileName);
audProxy.loadDataFromFile(audioFileName);
vidProxy.loadDataFromFile(videoFileName);
docProxy.loadDataFromFile(docFileName);
// store the loaded interMedia objects into the database
String query3 = "update pm.online_media set" +
    " product_photo=?, product_audio=?," +
    " product_video=?, product_testimonials=?" +
    " where product_id=3106";
OraclePreparedStatement pstmt = (OraclePreparedStatement)conn.prepareStatement(query3);
pstmt.setORAData(1, imgProxy);
pstmt.setORAData(2, audProxy);
pstmt.setORAData(3, vidProxy);
pstmt.setORAData(4, docProxy);
pstmt.execute();
pstmt.close();
conn.commit();

Thanks for u r help, thats great, i will tell the error messages properly next time, thanks again for u suggestion.
I have a problem, i modified my code with your solution, the code is:
<HTML>
<HEAD>
</HEAD>
<BODY bgcolor="pink">
<%@ page import="oracle.ord.im.OrdVideo" %>
<%@ page import="oracle.jdbc.driver.*" %>
<%@ page import="oracle.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.File" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.io.*" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*;" %>
<CENTER>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","indublin");
try
PreparedStatement ps =con.prepareStatement("INSERT INTO t1 (id ,vid) values(16,ORDSYS.ORDVIDEO.INIT( ))");
ps.executeUpdate( );
ps.close();
con.setAutoCommit(false);
Statement st=con.createStatement();
out.println("gdjhg");
out.println("gdjhg");
OracleResultSet rs=(OracleResultSet)st.executeQuery("select vid from t1 where id=16 for update");
out.println("gdjhg");
rs.next();
OrdVideo videoproxy = (OrdVideo)rs.getORAData("vid", OrdVideo.getORADataFactory());
String videofile="CAMWIZ 15-APR-06 16=44=52.50.wmv";
videoproxy.loadDataFromFile(videofile);
out.println("gdjhg");
byte[ ] [ ] ctx = new byte[1][64];
videoproxy.setProperties(ctx);
out.println("gdjhg");
String updateSQL = "update t1 set vid=? where id=16";
OraclePreparedStatement opstmt = (OraclePreparedStatement)con.prepareStatement(updateSQL);
opstmt.setORAData(1, videoproxy);
opstmt.execute();
opstmt.close();
con.commit();
catch(Exception e)
out.println(e.getMessage()+"I/O exception");
%>
</center>
</body>
</html>
The problem in the code is, there r no errors, but the jsp page is not loading in the web server, it is loading continously, not stoping at all. What i changed is i kept yhe con.SetAutoCommit(false), after the insert statement, becuse i want to select the inserted record. How long it takes normally to load a video file in to database, i want u r help.
Thanks,
bye now.

Similar Messages

  • About loadDataFromFile( ) method

    Hai,
    I want to load video data in to the ordvideo object, i am using loadDataFromFile method ,but it is giving null exception, it is not loading. can any one try for me, (i want to load avi ro mpeg are any format)
    I am putting the code here:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY bgcolor="pink">
    <%@ page import="oracle.ord.im.OrdVideo" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="oracle.sql.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*;" %>
    <CENTER>
    <%
    try
    OrdVideo videoproxy=null;
    videoproxy.loadDataFromFile("E:\\ATHADU DVD SONGS\\athadu.AVI");
    catch(Exception e)
    out.println(e.getMessage()+"I/O exception");
    %>
    </center>
    </body>
    </html>

    You are getting a null exception because you are trying to call a method on a null object. Here's the code you posted:
    OrdVideo videoproxy=null;
    videoproxy.loadDataFromFile("E:\\ATHADU DVD SONGS\\athadu.AVI");
    The ORDVideo object is a proxy object which means it must be selected from a database table. You can't use it as a standalone class.
    Have you tried debugging your program outside of the JSP and servlet engine?
    For example, there is a Quickstart for Java guide in the interMedia page of OTN
    http://www.oracle.com/technology/sample_code/products/intermedia/index.html
    This has a simple but complete program demonstrating how to use the Java proxy classes. Can you get this to work?

  • LoadDataFromFile(String) method is not  working

    Hai,
    Sorry for posting again, its very urgent for mee
    There r no errors in the code below, it is supposed to load a video file in to the database, but the problem is the jsp page is not loading(the page is not loading even after 30 minutes, continously loading). I think the problem is with the loadDataFromFile( ) method, can any one solve the problem for mee
    <HTML>
    <HEAD>
    </HEAD>
    <BODY bgcolor="pink">
    <%@ page import="oracle.ord.im.OrdVideo" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="oracle.sql.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*;" %>
    <CENTER>
    <%
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","indublin");
    try
    PreparedStatement ps =con.prepareStatement("INSERT INTO t1 (id ,vid) values(16,ORDSYS.ORDVIDEO.INIT( ))");
    ps.executeUpdate( );
    ps.close();
    con.setAutoCommit(false);
    Statement st=con.createStatement();
    out.println("gdjhg");
    out.println("gdjhg");
    OracleResultSet rs=(OracleResultSet)st.executeQuery("select vid from t1 where id=16 for update");
    out.println("gdjhg");
    rs.next();
    OrdVideo videoproxy = (OrdVideo)rs.getORAData("vid", OrdVideo.getORADataFactory());
    String videofile="CAMWIZ 15-APR-06 16=44=52.50.wmv";
    videoproxy.loadDataFromFile(videofile);
    out.println("gdjhg");
    byte[ ] [ ] ctx = new byte[1][64];
    videoproxy.setProperties(ctx);
    out.println("gdjhg");
    String updateSQL = "update t1 set vid=? where id=16";
    OraclePreparedStatement opstmt = (OraclePreparedStatement)con.prepareStatement(updateSQL);
    opstmt.setORAData(1, videoproxy);
    opstmt.execute();
    opstmt.close();
    con.commit();
    catch(Exception e)
    out.println(e.getMessage()+"I/O exception");
    %>
    </center>
    </body>
    </html>
    Thanks,
    bye now

    Hi Saravanan,
    I Understand your logic,i was doing the same but it never worked for me.
    In AbstractPortalComponent ,the request object is passed as parameter to the do… methods.
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/ff3c41325fa831e10000000a1550b0/content.htm
    You need to access the original ServletRequest() of this request to process further.
    In my opinion,problem is not in buff.append.if you see it in debug you can see that (char)i itself null or something.
    For a change try my code and see what kind of parameters your ServletRequest()has.
    Good luck

  • Uploading video into database

    Hai,
    There r no errors in the code below, it is supposed to load a video file in to the database, but the problem is the jsp page is not loading(the page is not loading even after 30 minutes, continously loading). I think the problem is with the loadDataFromFile( ) method, can any one solve the problem for mee
    <HTML>
    <HEAD>
    </HEAD>
    <BODY bgcolor="pink">
    <%@ page import="oracle.ord.im.OrdVideo" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="oracle.sql.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*;" %>
    <CENTER>
    <%
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","indublin");
    try
    PreparedStatement ps =con.prepareStatement("INSERT INTO t1 (id ,vid) values(16,ORDSYS.ORDVIDEO.INIT( ))");
    ps.executeUpdate( );
    ps.close();
    con.setAutoCommit(false);
    Statement st=con.createStatement();
    out.println("gdjhg");
    out.println("gdjhg");
    OracleResultSet rs=(OracleResultSet)st.executeQuery("select vid from t1 where id=16 for update");
    out.println("gdjhg");
    rs.next();
    OrdVideo videoproxy = (OrdVideo)rs.getORAData("vid", OrdVideo.getORADataFactory());
    String videofile="CAMWIZ 15-APR-06 16=44=52.50.wmv";
    videoproxy.loadDataFromFile(videofile);
    out.println("gdjhg");
    byte[ ] [ ] ctx = new byte[1][64];
    videoproxy.setProperties(ctx);
    out.println("gdjhg");
    String updateSQL = "update t1 set vid=? where id=16";
    OraclePreparedStatement opstmt = (OraclePreparedStatement)con.prepareStatement(updateSQL);
    opstmt.setORAData(1, videoproxy);
    opstmt.execute();
    opstmt.close();
    con.commit();
    catch(Exception e)
    out.println(e.getMessage()+"I/O exception");
    %>
    </center>
    </body>
    </html>
    Thanks,
    bye now.

    --Database procedure to get the file
    create or replace PROCEDURE get_video(pfileid IN NUMBER) IS
    v_blob BLOB;
    v_length NUMBER;
    v_mime_type VARCHAR2(300);
    v_file_name VARCHAR2(200);
    BEGIN
    -- get pdf_data and its mime type from the database
    SELECT file_blob, mime_typ, file_nm
    INTO v_blob, v_mime_type, v_file_name
    FROM appl_gui.hcd_cont_dtl_file
    WHERE tablex = pfileid;
    v_length := dbms_lob.getlength(v_blob);
    owa_util.mime_header(v_mime_type, FALSE);
    htp.p('Content-length: ' || v_length);
    htp.p('Content-Disposition: filename="' || v_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(v_blob);
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20001, 'Error: ' || SQLERRM);
    END get_video;
    --Application Process Name it as GET_VIDEO
    BEGIN
    get_pdf(:P25_FILE_ID);
    END;
    BEGIN
              htp.p('
              <object>
              <embed type="application/x-mplayer2" src="f?p=&APP_ID.:25:&APP_SESSION.:APPLICATION_PROCESS=GET_VIDEO::::" name="MediaPlayer" width=800 height=300></embed>
              </object>');
    END;

  • SetProperties error

    I'm using this java code to insert an image:
    /*begin of source code*/
    OrdImage image = new OrdImage(connection);
    image.setBindParams("photos", "content", "id = 1");
    if(image.loadData("myimage.jpg")) {
    image.setProperties();
    else {
    System.err.println("loadData failed");
    /*end of source code*/
    There are no problems while inserting the image but the
    setProperties returns me an error (null).
    Can anyone help me?
    Clovis Junior
    PS.: Sorry about my english

    Hi Clovis,
    You seem to be using the interMedia Java client API that was in
    8.1.5 and 8.1.6 and has since been deprecated. If your database
    version is 8.1.6 or later, please use the new Java API. For
    8.1.6, you can download it from OTN. For 8.1.7 and 9i, its
    included on the CD and should already be installed.
    Additionally, please note that loadData does not load a file
    from the local file system into a database server image object.
    The file must reside on a file system accessible to the database
    server (either local to the server m/c or networked).
    Use loadDataFromFile() method in the new interface to upload
    from a local file into the database.
    If you are loading data from a server based file and feel the
    problem is that interMedia doesn't correctly extract properties,
    please send me sample data files that you are working with.
    Hope this helps,
    Rajiv

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Issue with SharePoint foundation 2010 to use Claims Based Auth with Certificate authentication method with ADFS 2.0

    I would love some help with this issue.  I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0  I have a test account set up with lab.acme.com to use the ACS.
    When I log into my site using Windows Auth, everything is great.  However when I log in and select my ACS token issuer, I get sent, to the logon page of the ADFS, after selected the ADFS method. My browser prompt me which Certificate identity I want
    to use to log in   and after 3-5 second
     and return me the logon page with error message “Authentication failed” 
    I base my setup on the technet article
    http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
    I validated than all my certificate are valid and able to retrieve the crl
    I got in eventlog id 300
    The Federation Service failed to issue a token as a result of an error during processing of the WS-Trust request.
    Request type: http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
    Additional Data
    Exception details:
    Microsoft.IdentityModel.SecurityTokenService.FailedAuthenticationException: MSIS3019: Authentication failed. ---> System.IdentityModel.Tokens.SecurityTokenValidationException:
    ID4070: The X.509 certificate 'CN=Me, OU=People, O=Acme., C=COM' chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed
    correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    --- End of inner exception stack trace ---
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.BeginGetScope(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.BeginIssue(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.DispatchRequestAsyncResult..ctor(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginDispatchRequest(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult..ctor(WSTrustServiceContract contract, DispatchContext dispatchContext, MessageVersion messageVersion, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext
    serializationContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String
    trustNamespace, AsyncCallback callback, Object state)
    System.IdentityModel.Tokens.SecurityTokenValidationException: ID4070: The X.509 certificate 'CN=Me, OU=People, O=acme., C=com' chain building
    failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    thx
    Stef71

    This is perfectly correct on my case I was not adding the root properly you must add the CA and the ADFS as well, which is twice you can see below my results.
    on my case was :
    PS C:\Users\administrator.domain> $root = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ad0001.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "domain.ad0001" -Certificate $root
    Certificate                 : [Subject]
                                    CN=domain.AD0001CA, DC=domain, DC=com
                                  [Issuer]
                                    CN=domain.AD0001CA, DC=portal, DC=com
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    22/07/2014 11:32:05
                                  [Not After]
                                    22/07/2024 11:42:00
                                  [Thumbprint]
                                    blablabla
    Name                        : domain.ad0001
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : domain.ad0001
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17164
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.domain> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ADFS_Signing.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "Token Signing Cert" -Certificate $cert
    Certificate                 : [Subject]
                                    CN=ADFS Signing - adfs.domain
                                  [Issuer]
                                    CN=ADFS Signing - adfs.domain
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    23/07/2014 07:14:03
                                  [Not After]
                                    23/07/2015 07:14:03
                                  [Thumbprint]
                                    blablabla
    Name                        : Token Signing Cert
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : Token Signing Cert
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17184
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.PORTAL>

  • Using G_SET_GET_ALL_VALUES Method

    Hi,
    I need to use the following method. G_SET_GET_ALL_VALUES. But I'm not sure of the data type that it returns.
    CALL FUNCTION 'G_SET_GET_ALL_VALUES'
      EXPORTING
      CLIENT                      = ' '
      FORMULA_RETRIEVAL           = ' '
      LEVEL                       = 0
        setnr                       = wa_itab_progrp-setname
      VARIABLES_REPLACEMENT       = ' '
      TABLE                       = ' '
      CLASS                       = ' '
      NO_DESCRIPTIONS             = 'X'
      NO_RW_INFO                  = 'X'
      DATE_FROM                   =
      DATE_TO                     =
      FIELDNAME                   = ' '
      tables
        set_values                  = ????????
    EXCEPTIONS
      SET_NOT_FOUND               = 1
      OTHERS                      = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Can anyone please let me know what I should do at the SET_VALUES section.
    Thanks
    Lilan

    Hi,
    See the FM Documentation,
    This function module determines all the values of a set or its subordinate sets. The required call parameter is the set ID (SETNR). The other parameters are optional:
    FORMULA_RETRIEVAL: 'X' => The formulas in the set are also returned (default ' ' requires fewer database accesses)
    LEVEL: The default value is 0 and means "expand all levels". Values other than 0 determine the level to which they are to be expanded
    VARIABLES_REPLACEMENT: 'X' => The value variables in the set hierarchy are replaced by their default values (this means additional database accesses for each variable)
    NO_DESCRIPTIONS: 'X' => The short descriptions of the sets and set lines are not read from the database. For performance reasons you should only set this parameter to ' ' if you need the texts
    The values determined are returned to the internal table SET_VALUES.
    Thanks.

  • Clearing values from request in decode method

    I am using a custom table paginator. In its ‘decode’ method I have the next code to control whether ‘next’ link is clicked:
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) {     
         } else if (pLink.equals("previous")) {
    }But the next sequence produces some problems:
    1.     Initial page load.
    2.     Click on ‘next’ link.
    3.     Table navigates ok to next page.
    4.     Reload page (push F5).
    5.     The previous click still remains in the request, so decode method think ‘next’ link is pressed again.
    6.     Application abnormal behaviour arises.
    So, I am trying to clear the ‘next_link’ key from the request, but next code throws an UnsupportedOperationException:
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) {     
         } else if (pLink.equals("previous")) {
         requestMap.put("pLink" + clientId, "");
    }Do any of you have some ideas?

    Hey, where are you RaymondDeCampo, rLubke, BalusC ... the masters of JSF Universe?
    ;-)

  • Method all values from row

    Hi,
    Is there a method that get the all the values of a row? I've gone through the java api but didn't found one, but wanted to be sure.
    If not I'll have to do getValueAt for every column?
    Grtz

    Here is one possible implementation using RowTableModel (a self made class).
    To access a row, we can use this: Product product = (Product) model.getRow(rowIndex);
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    public class Tabel extends JPanel {
        private JTable table;
        private JTextField filterText;
        private TableRowSorter<MyTableModel> sorter;
        private String output;
        private final MyTableModel model;
        public Tabel() {
            //Create a table with a sorter.
            model = new MyTableModel();
            sorter = new TableRowSorter<MyTableModel>(model);
            table = new JTable(model);
            table.setRowSorter(sorter);
            table.setPreferredScrollableViewportSize(new Dimension(500, 200));
            table.setFillsViewportHeight(true);
            //Single selection
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            //Making sure columns can't be dragged and dropped
            table.getTableHeader().setReorderingAllowed(false);
            //Double click event
            table.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent mouseEvent) {
                    if (mouseEvent.getClickCount() == 2) {
                        System.out.print(output);
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            add(scrollPane);
            JPanel form = new JPanel();
            JLabel l1 = new JLabel("Filter Text:");
            form.add(l1);
            filterText = new JTextField(15);
            //Whenever filterText changes, invoke newFilter.
            filterText.getDocument().addDocumentListener(
                    new DocumentListener() {
                        public void changedUpdate(DocumentEvent e) {
                            newFilter();
                        public void insertUpdate(DocumentEvent e) {
                            newFilter();
                        public void removeUpdate(DocumentEvent e) {
                            newFilter();
            l1.setLabelFor(filterText);
            form.add(filterText);
            add(form);
         * Update the row filter regular expression from the expression in
         * the text box.
        private void newFilter() {
            RowFilter<MyTableModel, Object> rf = null;
            //If current expression doesn't parse, don't update.
            try {
                rf = RowFilter.regexFilter("(?i)" + filterText.getText(), 0); //"(?i)" => Zoeken gebeurd case-insensitive
            } catch (java.util.regex.PatternSyntaxException e) {
                return;
            sorter.setRowFilter(rf);
        class MyTableModel extends RowTableModel {
            private final List<Product> mData;
            private final List<String> cNames;
            public MyTableModel() {
                super(Product.class);
                mData = new ArrayList<Product>();
                mData.add(new Product("Frontline Small", 5, 1));
                mData.add(new Product("Frontline Medium", 10, 2));
                mData.add(new Product("Frontline Large", 15, 1));
                mData.add(new Product("Frontline Extra Large", 20, 2));
                mData.add(new Product("Frontline spuitbus", 7.5, 3));
                cNames = new ArrayList<String>();
                cNames.add("Product");
                cNames.add("Prijs");
                cNames.add("Aantal stuks beschikbaar");
                setDataAndColumnNames(mData, cNames);
                setColumnClass(0, String.class);
                setColumnClass(1, Double.class);
                setColumnClass(2, Integer.class);
            public Object getValueAt(final int rowIndex, final int columnIndex) {
                switch (columnIndex) {
                    case 0:
                        return mData.get(rowIndex).getDescriction();
                    case 1:
                        return mData.get(rowIndex).getPrice();
                    case 2:
                        return mData.get(rowIndex).getNumber();
                return null;
            @Override
            public Class getColumnClass(int column) {
                return super.getColumnClass(column);
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tabel newContentPane = new Tabel();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(final String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    class Product {
        private String descriction;
        private double price;
        private int number;
        Product(final String descriction, final double price, final int number) {
            this.descriction = descriction;
            this.price = price;
            this.number = number;
        public String getDescriction() {
            return descriction;
        public void setDescriction(final String descriction) {
            this.descriction = descriction;
        public int getNumber() {
            return number;
        public void setNumber(final int number) {
            this.number = number;
        public double getPrice() {
            return price;
        public void setPrice(final int price) {
            this.price = price;
        @Override
        public String toString() {
            return descriction + ", " + price + ", " + number;
    }

  • How can I move an ArrayList from one method to another?

    As the subject reveals, I want to know how I move an ArrayList. In one method, I fill my ArrayList with objects, and in the next I want to pick an arbitrary object out of the ArrayList.
    How do I make this work??

    You pass the same array list to both the method. Both method are getting the same thing.
    void main(){
    //create array list here
    ArrayList aList = new ArrayList();
    //pass it to a method to fill items
    fillArrayList(aList);
    //pass the same arraylist to another method
    printArrayList(aList);
    void fillArrayList(ArrayList list){
      list.add("A");
    void printArrayList(ArrayList list){
    //The array list will contain A added by the previos method
    System.out.println(list);
    FeedFeeds : http://www.feedfeeds.com                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HT1918 Can I have multiple payment methods on one account

    Currently, both of my teenage sons and I are sharing an Apple account with one payment method. I would like to have a payment method for each of us.

    If they are teenagers, it is not too soon to set up individual accounts per person. 
    This will address the separate payments issue, and will make it much easier in a few years when they start heading off to university or moving to their own living arrangements.

  • A method to convert an existing iCloud account to a Child iCloud Account for Family Sharing

    I do not see any method by which to convert an existing iCloud account (we have three set up for our kids, all their birthdays are set later than their actual birthdays so we could grab their actual names before they were all gone years ago) to a new Child iCloud Account for use with Family Sharing (namely to be able to take advantage of the new features: Family Calendar, Photostream, 'Ask to Buy' on the Stores, etc. on their own iPad minis.
    If this is just not possible under the current scheme, please oh please Apple make this an option - there are probably thousands of others in this same boat, and I refuse to give up my kids' iCloud accounts!

    I've read every string and workaround solution on these forums (to date). There's really no good options here.
    USER STORY: My kid (age 7) has an iPad 2.  I created an email address for him (which he doesn't know about). I created an apple ID for him (which he also doesn't know or care about) and I set up his Apple ID with my credit card.  In addition I've set up parental controls on the iPad to lock it down and make it more age appropriate.   Over the past year or so it's worked out fine, he sees something he might like, brings the iPad to me and if I approve, I enter the Apple ID Password  and approve the purchase.   After a year of doing this, he has a nice little collection of apps, kid songs, a few movies, etc.   I would like to move my kid over to a legitimate kid account now that Apple has released features that support this.  Currently the ability to convert an account does not exist. Seems like it should be easy to change a birthday, etc.
    Almost seems like Apple is penalizing us for getting our kid an iPad last year. 
    Apple  - Please consider my user story for your upcoming feature enhancements.

  • How can i execute ejb method in a servlet?

    hi
    I am using a IBM HTTP Server and Weblogic Server.
    I could execute below source in a main method of application but i could not that in a init method of servlet because of ClassCastException.
    (a classpath of weblogic contains client's classpath)
    // source code
    Hashtable props = new Hashtable();
    props.pu(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL,
    "t3://192.168.1.5:7001");
    Context ctx = new InitialContext(props);
    Object obj = ctx.lookup("session.LigerSessionHome");
    LigerSessionHome home = (LigerSessionHome) PortableRemoteObject.narrow (obj, LigerSessionHome.class);
    // error code
    Exception : session.LigerSessionBeanHomeImpl_ServiceStub
    java.lang.ClassCastException: session.LigerSessionBeanHomeImpl_ServiceStub
    at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:253)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136)
    at credit.getCreditResearch(credit.java:41)
    at creditResearchClient.doGet(creditResearchClient.java:122)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    thanks

    Have your stubs somehow got out of sync? So that your Servlet engine is pointing to a different jar than that of your jvm on which you were running your client application
    hi
    I am using a IBM HTTP Server and Weblogic Server.
    I could execute below source in a main method of
    application but i could not that in a init method of
    servlet because of ClassCastException.
    (a classpath of weblogic contains client's classpath)
    // source code
    Hashtable props = new Hashtable();
    props.pu(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL,
    "t3://192.168.1.5:7001");
    Context ctx = new InitialContext(props);
    Object obj = ctx.lookup("session.LigerSessionHome");
    LigerSessionHome home = (LigerSessionHome)
    PortableRemoteObject.narrow (obj,
    LigerSessionHome.class);
    // error code
    Exception :
    session.LigerSessionBeanHomeImpl_ServiceStub
    java.lang.ClassCastException:
    session.LigerSessionBeanHomeImpl_ServiceStub
    at
    com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(Porta
    leRemoteObject.java:253)
    at
    javax.rmi.PortableRemoteObject.narrow(PortableRemoteObj
    ct.java:136)
    at credit.getCreditResearch(credit.java:41)
    at
    creditResearchClient.doGet(creditResearchClient.java:12
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java
    740)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java
    865)
    thanks

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

Maybe you are looking for