Synchronizer token and JSF

Hello,
I am just wondering if JSF offers a synchronizer token feature in order to avoid multiple form submissions.
Thanks in advance,
Albert Steed.

Here's how I've implemented a token synchronizer pattern in my web app.
This example has a session-scope Visit object and request-scope RequestBean:
  <managed-bean>
    <description>Session bean that holds data and delegates needed by request beans.</description>
    <managed-bean-name>visit</managed-bean-name>
    <managed-bean-class>com.example.Visit</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>
  <managed-bean>
    <description>Some request bean.</description>
    <managed-bean-name>reqBean</managed-bean-name>
    <managed-bean-class>com.example.RequestBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
      <property-name>visit</property-name>
      <value>#{sessionScope.visit}</value>
    </managed-property>
  </managed-bean>My Visit class has the following:
    private long activeToken;
    private long receivedToken;
     * This returns the active save token.  Note that this is not the same
     * variable that is set by the setSaveToken() method.  This is so we can put a
     * tag in a JSP:<br/>
     *   <h:inputHidden value="#{visit.saveToken}" /> <br/>
     * That will retrieve the active token from Visit when the page
     * is rendered, and when the page is returned, setSaveToken() sets the
     * received token.  The tokens can then be compared to see if a save
     * should be performed.  See BaseBean.generateToken() for more details.
     * @return Returns the active save token.
    public long getSaveToken() {
        return this.activeToken;
     * Sets the received token.  Note that this method is only intended to be
     * called by a JSF EL expression such as: <br/>
     *   <h:inputHidden value="#{visit.saveToken}" /> <br/>
     * See getSaveToken() for more details on why.
     * @param received token value to set
    public void setSaveToken(long aToken) {
        this.receivedToken = aToken;
    void setReceivedToken(long aToken) {
        this.receivedToken = aToken;
    long getReceivedToken() {
        return this.receivedToken;
    void setActiveToken(long aToken) {
        this.activeToken = aToken;
    long getActiveToken() {
        return this.activeToken;
     * @return true if the active and received token are both non-zero and they match
    boolean tokensMatchAndAreNonZero() {
        return (this.activeToken != 0) && (this.receivedToken != 0) && (this.activeToken == this.receivedToken);
. . .My backing beans extend a base class BaseBean with these methods:
     * Generates a new save token, saving it to a field in Visit. Guaranteed to not
     * generate a 0 (0 is used to denote an expired token).<br/><br/>
     * This token is used to make sure that
     * actions that modify data in a way that should not be immediately repeated.
     * Call this method prior to rendering a page that will submit the non-repeatable
     * request.  Then before saving any data, call saveTokenIsInvalid() to see if the
     * save should be executed.  If the token is valid, expire it and proceed with
     * saving.<br/>
     * The view that submits an unrepeatable request should have the tag:<br/>
     *      <h:inputHidden value="#{visit.saveToken}" /><br/>
     * in it.  Visit.getSaveToken() will set this field with the active token when the
     * page is rendered.  Visit.setSaveToken() will set a received token field, which
     * can then be compared to the active token to find out whether a save should be
     * performed.
    protected void generateSaveToken() {
        logger.debug("generateSaveToken()");
        Random random = new Random();
        long token = random.nextLong();
        while (token == 0) {
            token = random.nextLong();
        this.getVisit().setActiveToken(token);
        this.getVisit().setReceivedToken(0);
     * Checks the save token to see if it is valid.
     * @true if the save token is invalid.  It is invalid if either the received or the active
     * tokens in Visit are zero, or if the tokens do not match.
    protected boolean saveTokenIsInvalid() {
        if (logger.isDebugEnabled() ) {
            logger.debug("saveTokenIsInvalid():\nactive token: " + this.getVisit().getActiveToken() + "\nrecv'd token: " + this.getVisit().getReceivedToken() );
        boolean isValid = this.getVisit().tokensMatchAndAreNonZero();
        // return the inverse because this method is called "saveTokenIsInvalid"
        return !isValid;
     * Sets active token to zero, preventing any saves by methods that check for valid save token
     * before committing a change until generateSaveToken() is called again.
    protected void expireSaveToken() {
        logger.debug("expireSaveToken()");
        this.getVisit().setActiveToken(0);
     * Logs an info message saying that a save action was not performed because of invalid save
     * token.  Returns given String as outcome.
     * @param logger for subclass calling this method
     * @param outcome
     * @return outcome
    protected String logInvalidSaveAndReturn(Logger subclassLogger, String outcome) {
        if (subclassLogger.isInfoEnabled() ) {
            subclassLogger.info("User " + this.getVisit().getUsername() + " submitted a save request that was not " +
                    "processed because the save token was not valid.  Returning outcome: '" + outcome + "'.");
        return outcome;
    // Used by JSF managed bean creation facility
    public Visit getVisit() {
        return this.visit;
    // Used by JSF managed bean creation facility
    public void setVisit(Visit visit) {
        this.visit = visit;
. . .Any method that sets up a view containing a form I only want submitted once generates a token:
       this.generateSaveToken();And the token gets embedded in the HTML form with the tag:
<h:inputHidden value="#{visit.saveToken}" />An action method in RequestBean would then use the token to prevent multiple identical saves as follows:
    public String someActionMethod() {
        // prevent identical requests from being processed
        String normalOutcome = Constants.NavOutcome.OK;
        if (this.saveTokenIsInvalid() ) {
            return this.logInvalidSaveAndReturn(logger, normalOutcome);
        this.expireSaveToken();
        logger.debug("save token is valid.  attempting to save....");
        try {
              // invoke some business logic here
        } catch (MyException exc) {
              // important: if you are returning the user to the same form view with an error message,
              // and want to be able to process subsequent form submissions, then the token
              // needs to be regenerated
              this.generateSaveToken();
              return null;
. . .It has worked great so far. The only problems I've had are when I forget to generate or expire a token, or I forget to embed it in my form.
I also had a problem where I expired the token after my business logic completed, and my business logic took about 30-60 seconds to process--if the user clicks on the submit button several times while waiting for the page to return, the backing bean method still sees a valid token and processes the request. This was solved by simply expiring the token prior to invoking the business logic (as shown in the above example).
HTH,
Scott

Similar Messages

  • Synchronizer Token Pattern - Generic example

    Hi
    We have web applications not developped with struts or JSF, it's just a servlet/JSP design.
    We have big troubles with multiple forms submitted at the login-form, so our intention it's to "protect" this page with the synchronizer token pattern.
    Where i have to handle the request? In a filter? When do i put the token into the session and many more questions?
    Do you hava me a concrete example of this pattern? Thanks very much!
    Kind regards
    Michael

    There is already a components - Shale Token [1] that helps you solve double submit issue. The wiki is here [2]. The component is in shale-core.jar which you can find in the sample apps [3]
    [1] http://shale.apache.org/
    [2] http://wiki.apache.org/shale/Token
    [3] http://people.apache.org/builds/shale/nightly/

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • How to integrate Single Sign-On and JSF?

    Hi all,
    We are going to develop a web application using Oracle technologies, including ADF and JSF.
    But we´ll need to secure our website using Oracle Identity Manager (Single Sign-On). I am having difficulties to find any resource explaining how to do that.
    Also, the IM (SSO) will run on a Oracle AS instance and our web app (ADF+JSF) will run on a separete OC4J instance, due to ADF version. Is this a problem?
    Thanks

    We too are in the process of implementing iStore with SSO features.
    And if you believe me it seems to me as nightmare.
    In our scenerio we are intgrating this SSO with Third party access control too (AD and Siteminder). I would request you to please respond me on the following mail id , so we can share our experince which will help us in our implementation
    [email protected]
    regards and thanks in advance
    Vikas Deep

  • Facelets and jsf-extensions problem.

    I'm fairly certain I've run into a problem between facelets and jsf-extensions. I'm working with JSF 1.2 RI, Woodstock, Facelets 1.1.13, on Tomcat 6.
    When trying to get Woodstock autoValidation to work I get a javascript error the "I has no properties". The error occurs in the com_sun_faces_ajax.js file in the jsf-extensions-dynamic-faces-0.1.jar (I've used both the RC4 and a build today ,10/18/07 from source with the same results). Here is the code snippet where it happens (with my comment).
    var I = G.getElementsByTagName("components")[0];
    var C = I.getElementsByTagName("render");
    for(var F = 0; F < C.length; F++) {
    In the second line there it looks like the variable I is null, but based on the post response below I don't know why.
    The response from the post looks like this:
    <partial-response><components><render id="PayableForm:vendorGci"><markup><![CDATA[{"valid":true,"id":"PayableForm:vendorGci"}]]></markup></render></components>
    However the server side code (validation method) never gets executed. I'm willing to do some digging and debug work, but I'd need to be pointed in the right direction.
    The following is more potentially useful code snippets.
    Here is the textField code:
    <w:form id="PayableForm">
    <w:textField style="display:none;" />
    <w:message for="vendorGci" />
    <w:label id="vendorGciLabel" for="vendorGci" text="Vendor: " />
    <w:textField id="vendorGci" autoValidate="true"
    text="${vendorBean.searchGci}" maxlength="8" required="true"
    validatorExpression="#{ vendorBean.validateVendor}" />
    Here is the javascript in the page (the init function is called from the body: onLoad="setTimeout('init();', 0);" , this does happen):
    <w:script type="text/javascript">
    function VendorListener(){
    function VendorNotify(props){
    alert("VendorNotify called!"); <--------------- I never see this alert message
    if ( props.id != "PayableForm:vendorGci") { return; }
    var field = document.getElementById("PayableForm:vendorGciLabel");
    field.setProps({
    valid: props.valid
    VendorListener.prototype.notify = VendorNotify;
    function initAccountRows(){
    var table = document.getElementById("PayableForm:vendorAccountTable");
    table.initAllRows();
    function init(){
    initAccountRows();
    var listener = new VendorListener();
    dojo.subscribe(
    webui.suntheme.widget.textField.event.validation.endTopic ,
    listener, listener.notify);
    Here is the validator method. It currently doesn't do anything, just trying to get something to work. I never see the output, and I never hit the breakpoint in the method.
    public void validateVendor(FacesContext context, UIComponent comp, Object value){
    System.out.println("**********************************");
    System.out.println("validateVendor called");
    System.out.println(value);
    System.out.println("**********************************");
    }

    Actually I don't need a global variable. I need to refer in my included template the actual backing bean used in the current page. As all my backing bean extends a abstract class I could bind my component to a property of the current backing bean, no matters which one. Just like a polymorphic call but without the parameter. Let's imagine I could get this object of the facesContext object I would be able to do:
    <rich:datascroller renderIfSinglePage="false" align="right" for="listagem" maxPages="12" fastStep="10"
    pageIndexVar="pageIndex" pagesVar="pages" stepControls="show" fastControls="hide" boundaryControls="show"
    inactiveStyleClass="paginacaoInativa" selectedStyleClass="paginacaoSelecionada"
    styleClass="paginacao" tableStyleClass="paginacaoTabela"
    binding="#{facesContext.currentBackingbean.formDataScroller}" id="paginacao">
    Instead of pass the backing bean to the ui:param of this template... Dou you get the point?

  • "error while trying to synchronize Audio and MIDI"

    Hello All,
    Just got Logic 8... installed (as upgrade from 7)
    I keep (consistantly) getting this:
    "error while trying to synchronize Audio and MIDI" when in play or record mode... has anyone any ideas regarding a 'fix' or maybe even to point out stupidity on my part re settings; I'm open to comments here and would obviously love to get this fixed/sorted out.
    System is basically: G5 Dual 1.8/OS 10.4.10/MOTU 828 Mk2
    Thanks in advance.

    Hi,
    I first did what the manual was telling me but that made no difference as the sync would drop within 5 to 15 bars... very frustrating.
    Since my original posting I have spoken with MOTU regarding this Audio/MIDI sync problem. There is evidently a simple reset that needs to be done (that is if like me you are using a MOTU 828 Mk2 interface), you have to toggle through both digital input and output settings in the Audio Control Panel. The problem then goes away.
    I hope that is helpful. I think that this probably is relevant to all MOTU interfaces, or is at least worth trying if you are having this problem... maybe other manufacturers too... ?
    Cheers, Kick

  • Can I use icloud to synchronize contacts and calender for 1 ipad and 3 Windows 7/8 PC?

    Can I use icloud to synchronize contacts and calender for 1 ipad and 3 Windows 7/8 PC?
    regards,
    Jan

    Thanks! One more question ..... Will I have to enter appointments on an iCloud default calendar by logging in to my iCloud account every time, or can I just enter data on calendars in my 2 devices?

  • Error while trying to synchronize audio and MIDI.  Sample rate 42804 recognized.  Check conflict between Garageband and external device.

    Sometimes, while playing back my software instrument songs, I get an intermittent pop-up error message, saying "Error while trying to synchronize audio and MIDI.  Sample rate 42804 recognized.  Check conflict between Garageband and external device."
    (Sometimes the five digit number is different, but remains a five-digit number beginning with "4".)
    Simultaneously, the song stops until I press the "Okay" button in the pop-up window.
    When I continue to play the song, the sound is jerky and clipped, and the playhead doesn't keep up with the song, and then suddenly jumps to the part of the song currently being played.
    There's also a sound of static.
    The issue seems to occur whether or not I have my MIDI controller turned on and plugged into my desktop Imac.
    Tony

    Hello,
    open your Audio MIDI Setup utility and set the input to 44100
    https://discussions.apple.com/message/12710638#12710638

  • Error while trying to synchronize Audio and MIDI. plz help i cant hear anything

    plz help me i cant hear nothing and its says: Error while trying to synchronize Audio and MIDI.
    Sample Rate 38536 recognized.
    Check conflict between Logic Pro X and external device. ????????   PLZ HELP

    It means you are overtaxing the CPU, likely with just one (3rd party-)software instrument plugin. Ignore the word "external", in this context it often means "3rd party plugin".
    So what synth is it? Since you're Dutch, it's probably one of the trancy dancy synths, such as Albino, Diva, Sylenth or Massive... I could be wrong though...
    The best way to avoid this message is to Freeze the track with the guilty synner - however, a frozen track cannot be edited, so if that is a problem, you will have to make the synth itself run lighter, which can be achieved by turning of internal effects that are ON the synth itself, especially reverb.
    http://help.apple.com/logicpro/mac/10/#lgcpf1cbfd51

  • How to solve: Error while trying to synchronize Audio and MIDI.

    The project consists of an hour long DVD of a play which I have loaded into Logic ( on a MacbookPro) and stripped the audio
    and cut it up into regions  to name the different parts of the play ( verse/music etc)
    Usually I am able to play the project with a small window showing the Movie and watching the audio in the back ground adding markers and notes.
    Most of the time this works fine.. but then I get the following message re-occurring every few seconds:
    "Error while trying to synchronize Audio and MIDI.
    Sample Rate 26848 recognized.
    Check conflict between Logic Pro and external device"
    There is no MIDI, there is no external device, the Sample Rate is the usual 44.1
    Can anyone explain how to stop getting this error message which keeps interrupting workflow?

    Hello,
    open your Audio MIDI Setup utility and set the input to 44100
    https://discussions.apple.com/message/12710638#12710638

  • LogicPro 8 "Error while trying to synchronize Audio and MIDI"

    Hello,
    My rig: Dual 2.5 GHz PowerPC G5 3.5 GB DDR SDRAM. OS X 10.4.11. Logic Pro 8.0.2, Motu 828mkII interface, emagic Unitor 8 midi interface, Makie Control Universal, 7200rpm Firewire 800 Hard drives.
    I Just launched a Logic Pro 8 session that was started a few days ago and when I click "Play" there is no audio from the recorded tracks coming through the speakers. All that comes through the speakers is a series of hi pitched (roughly 4k to 6k) beeps and then an error message: "Error while trying to synchronize Audio and MIDI". I've tried restarting everything and still get the same results. I tried switching audio device to "built-in audio" instead of the motu and that works fine, (the tracks play back correctly).
    I've also tried other sessions that have different sample resolutions and bit depth and I also tried reseting all midi drivers.
    All sessions produced the same results, "Error while trying to synchronize Audio and MIDI", and played correctly when using built-in audio device. It's looking like the problem is with the motu.
    How can I trouble shoot this?

    Sounds like the MKII needs a reset.
    You can reset the 828 MkII to default settings in the following way (as provided from the MOTU support page):
    Follow these steps to restore the 828mkII to Factory Default Settings.
    Disconnect the firewire cable from the 828mkII
    Press the Setup knob
    Turn the Setup knob all the way to the right
    Press the Select knob
    Press the Value knob
    Power off the interface and plug the firewire cable back in
    Power the interface back on
    pancenter-

  • Solution for "Error while trying to synchronize Audio and MIDI" and "System Overload" messages

    Article for those who hate Logic error windows
    Seen in Logic Pro 9.1.7 on Mac OS X Lion 10.7.4
    and Logic Pro 9.0.0 on Mac OS X Snow Leopard 10.6.5
    Logic Pro:
    System Overload.
    The audio engine was not able to process all required data in time.
    (-10011)
    Error while trying to synchronize Audio and MIDI.
    Sample Rate xxxxx recognized.
    Check conflict between Logic Pro and external device.
    The search in the help given as follows: overload occurs when you use a lot of tracks and a lot of effects on them, and the synchronization is lost when the selected MIDI track for recording or playback. Yes, this is all that is written in the resources. And here are useful tips that have been found:
    The Bounce function allows the entire instrument track to be recorded as an audio file. This bounced audio file can then be used (as an audio region) on a standard audio track, allowing you to reassign the available processing power for further software instrument tracks. For more details, see "Bouncing Your Project."
    You can also make use of the Freeze function to capture the output of a software instrument track, again saving processing power. For details, see "Freezing Tracks in the Arrange Area."
    These tips - about the timing. About overload - there are no tips, except as "reducing the number of plug-ins" and "increasing latency". Zero useful tips - I got two errors in the test project with a blank audio track with no effects, MIDI drums and standard synthesizer, it was no aux buses, and the entire project was only a single plugin in the master track.
    Here is the configuration of my computer:
    iMac12, 2
    CPU: Intel Core i5 3,1 GHz
    Memory: 4 GB
    And here's a project that almost immediately stops Logic, all instruments and plug-ins with the init-patch, ie not the most demanding settings:
    It's sad.
    When this happened the first time, I could start the project only if the empty audio track has been selected, a track specially designed so that you can at least start the project. Then, this problem has evaporated along with the changing conditions of work and I forgot about it until the last case.
    I was looking for the cause of the problem in the console and the system monitor for two days, and finally I found that Logic ping to the network frequently. I remembered the exact time of occurrence of the problem, and system logs revealed that the problems began immediately, as soon as I deactivate the service of the Internet.
    Solution: enable the Internet, or add a new network service on a computer with no Internet. I just created the Ethernet connection to the ip address 1.0.0.0
    Logic immediately began to sing.

    Hi gabaghoul
    Yes, it worked for me on four different OS and Logic versions (10.6 - 10.8 and 9.0 - 9.1.6)
    It does not work in some cases, hard enough to tell in which one, but you can try, it very easy: go to the net settings and create new Ethernet connection to the ip address 1.0.0.0 and connect LAN cable to the port.
    Also you can try to figure out what happens in your system while Logic error occured - fot that you just start Console and search "logicpro"
    Pay attention to repetitive events in a console and events with suitable timing, not so far from error
    The problem may be related to the GUI or system memory, sometimes turning off Safari (or Chrome, others browsers) might help.
    Message was edited by: spred

  • GarageBand: Error while trying to synchronize Audio and MIDI.

    This error recently started popping up for me while using garageband.
    GarageBand: Error while trying to synchronize Audio and Midi
    Sample rate xxxxxx recognized
    Check conflict between garageband and external device
    When I use garageband, my input and output are usually set to my scarlett 2i2 interface and I've never received the synchronizing error before today.  I am not using any Midi.
    I've checked the Audio Midi Setup tool to make sure that my format is at 44100.0Hz and have set the "sound" in system preferences to use my scarlett 2i2 interface for input and built-in system for output.
    Can anyone help me out with why i'm receiving this error?

    Good grief!  I'm on a Mac OS X and was having this same problem.  All these discussions about so much technical jargon just had me exhausted ... not only did I not understand what was being referred to, but I couldn't imagine how to do what was being said.
    Here's what got me straight:
    1.  Go to System Preferences and click on Sound
    2.  Click on Input and select your USB mic (or whatever you're using)
    3.  Click on Output and select Internal Speakers
    Done.  No more problem with Garageband!

  • Re: ERROR while trying to synchronize Audio and MIDI

    Hi Guys/Gals
    A bit of a strange one. Yes, I have posted a similar question concerning my trusted 2.7ghz G5 PPC and my Digidesign 003R which it turned out that the Digi's FW ports were to blame.
    New issue. I have just completed an install on a client's machine, here's it's specs etc:
    Hardware:
    iMac 2.8Ghz Duo Core Intel, 4Gb ram, 500Gb HD etc (the custom top end before last week's upgrade) arrived last week. Running Leopard 10.5.2 and has all the latest updates. (firmware/software)
    Apogee Ensemble (with newest firmware update/upgrade)
    Iomega ULTRAMAX HARD DRIVE 1TB USB 2.0/FIREWIRE® 400/800 (sorry, copied from their site)
    M-Audio Axiom 49 USB Midi controller/keyboard
    Software:
    Logic Pro 8 (latest 8.0.1) All standard plugs/samples, no third parties at all, just 100% Apple install.
    Reason 4 (latest 4.0.1)
    I reformatted the built-in hd to two partitions of equal size, one for the OS and one for whatever. I formated the external terrabyte into two partitions also of equal size, non are journalized, all are GUI partitions. I copied the LP 8 demos to both the internal "spare" partition and to the primary "Audio1" partition of the external drive. The Iomega HD is connected via the 800FW port and the Apogee Ensemble is connected via the 400FW port (the iMac has one of each). If I play any of the demo songs from the internal partition, they play perfectly, if I play them off the external Iomega partitions (either) within 8 bars I get:
    "Error while trying to synchronize Audio and MIDI
    Sample Rate 45946 recognized.
    Check conflict between Logic Pro and external device."
    As I said, any demo played back from the internal drives absolutely perfectly..... Any ideas?
    Cheers!!
    Bobs

    There are a lot of different opinions about partitioning in Mac OS X and you can read some of them here:
    http://forums.cnet.com/5208-7592_102-0.html?forumID=25&threadID=44865&messageID= 530144
    and here
    http://forums.appleinsider.com/archive/index.php/t-8096.html
    My opinion is that partitions cam be useful when:
    1. the OS can't manage big volumes (as it was in the past)
    2. the OS can't optimize the space on big volumes
    3. want to install 2 or more separate OSes
    4. organization (like in your case).
    Now, OS X filesystem (HFS+) is robust and reliable and OS X is a multitasking system that parallelizes I/O operations like reading or writing a disk.
    So if you have 2 separate hard disk the system can parallelize the operations (i.e. reading from one and writing into another one) but if you have 2 partitions the system (or better the disk subsystem) have to jump back and forth among the partitions.
    About the linking schema of the Audio interfaces and the FW hard disks it can change: I connect my FW disk to the MOTU and the MOTU to the mac while a friend of mine have to put the disk before of his Presonus.
    Thanks for the beer!
    cheers
    rob

  • (rare?) Error while trying to synchronize Audio and MIDI.

    Hello there,
    My problem: Until today, I've been working with all my projects without any problems with my configuration, but today I've turned on the computer and when I play any project (including a new project with one or two audio tracks or the SAME PROJECT that i've been working the last night), 3 or 4 seconds later I get the fantastic and typical error from logic and an apparently more slow performance loading projects...
    everytime... play, and error...play (or pause) and error...
    "Error while trying to synchronize Audio and MIDI.
    Sample Rate 41347 recognized.
    Check conflict between Logic Pro and external device."
    and sometimes... (randomly)  
    "System Overload. The audio engine was not able to process all required data in time."
    ... and I haven't touched anything / no updates / no setup changes... NOTHING.
    I've tried all these things (searching in the forum) with NO luck:
    http://support.apple.com/kb/TS2111
    http://support.apple.com/kb/TA24535
    My equipment:
    Macbook pro 2,4 Intel Core 2 Duo / 2 GB RAM
    Logic Pro 9.1.3
    Snow Leopard 10.6.7
    Motu ultralite Mk2
    Lacie quadra 1 TB (FW800)
    - I have a motu ultralite mk2, but i've tried with the built-in audio too, and I'll just get the same performance.
    - I've tried with the lacie hardrive on and off and with projects in the internal hardrive and others with all the audios in the external.
    The funny thing is that i've been working in a project this last night and all PERFECT, and now its impossible work with it, and I haven't changed anything.
    PLEASE, any help? I'm confused and I need to finish some works...
    THANKS!

    If the MOTU unit has a reset procedure, unplug it from the Mac and do it now. That's simialr to what the older 828MkII units used do when they needed to be run through the reset procedure.
    It can be caused by a Firewire/USB glitch or power surge when powering up the computer.
    p.s.
    As a side note, I remember that same error.....
    "Error while trying to synchronize Audio and MIDI. Sample Rate 41347 recognized."
    From Logic 3.5, it's been around for that long, with different sample rates of course.
    Back then it was from bad audio drivers.. it's difficult to pin down some of these errors as they can be caused by different things.
    pancenter-

Maybe you are looking for

  • How do I use a bluetooth headset with garageband?

    How do I use a bluetooth headset with garageband? I can't get it to work after many tries.

  • How to diferenciate apps on iphone and ipad

    I am using same iTunes for my iphone and Ipad. I would like to have this devices with different applications and different files. Is this possible on the same computer ? BTW. New iTunes is unusable - if Apple wants to get rid of their customers  new

  • Error while trying to raise a Goods Receipt PO in SAP B1 v 9.0

    Hi Experts, while trying to raise a Goods Receipt PO in SAP B1 v 9.0 the following error is been generated: You should use existing Serial/batch number for this document type [21-59 ] Note:We are able  to generate Goods Receipt PO for an item which i

  • My mac wont load when I turn it on

    When I turn my Macbook on all it shows is the apple sign and says its loading but doesnt load. I cannot get to my login screen and log on to my account on my Macbook and access my desktop. How do I fix this?

  • Error Building DLL, LabView 8.2

    Hello everybody, I'm building a CVI application. I need some functions of LabView (related to time series analysis), so I'm trying to build DLLs with the .VIs I need. I followed all the steps necesary and visited all the related topics at ni.com. I a