SetArray Method

Hi,
I am trying to update Array datatype in Oracle.
I am getting java.sql.Array object from database since I can't create descriptor
from
weblogic pool using JNDI.
Now I have this Array but its just a pointer, How can I update values in this
array.
here is the code
... after creating connection
Array array=null;
while (rs.next()){
array = rs.getArray("myarray");
String[] mystringarray = (String[])array.getArray();
for (int i = 0; i < mystringarray.length; i++) {
scores="student no." + i;
However I need to know how to update this Array?
I want to call --
PreparedStatement pstmt =                          conn.prepareStatement("{call test_package.newarray(?)}");
pstmt.setArray(1, array);
pstmt.executeUpdate();
If I cannot update this way bec its a pointer to recordset, how do I go about
updating?
thanks

Actually you are not using OracleConnection's createARRAY method. Your code says 'cstmt.createARRAY' and cstmt is presumablyl a calleable statement.Hard to see how that could be so given that there is no CallableStatement.createArray() method, nor even an OracleCallableStatement.createArray() method. The only createArray() method mentioned in the document you cited is in OracleConnection.

Similar Messages

  • SetElement - setArray method

    Has anyone found a good example using either a setElement or setArray method in a Jpublisher generated class...
    All we can get it to do is throw a negative array index error...
    //Jpub generated collection object - table
    TxTable tx = new TxTable();
    //jpub generated record object for Tx table
    TxRecord tr = new TxRecord();
    //set record column values
    tr.setFName("Hello");
    tr.setLname("World");
    // pass record object to slot 1
    tx.setElement(tr, 1);
    What am I missing?

    u cant do it.
    setArray() method is for setting a 'array' value the prepared statement. it is very much similar to setInt(index, intValue) or setString(index,StringValue) methods.
    Array is thehe mapping in the Java programming language for the SQL type ARRAY.

  • SetArray of PreparedStatement

    Can any one tell me how the setArray is used in PreparedStatement where in the Query takes 2 parameters. Now the requirement is that instead of me running the SQL in loop for different values, I just want to set the array using setArray method of PreparedStatement.
    Snippet of code will be of a great help.

    u cant do it.
    setArray() method is for setting a 'array' value the prepared statement. it is very much similar to setInt(index, intValue) or setString(index,StringValue) methods.
    Array is thehe mapping in the Java programming language for the SQL type ARRAY.

  • ClassCastException from OraclePreparedStatement.setArrayInternal() method

    The following code throws a ClassCastException from oracle.jdbc.driver.OraclePreparedStatement.setArrayInternal() method line# 5886 when cs.setArray() is executed.
    Connection conn = getConnection(); // Returns a java.sql.Connection instance
    CallableStatement cs = conn.prepareCall(queryString);
    cs.setArray(1, new UsnArray(usns)); // UsnArray implements java.sql.Array
    cs.registerOutParameter(2, Types.INTEGER);
    cs.execute();
    This works if I create the CallableStatement on an oracle.jdbc.driver.OracleConnection instance and use an oracle.sql.ARRAY instance in the setArray() method call. A JDBC-compliance driver shouldn't be expecting the applications to use driver-specific classes. The application can pass any instance of type java.sql.Array in the setArray() method call.
    Is this a bug in the driver?
    Driver information from ojdbc14.jar manifest.mf file:
    Manifest-Version: 1.0
    Specification-Title: Oracle JDBC driver classes for use with JDK14
    Sealed: true
    Created-By: 1.4.2_08 (Sun Microsystems Inc.)
    Implementation-Title: ojdbc14.jar
    Specification-Vendor: Oracle Corporation
    Specification-Version: Oracle JDBC Driver version - "10.2.0.2.0"
    Implementation-Version: Oracle JDBC Driver version - "10.2.0.2.0"
    Implementation-Vendor: Oracle Corporation
    Implementation-Time: Tue Jan 24 08:55:21 2006
    Name: oracle/sql/converter/
    Sealed: false
    Name: oracle/sql/
    Sealed: false
    Name: oracle/sql/converter_xcharset/
    Sealed: false
    --------------------------------------------------------------------------------------------------

    Let me elaborate on your last two replies: it doesn't matter what other drivers support; it doesn't matter what your "intention" was; all that matters is whether the implementation adheres to the specification or not. If it is not, it is not compliant to the specification (period). It is a very strong statement to say that "You must use oracle.sql.ARRAY." I'm not quite sure you understand the meaning and motivation behind standards like JDBC and J2EE and standards bodies like ANSI. This is very obvious when you say that "This is a limitation of the expressiveness of the Java type system."
    If you think the JDBC compliance only mandates that "A driver is only required to accept a value that is of the concrete class defined by the driver," which is not mentioned anywhere in the spec anyway, then Sun would have simply defined the setArray method as "public void setArray(int i, oracle.sql.ARRAY x)" (one for each driver available) instead of saying "public void setArray(int i, java.sql.Array x)". It also clearly says that if a specification is not supported by a driver, in which case it must be specified in the DatabaseMetaData, the driver must throw a SQLEception. Bur your claim completely contradicts everything. You can also refer links like this on the Web: http://archives.postgresql.org/pgsql-jdbc/2003-07/msg00294.php.
    I don't know what you mean by "The JDBC spec is not as precise as it could be." The relevant requirements have been clearly stated throughout Chapter 13 “Statements” and in Appendix B "Data Type Conversion Tables" in JDBC 3.0 spec (Chapter 8 Section 3 "Arrays" in JDBC 2.1 spec).
    A JDBC driver may provide underlying data source-specific features in addition to those mandated by the JDBC specification. Applications that try to take advantage these additional features may decide to “stick” with a specific driver and import driver-specific classes. But these additional features cannot substitute the basic requirements.

  • Cannot insert String[] objects in PreparedStatements !!!

    Hello guys,
    I'm using PostgreSQL 7.0.3 for a website project.
    I've got a table in the website database system which has a integer array type,
    e.g.
    create table preferences(
    user_id integer references user,
    music varchar(20)[5],
    magazines varchar(20)[5],
    channel varchar(10)[3]
    )I've also got an javabean which holds the use preferences object
    public class userPref{
    private String[] music;
    private String[] magazines;
    private String[] channel;
    private int userId;
    // a constructor which uses reflection
    public userPref(HttpServletRequest request){
    }know i would like to be able to insert some values in that
    table using java.sql library.
    i've got
    Connection con = broker.getConnection(); // the connection pool releases one connection
    PreparedStatement ps = con.prepareStatement;
    ps.setInt(1,user.getId());
    ...But for the rest of the fields, what should I use ?
    I saw that there was setArray method in the PreparedStatement that uses java.sql.Array Class
    Is it the method that I've got to use. If so, do I need to implement it ?
    Please help me,
    touco

    I have no idea if that is the method you have to use or whether it will do what you want, but you do not have to implement it. That is the responsibility of the JDBC driver writer, just like the other 100-odd methods of PreparedStatement.

  • Passing array of timestamps into oracle stored proc

    Hey there,
    I have an interesting problem. I need to pass an array of java.sql.Timestamp into a stored proc.
    I see that the PreparedStatement provides a setArray() method which takes as arguments an int, java.sql.Array
    Anybody know how I can use the java.sql.Array to my advantage here ? Basically, I don't see how I can create a java.sql.Array of Timestamps
    thanks in advance for all your help.
    Manish Mandelia

    The java.sql.Array implementation is provided by your jdbc driver.
    For exemple using Oracle you can obtain an sql.Array with something like this :
    Connection con=getConnection() // get a connection to the DB
    //first declare what type of array you will use in the DB
    // you probably want to replace CHAR(7) by Timestamp here
    PreparedStatement createArray=
    con.prepareStatement("CREATE OR REPLACE TYPE MYARRAY AS VARRAY(100) OF CHAR(7)");
    createArray.execute();          
    //then get an java instance of this Array
    oracle.sql.ArrayDescriptor arrayDescriptor = oracle.sql.ArrayDescriptor.createDescriptor("MYARRAY",con);
    // content is used to fill the Array
    String[] content= {"string0", "string1"};
    java.sql.Array sqlArray=new oracle.sql.ARRAY(arrayDescriptor, con, content);               
    // then call your stored procedure
    java.sql.CallableStatement callStmt=con.prepareCall("call MyStoredProcedure(?)");
    // passing the array as an argument
    callStmt.setArray(1,sqlArray);
    callStmt.execute();
    As you can see the code is quite database specific.
    hope that helps.

  • StringIndexOutOfBoundsException using ARRAY data type

    Hi all.
    JDK 1.5.0_03, Oracle 9.2.0.4, 9i thin drivers.
    I'm trying to use the ARRAY data type to submit a large amount of data to a stored procedure. Unfortunatley I'm getting an error when using the oracleCAllableStatement.setArray method. I've successfully set up my types in the database, and I can create my StructDescriptor and ArrayDescriptor objects but that's as far as I get.
    Here's my code:
    connection = ConnectionManager.getRawConnection(DatabaseProperties.CSA_DB);
    connection.setAutoCommit(false);
    ARRAY array = getDatabaseArray(timeSeriesList, date, connection);
    String result = new String();
    statement = (OracleCallableStatement)connection.prepareCall("{call DATA_LOAD.ARCHIVE_TIMESERIES(?, ?)");
    statement.setARRAY(1, array);
    statement.registerOutParameter(2, OracleTypes.VARCHAR, result);
    statement.execute();
    LOG.info(result);
    connection.commit();
    The line highlighted is where it fails. The exception is below. Unfortunatley its a Java exception rather than a Oracle one so not much help there.
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 40
         at java.lang.String.charAt(Unknown Source)
         at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:123)
         at oracle.jdbc.driver.OracleSql.parse(OracleSql.java:69)
         at oracle.jdbc.driver.OracleConnection.nativeSQL(OracleConnection.java:1181)
         at oracle.jdbc.driver.OracleStatement.expandSqlEscapes(OracleStatement.java:6412)
         at oracle.jdbc.driver.OracleStatement.parseSqlKind(OracleStatement.java:6401)
         at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:152)
         at oracle.jdbc.driver.OracleCallableStatement.<init>(OracleCallableStatement.java:77)
         at oracle.jdbc.driver.OracleCallableStatement.<init>(OracleCallableStatement.java:48)
         at oracle.jdbc.driver.OracleConnection.privatePrepareCall(OracleConnection.java:1134)
         at oracle.jdbc.driver.OracleConnection.prepareCall(OracleConnection.java:988)
         at com.db.csa.systems.csa.timeseries.DataArchivedTimeSeriesProvider.archiveTimeseriesForDate(DataArchivedTimeSeriesProvider.java:46)
         at com.db.csa.experiments.TimeseriesArchiver.main(TimeseriesArchiver.java:26)
    I'm now completely stuck as short of decompiling the class that's throwing the exception I have no idea what's going on.
    Anyone got any ideas?
    Thanks, Rob
    Message was edited by:
    user470390

    Hi,
    Shouldn't:
    statement = (OracleCallableStatement)connection.prepareCall("{call DATA_LOAD.ARCHIVE_TIMESERIES(?, ?)");be this:
    statement = (OracleCallableStatement)connection.prepareCall("{call DATA_LOAD.ARCHIVE_TIMESERIES(?, ?)}");i.e. have a closing brace?
    - Mark

  • Updating VARRAYs usin PrepareStatement

    I have the folling code:
    // Read array from recordset
    ARRAY x =
    ttProvider.rs.getARRAY( ttProvider.X );
    String b[] = (String[])x.getArray();
    My problem is that I want to use the OraclePrepereStatement.setARRAY(index, ARRAY) but I dont know how to manipulate the ARRAY type. There is no setArray method.
    Please respond asap.
    Claus Christensen, Autocom Aps
    null

    i went through a lot of that wiki article but it
    didnt tell me how i can make 1. im using a derby
    database
    http://db.apache.org/derby/docs/10.2/ref/rrefsqlj37836.html
    That a good life lesson as well. The Wiki article was the general background,
    but if you want specific information about product X, consider reading
    the documentation for product X.

  • Oracle, SELECT IN and PreparedStatement.setArray

    I want to execute the following query: SELECT * FROM SOMETABLE WHERE IDFIELD IN (?)
    The number of values in the IN list is variable. How can I do this with a prepared statement?
    I am aware of the different alternatives:
    1) Keep a cache of prepared statement for each sized list seen so far.
    2) Keep a cache of prepared statements for different sizes (1, 5, 10, 20) and fill in the left over parameter positions with the copies first value.
    They both have the disadvantage that there could be many prepared statements for each query that get used once, and never used again.
    I have tried this:
    stmt.execute ("CREATE OR REPLACE TYPE LONGINTLIST AS TABLE OF NUMBER(15)");
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor ("LONGINTLIST", conn);
    long idValues [] = {2, 3, 4};
    oracle.sql.ARRAY paramArray = new oracle.sql.ARRAY (desc, conn, idValues);
    PreparedStatement query = conn.prepareStatement ("SELECT * FROM MYTABLE WHERE ID_FIELD IN (?)");
    query.setArray (1, paramArray);
    But Oracle gives a data conversion error.
    I then tried this:
    PreparedStatement query = conn.prepareStatement ("SELECT * FROM MYTABLE WHERE ID_FIELD IN (SELECT * FROM TABLE (?))");
    This works and the rows are returned, but the Oracle optimizer does not like it very much, since it always does a full table scan even though there is a primary key index on ID_FIELD.
    Any ideas?
    I also tried this:
    OraclePreparedStatement oraQuery = (OraclePreparedStatement) query;
    oraQuery.setARRAY (1, paramArray);
    But same behavior.
    Roger Hernandez

    Please re-read the original message. As I mentioned,
    I am aware of the two commonly used alternatives.No actually the most used alternative is to build the SQL dynamically each time.
    I know how to get both of them to work, and have used
    both alternatives in the past. The downside to both
    these approaches is that you need to save multiple
    prepared statements for each query. What I am trying
    to find is a way of having only one saved prepared
    statement for a query having a variable number of IN
    clause parameters.You could probably use a stored procedure that takes an 'array' and then do the processing in the stored proc to handle each array element.
    However, your database might not support that stored procs or arrays. Or it might not cache it with arrays. And the overhead of creating the array structure or processing it in the proc might eat any savings that you might gain (even presuming there is any savings) by using a prepared statement in the first place. Of course given that you must be using an automated profiling tool and have a loaded test environment you should be able to easily determine if this method saves time or not.
    Other than that there are no other solutions.

  • PreparedStatement.setArray() ... again

    Hi Joe;
    I am aware that weblogic pool driver does not support Oracle Array's
    via .setArray. This is because Oracle Array's require
    ArrayDescriptor, and when I call this class with a Weblogic Pool
    Connection, a ClassCastException is thrown because the Connection
    object is not an OracleConnection.
    Is there anyway I can use PreparedStatement.setArray() without
    getting this ClassCastException? Are there any known workarounds that
    prevents me from having to use Oracle Specific classes?
    I am using WLS 6.1sp4 on Oracle 9i
    Thanks,
    [email protected]

    Paul Rowe wrote:
    Hi Joe;
    I am aware that weblogic pool driver does not support Oracle Array's
    via .setArray. This is because Oracle Array's require
    ArrayDescriptor, and when I call this class with a Weblogic Pool
    Connection, a ClassCastException is thrown because the Connection
    object is not an OracleConnection.
    Is there anyway I can use PreparedStatement.setArray() without
    getting this ClassCastException? Are there any known workarounds that
    prevents me from having to use Oracle Specific classes?
    I am using WLS 6.1sp4 on Oracle 9iHi. In 6.1sp5 we implement a method on pool connections, getVendorConnection(),
    which for those intractible cases where Oracle secretly requires a specific class
    (it's secret because the method signatues says it takes a java.sql.Connection),
    we provide a way to get a direct reference to the pooled oracle connection.
    This is dangerous, because it gives application code a backdoor to the pooled
    resource, and we can never again guarantee that future pool users are getting
    sole access to the connection. Therefore, by default we will close and replace
    any pooled connection after it is exposed in this way. Read the docs on this option,
    and I can give advice too on the safe things to do with an exposed connection,
    and later, how to retrieve the performance lost to the pool having to replace
    exposed connections....
    Joe
    >
    >
    Thanks,
    [email protected]

  • Java.sql.PreparedStatement.setArray( ) not found in J2SE v1.3.1?

    Why do I get the error method setArray(int, Array) not found in interface java.sql.PreparedStatement? As per on-line documentation the method is available since version 1.2.
    In JDeveloper help I have read that...
    "JDeveloper uses J2SE definitions to describe an installed J2SE environment. This environment can be either a JRE (Java Runtime Engine) or an SDK. Note that if you are using a JRE, some features may not be available. Every JDeveloper project uses a J2SE definition to determine what version of the Java API to compile and run with."
    Is my problem because my JDeveloper installation is using a JRE and not an SDK?

    Sounds like a SQL problem. Not an expert in DB2 bu you might want to try INSERT INTO SESSION (col1name, col2name) VALUES (?,?);
    Edited by: Kungen on Sep 19, 2007 6:46 AM

  • How to dump array created by 'getrows method' into spreadsheet??

    hi,
    I'm sorry but I'm not goot as English.
    I'm trying to dump oo4o dynasets into farpoint spreadsheet without looping.
    first, I created the array of variant type through the 'getrows' method of oo4o.
    the 'getrows' method copies records from a Dynaset into a two-dimensional array. The first subscript identifies the field and the second identifies the row number.
    Then I found the method 'setarray' of spreadsheet but this method dumps a array into spread
    beginning with the row number. In result the spreadsheet views the recordset that the rows
    and the columns are exchanged.
    Please, Advice about my trying.

    MESSAGE FROM THE FORUMS ADMINISTRATORS and COMMUNITY
    This thread will be deleted_ within 24 business hours. You have posted
    an off-topic question in an area clearly designated for discussions
    about the features and functionality of the forums site. Community
    members looking to help you with your question won't be able to find
    it in this category.
    Please use the "Search Forums" element on the left panel to locate
    a forum based on your topic. A more appropriate forum for this post
    could be:
    New to Java http://forum.java.sun.com/forum.jspa?forumID=54

  • 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.

Maybe you are looking for

  • Null value in Session vars and request.getParameter

    We're migrating our application from iPlanet.           Under iPlanet, when we looped through a resultset and set the values to           session variables - it worked fine, even when a resultset value was null,           but in WebLogic, I get the f

  • IOS 8 Exchange Email no longer Pushes

         Ever since I upgraded to iOS 8 on my iPhone 5 my exchange email has gone silent.  I no longer get emails pushed to my phone (whether on WiFi or LTE).  Instead, I have to open up the Mail application and it will then update with new emails. I hav

  • ?ipod no longer turns off by pressing and holding play/pause on click whee

    ipod had turned off before, but now cannot turn it off. It continues to stay on. I've tried to use hold switch to see if that helps, but ipod still won't turn off, and it uses up my battery. hold play/pause button doesn't seem to work?

  • Unable to export v-card from Address Book

    After installation of OS 10.6 Snow Leopard. Does anyone have any suggestions to resolve this issue? Thanks.

  • Using share function with Site Groups

    Hi, When we share a file with someone in SharePoint 2013, the user will receive an email generally. I have observed that when we put a sharepoint group rather than a single user in the sharing pane, the email doesn't go to everyone in the group. Can