Oracle Sequence Vs autoincrement feature in cold fusion-Weird error!!!

When a oracle sequence is used with cold fusion there is a problem with sequence generation. It generates sequence
like "5,4,6,5...."etc. It works fine when using the autoincrement feature. Our application demands using the sequence from oracle.
Have you come across any problem as this? Can anyone tell me if there is any disadvantage using oracle sequence with cold fusion.
Please let me know the disadvantages of the same if any...
Thanks!
Janani.

This was definitely the right answer, I thought ODAC was already installed on the server, but apparently not. I installed the 64-bit OCAC XCopy version on the server and now it works.

Similar Messages

  • How not to use Cold Fusion and Java

    Overview
    This write up is intended to give java developers that are
    developing ColdFusion applications some beneficial information:
    things that are not documented.
    Scenario
    The company builds enterprise class web application software
    for fortune 500 companies. It had purchased a CF 7 based product,
    had and existing proprietary J2EE based product, and needed to
    integrate the two while meeting a host of new requirements. These
    requirements were based on delivering a better user experience,
    faster / cheaper integration, increased flexibility /
    configuration, useablily, decreasing maintenance costs, the ability
    to deploy in either install or ASP models. An initiative was
    started to create a new framework that integrated the best of each
    technologies. Tactically, this meant that we were to build a hybrid
    CF and java application: one that used building blocks (decoupled /
    cohesive components) that would allow applications to be rapidly
    assembled, configured and deployed. This made sense on several
    levels, the team was composed of Java and CF developers, the CF
    rapid application development was very productive, there is great
    functionality delivered in the CF platform and initial performance
    tests showed no cause for alarm
    The agreed upon design, based on requirements, and analysis
    by both the CF and Java staff has us using CF in the presentation
    layer, using a CF based MVC, use of CF based web services. The MVC
    was deployed using CFC inheritance for model objects and views made
    use of CF custom tags. The internals of the application, used a
    rules engine, some proprietary java, ORM, and other J2EE
    technology. The initial performance of the system was reasonable.
    We pushed on with product implementation.
    Then it was time to load test the application, and tune it.
    Under load the response times were orders of magnitude slower,
    sometimes the pages even timed out.
    Armed with our profiler, oracle execution plans and we
    charged ahead addressing issue after issue. Note that we took
    meticulous care in tweaking the active thread pool and ensuring
    that our CF setup was tuned for our application. None of the
    observations here are a condemnation of the language; rather they
    are aspects that, when considered together, not conducive for
    building integrated java and CF frameworks that use a structured /
    OO programming practices. Further detail can be provided on
    request.
    CFC inheritance should be avoided - resolution of variable
    scope is expensive even if properly declared.
    Since CF creates a class per method under the covers call
    stacks become very large, especially if used in a loop. This is
    nominally exacerbated by CF calls necessary to set up for the
    method call (String.toUpper()).
    Nesting of loops and if statements should be kept to a
    minimum - the conditional for each lookup of logical operator like
    LT, GT are synchronized. Under load this results in thread waits.
    Jrun has as single thread pool - both http and web service
    requests use the same pool. Under load this leads to thread
    deadlock. There are work arounds, but they are painful.
    Recursion should be avoided - we had a few recursive routines
    and these had to be rewritten.
    Custom Tags - should be used sparingly - each custom tag
    makes a synchronized call to the license server - (This may be
    fixed in CF 8)
    Summary
    In the end we got the performance to reasonable numbers, but
    we ended up moving some code to java (Custom Tags) and getting rid
    of 'good programming' practices (Inheritance, loops, etc), mandated
    proper variable scoping for those things left over. We prototyped a
    sans cold fusion implementation and had an order of magnitude
    improvement in performance and number of requests served per
    second.
    The lesson? Use Coldfusion in its sweet spot: make a query,
    iterate over the results and format for display. Extensive use of
    structure programming techniques or OO CFCs should be avoided: they
    will work but under load - but are better as a prototype. Building
    frameworks in CF? Think twice, no three times, and, if you must, be
    minimalist.
    Text

    interesting aslbert123,
    Not that I doubt you, but could you answer some questions
    about your implementation that was so slow:
    1.) Did you put your CFCs in the application or server scope?
    2.) Were you initializing your CFCs, via CreateObject or
    <cfinvoke>, on every request?
    3.) Are you sure that you were properly Var'ing every
    variable in your methods? (people typically forget about query
    names and loop iterator variables)
    4.) Could you give examples of how your inheritence was set
    up?
    5.) For CustomTags, did you call them the old <cf_tag>
    way or the newer, better-performing <cfimport> way?
    6.) How did you connect CF to Java exactly?
    Thanks,
    Aaron

  • Digital Signature - Cold Fusion

    we are in the process of implementing Digital Signature
    process with PKI technology complaint. Reports is geneated as a PDF
    format using cold fusion tools. Is there is any feature to
    implement digital signature process in Cold Fusion. since Cold
    Fusion is a Adobe Product ? How Can I take advantage of that ? Any
    suggestion/help is really appreciated.

    I am really interested about this topic. I am in the same
    condition of CF100. I have to build an application where the user
    have to sign a form with his digital signature. I hope that someone
    from Adobe can help us about this issue

  • Cannot browse server following installation of hotfix 4 to Cold Fusion 9.0.1

    Hi
    I've been tasked with updating a ColdFusion 9.0.1 installation to the latest patches.  I've started with Hotfix 4.  The installation appeared to go OK, and the services started after I applied the update.  However, when I went to moved onto the next update (APSB13-10) starting by browsing to the update file I ran into a problem.  When I click on the "browse server" button to locate the .jar file for the next update I encounter an error:  "Unable to authenticate on RDS server using current security information".  I've also found that if I try to put the full path into the Update File line and hit "Submit Changes" it errors.
    This seems to be the same problem as http://forums.adobe.com/message/5256752#5256752, but there's no solution to the problem in that discussion.
    I've checked the RDS settings, and RDS is unchecked.  I notice that this screen is different from the pre-upgrade screen, but this seems to be as a result of, I think, APSB13-03, which is included in HotFix 4.  If I try to make any changes on this screen it errors and logs me out of the Cold Fusion administrator.  I've tried commenting out the RDS section in the web.xml file, but this gives me a different error.
    I'm doing this on an isolated test server which has no access to the network.  If I revert to the snapshot I took before the upgrade attempt ColdFusion runs as expected.
    Any ideas what might be the problem?  Thanks in advance.

    In case it helps anyone I've realised what I was doing wrong here.
    The main “problem” was that one of the updates included in Cumulative Hotfix 4 is APSB13-03 (http://helpx.adobe.com/coldfusion/kb/coldfusion-security-hotfix-apsb13-03.html).  I knew this changed the behaviour of RDS but my knowledge prior to this work of ColdFusion and in particular RDS was very limited, and so I didn't understand the implications of this hotfix.  What this update does is disable RDS by default; I wasn't really aware what the RDS status of my server was prior to the update, partly because before this update there is no "disable RDS" tick box to show whether it is enabled or disabled.  With RDS disabled, you can't browse as the update instructions require you to do.  Obviously RDS was enabled on my setup without me realising it.
    My understanding of this wasn't helped by the fact that when I tried to paste a path into the box and hit the "update" button I got a different error, which I described in my original post.  Similarly if I tried to change RDS settings, or do pretty much anything in the administrator, it failed and logged me out in the same way.  It seemed to me that the whole thing was broken by the updates and I didn't know how to fix it.
    So, following the excellent advice of Charlie Arehart in two articles: http://www.carehart.org/blog/client/index.cfm/2010/12/12/cfmyths_cumulative_hotfixes and http://www.carehart.org/blog/client/index.cfm/2011/10/21/why_chfs_may_break, I went back to the start and installed the cumulative hotfixes one by one.  Although I don't think I actually needed to do this, as Hotfix 4 seems to contain all the previous hotfixes, it did help me realise that the browsing/RDS issue and the error and logout when I tried to do anything in the administrator were two different problems. After further bit of googling I found people suggesting that you should use https to access the administrator, but the shortcut I had was taking me to http (as far as I know I was using the default shortcut).  I found that by going to https the problem of being logged out when trying to do anything disappeared and I could put a UNC path in to update the .jar file for the next update.  I also was now able to enable RDS for single password and could browse like the hotfix instructions advise.  I've since disabled RDS and accepted the inability to browse as a "feature", happy that it's more secure as a result.
    So my “problems” were largely self-inflicted due to my own ignorance of the product, but it wasn’t helped by Adobe’s apparent inability to grasp that there may be similarly ignorant people attempting these updates.  It would have been nice to see some guidance from them.  Furthermore, the cumulative hotfix 4 page (http://helpx.adobe.com/coldfusion/kb/cumulative-hotfix-4-coldfusion-901.html) doesn’t even mention RDS, let alone that the default behaviour changes.  It’s only when you check the individual hotfix information that you can see the information that helped me to realise where I was going wrong.
    As for using https not http; great, but if I’m right that my shortcut is the default out-of-the-box shortcut, where’s the information to advise to change to using https as a result of one of the hotfixes included in hotfix 4 (originally, I think, hotfix 2)?  It’s certainly not mentioned on the page for cumulative hotfix 4. 

  • How to register Rest web services in Cold Fusion 9 administration console?

    I am building a Rest web service using Cold Fusion 9 and Cold Fusion Builder 3 and now I want to register it on Cold Fusion 9 admin console, but I didn't see any option there as in CF 10 and CF 11 Data Services ---> Rest Web service. So, please tell me how to register my Rest web service in CF 9 either through admin console or through code?

    Simple answer: you can't.  REST services were a new feature released with CF10.  Alternatively, you can use a community-supported framework to provide REST services, such as:
    Taffy (a dedicated REST framework)
    FW/1 (an MVC framework with REST capabilities)
    ColdBox (an MVC framework with REST capabilities)
    -Carl V.

  • JDBC/Cold Fusion to 8.1.6 DB

    I'm using the 8.1.7 JDBC client on a Win2K Cold Fusion Server. The client connects to the database, but frequently hangs in the midst of a simple query. When I look at the task manager in Windows, the jrun process has maxed out at 99% with very little RAM being used. I'm trying to figure if this is a JDBC problem or a java runtime bug.
    anyone have suggestions?

    Update: I am running the rmjvm.run( true ) procedure to remove the jvm install. This is hanging as well. It creates the 'MONSTER' rollback segment, via the initjvmaux.rollbacksetup call, but then hangs (it appears) after that...I'll let it run a bit longer but this getting very frustrating is to say the least (of course, I have said more @()$*&@$(*#&!!!).
    If I do a fresh install on the same machine, same parameters, and everything works then Oracle needs to work on their conversion utilities...and I thought their problems were just limited to their GUI tools...oh well. Oh yeah, perhaps a class action lawsuit against big O for loss of productivity because their conversion utility didn't work as documented. Don't get me wrong, best DB on the market, unfortunely, that's where their success ends in my opinion.

  • Spry With Cold Fusion + Tutorials

    Hi,
    I want to try Spry with cold fusion . Can anyone help me on
    getting some tutorials?

    >
    http://www.adobe.com/devnet/dreamweaver/articles/edit_data_in_ajax.html
    A more advanced demo application, without tutorial, but with
    more advanced
    features, is now available here:
    http://www.massimocorner.com/spry/dynamic_spry.zip
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion and Dreamweaver developers:
    http://www.massimocorner.com

  • Multiple Cold Fusion Instances

    Can you run multiple instances of cold fusion using cold fusion standard?

    Hi
    Welcome to Adobe ColdFusion forums . Multiple instance is a feature of Adobe ColdFusion Enterprise. So you will not be able to achieve the same in Standard Edition.
    http://www.adobe.com/products/coldfusion-family/buying-guide.html
    For development purpose, install CF 10 as trial which will act as Enterprise Edition for 30 days. After 30 days, CF 10 will become Developer edition and you can continue your development.
    HTH
    Thanks
    VJ

  • Mixing sun-database-binding with Oracle sequences

    Hello,
    I wish to insert rows inside the database, for instance rows representing persons, and rows representing their addresses. Primary keys for both person and address are Oracle sequence based.
    My question is, if I insert a person, then one of her address, how can I retrieve the person ID for the address row to reference it.
    The insert statement for the person is (for the moment) as follow
    insert into Person (PERSON_ID, FIRST_NAME, LAST_NAME) values (PERSON_SEQ.nextval, ?, ?)The problem with this approach is that I never know the person ID, and am unable to make any references to it in the address row.
    I tried to add an operation in the NetBeans generated person table WSDL. This operation would execute this statement:
    select PERSON_SEQ.nextval from dualBut, for the moment, it's a failure.
    Could you provide me with some hints?

    Hi,
    First I would advise you to register and post on the [email protected] alias - you can find the details of how to do this on the OpenESB site..... you'll reach a larger audience this way.
    Second, you need a Stored Procedure in Oracle to do this, then use this from the DB BC, here's one I created which does something similar, i.e. returns a value I'm interested in after an "Update" statement....
    CREATE OR REPLACE PROCEDURE "NEXTAPPNUMFINDER" (nextAppNum OUT NUMBER)
    IS
    BEGIN
    UPDATE ACTIVE_APPLICATION_NUMBER
    SET APPLICATION_NUMBER_NEXT = APPLICATION_NUMBER_NEXT + 1
    RETURNING APPLICATION_NUMBER_NEXT
    INTO nextAppNum;
    END;
    Hope this helps
    Mark

  • Need to dial a phone number from Cold Fusion

    My boss asked me if there was any way that a phone number
    could be dialed from Cold Fusion. We have a website where at some
    point we want to just click a button and dial that phone number. My
    guess is that the conversation will then be carried through the
    computer's microphone and speakers and using the computer's modem.
    Let me know if there is a way, or what would be the easiest
    way to accomplish this, even if it has to be using VOIP, since
    that's an option for this project.
    Thanks!

    Is this an internal site or an public-facing site? If you are
    talking about using this tool in your intranet and you have a
    modern phone system in place, there may be an API to interfacing
    with your phone system. We use a TAPI interface to create a phone
    dialer so our callcenter agents can dial a phone number on their
    phone just by clicking on a link. I'm pretty sure there are a bunch
    of freeware/shareware TAPI COM objects you can use floating around
    the interwebs (If your phone system supports TAPI).
    If you are talking about a public-facing website, then I'm
    afraid I can't offer much advice other than to check out the Java
    Communications lead that Ted gave you.

  • How do you determine what version of PHP is on the cold fusion server

    I am trying to find out what version of PHP is on my cold
    fusion server, how do I do this? Does coldfusion come with
    PHP?

    In the C:\Windows folder, locate the file called php.ini and
    open it in Notepad.
    <?php phpinfo() ?>
    I answered it myself. Maybe it can help someone else.

  • New free Runtime license for Oracle xe, and more features

    This comment is related to the other post, but is different.
    Why oracle don't have a free runtime license like Ms Access.
    Maybe having more restrictions, allowing several instance at a time.
    Having more features to make easier to install for small programs.
    Thinking to write an small application I ask my self why an Oracle dba, can't use Oracle as the end database, and I have to use Ms Access.
    Maybe the size of the database could be reduced, and not include apex, I think could even block database procedures, but to enable an option, please.
    I ask to Oracle, to please think a solution to replace msaccess runtime, etc., making easier the install, desintall, etc. for very very very small databases.
    Thanks.

    Hello,
    though I'm not an Oracle representative, I have an opinion on your request I want to share with you.
    Oracle Database has some features which by design won't allow easy embedding. Disabling those features isn't really easy and you wouldn't look at just some features less but at a software that behaves differently in wide areas. What would be the advantage to use it?
    I don't think you have to use MS Access, though. There are small embeddable databases available, even from Oracle (Oracle Berkeley DB to name one). So why should Oracle re-invent the wheel by downgrading a full-featured database that long that it is embeddable when other projects started to support this by design already?
    -Udo

  • Using oracle sequence in SQL Loader

    I'm using oracle sequence in control file of sql loader to load data from .csv file.
    Controlfile:
    LOAD DATA APPEND
    INTO TABLE PHONE_LIST
    FIELDS TERMINATED BY "," TRAILING NULLCOLS
    PHONE_LIST_ID "seqId.NEXTVAL",
    COUNTRY_CODE CHAR,
    CITY_CODE CHAR,
    BEGIN_RANGE CHAR,
    END_RANGE CHAR ,
    BLOCKED_FREE_FLAG CHAR
    Datafile:
    1516,8,9,9,B
    1517,1,1,2,B
    1518,8,9,9,B
    1519,8,9,9,B
    1520,8,9,9,B
    1521,8,9,9,B
    1) As first column uses oracle sequence, we have not defined that in datafile.
    This gives me error "Can not insert NULL value for last column"
    Is it mandatory to specify first column in datafile, even though we are using sequence?
    2) Another table is referencing PHONE_LIST_ID column (the one for which we using sequence) of this table as a foreign key.
    So is it possible to insert this column values in other table simultaneously? Sequence no. should be same as it is in first table...
    Kindly reply this on urgent basis....

    use BEFORE INSERT trigger
    with
    select your_seq.nextval into :new.id from dual;

  • JPA: Oracle Sequence Generator not up to date

    Hi,
    I'm using the JPA Oracle Sequence Generator in one of my JPA classes:
    @Entity
    @Table(name = "DACC_COST_TYPE")
    public class JPACostType implements Serializable {
    @SequenceGenerator(name = "CostTypeGenerator", sequenceName = "DACC_COST_TYPE_SEQ")
        @Column(name = "ID_COST_TYPE")
        @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CostTypeGenerator")
        private Integer idCostType;
    In order to persist a new object I perform the following code:
    @PersistenceContext
    private EntityManager em;
    JPACostType myJPA = new JPACostType();
    myJPA.setIdCostType = null;
    em.merge(myJPA);
    em.flush();
    Normally this works fine. But after deploying the app there sometimes happens an error:
    Caused by: javax.persistence.PersistenceException: SQLException while inserting entity {com.karmann.dacc.ejb.busilog.jpa.JPACostType(idCostType=4)}.
    at com.sap.engine.services.orpersistence.core.PersistenceContextImpl.flush(PersistenceContextImpl.java:278)
    at com.sap.engine.services.orpersistence.core.PersistenceContextImpl.beforeCompletion(PersistenceContextImpl.java:565)
    at com.sap.engine.services.orpersistence.entitymanager.EntityManagerImpl.beforeCompletion(EntityManagerImpl.java:410)
    at com.sap.engine.services.orpersistence.environment.AppJTAEnvironmentManager.beforeCompletion(AppJTAEnvironmentManager.java:197)
    at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:232)
    ... 52 more
    Caused by: java.sql.SQLException: ORA-00001: unique constraint (AEMA.DACC_COST_TYPE_PK) violated
    Obviously JPA does not fetch the new key by accessing the Oracle sequence. This documents "next value = 5". Does JPA fetch the new key from its cache? Is there any possibility to avoid this?
    Thanks for each hint,
    Christoph

    Hello Christoph Schäfer  ,
    I am stuck with a similar issue. I was able to save mutiple entries and there has not been much change to my JPA. I added new entities and new sequences.
    Now, I get the error Caused by: javax.persistence.PersistenceException: java.sql.SQLException: ORA-02289: Sequence ist nicht vorhanden.
    I have checked the name of sequence and sequence next val on the DB. It works on DB but when i execute it from ejb, it gives me thsi error. Now, it gives the error for all previously working JPA entities.
    I have also provided allocationSize = 1 for all entities.
    Please let me know, possible cause/solution to this issue.
    thank you.
    Regards,
    Sharath

  • Modifying cold fusion script not picked up by iis

    We are running coldfusion 7, using iis6 on windows 2003 server. I am not a cold fusion developer and this is the only coldfusion script we have created by a previous developer. I needed to make some simple modifications to the script, including a change in the title. After having restarted IIS the modified script is still not showing the new title. What do I need to do for iis to show the changes in the cfm file?

    It's in the CF Administrator, which is separate from the JRun Admin Console. You can often get to the CF Administrator with a URL like this:
    http://your_server/CFIDE/administrator/
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/
    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
    GSA Schedule, and provides the highest caliber vendor-authorized
    instruction at our training centers, online, or onsite.
    Read this before you post:
    http://forums.adobe.com/thread/607238

Maybe you are looking for