Identity field in Oracle 11.2 with EF6

Hi,
I am in model first and I need to use Identity field to generate PK
This is my code
using (var ctx = new Model14Container())
var newElem = ctx.Entity12.Add(new Entity12());
ctx.SaveChanges();
var elem = ctx.Entity12.FirstOrDefault();
The Id is always 0. And I have a PK error the second time
I use Generate Oracle Via T4 (TPT).xaml (VS) and SSDLToOracle.tt (VS) in VS2013 with ODP 12c release3
The SQL code is generated without sequence
I tried with Devart and I had no problem
Thanks
Romain

I try the trial version of DevArt and this is the result
-- This is auto-generated SQL script.
-- This DDL was generated by 'Devart SSDLToOracle.tt' template.
-- SQL is generated on: 01/23/2015 16:17:07
-- Generated from EDMX file: c:\Model1.edmx
-- Dropping existing foreign keys
-- Dropping existing tables
DROP TABLE "Entity1"
DROP SEQUENCE "Entity1_SEQ"
-- Creating all tables
-- Table "Entity1"
CREATE TABLE "Entity1"  (
    "Id" NUMBER(10) NOT NULL,
    PRIMARY KEY ("Id")
CREATE SEQUENCE "Entity1_SEQ"
CREATE OR REPLACE TRIGGER "Entity1_INS_TRG"
    BEFORE INSERT ON "Entity1" FOR EACH ROW
BEGIN
    SELECT "Entity1_SEQ".NEXTVAL INTO :NEW."Id" FROM DUAL;
END;
And this is the SQL script generated by Oracle
-- Entity Designer DDL Script for Oracle database
-- Date Created: 1/23/2015 4:28:48 PM
-- Generated from EDMX file: C:\Model1.edmx
-- Dropping existing FOREIGN KEY constraints
-- Dropping existing tables
-- Creating all tables
-- Creating table 'Entity1'
CREATE TABLE "dbo"."Entity1" (
   "Id" NUMBER(10) NOT NULL
-- Creating all PRIMARY KEY constraints
-- Creating primary key on "Id"in table 'Entity1'
ALTER TABLE "dbo"."Entity1"
ADD CONSTRAINT "PK_Entity1"
   PRIMARY KEY ("Id" )
   ENABLE
   VALIDATE;
-- Creating all FOREIGN KEY constraints
-- Script has ended
For both tests, I use the standard EMDX Designer
You can see the diffrence: no "dbo", "/" instead of ";", SEQ created
With DevArt, we have a real working Oracle SQL script
All the code is in the .tt file
Can you have the same result ?
I am ready to test your fix
Regards
Romain

Similar Messages

  • Combing PDF forms with identical field names while retaining unique values.

    I have several PDF files of the same form that has been filled out by multiple users. I need to create a combined file of all the responses for reporting purposes. However, the forms (obviously) all have the same field names, and when I combine them the values of the first form autofill the values of the matched fields on the other forms. I need a way to combine the forms while retaining the unique field values. I thought I could write a js to rename the fields, but that isn't possible.
    *EDIT: The fields need to retain editability because some contain long, scrolling text. Flattening or read-only isn't an option, not that either fixes the above problem.
    Suggestions?

    UPDATE:
    I solved this problem, at least for my own needs. Following try67's advice in a related post, I had to delete the existing fields and create new ones with new names. Given my desired outcome, this meant collecting all of the field properties of the fields (with some variation by field type), storing it, erasing the existing fields, and using that stored information to create new, identical fields (again with some variation by field type). Since I didn't want to retain actions or javascript, this was a perfect solution. I also no longer needed the buttons to function (since I wasn't retaining their javascript), so I made them read-only. I'm listing my working code below, in case anyone else could benefit from some or all of it.
    My question to the community is this: Why doesn't Adobe allow for fields to be renamed via javascript? Is it a security issue? My life would have been a lot easier the last few days if I could simply rename existing fields.
    The following script is used in a Combine Files action via the Action Wizard. The PDF optimizer is also used to strip out or flatten additional items.
    //This script is used to rename all the fields in a document while also removing any javascript or actions associated with those fields. Makes buttons read only without renaming.
    //Function to create a random alphanumeric ID.
    function makeid(n) {
        var text = "";
        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        for( var i=1; i <=n; i++ )
            text += possible.charAt(Math.floor(Math.random() * possible.length));
        return text;
    //List variables for collecting arrays of field properties.
    var fieldNum = this.numFields;
    var fieldNameArray = new Array();
    var fieldTypeArray = new Array();
    var pageNumArray = new Array();
    var fieldRectArray = new Array();
    var fieldValueArray = new Array();
    var borderStyleArray = new Array();
    var borderColorArray = new Array();
    var borderThicknessArray = new Array();
    var fillColorArray = new Array();
    var textColorArray = new Array();
    var textFontArray = new Array();
    var textSizeArray = new Array();
    var textAlignmentArray = new Array();
    var textMultilineArray = new Array();
    var checkmarkStyleArray = new Array();
    var radiowidgetNumArray = new Array();
    var radiowidgetRectArray = new Array();
    var radiowidgetPageNumArray = new Array();
    //Get the properties of all the current fields, including widgets.
    for (var i = 0; i < fieldNum; i++) {
        var currentField = this.getNthFieldName(i);
        fieldNameArray[i] = makeid(5);
        fieldTypeArray[i] = this.getField(currentField).type;
        borderStyleArray[i] = this.getField(currentField).borderStyle;
        borderColorArray[i] = this.getField(currentField).strokeColor;
        borderThicknessArray[i] = this.getField(currentField).lineWidth;
        fillColorArray[i] = this.getField(currentField).fillColor;
        textColorArray[i] = this.getField(currentField).textColor;
        textFontArray[i] = this.getField(currentField).textFont;
        textSizeArray[i] = this.getField(currentField).textSize  
        if (this.getField(currentField).type == "text") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            textAlignmentArray[i] = this.getField(currentField).alignment;
            textMultilineArray[i] = this.getField(currentField).multiline;
        if (this.getField(currentField).type == "checkbox") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            checkmarkStyleArray[i] = this.getField(currentField).style;
        if (this.getField(currentField).type == "radiobutton") {
            checkmarkStyleArray[i] = this.getField(currentField).style;
            fieldValueArray[i] = this.getField(currentField).value;
            var n = 0;
            while (this.getField(currentField + "." + n) != null) {
                radiowidgetNumArray[n] = this.getField(currentField + "." + n).name;
                n++;
            for (x = 0; x < radiowidgetNumArray.length; x++) {
                radiowidgetRectArray[x] = this.getField(radiowidgetNumArray[x]).rect;
                radiowidgetPageNumArray[x] = this.getField(radiowidgetNumArray[x]).page;
    //Delete all the current fields, except for buttons, which become read-only.
    for (var i = (fieldNum - 1); i > -1; i--) {
        var currentField = this.getNthFieldName(i);
        if (this.getField(currentField).type != "button") {
            this.removeField(currentField);
        } else {
            this.getField(currentField).readonly = true;
    //Using the stored arrays of field properties, generate new, identical fields.
    for (var i = 0; i < fieldNum; i++) {
        if (fieldTypeArray[i] == "text") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]);
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.alignment = textAlignmentArray[i];
            newField.multiline = textMultilineArray[i];
            newField.doNotSpellCheck = true;
        if (fieldTypeArray[i] == "checkbox") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]); 
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.style = checkmarkStyleArray[i];
            newField.readonly = true;
        if (fieldTypeArray[i] == "radiobutton") {
            for (y = 0; y < radiowidgetNumArray.length; y++) {
                var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], radiowidgetPageNumArray[y], radiowidgetRectArray[y]);
                newField.value = fieldValueArray[i];
                newField.borderStyle = borderStyleArray[i];
                newField.strokeColor = borderColorArray[i];
                newField.lineWidth = borderThicknessArray[i];
                newField.fillColor = fillColorArray[i];
                newField.textColor = textColorArray[i];
                newField.textFont = textFontArray[i];
                newField.textSize = textSizeArray[i];
                newField.style = checkmarkStyleArray[i];
                newField.readonly = true;           
    //End script.

  • Issue related with CLOB field in Oracle and PI

    Dear Experts,
    We are trying to transfer material Long description from SAP to Oracle table.
    There is a field in Oracle table 'LNG_DESC' which is defined as CLOB.
    In PI mapping we have defined that fields as String type with Maxlength as 14000.
    There are few materials for which this limit is excedding and we are getting ORA:014
    String too Long' error in communication channel.
    Kindly suggest that how can we define a field in PI as CLOB or how to handle this
    situation.
    Thanks
    Sumit

    Hi Hank,
    The reason could be either improper set up and loading sequence followed, or transactions not locked while performing set up filling and initialization.
    There could be two approaches to rectify this.
    1. Redo the inventory data, as per how to document.
    2. Identify the transactions that are not captured, by running the reports and analysing the date on which transactions are not captured(this could be quite painful) and then fill set up of movements just for these documents and load to cube without discurbing the deltas.
    Do write back to me, if you have any questions.
    Naveen

  • Importing an SQL Server TEXT data type field in Oracle - problem with LONG

    Hello,
    I work in Oracle 9i and I created a view on a distant SQL Server database that contains a TEXT data type field. But I have a problem when I select that field in Oracle; I have the following error message: "ORA-00997: forbidden use of LONG data type".
    Could anybody have a solution for me, to solve that problem?
    Thanks a lot!

    It is very difficult to suggest anything without seeing your code.  I don't even know if what you are seeing is the actual value or an error code.  Often, negative numbers are indicative of error codes. 
    For instance -1 could mean that you have an invalid reference or path, etc...
    Can you post your code?

  • IDENTITY field problem

    Could anyone please suggest me the best way to retrieve value inserted
    in the identity field in case of concurrent connections for databases
    (RDBMS) like DB2, SQL Server or Oracle.<br> Particularly in case of
    DB2.<br> And if the suggestion is to use Stored Procedures and
    <b>'@@IDENTITY'</b> in case of SQL server then please suggest the
    method/statement to be used in case of DB2.<br> I m using Db2 with a
    JSP application and need to link multiple tables through IDENTITY field
    value generated in one table.

    Hi Guys,
    I found the Solution to get back the auto generated IDENTITY column value.
    Steps to follow.
    1. Get Database Connection
    2. Set AutoCommit to false (use setAutocommit(false) )
    3. Set the PreparedStement for Insert and fire the SQL.
    4. Close the PreparedStatement.
    5. Fire this SQL to get the auto generated ID.
    SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1
    6. This generated ID will always double. Get this ID to the attribute fo the bean.
    7. Now you can commit.
    Example.
    ResultSet rs = prepStmt.executeQuery("SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1");
    double id = 0.0;
    if (rs.next()) {
    System.out.println("rs.next() ");
    setGeneratedId(rs.getDouble(1));
    System.out.println(" getGeneratedId() : " + getGeneratedId());
    connection.commit();

  • How to encrypt the text in password field in Oracle Forms version 6i

    Need help!
    How to encrypt the text in password field in Oracle Forms version 6i?
    one way is to change the settings in the property palette. Can somebody provide me some script to be run while the form is running which will enable the password to be encrypted?
    Thanks!

    Hello,
    Do you mean "hidden" (replaced with stars) or encrypted (that needs to be decrypted ?
    Francois

  • How to increase the width of a field in oracle reports 6i

    Hello,
    I'm facing a problem related to width of field. I have a table with field abc varchar2(1500) and when I try to show it in report. I'm unable to see complete data because field size in report is 300.
    Kindly guide me to increase the size/width of field in oracle report 6i
    thanks in advance
    sadiq

    Post your question on Reports forum
    Reports

  • Auto Increment Not Working - SQL Identity field

    I am new to Visual Basic & SQL server but have some experience in Access & VBA. But this is a steep learning curve!
    I am banging my head against a wall with a problem..
    All of my tables in this database are in the dataset. The main one being tblItems with a PK 'ITEMID'
    I have 2 forms - the first one is used to lookup an item the second displays the item's full details.
    On the first form (lookup) I have a 'Add New' button which launches the second form with the code - frmProductDetail.VItemsBindingSource.AddNew()
    This opens the form with empty boxes as expected. I have a 'Save' button on the second form with the following code -
            Dim row As SASHItemsDataSet.tblItemsRow
            row = SASHItemsDataSet.tblItems.NewRow
            With row
                .ITEMCODE = txtItemCode.Text
                .ITEMDESCRIPTION = txtItemDescription.Text
                .CATEGORY = cmbItemCategory.SelectedValue
                .PURCHCOST = txtPurchCost.Text
                .SELLCOST = txtSellPrice.Text
                .UNIT = cmbUOM.SelectedValue
                .VATID = cmbVAT.SelectedValue
                .WHLOCATION = cmbWHLoc.SelectedValue
            End With
            SASHItemsDataSet.tblItems.Rows.Add()
            Try
                Me.Validate()
                Me.VItemsBindingSource.EndEdit()
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "UPDATE FAILED")
            End Try
    My problem is I get the error msg box with the following error 'Column 'ITEMID' does not allow nulls'
    This field is set as a auto incrementing identity field with all the correct settings shown in Visual Studio so it shouldn't be coming back as null.
    I have Googled for hours & tried all sorts with no luck..
    I have clearly gone wrong somewhere but I can't work out where... any help appreciated!
    James

    This is the code on frmProductLookup that opens the form...
            frmProductDetail.Show()
            frmProductDetail.VItemsBindingSource.AddNew()
    This is the code on frmProductDetail_Load...
            'TODO: This line of code loads data into the 'SASHItemsDataSet.tblVAT' table. You can move, or remove it, as needed.
            Me.TblVATTableAdapter.Fill(Me.SASHItemsDataSet.tblVAT)
            'TODO: This line of code loads data into the 'SASHItemsDataSet.tblWarehouseLocations' table. You can move, or remove it, as needed.
            Me.TblWarehouseLocationsTableAdapter.Fill(Me.SASHItemsDataSet.tblWarehouseLocations)
            'TODO: This line of code loads data into the 'SASHItemsDataSet.tblStockUnits' table. You can move, or remove it, as needed.
            Me.TblStockUnitsTableAdapter.Fill(Me.SASHItemsDataSet.tblStockUnits)
            'TODO: This line of code loads data into the 'SASHItemsDataSet.tblItemCategory' table. You can move, or remove it, as needed.
            Me.TblItemCategoryTableAdapter.Fill(Me.SASHItemsDataSet.tblItemCategory)
            'TODO: This line of code loads data into the 'SASHItemsDataSet.vItems' table. You can move, or remove it, as needed.
            'Me.VItemsTableAdapter.Fill(Me.SASHItemsDataSet.vItems)
            Me.VItemsTableAdapter.Fill(Me.SASHItemsDataSet.vItems)
            Me.VItemsBindingSource.Position = Me.VItemsBindingSource.Find("ITEMID", _passedText)
            Me.txtWKSName.Text = Environment.MachineName
            Me.txtSellPrice.Text = FormatCurrency(Me.txtSellPrice.Text)
            Me.txtPurchCost.Text = FormatCurrency(Me.txtPurchCost.Text)
            Me.txtPriceIVAT.Text = FormatCurrency(Me.txtSellPrice.Text + (Me.txtSellPrice.Text * 0.2))
    On the tblItemTableAdapter this is the Command Text for the Insert Command...
    INSERT INTO tblItems
                             (ITEMCODE, ITEMDESCRIPTION, UNIT, WHLOCATION, VATID, PREFSUPPLIER, CATEGORY, PURCHCOST, SELLCOST, INACTIVE)
    VALUES        (@ITEMCODE,@ITEMDESCRIPTION,@UNIT,@WHLOCATION,@VATID,@PREFSUPPLIER,@CATEGORY,@PURCHCOST,@SELLCOST,@INACTIVE)
    SQL Server Management Studio clearly shows the column as an Identity column. If I add a row through SSMS it does create an PK identity automatically. I have also dropped the ITEMID column & recreated through SSMS which has no effect.
    I am now considering creating a separate form just for adding an item but I have managed it in Access but am just struggling with VB!
    Thanks,
    James

  • Blank space updatation to Collection field in Oracle 10g

    Hi,
    we have the Oracle 9i database in the dev environment and Oracle 10g in Production environment.
    In Oracle 9i, the below scenario works find, but in Oracle 10g it won'nt, The scenerio is ,
    Update table1
    set test_collection = ' '; -- works fine in Oracle 9i , but it wont works in Oracle 10g,
    Update tabel1
    set test_collection = null; -- works in both the versions.
    Please suggest,.
    raja k

    What is myv, is that the collection name ?? See post number 5 of this thread where I declared it.
    >
    In Oracle 9i, we need not to specify the collection
    name while updating the collection type field in the
    table. 9.2.0.6 was notoriously buggy and wasn't considered stable till 9.2.0.7 if I recall correctly. And now (thankfully) it's unsupported.
    The sql code was written in concern to Oracle 9i, now
    while migrating to Oracle 10g, we are getting the
    problem with this. The problem is , i don'nt have the
    access to Production environment, which is migrated
    to Oracle 10g, we develop the code on Oracle 9i, and
    will release to deploy on Oracle 10g. Develop in 9i and deploy to 10g! Do you really think that's a good setup? How about upgrading your development environment to match production.
    update table1 set test_collection = null; - this
    works fine in Oracle 9i ,
    update table1 set test_collection = ''; - this works
    fine in Oracle 9i ,
    but in Oracle 10g ,
    update table1 set test_collection = null; - this
    works fine in Oracle 10g ,
    update table1 set test_collection = ''; - this won'nt
    works in Oracle 10g , Yes, I already understand what your issue is.
    as you suggested, do we need to specify the
    collection name while updating the collection type
    field. in Oracle 10g, In Oracle 9i , it won'nt
    required ?? Yes, this would be the correct way to do it.
    Karthick,
    because null is not same as ''
    SQL> select * from dual where ''=null
    2 /
    no rows selectedErrrm, yes it is actually...
    SQL> select 1 from dual where '' is null;
    1
    1
    SQL>
    ... if you use the correct condition for checking nulls.

  • Upload an .doc attachment into a blob field in Oracle

    sir i have to upload a .doc file into a blob field in the oracle database.
    help with any code, or code links
    The code i am having,pls suggest if any changes...
    String QUERY_ENHANCEMENT = "INSERT INTO EKMIS_ENHANCEMENT(USER_ID,ENH_TYPE,MODULE,DESCRIPTION,ATTACHMENT)";
         QUERY_ENHANCEMENT = QUERY_ENHANCEMENT+"VALUES(?,?,?,?,?)";
              PreparedStatement preparedStatement = connection.prepareStatement(QUERY_ENHANCEMENT);
         preparedStatement.setString(1, enhancementTO.getUserid());
         preparedStatement.setString(2, enhancementTO.getType());
         preparedStatement.setString(3, enhancementTO.getModule());
         preparedStatement.setString(4, enhancementTO.getDescription());
         try
              File anyFile = new File(enhancementTO.getPath());
              InputStream is = new FileInputStream(anyFile);
              preparedStatement.setBinaryStream( 5, is, (int)(anyFile.length()));
         catch(FileNotFoundException fnfe)
              System.out.println("Exception while archiving to BLOB/CLOB");
              fnfe.printStackTrace();
         return preparedStatement;

    the html form is like this..
    <table width="780" cellpadding="2" cellspacing="0" border="0">
                   <tr>
                        <td colspan="6" class="SectionHeader">USER COMMENTS/SUGGESTIONS/COMPLAINTS</td>
                   </tr>
                   <tr>
                                       <td height="18" class="boldLabel_RA">
                                            User Id
                                       </td>
                                       <td height="18" class="value_LA">
                                            <input name="userId" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserID}"/>
                                       </td>
                                       <td height="18" class="boldLabel_RA">
                                            User Name
                                       </td>
                                       <td height="18" class="value_LA">
                                            <input name="userName" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserName}"/>
                                       </td>
                                       <td height="18" class="boldLabel_RA">
                                            Select Type
                                       </td>
                                       <td height="18" class="value_LA">
                                            <select class="big" name="type">
                                                 <option value="0"/>
                                                 <option value="E">Enhancement</option>
                                                 <option value="S">Suggestion</option>
                                                 <option value="B">Bug</option>
                                            </select>
                                       </td>
                                  </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Select Module</td>
                        <td colspan="5" height="18" class="value_LA">
                             <select name="mod" class="extralong">
                             <option value="0"/>
                                  <xsl:call-template name="getModules" >
                                       <xsl:with-param name="modules" select="requestParameters/param[@name='sat']" />
                                  </xsl:call-template>
                             </select>
                        </td>
                   </tr>
                   <tr>
                        <td colspan="6" class="SectionHeader"/>
                   </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Description</td>
                        <td colspan="5" height="18" class="value_LA">
                             <textarea name="description" class="big"/>
                        </td>
                   </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Add Attachment</td>
                        <td colspan="5" height="18" class="value_LA">
                             <input name="path" type="file" class="big"/>
                        </td>
                   </tr>
              </table>

  • Using Identity Field in Entity Bean

    hi.....
    i am using Orion 2.0 with SQL Server 2000(professional) on Windows 2k...
    i got database with 10 tables...
    each table got an identity field where i am getting new value by database whenever i enter some data....
    now i don't have any access with the indentity field as it is totally managed by Database.....
    whenever i tried to set in ejb-jar.xml the column name,...while intestion ..it is giving me insert error as i don't have any access to that field( indentity field)
    and if i don't mention primary key...as that field....there is error for deployment...saying that no primary key defined........or primary key is nullll.....
    and i need to use that indentity field....else i need to manage all the other insertion in BMP which i don't want to do...
    Pls help me asap
    THanks
    Aniruddha Navare
    [email protected]

    EJB doesn't support identity field. EJB expects you set primary key values explicitly. There is a well known pattern that makes use of a session bean to generate entity bean primary key. Your best option is to use BMP or give up auto increment identity fields.

  • Hierarchical Field in Oracle Forms

    Hi Experts
    Can any one please give me a sample code to write a hierarchical field in Oracle Forms. I want to display
    Category->Organization->Item->Quantity
    Thanks in Advance.
    Ahmed

    okay,
    place your treeitem in the layout. The treeitem has to the only item in the block and property "Single record" has to be true.
    To populate your tree with data you can either
    - use a query to populate a treeitem have a look at this thread Tree Menu
    - use the Ftree.Add_Tree_Node built-in and program your own logic.

  • Error when reading BLOB field from Oracle usin Toplink

    We experience a very annoying problem when trying to read a BLOB
    field from Oracle 8.1.6.2.0 using TOPLink 3.6.3. I have attached the
    exception stack trace that is reported to the console. As far as I can
    judge a fault at oracle.sql.LobPlsqlUtil.plsql_length() happens first and
    then at TOPLink.Private.DatabaseAccess.DatabasePlatform.convertObject().
    The exception is permanently repeating that is very critical for us.
    ServerSession(929808)--Connection(5625701)--SELECT LOBBODY, ID, LABEL, FK_OBJECT_ID, FK_OBJECTTYPE FROM NOTE WHERE (ID = 80020)
    INTERNAL EXCEPTION STACK:
    java.lang.NullPointerException
    at oracle.sql.LobPlsqlUtil.plsql_length(LobPlsqlUtil.java:936)
    at oracle.sql.LobPlsqlUtil.plsql_length(LobPlsqlUtil.java:102)
    at oracle.jdbc.dbaccess.DBAccess.lobLength(DBAccess.java:709)
    at oracle.sql.LobDBAccessImpl.length(LobDBAccessImpl.java:58)
    at oracle.sql.BLOB.length(BLOB.java:71)
    at TOPLink.Private.Helper.ConversionManager.convertObjectToByteArray(ConversionManager.java:309)
    at TOPLink.Private.Helper.ConversionManager.convertObject(ConversionManager.java:166)
    at TOPLink.Private.DatabaseAccess.DatabasePlatform.convertObject(DatabasePlatform.java:594)
    at TOPLink.Public.Mappings.SerializedObjectMapping.getAttributeValue(SerializedObjectMapping.java:43)
    at TOPLink.Public.Mappings.DirectToFieldMapping.valueFromRow(DirectToFieldMapping.java:490)
    at TOPLink.Public.Mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:808)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:173)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:325)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:373)
    at TOPLink.Public.QueryFramework.ReadAllQuery.execute(ReadAllQuery.java:366)
    at TOPLink.Public.QueryFramework.DatabaseQuery.execute(DatabaseQuery.java:406)
    I have started the application with Oracle JDBC logging on and found that the problem may originate in a possible lack of syncronization in the pooled connection implementation:
    DRVR FUNC OracleConnection.isClosed() returned false
    DRVR OPER OracleConnection.close()
    DRVR FUNC OracleConnection.prepareCall(sql)
    DRVR DBG1 SQL: "begin ? := dbms_lob.getLength (?); end;"
    DRVR FUNC DBError.throwSqlException(errNum=73, obj=null)
    DRVR FUNC DBError.findMessage(errNum=73, obj=null)
    DRVR FUNC DBError.throwSqlException(reason="Logical handle no longer valid",
    SQLState=null, vendorCode=17073)
    DRVR OPER OracleConnection.close()
    so the prepareCall() is issued against an already closed connection and the
    call fails.
    I assume we have been using a JDBC 2.0 compliant driver. We tried out
    drivers that Oracle supplies for 8.1.6, 8.1.7 versions. To be true I
    couldn't find any information about the JDBC specification they conform to. Does it
    mean that these drivers may not be 100%-compatible with JDBC 2.0 Spec?
    How can I find out if they are 2.0 compliant?
    Also I have downloaded Oracle 9.2.0.1 JDBC drivers. This seemed to work
    fine until we found another incompatibility which made us return back to
    8.1.7 driver:
    UnitOfWork(7818028)--Connection(4434104)--INSERT INTO STATUSHISTORY (CHANGEDATE, FK_SET_STATUS_ID) VALUES ({ts '2002-10-17 16:46:54.529'}, 2)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.jav
    a:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java
    :1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatemen
    t.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepare
    dStatement.java:589)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeDirectNoSelect(
    DatabaseAccessor.java:906)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeNoSelect(Databa
    seAccessor.java:960)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeCall(DatabaseAc
    cessor.java:819)
    at TOPLink.Public.PublicInterface.UnitOfWork.executeCall(UnitOfWork.java:

    Hello Yury,
    I believe the problem is that TopLink's ServerSession by default executes read queries concurrently on the same connection. It does this to reduce the number of required connections for the read connection pool. Normally this is a good concurrency optimization, however some JDBC drivers have issues when this is done. I had thought that with Oracle JDBC 8.1.7 this issue no longer occurred, but perhaps it is only after version 9. I believe that the errors were only with the thin JDBC driver, not the OCI, so using the OCI driver should also resolve the problem. Using RAW instead of BLOB would also work.
    You can configure TopLink to resolve this problem through using exclusive read connection pooling.
    Example:
    serverSession.useExclusiveReadConnectionPool(int minNumerOfConnections, int maxNumerOfConnections);
    This will ensure that TopLink does not to try to concurrently execute read queries on the same connection.
    I'm not exactly sure what your second problem with the 9.x JDBC drivers is. From the SQL and stack trace it would seem that the driver does not like the JDBC timestamp syntax. You can have TopLink print timestamp in Oracle's native SQL format to resolve this problem.
    Example:
    serverSessoin.getLogin().useNativeSQL();
    Make sure you configure your server session before you login, or if using the TopLink Session Manager perform the customizations through a SessionEventListener-preLogin event.

  • Does Oracle OLAP comes with Oracle Database 10g ?

    1.Does Oracle OLAP comes with Oracle Database 10g or do we need seperate software to have this ?.
    2.If I create a Cube with Analytic work space manager the cube is going to be stored in the Database ( meaning the in the table space where OLAP is Stored).
    3. What is the difference between Analtyic work space manager and discoverer For Olap.
    Help is higly appreciated ..
    Thanks, Prasad

    One thing to point out : The OLAP option is a costed database option, so while this is automatically installed and part of your database you do have to purchase additional licenses to use this feature. You will need to check with your Oracle account manager to see if you are actually licensed to use this feature.
    If you have existing 9i OLAP cubes these can be quickly and easily migrated to 10g OLAP and the documentation explains how to do this. However, there are many new features that are part of 10g OLAP that will improve the performance of your data model that will not be enabled as part of a migration process. Based on my experiences it would be quicker and easier (depending on the size of your existing 9i OLAP cubes) to consider rebuilding your data model using these new 10g features. You should be able to export all the dimensions to XML templates from 9i OLAP and import the templates into the 10g schema and reload your dimensions.
    For the cubes you will probably want to consider using partitioning, composites and compression to provide maximum flexibility and performance for your new data model. There is more information on these features within the OLAP documentation and in the many whitepapers and presentations on the OLAP home page on OTN.
    For moving data from SQL Server to 10g OLAP much depends on the nature of the data transfer. If it is a one-off bulk data load then you could consider using the normal MS command line tools to dump the data out and transfer it to Oracle. Alternatively, you could consider using Oracle Data Integrator to manage the extraction of the SQL Server data and the data load process into Oracle 10g relational tables. If you decide to use Data Integrator this will require additional licenses.
    If you can extract the data from SQL Server to flat files you can use Oracle Warehouse Builder (basic ETL is free as part of the 10g database license) to load that flat file data via external tables. Warehouse Builder can also be used to define your OLAP data model (think of Warehouse Builder as a more powerful version of Analytic Workspace Manager) and provides tools to load the data directly into your OLAP dimensions and cubes. You can get more information on managing OLAP data models with Warehouse Builder the Warehouse Builder home page on OTN.
    There are no facilities to modify Discoverer Viewer to add customisations. You can add company logos, modify certain colors and/or hide certain features but it is not possible to add additional features. You may want to consider using BI Beans to provide this type of environment. BI Beans is the development framework used to create Discoverer Viewer. You can create customised JSP pages that look identical to Discoverer Viewer pages with the added benefit of providing your own specific features. You can get more information on the BI Beans home page on OTN.
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • ISE - EAP-FAST PAC Provisioning - Identity field??

    Hi all, very simple question regarding the fields in the PAC provisioning section of ISE. Basically wondering what the "identity" field under machine and tunnel PAC is meant to be? I am currently planning an EAP-FAST deployment and this is the only area I am wondering about. Essentially planning to auto-provision the PAC hopefully using authenticate in-band. The Cisco doco is a little vague on this particular field.
    Thanks in advance - have googled this for a day or so and frankly cannot find the information that I want.

    Use
    PAC
    •Tunnel PAC Time To Live—The Time to Live (TTL) value restricts the lifetime of the PAC. Specify the lifetime value and units. The default is 90 days. The range is between 1 and 1825 days.
    •Proactive PAC Update When: of PAC TTL is Left—The Update value ensures that the client has a valid PAC. Cisco ISE initiates an update after the first successful authentication but before the expiration time that is set by the TTL. The update value is a percentage of the remaining time in the TTL. The default is 90%.
    •Allow Anonymous In-band PAC Provisioning—Check this check box for Cisco ISE to establish a secure anonymous TLS handshake with the client and provision it with a PAC by using phase zero of EAP-FAST with EAP-MSCHAPv2. To enable anonymous PAC provisioning, you must choose both of the inner methods, EAP-MSCHAPv2 and EAP-GTC.
    •Allow Authenticated In-band PAC Provisioning—Cisco ISE uses SSL server-side authentication to provision the client with a PAC during phase zero of EAP-FAST. This option is more secure than anonymous provisioning but requires that a server certificate and a trusted root CA be installed on Cisco ISE.
    When you check this option, you can configure Cisco ISE to return an Access-Accept message to the client after successful authenticated PAC provisioning.
    –Server Returns Access Accept After Authenticated Provisioning—Check this check box if you want Cisco ISE to return an access-accept package after authenticated PAC provisioning.
    •Allow Machine Authentication—Check this check box for Cisco ISE to provision an end-user client with a machine PAC and perform machine authentication (for end-user clients who do not have the machine credentials). The machine PAC can be provisioned to the client by request (in-band) or by the administrator (out-of-band). When Cisco ISE receives a valid machine PAC from the end-user client, the machine identity details are extracted from the PAC and verified in the Cisco ISE external identity source. Cisco ISE only supports Active Directory as an external identity source for machine authentication. After these details are correctly verified, no further authentication is performed.
    When you check this option, you can enter a value for the amount of time that a machine PAC is acceptable for use. When Cisco ISE receives an expired machine PAC, it automatically reprovisions the end-user client with a new machine PAC (without waiting for a new machine PAC request from the end-user client).
    •Enable Stateless Session Resume—Check this check box for Cisco ISE to provision authorization PACs for EAP-FAST clients and always perform phase two of EAP-FAST (default = enabled).
    Uncheck this check box in the following cases:
    –If you do not want Cisco ISE to provision authorization PACs for EAP-FAST clients
    –To always perform phase two of EAP-FAST
    When you check this option, you can enter the authorization period of the user authorization PAC. After this period, the PAC expires. When Cisco ISE receives an expired authorization PAC, it performs phase two EAP-FAST authentication.
    •Preferred EAP Protocol—Check this check box to choose your preferred EAP protocols from any of the following options: EAP-FAST, PEAP, LEAP, EAP-TLS, and EAP-MD5. By default, LEAP is the preferred protocol to use if you do not enable this field.

Maybe you are looking for

  • Intel kms resolution problem in tty [solved]

    Hello guys, I had always added vga=773 to kernel line to have a acceptable resolution on startup and in tty. This was a relict of my time without KMS. For testing purposes I deleted it and tried without it but the system fills then just only about on

  • Multiple planned orders for a requirement

    Hi,        We have PPDS MRP with NEW shelflife w/ lot size profle run for product and produces multiple planned orders for the the requirements. I have a requirement of 4,750 and 14,976 in the system and available stock 86,966. The system creates two

  • Cant find 10.2.0.3 patchset for oracle client

    Hi folks, i have an installation manual for some program called business flex, it says that after installing 10.2.0.1 client for windows (2003 server); i have to upgrade to 10.2.0.3 but i cant find the patchset.. client 10.2.0.3 seems to be available

  • Isn't there an easier way for iPhoto to show (Photoshop) edited RAW photos?

    Hi fellow Apple community members, below is a (very) detailed description of my problem> Once I'm done shooting with my Canon DSLR i auto-import my pics into iPhoto '11. My pics are shot in RAW format. I have Photoshop CS6 set as my default image edi

  • How to close all active connections in Times ten database

    Hi, I am new to Times Ten database. Uisng ttsatus utility I am able to find our the active conenctions but not sure how to close this. I m using windows as OS Request your help in this regards Regards, Harmeet