Warning al no cumplirse condicion booleana. Cómo puedo hacer esto?

Requiero desplegar en labview un warning ó aviso una vez que se verifica una condición booleana,
Me explico mejor: por ejemplo comparo dos números; 5 y 2... entonces lo que requiero es que si 5> 2 salga un aviso que diga : "el número ingresado es mayor" (suponiendo que se ingreso el cinco 5.
No se si me hice entender.
 lo que requiero es que el usuario sepa si el numero que ingresó es mayoy o menor mediante un aviso de texto.
Gracias por su ayuda

Hola angoav98,
Yo estoy usando un traductor (translate.google.com) así que disculpen los erroresgramaticales. 
He incluido un VI de ejemplo que muestra lo que yo creo que está tratando de lograr. 
Feliz Día de Pi. (3.14)
Attachments:
3.14.12 - goodnaysayer - reply to angoav98 - Number Comparison.vi ‏34 KB

Similar Messages

  • Warning messages with the option to continue or cancel

    I am fairly new to the world of JSF and I need to have the ability to present a warning to the user, and allow them the option to continue or to cancel. I need to do this via a message on the page with a link rather than a javascript alert box. The basic usability would be this, the user uses the webapp to create an object, they can then go in and edit the object, while editing they have the option to delete the object, the "delete" control is a button. If they click on this button, I need a way to warn the user but allow them to continue anyway. Currently we have a facility to add a warning to the page, but what I would like to do is add a link or even a button to that page that will allow the delete to take place. Does anyone have any ideas? I've spent quite a few hours on google and haven't found anything similar to what I'm trying to do. The inability to use javascript has been dictated to me, so that is not an option.

    Try this...
    Create two similar "submit" buttons. The only difference is that one will reload the current page, with your warning message displayed. The second will actually execute the delete action.
    When the page is first viewed, the first button will be rendered and the second button will not be rendered. You can facilitate this using the rendered attribute on the commandLink or commandButton, and then tying that to a boolean variable in the backing bean.
    When the first delete button is clicked, you perform the necessary action to display the warning message, flip the rendered boolean, and return the same page again. The page will be reloaded, this time with the second button rendered and the first button not rendered.
    When the second delete button is clicked, you perform the delete, flip the boolean again (especially if your backing bean is in session scope!) and return the user to the appropriate page. If the user chooses cancel, then remember to flip the boolean again.
    Hope this helps!
    CowKing

  • Condicion Layout

    Hice un reporte para impresion de facturas, hice uno para MXP y otro para USD, pero no es practico tenerlos separados, el problema que tengo es porque no puedo hacer una condicion en el layout, algo asi como
    if xcampo = 0 then
        ycampo
    else
       xcampo
    Alguien sabe como aplicar eso en el reportador???
    Saludos

    Hola
    En el Diseñador de layout debes crear campos de fórmula y la condición será una fórmula. Por ejemplo, supongamos que quieres ver un texto A si la moneda del documento es EURO, o un texto B si la moneda es DOLAR.
    Se entiende que tienes un campo que trae la moneda del documento, supondremos que este campo es el campo F_100
    Ahora creas 2 campos de texto, ambos en la misma posición dentro del diseñador. El primer campo es Texto A y corresponderá al campo F_101. El segundo campo es de texto B y corresponderá a su vez al campo F_102. (Estos son los campos que se mostrarán según la condición que se cumpla)
    Luego creas un primer campo fórmula, cuya fórmula es (F_100 == 'EURO') y otro campo fórmula que será (F_100 == 'DOLAR'). Supondremos adicionalmente que estos campos fórmula, son los campos F_103 y F_104 respectivamente.
    Ahora que ya tienes lo que quieres mostrar y los campos con las condiciones, solo tienes que realizar los enlaces. El campo F_101 lo enlazas al campo F_103, mientras que el campo F_102 lo enlazas al campo F_104
    El enlace lo haces en las propiedades de cada campo, en la opción ENLACE A
    Aqui te presento otro caso similar, por si tuvieses alguna duda respecto de lo señalado...
    Espero te sea de ayuda
    Saludos Cordiales,

  • Condicion en PLD

    Estimados Todos:
    Como puedo hacer en el PLD una formula que sigue la siguiente logica:
    Si Monto <= 100
    entonces Descuento = 0
    sino Descuento = Monto * 0.01
    Gracias

    Necesitas mas de un campo de formula
    Si Monto <= 100
    entonces Descuento = 0
    sino Descuento = Monto * 0.01
    Necesitas uno que valide el caso 1 de monto <=100
    de tal forma que para este caso te quede por ejemplo F_001==100, en cuyo caso, si esto es afirmativo, el campo se enciende por asi decirlo pues es un boolean ok? osea que impreso verias un numero 1
    Ligado a este campo, pondrias otro de formula que sea F_002=0  , cuando quieres asignar un valor, solo usas un signo de igual a (=)
    Ahora, para cuando sea FALSE necesitarias un par de campos mas que, en consecuencia, hagan y/o comparen lo contrario a lo arriba expuesto

  • Unix Log Monitoring regular expression not picking up alerts

    Hi,
    We are moving our unix monitoring to SCOM 2012 SP1 rollup 4.
    What I have got working is indvidual alert logging of Unix Log alerts by exporting the MP and changing the <IndividualAlerts> value to true and removing the suppression xml section then reimporting the MP.
    What I am trying to do is use the regular expression to peform the suppression of specific event (such as event codes).
    The expression is:
    ((?i:warning)(?!(.*1222)|(.*1001)))
    ie Search the log for "warning" (not case sensitive) then check if events 1222 or 1001 exist if so return no match, if they dont exist then return true. 
    I use the built in test function in SCOM when creating the rule and the tests come back as expected but when I inject test lines into the unix log, no alerts get generted.
    I suspect it could be the syntax not being accepted on the system (its running RedHat 6 )
    I have tested this with regex tools and works.
    When I try and test it on the server i get:
    [root@bld02 ~]# grep ((?i:Warning)(?!(.*1222)|(.*1001))) /var/log/messages
    -bash: !: event not found
    [root@bld02 ~]# tail /var/log/messages
    Nov 13 15:07:26 bld02 root: SCOM Test Warning Event ID 1001 Round 18
    Nov 13 15:07:29 bld02 root: SCOM Test Warning Event ID 1000 Round 18
    Nov 13 15:07:35 bld02 root: SCOM Test Warning Event ID 1002 Round 18
    So I am expecting 2 alerts to be generated.
    SCOM tests to show expression working:
    Test 1 Matching
    Test 2 to exclude
    Need some help with this, Thankyou in advance :)

    Hello,
    Here's an example of modifying the MP to exclude particular events.  Firstly, I created a log file rule using the MP template that is fairly inclusive - matching the string Warning (with either a lower or upper case W).
    I then exported the MP, and modified the rule.  I set the IndividualAlerts = true and removed the AlertSuppression element, so that every matched line will fire a unique alert.  You don't have to remove the AlertSuppression, but you should use
    Individual alerts so that the exclusion logic doesn't exclude concurrent events that you actually want to match.
    Implementing the exclusion logic involves the addition of a System.ExpressionFilter definition in the rule. This will use a conditional evaluation of the //row element of the data item.  Here's an example of a dataitem matching an individual row:
    <DataItem type="System.Event.Data"time="2013-11-15T10:33:14.8839662-08:00"sourceHealthServiceId="667FF365-70DD-6607-5B66-F9F95253B29F">
    <EventOriginId>{86AB962D-2F44-29FD-A909-B99FF6FEB2C5}</EventOriginId>
    <PublisherId>{EC7EA4B1-0EA5-7E8E-701F-82FEF3367BC4}</PublisherId>
    <PublisherName>WSManEventProvider</PublisherName>
    <EventSourceName>WSManEventProvider</EventSourceName>
    <Channel>WSManEventProvider</Channel>
    <LoggingComputer/>
    <EventNumber>0</EventNumber>
    <EventCategory>3</EventCategory>
    <EventLevel>0</EventLevel>
    <UserName/>
    <RawDescription>Detected Entry: warning 1002</RawDescription>
    <CollectDescription Type="Boolean">true</CollectDescription>
    <EventData>
    <DataItem type="SCXLogProviderDataSourceData"time="2013-11-15T10:33:14.8839662-08:00"sourceHealthServiceId="667FF365-70DD-6607-5B66-F9F95253B29F">
    <SCXLogProviderDataSourceData>
    <row>warning 1002</row>
    </SCXLogProviderDataSourceData>
    </DataItem>
    </EventData>
    <EventDisplayNumber>0</EventDisplayNumber>
    <EventDescription>Detected Entry: warning 1002</EventDescription>
    </DataItem>
    Here is the rule in the MP XML.  The <ConditionDetection>...</ConditionDetection> content was what I added to do the exclusion filtering:
    <Rule ID="LogFileTemplate_66b86eaded094c309ffd2631b8367a32.Alert" Enabled="false" Target="Unix!Microsoft.Unix.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
    <Category>EventCollection</Category>
    <DataSources>
    <DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.VarPriv.DataSource">
    <Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
    <LogFile>/tmp/test</LogFile>
    <UserName>$RunAs[Name="Unix!Microsoft.Unix.ActionAccount"]/UserName$</UserName>
    <Password>$RunAs[Name="Unix!Microsoft.Unix.ActionAccount"]/Password$</Password>
    <RegExpFilter>warning</RegExpFilter>
    <IndividualAlerts>true</IndividualAlerts>
    </DataSource>
    </DataSources>
    <ConditionDetection TypeID="System!System.ExpressionFilter" ID="Filter">
    <Expression>
    <RegExExpression>
    <ValueExpression>
    <XPathQuery Type="String">//row</XPathQuery>
    </ValueExpression>
    <Operator>DoesNotContainSubstring</Operator>
    <Pattern>1001</Pattern>
    </RegExExpression>
    </Expression>
    </ConditionDetection>
    <WriteActions>
    <WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
    <Priority>1</Priority>
    <Severity>2</Severity>
    <AlertName>Log File Alert: ExclusionExample</AlertName>
    <AlertDescription>$Data/EventDescription$</AlertDescription>
    </WriteAction>
    </WriteActions>
    </Rule>
    I traced this with the Workflow Analyzer as I tested, which shows the logic being applied.  Here is the exclusion happening:
    Here's more info on the definition of an ExpressionFilter:
    http://msdn.microsoft.com/en-us/library/ee692979.aspx
    And more information on Regular Expressions in MPs:
    http://support.microsoft.com/kb/2702651/en-us
    You can also have multiple Expressions in the ExpressionFilter joined by OR or AND operators.
    Also, if you are comfortable with the MP authoring, you can just skip the step of creating the rules in the MP template and just author your own MP with the VSAE tool:
    http://social.technet.microsoft.com/wiki/contents/articles/18085.scom-2012-authoring-unixlinux-log-file-monitoring-rules.aspx
    www.operatingquadrant.com

  • Flex sdk incremental build will lose swc information

    I have a mxmlc ant task job like this
            <mxmlc 
            file="${trunk_dir}/main/src/main.mxml"
            output="${local_tmp}/app/bin/main.swf"
                      >    
                <load-config filename="${basedir}/flex-config-sea.xml"/>
                <source-path path-element="${FLEX_HOME}/frameworks"/>
            </mxmlc>
    in flex-config-sea.xml I put this in for incremental compile and swc build
          <include-libraries>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/Mate_08_9.swc</library>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/xprogress.swc</library>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/component.swc</library>
          </include-libraries>
          <incremental>true</incremental>
    the first time build is ok, but the second time after I changed one single file, the output is
    [mxmlc] Loading configuration file /opt/cruisecontrol-bin-2.8.4/projects/cc/flex-config-sea.xml
        [mxmlc] Recompile: /opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/src/C.as
        [mxmlc] Reason: The source file or one of the included files has been updated.
        [mxmlc] Files changed: 1 Files affected: 0
        [mxmlc] Required RSLs:
        [mxmlc]     textLayout_2.0.0.232.swz with 1 failover.
        [mxmlc]     framework_4.6.0.23201.swz with 1 failover.
        [mxmlc]     rpc_4.6.0.23201.swz with 1 failover.
        [mxmlc]     mx_4.6.0.23201.swz with 1 failover.
        [mxmlc]     spark_4.6.0.23201.swz with 1 failover.
        [mxmlc]     sparkskins_4.6.0.23201.swz with 1 failover.
        [mxmlc] /tmp/sea_local/app/bin/main.swf (426617 bytes)
    but the output swf is complaining lack of some swc when running, which didn't show up in the first time
    ReferenceError: Error #1065: Variable _shared_maps_GlobalMapWatcherSetupUtil is not defined.
              at global/flash.utils::getDefinitionByName()
              at shared.maps::GlobalMap()
              at main/_main_GlobalMap1_i()
              at main()
              at _main_mx_managers_SystemManager/create()
              at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()
              at mx.managers::SystemManager/initializeTopLevelWindow()
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.preloaders::Preloader/timerHandler()
              at flash.utils::Timer/_timerDispatch()
              at flash.utils::Timer/tick()
    this message normally shows up when there's no Mate_08_9.swc found at runtime. but this shouldn't happen.
    is there anyway to work around this? thanks a lot
    here is the full flex-config-sea.xml:
    <flex-config>
       <!-- benchmark: output performance benchmark-->
       <!-- benchmark usage:
       <benchmark>boolean</benchmark>
       -->
       <compiler>
          <!-- compiler.accessible: generate an accessible SWF-->
          <accessible>true</accessible>
          <!-- compiler.actionscript-file-encoding: specifies actionscript file encoding. If there is no BOM in the AS3 source files, the compiler will use this file encoding.-->
          <!-- compiler.actionscript-file-encoding usage:
          <actionscript-file-encoding>string</actionscript-file-encoding>
          -->
          <!-- compiler.allow-source-path-overlap: checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous.-->
          <allow-source-path-overlap>false</allow-source-path-overlap>
          <!-- compiler.as3: use the ActionScript 3 class based object model for greater performance and better error reporting. In the class based object model most built-in functions are implemented as fixed methods of classes.-->
          <as3>true</as3>
          <!-- compiler.compress usage:
          <compress>boolean</compress>
          -->
          <!-- compiler.context-root: path to replace {context.root} tokens for service channel endpoints-->
          <!-- compiler.context-root usage:
          <context-root>context-path</context-root>
          -->
          <!-- compiler.debug: generates a movie that is suitable for debugging-->
          <debug>false</debug>
          <!-- compiler.defaults-css-files usage:
          <defaults-css-files>
             <filename>string</filename>
             <filename>string</filename>
          </defaults-css-files>
          -->
          <!-- compiler.defaults-css-url: defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file.-->
          <!-- compiler.defaults-css-url usage:
          <defaults-css-url>string</defaults-css-url>
          -->
          <!-- compiler.define: define a global AS3 conditional compilation definition, e.g. -define=CONFIG::debugging,true or -define+=CONFIG::debugging,true (to append to existing definitions in flex-config.xml) -->
          <!-- compiler.define usage:
          <define>
             <name>string</name>
             <value>string</value>
             <value>string</value>
          </define>
          -->
          <!-- compiler.enable-runtime-design-layers usage:
          <enable-runtime-design-layers>boolean</enable-runtime-design-layers>
          -->
          <!-- compiler.es: use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype properties. In the prototype based object model built-in functions are implemented as dynamic properties of prototype objects.-->
          <es>false</es>
          <extensions>
             <!-- compiler.extensions.extension usage:
             <extension>
                <extension>string</extension>
                <parameters>string</parameters>
             </extension>
             -->
          </extensions>
          <!-- compiler.external-library-path: list of SWC files or directories to compile against but to omit from linking-->
          <external-library-path>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/player/11.1/playerglobal.swc</path-element>
          </external-library-path>
          <fonts>
             <!-- compiler.fonts.advanced-anti-aliasing: enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small fonts.-->
             <advanced-anti-aliasing>true</advanced-anti-aliasing>
             <!-- compiler.fonts.flash-type: enables FlashType for embedded fonts, which provides greater clarity for small fonts.-->
             <!-- compiler.fonts.flash-type usage:
             <flash-type>boolean</flash-type>
             -->
             <languages>
                <!-- compiler.fonts.languages.language-range: a range to restrict the number of font glyphs embedded into the SWF-->
                <!-- compiler.fonts.languages.language-range usage:
                <language-range>
                   <lang>string</lang>
                   <range>string</range>
                   <range>string</range>
                </language-range>
                -->
             </languages>
             <!-- compiler.fonts.local-font-paths usage:
             <local-font-paths>
                <path-element>string</path-element>
                <path-element>string</path-element>
             </local-font-paths>
             -->
             <!-- compiler.fonts.local-fonts-snapshot: File containing system font data produced by flex2.tools.FontSnapshot.-->
             <!-- compiler.fonts.managers: Compiler font manager classes, in policy resolution order-->
             <managers>
                <manager-class>flash.fonts.JREFontManager</manager-class>
                <manager-class>flash.fonts.BatikFontManager</manager-class>
                <manager-class>flash.fonts.AFEFontManager</manager-class>
                <manager-class>flash.fonts.CFFFontManager</manager-class>
             </managers>
             <!-- compiler.fonts.max-cached-fonts: sets the maximum number of fonts to keep in the server cache.  The default value is 20.-->
             <max-cached-fonts>20</max-cached-fonts>
             <!-- compiler.fonts.max-glyphs-per-face: sets the maximum number of character glyph-outlines to keep in the server cache for each font face. The default value is 1000.-->
             <max-glyphs-per-face>1000</max-glyphs-per-face>
          </fonts>
          <!-- compiler.headless-server: a flag to set when Flex is running on a server without a display-->
          <!-- compiler.headless-server usage:
          <headless-server>boolean</headless-server>
          -->
          <!-- compiler.include-libraries: a list of libraries (SWCs) to completely include in the SWF-->
          <!-- compiler.include-libraries usage:
          <include-libraries>
             <library>string</library>
             <library>string</library>
          </include-libraries>
          -->
          <include-libraries>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/Mate_08_9.swc</library>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/xprogress.swc</library>
             <library>/opt/cruisecontrol-bin-2.8.4/projects/sea_client/trunk/main/libs/component.swc</library>
          </include-libraries>
          <!-- compiler.incremental: enables incremental compilation-->
          <!-- compiler.incremental usage:
          <incremental>boolean</incremental>
          -->
          <incremental>true</incremental>
          <!-- compiler.isolate-styles: enables the compiled application or module to set styles that only affect itself and its children-->
          <!-- compiler.isolate-styles usage:
          <isolate-styles>boolean</isolate-styles>
          -->
          <!-- compiler.keep-all-type-selectors: disables the pruning of unused CSS type selectors-->
          <!-- compiler.keep-all-type-selectors usage:
          <keep-all-type-selectors>boolean</keep-all-type-selectors>
          -->
          <!-- compiler.keep-as3-metadata: keep the specified metadata in the SWF-->
          <!-- compiler.keep-as3-metadata usage:
          <keep-as3-metadata>
             <name>string</name>
             <name>string</name>
          </keep-as3-metadata>
          -->
          <!-- compiler.keep-generated-actionscript: save temporary source files generated during MXML compilation-->
          <keep-generated-actionscript>false</keep-generated-actionscript>
          <!-- compiler.library-path: list of SWC files or directories that contain SWC files-->
          <library-path>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/flash-integration.swc</path-element>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/authoringsupport.swc</path-element>
             <path-element>/opt/flexsdk/4.6.0/frameworks/locale/{locale}</path-element>
          </library-path>
          <!-- compiler.locale: specifies the locale for internationalization-->
          <locale>
             <locale-element>en_US</locale-element>
          </locale>
          <!-- compiler.minimum-supported-version usage:
          <minimum-supported-version>string</minimum-supported-version>
          -->
          <!-- compiler.mobile: specifies the target runtime is a mobile device-->
          <mobile>false</mobile>
          <mxml>
             <!-- compiler.mxml.compatibility-version: specifies a compatibility version. e.g. -compatibility-version=2.0.1-->
             <!-- compiler.mxml.compatibility-version usage:
             <compatibility-version>version</compatibility-version>
             -->
             <!-- compiler.mxml.minimum-supported-version usage:
             <minimum-supported-version>string</minimum-supported-version>
             -->
             <!-- compiler.mxml.qualified-type-selectors usage:
             <qualified-type-selectors>boolean</qualified-type-selectors>
             -->
          </mxml>
          <namespaces>
             <!-- compiler.namespaces.namespace: Specify a URI to associate with a manifest of components for use as MXML elements-->
             <namespace>
                <uri>http://ns.adobe.com/mxml/2009</uri>
                <manifest>/opt/flexsdk/4.6.0/frameworks/mxml-2009-manifest.xml</manifest>
             </namespace>
             <namespace>
                <uri>library://ns.adobe.com/flex/spark</uri>
                <manifest>/opt/flexsdk/4.6.0/frameworks/spark-manifest.xml</manifest>
             </namespace>
             <namespace>
                <uri>library://ns.adobe.com/flex/mx</uri>
                <manifest>/opt/flexsdk/4.6.0/frameworks/mx-manifest.xml</manifest>
             </namespace>
             <namespace>
                <uri>http://www.adobe.com/2006/mxml</uri>
                <manifest>/opt/flexsdk/4.6.0/frameworks/mxml-manifest.xml</manifest>
             </namespace>
          </namespaces>
          <!-- compiler.omit-trace-statements: toggle whether trace statements are omitted-->
          <omit-trace-statements>true</omit-trace-statements>
          <!-- compiler.optimize: Enable post-link SWF optimization-->
          <optimize>true</optimize>
          <!-- compiler.preloader: Specifies the default value for the Application's preloader attribute. If not specified, the default preloader value is mx.preloaders.SparkDownloadProgressBar when -compatibility-version >= 4.0 and mx.preloaders.DownloadProgressBar when -compatibility-version < 4.0.-->
          <!-- compiler.preloader usage:
          <preloader>string</preloader>
          -->
          <!-- compiler.report-invalid-styles-as-warnings: enables reporting of invalid styles as warnings-->
          <!-- compiler.report-invalid-styles-as-warnings usage:
          <report-invalid-styles-as-warnings>boolean</report-invalid-styles-as-warnings>
          -->
          <!-- compiler.report-missing-required-skin-parts-as-warnings: Use this option to generate a warning instead of an error when a missing required skin part is detected.-->
          <!-- compiler.report-missing-required-skin-parts-as-warnings usage:
          <report-missing-required-skin-parts-as-warnings>boolean</report-missing-required-skin-parts-as-warnings>
          -->
          <!-- compiler.services: path to Flex Data Services configuration file-->
          <!-- compiler.services usage:
          <services>filename</services>
          -->
          <!-- compiler.show-actionscript-warnings: runs the AS3 compiler in a mode that detects legal but potentially incorrect code-->
          <show-actionscript-warnings>true</show-actionscript-warnings>
          <!-- compiler.show-binding-warnings: toggle whether warnings generated from data binding code are displayed-->
          <show-binding-warnings>true</show-binding-warnings>
          <!-- compiler.show-invalid-css-property-warnings: toggle whether invalid css property warnings are reported-->
          <!-- compiler.show-invalid-css-property-warnings usage:
          <show-invalid-css-property-warnings>boolean</show-invalid-css-property-warnings>
          -->
          <!-- compiler.show-shadowed-device-font-warnings: toggles whether warnings are displayed when an embedded font name shadows a device font name-->
          <show-shadowed-device-font-warnings>false</show-shadowed-device-font-warnings>
          <!-- compiler.show-unused-type-selector-warnings: toggle whether warnings generated from unused CSS type selectors are displayed-->
          <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
          <!-- compiler.source-path: list of path elements that form the roots of ActionScript class hierarchies-->
          <source-path>
          </source-path>
          <!-- compiler.strict: runs the AS3 compiler in strict error checking mode.-->
          <strict>true</strict>
          <!-- compiler.theme: list of CSS or SWC files to apply as a theme-->
          <!-- compiler.use-resource-bundle-metadata: determines whether resources bundles are included in the application.-->
          <use-resource-bundle-metadata>true</use-resource-bundle-metadata>
          <!-- compiler.verbose-stacktraces: save callstack information to the SWF for debugging-->
          <verbose-stacktraces>false</verbose-stacktraces>
          <!-- compiler.warn-array-tostring-changes: Array.toString() format has changed.-->
          <warn-array-tostring-changes>false</warn-array-tostring-changes>
          <!-- compiler.warn-assignment-within-conditional: Assignment within conditional.-->
          <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
          <!-- compiler.warn-bad-array-cast: Possibly invalid Array cast operation.-->
          <warn-bad-array-cast>true</warn-bad-array-cast>
          <!-- compiler.warn-bad-bool-assignment: Non-Boolean value used where a Boolean value was expected.-->
          <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
          <!-- compiler.warn-bad-date-cast: Invalid Date cast operation.-->
          <warn-bad-date-cast>true</warn-bad-date-cast>
          <!-- compiler.warn-bad-es3-type-method: Unknown method.-->
          <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
          <!-- compiler.warn-bad-es3-type-prop: Unknown property.-->
          <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
          <!-- compiler.warn-bad-nan-comparison: Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN.-->
          <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
          <!-- compiler.warn-bad-null-assignment: Impossible assignment to null.-->
          <warn-bad-null-assignment>true</warn-bad-null-assignment>
          <!-- compiler.warn-bad-null-comparison: Illogical comparison with null.-->
          <warn-bad-null-comparison>true</warn-bad-null-comparison>
          <!-- compiler.warn-bad-undefined-comparison: Illogical comparison with undefined.  Only untyped variables (or variables of type *) can be undefined.-->
          <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
          <!-- compiler.warn-boolean-constructor-with-no-args: Boolean() with no arguments returns false in ActionScript 3.0.  Boolean() returned undefined in ActionScript 2.0.-->
          <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
          <!-- compiler.warn-changes-in-resolve: __resolve is no longer supported.-->
          <warn-changes-in-resolve>false</warn-changes-in-resolve>
          <!-- compiler.warn-class-is-sealed: Class is sealed.  It cannot have members added to it dynamically.-->
          <warn-class-is-sealed>true</warn-class-is-sealed>
          <!-- compiler.warn-const-not-initialized: Constant not initialized.-->
          <warn-const-not-initialized>true</warn-const-not-initialized>
          <!-- compiler.warn-constructor-returns-value: Function used in new expression returns a value.  Result will be what the function returns, rather than a new instance of that function.-->
          <warn-constructor-returns-value>false</warn-constructor-returns-value>
          <!-- compiler.warn-deprecated-event-handler-error: EventHandler was not added as a listener.-->
          <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
          <!-- compiler.warn-deprecated-function-error: Unsupported ActionScript 2.0 function.-->
          <warn-deprecated-function-error>true</warn-deprecated-function-error>
          <!-- compiler.warn-deprecated-property-error: Unsupported ActionScript 2.0 property.-->
          <warn-deprecated-property-error>true</warn-deprecated-property-error>
          <!-- compiler.warn-duplicate-argument-names: More than one argument by the same name.-->
          <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
          <!-- compiler.warn-duplicate-variable-def: Duplicate variable definition -->
          <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
          <!-- compiler.warn-for-var-in-changes: ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order.-->
          <warn-for-var-in-changes>false</warn-for-var-in-changes>
          <!-- compiler.warn-import-hides-class: Importing a package by the same name as the current class will hide that class identifier in this scope.-->
          <warn-import-hides-class>true</warn-import-hides-class>
          <!-- compiler.warn-instance-of-changes: Use of the instanceof operator.-->
          <warn-instance-of-changes>true</warn-instance-of-changes>
          <!-- compiler.warn-internal-error: Internal error in compiler.-->
          <warn-internal-error>true</warn-internal-error>
          <!-- compiler.warn-level-not-supported: _level is no longer supported. For more information, see the flash.display package.-->
          <warn-level-not-supported>true</warn-level-not-supported>
          <!-- compiler.warn-missing-namespace-decl: Missing namespace declaration (e.g. variable is not defined to be public, private, etc.).-->
          <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
          <!-- compiler.warn-negative-uint-literal: Negative value will become a large positive value when assigned to a uint data type.-->
          <warn-negative-uint-literal>true</warn-negative-uint-literal>
          <!-- compiler.warn-no-constructor: Missing constructor.-->
          <warn-no-constructor>false</warn-no-constructor>
          <!-- compiler.warn-no-explicit-super-call-in-constructor: The super() statement was not called within the constructor.-->
          <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
          <!-- compiler.warn-no-type-decl: Missing type declaration.-->
          <warn-no-type-decl>true</warn-no-type-decl>
          <!-- compiler.warn-number-from-string-changes: In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns NaN in ActionScript 2.0 when the parameter is '' or contains white space.-->
          <warn-number-from-string-changes>false</warn-number-from-string-changes>
          <!-- compiler.warn-scoping-change-in-this: Change in scoping for the this keyword.  Class methods extracted from an instance of a class will always resolve this back to that instance.  In ActionScript 2.0 this is looked up dynamically based on where the method is invoked from.-->
          <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
          <!-- compiler.warn-slow-text-field-addition: Inefficient use of += on a TextField.-->
          <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
          <!-- compiler.warn-unlikely-function-value: Possible missing parentheses.-->
          <warn-unlikely-function-value>true</warn-unlikely-function-value>
          <!-- compiler.warn-xml-class-has-changed: Possible usage of the ActionScript 2.0 XML class.-->
          <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
       </compiler>
       <!-- debug-password: the password to include in debuggable SWFs-->
       <!-- debug-password usage:
       <debug-password>string</debug-password>
       -->
       <!-- default-background-color: default background color (may be overridden by the application code)-->
       <default-background-color>0xFFFFFF</default-background-color>
       <!-- default-frame-rate: default frame rate to be used in the SWF.-->
       <default-frame-rate>24</default-frame-rate>
       <!-- default-script-limits: default script execution limits (may be overridden by root attributes)-->
       <default-script-limits>
          <max-recursion-depth>1000</max-recursion-depth>
          <max-execution-time>60</max-execution-time>
       </default-script-limits>
       <!-- default-size: default application size (may be overridden by root attributes in the application)-->
       <default-size>
          <width>500</width>
          <height>375</height>
       </default-size>
       <!-- externs: a list of symbols to omit from linking when building a SWF-->
       <!-- externs usage:
       <externs>
          <symbol>string</symbol>
          <symbol>string</symbol>
       </externs>
       -->
       <frames>
          <!-- frames.frame: A SWF frame label with a sequence of classnames that will be linked onto the frame.-->
          <!-- frames.frame usage:
          <frame>
             <label>string</label>
             <classname>string</classname>
          </frame>
          -->
       </frames>
       <framework>halo</framework>
       <!-- include-inheritance-dependencies-only: only include inheritance dependencies of classes specified with include-classes -->
       <!-- include-inheritance-dependencies-only usage:
       <include-inheritance-dependencies-only>boolean</include-inheritance-dependencies-only>
       -->
       <!-- include-resource-bundles: a list of resource bundles to include in the output SWC-->
       <!-- include-resource-bundles usage:
       <include-resource-bundles>
          <bundle>string</bundle>
          <bundle>string</bundle>
       </include-resource-bundles>
       -->
       <!-- includes: a list of symbols to always link in when building a SWF-->
       <!-- includes usage:
       <includes>
          <symbol>string</symbol>
          <symbol>string</symbol>
       </includes>
       -->
       <!-- link-report: Output a XML-formatted report of all definitions linked into the application.-->
       <!-- link-report usage:
       <link-report>filename</link-report>
       -->
       <!-- load-config: load a file containing configuration options-->
       <!-- load-externs: an XML file containing <def>, <pre>, and <ext> symbols to omit from linking when building a SWF-->
       <!-- load-externs usage:
       <load-externs>filename</load-externs>
       -->
       <metadata>
          <!-- metadata.contributor: A contributor's name to store in the SWF metadata-->
          <!-- metadata.contributor usage:
          <contributor>name</contributor>
          -->
          <!-- metadata.creator: A creator's name to store in the SWF metadata-->
          <creator>darkhutgme</creator>
          <!-- metadata.date: The creation date to store in the SWF metadata-->
          <!-- metadata.date usage:
          <date>text</date>
          -->
          <!-- metadata.description: The default description to store in the SWF metadata-->
          <description></description>
          <!-- metadata.language: The language to store in the SWF metadata (i.e. EN, FR)-->
          <language>EN</language>
          <!-- metadata.localized-description: A localized RDF/XMP description to store in the SWF metadata-->
          <!-- metadata.localized-description usage:
          <localized-description>
             <text>string</text>
             <lang>string</lang>
             <lang>string</lang>
          </localized-description>
          -->
          <!-- metadata.localized-title: A localized RDF/XMP title to store in the SWF metadata-->
          <!-- metadata.localized-title usage:
          <localized-title>
             <title>string</title>
             <lang>string</lang>
             <lang>string</lang>
          </localized-title>
          -->
          <!-- metadata.publisher: A publisher's name to store in the SWF metadata-->
          <publisher>darkhutgame</publisher>
          <!-- metadata.title: The default title to store in the SWF metadata-->
          <title>GAME</title>
       </metadata>
       <!-- raw-metadata: XML text to store in the SWF metadata (overrides metadata.* configuration)-->
       <!-- raw-metadata usage:
       <raw-metadata>text</raw-metadata>
       -->
       <!-- remove-unused-rsls: remove RSLs that are not being used by the application-->
       <remove-unused-rsls>true</remove-unused-rsls>
       <!-- resource-bundle-list: prints a list of resource bundles to a file for input to the compc compiler to create a resource bundle SWC file. -->
       <!-- resource-bundle-list usage:
       <resource-bundle-list>filename</resource-bundle-list>
       -->
       <!-- runtime-shared-libraries: a list of runtime shared library URLs to be loaded before the application starts-->
       <!-- runtime-shared-libraries usage:
       <runtime-shared-libraries>
          <url>string</url>
          <url>string</url>
       </runtime-shared-libraries>
       -->
       <!-- runtime-shared-library-path: specifies a SWC to link against, an RSL URL to load, with an optional policy file URL and optional failover URLs -->
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/textLayout.swc</path-element>
          <rsl-url>textLayout_2.0.0.232.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/osmf.swc</path-element>
          <rsl-url>osmf_1.0.0.16316.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/osmf_1.0.0.16316.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/framework.swc</path-element>
          <rsl-url>framework_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/framework_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/charts.swc</path-element>
          <rsl-url>charts_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/charts_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/rpc.swc</path-element>
          <rsl-url>rpc_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/rpc_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/mx/mx.swc</path-element>
          <rsl-url>mx_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/mx_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/advancedgrids.swc</path-element>
          <rsl-url>advancedgrids_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/advancedgrids_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/spark.swc</path-element>
          <rsl-url>spark_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/spark_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/spark_dmv.swc</path-element>
          <rsl-url>spark_dmv_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/spark_dmv_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-path>
          <path-element>/opt/flexsdk/4.6.0/frameworks/libs/sparkskins.swc</path-element>
          <rsl-url>sparkskins_4.6.0.23201.swz</rsl-url>
          <policy-file-url></policy-file-url>
          <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/sparkskins_4.6.0.23201.swz</rsl-url>
          <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
       </runtime-shared-library-path>
       <runtime-shared-library-settings>
          <!-- runtime-shared-library-settings.application-domain: override the application domain an RSL is loaded into. The supported values are 'current', 'default', 'parent', or 'top-level'.-->
          <application-domain>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/textLayout.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/osmf.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/framework.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/charts.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/rpc.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/mx/mx.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/advancedgrids.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/spark.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/spark_dmv.swc</path-element>
             <application-domain-target>default</application-domain-target>
             <path-element>/opt/flexsdk/4.6.0/frameworks/libs/sparkskins.swc</path-element>
             <application-domain-target>default</application-domain-target>
          </application-domain>
          <!-- runtime-shared-library-settings.force-rsls: force an RSL to be loaded, overriding the removal caused by using the remove-unused-rsls option-->
          <!-- runtime-shared-library-settings.force-rsls usage:
          <force-rsls>
             <path-element>string</path-element>
             <path-element>string</path-element>
          </force-rsls>
          -->
       </runtime-shared-library-settings>
       <!-- size-report: Output an XML-formatted report detailing the size of all code and data linked into the application.-->
       <!-- size-report usage:
       <size-report>filename</size-report>
       -->
       <!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
       <static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries>
       <!-- swf-version: specifies the version of the compiled SWF file.-->
       <swf-version>14</swf-version>
       <!-- target-player: specifies the version of the player the application is targeting. Features requiring a later version will not be compiled into the application. The minimum value supported is "9.0.0".-->
       <target-player>11.1.0</target-player>
       <!-- tools-locale: specifies the locale used by the compiler when reporting errors and warnings.-->
       <!-- tools-locale usage:
       <tools-locale>string</tools-locale>
       -->
       <!-- use-direct-blit: Use hardware acceleration to blit graphics to the screen, where such acceleration is available.-->
       <!-- use-direct-blit usage:
       <use-direct-blit>boolean</use-direct-blit>
       -->
       <!-- use-gpu: Use GPU compositing features when drawing graphics, where such acceleration is available.-->
       <!-- use-gpu usage:
       <use-gpu>boolean</use-gpu>
       -->
       <!-- use-network: toggle whether the SWF is flagged for access to network resources-->
       <use-network>true</use-network>
       <!-- verify-digests: verifies the libraries loaded at runtime are the correct ones.-->
       <verify-digests>true</verify-digests>
       <!-- warnings: toggle the display of warnings-->
       <!-- warnings usage:
       <warnings>boolean</warnings>
       -->
    </flex-config>

    Somewhere in your pom.xml where you are configuring your build dependancies there will be a line <scope>caching</scope> this line is configuring the build to use a flex runtime shared library. This line is generating the error because caching is not a valid dependancy scope in maven 3 however mojos uses it anyway. There was a defect opened against flexmojos; I've linked it below. Froeder's response to the issue was that it was not fixable, that the warning is expected and that we'll have to live with it for now.
    https://issues.sonatype.org/browse/FLEXMOJOS-363?page=com.atlassian.jira.plugin.system.iss uetabpanels%3Achangehistory-tabpanel

  • Problems with I/O

    I have a file called test.txt (located in the same dir as my class files) that looks like this (name|hours worked|hourly payrate):
    Fred Mertz|31|20.25
    Lucy Ricardo|42|24.50
    Ethel Mertz|18|18.00
    I would like to read from this file an calculate the paycheck for each
    person. Therefore I have made the PayrollWriter class, but for some reason
    it don't write anything to a new file (when the program starts you specify
    which file you wan't to read from and which new file you would like to make
    with the paycheck).
    import java.io.*;
    import javax.swing.*;
    public class Payroll
    { public static void main(String[] args)
      { String in_name
           = JOptionPane.showInputDialog("Please type input payroll name:");
        String out_name
           = JOptionPane.showInputDialog("Please type output payroll name:");
        if ( in_name != null  &&  out_name != null )
           { processPayroll(in_name, out_name); }
        System.out.println("finished");
      private static void processPayroll(String in, String out)
      { PayrollReader reader = new PayrollReader(in);
        PayrollWriter writer = new PayrollWriter(out);
        while ( reader.getNextRecord() )
              { double pay = reader.hoursOf() * reader.payrateOf();
                writer.printCheck(reader.nameOf(), pay);
        reader.close();
        writer.close();
    public class PayrollReader{
            private BufferedReader infile;
            private String END_OF_FILE = "!";
            private String name;
            private int hours;
            private double payrate;
          /** PayrollReader constructs the reader to read from file  file_name
          public PayrollReader(String file_name)
          { try { infile = new BufferedReader(new FileReader(file_name)); }
            catch (Exception e)
                  { System.out.println("PayrollReader error: bad file name: "
                                       + file_name + "   Aborting!");
                    throw new RuntimeException(e.toString());
          public String nameOf() { return name; }
          public int hoursOf() { return hours; }
          public double payrateOf() { return payrate; }
          public void close()
          { try { infile.close(); }
            catch (IOException e)
                  { System.out.println("PayrollReader warning: file close
    failed"); }
          public boolean getNextRecord()
          { boolean result = false;
            name = null;
            hours = -1;
            payrate = -0.1;
            try { if ( infile.ready() )
                     { String line = infile.readLine();
                       StringTokenizer t = new StringTokenizer(line, "|");
                       String s = t.nextToken().trim();
                            if ( ! s.equals(END_OF_FILE) )    // finished?
                               { if ( t.countTokens() == 2 )  // hours and
    payrate?
                                    { name = s;
                                      hours = new Integer
    (t.nextToken().trim()).intValue();
                                      payrate = new Double
    (t.nextToken().trim()).doubleValue();
                                      result = true;
                                 else { throw new RuntimeException(line); }
             catch (IOException e)
                   { System.out.println("PayrollReader error: " +
    e.getMessage()); }
             catch (RuntimeException e)
                   { System.out.println("PayrollReader error: bad record format:
                                         + e.getMessage() + "  Skipping
    record");
                     result = getNextRecord();  // try again
            return result;
    public class PayrollWriter{
        private String file_name;
        private PrintWriter outfile;
        public PayrollWriter(String file){
         try{
             file_name = file;
             FileWriter w = new FileWriter(file_name);
             outfile = new PrintWriter(w);
             outfile.close();}
         catch (Exception e)
         {System.out.println("sdsdf");}
        public void printCheck(String name, double pay){
            try{outfile.println(name);
             outfile.println(pay);}
            catch(Exception e)
            {System.out.println("jhkhjk");}
        public void close(){
            outfile.close();
        }

    I Found the Error!
    Just needed to remove close() method from my PayrollWriter constructor!

  • Report server times out for 3 mb of excel

    I'm using a report viewer control in our application and it is working fine while displaying data and exporting it in different format by clicking export button provided by the report viewer.
    I have another page but there will be a normal asp button to generate same report. so i am using report viewer control and calling the public method .Render exposed by the report viewer.
        byte[] bytes = rptViewver.ServerReport.Render("Excel", deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
    this time i am getting below exception.
        Exception :System.Net.WebException: The request failed with HTTP status 504: Connection Timed Out.
        at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
        at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
        at Microsoft.SqlServer.ReportingServices2005.Execution.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
        at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
        at Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
        at Reports_GenerateReport.DisplayReport(Boolean IsExport) in f:\Sunil\View Reports\Login\Reports\GenerateReport.aspx.cs:line 1702
    My doubt is like, why it is getting time outs while leveraging same report viewer control internally.
    any suggestions to get rid of this?

    Hi sGudivada,
    Please check the ExecutionLog view in ReportServer database to learn more information about the report. The report server execution log contains information about the reports that execute on the server or on multiple servers in a scale-out deployment. For
    example:
    TimeDataRetrieval fields. Record number of milliseconds spent retrieving the data.
    TimeProcessing fields. Record number of milliseconds spent processing the report.
    TimeRendering fields. Record number of milliseconds spent rendering the report.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms159110(v=sql.110).aspx
    There is an article about troubleshooting report performance, you can refer to it.
    http://msdn.microsoft.com/en-us/library/bb522806(v=sql.105).aspx
    Thanks,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Big Problem in Applet-Servlet Communication-(Help)

    I wrote an method to send serialized objects from Applet to Servlet,
    the method is as following:
    private ObjectInputStream postObjects (URL servlet, Serializable objs[], String sessionID) throws Exception {
    ObjectInputStream in = null;
    ObjectOutputStream out = null;
    try{
    URLConnection con = servlet.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setRequestProperty("Content-Type","application/x-java-serialized-object");
    con.setAllowUserInteraction(false);
    con.setRequestProperty("Cookie", sessionID);
    out = new ObjectOutputStream(con.getOutputStream());
    int numObjects = objs.length;
    for(int x = 0; x < numObjects; x++){
    out.writeObject(objs[x]);
    out.flush();
    out.close();
    in = new ObjectInputStream(con.getInputStream());
    }catch(Exception e){
    e.printStackTrace(System.err);
    throw e;
    }finally{
    return in;
    when I call this method, I got the following error message in Applet console,
    my platform is Salaris 5.8 + iPlanet 6.0.
    java.io.EOFException
         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2150)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2619)
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:726)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
         at com.shinewave.lms.core.client.ServletProxy.postObjects(ServletProxy.java:255)
         at com.shinewave.lms.core.client.ServletProxy.doInitialize(ServletProxy.java:76)
         at com.shinewave.lms.core.client.APIAdapterApplet.LMSInitialize(APIAdapterApplet.java:60)
    java.lang.NullPointerException
         at com.shinewave.lms.core.client.ServletProxy.doInitialize(ServletProxy.java:77)
         at com.shinewave.lms.core.client.APIAdapterApplet.LMSInitialize(APIAdapterApplet.java:60)
    java.lang.NullPointerException
         at com.shinewave.lms.core.client.ServletProxy.doInitialize(ServletProxy.java:82)
         at com.shinewave.lms.core.client.APIAdapterApplet.LMSInitialize(APIAdapterApplet.java:60)
    Please help me to solve this problem, thank you very much.

    Hi..
    Sorry abt this. But I was hoping if u could help out on this..
    I am trying to implement a applet to servlet communication...
    wherin the servlet would read data from the database... and send it back to the applet which gets displayed on the applet...
    But the problem is that the applet is not able to establish a connection with the servlet..
    I am also using another supportive class whose object is basically passed from the servlet to the applet..
    could u help me..
    below is the piece of code...
    APPLET:
    import java.net.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    public class TestApplet extends JApplet implements ActionListener
         JButton btnLoad;
         JTextField tfEmpno, tfFname, tfLname, tfSalary;
         URL url;
    private String webServerStr = null;
    private String hostName = "sandy";
    private int port = 8085;
    private String servletPath = "/jdbcTest.DBDetailsServlet";     
    public TestApplet()
         super();
    // suppress Warning Message
    getRootPane().putClientProperty"defeatSystemEventQueueCheck",Boolean.TRUE);
         public void actionPerformed(ActionEvent ae)
              if(btnLoad.getText().equals("Load"))
                   if(loadData())
                        btnLoad.setText("Save");
              else
                   btnLoad.setText("Load");
    //               saveData();
         public void init()
              setBackground(Color.pink);
              tfEmpno = new JTextField(10);
              tfFname = new JTextField(10);
              tfLname = new JTextField(10);
              tfSalary= new JTextField(10);
              JPanel panel = new JPanel();
              panel.setLayout(new FlowLayout());
              panel.add(tfEmpno);
              panel.add(tfFname);
              panel.add(tfLname);
              panel.add(tfSalary);
              getContentPane().add(panel, BorderLayout.CENTER);
              JPanel bottom = new JPanel(new FlowLayout());
              btnLoad = new JButton("Load");
              btnLoad.addActionListener(this);
              bottom.add(btnLoad);
              getContentPane().add(bottom, BorderLayout.SOUTH);
         public boolean loadData()
              try
         System.out.println("Web Server host name: " + hostName);
         webServerStr = "http://" + hostName + ":" + port + servletPath;
         System.out.println("Web String full = " + webServerStr);
                   String servletGET = webServerStr + "?"
         + URLEncoder.encode("UserOption") + "="
         + URLEncoder.encode("AppletDisplay");     
    //               url = new URL(getCodeBase(),"http://sandy:8080/servlet/jdbcTest.DBDetailsServlet");
                   System.out.println("Complete Servlet Url => " + servletGET);
                   url = new URL(servletGET);
                   URLConnection con = url.openConnection();
                   con.setUseCaches(false); // Turn off caching.
                   InputStream in = con.getInputStream();
                   System.out.println("\nsuccess ....... con.getInputStream() ");
                   ObjectInputStream ois = new ObjectInputStream(in);
                   System.out.println("\nsuccess ....... new ObjectInputStream(in) ");
                   Object object = ois.readObject();
                   System.out.println("\nGot the object from servlet...");
                   if(object != null)
                        System.out.println("\nObject NOT null ...");
                        ArrayList result = (ArrayList) object;
                        jdbcTest.EmployeeValue empval = (jdbcTest.EmployeeValue) result.get(0);
                        tfEmpno.setText(""+empval.getEmp_no());
                        tfFname.setText(empval.getFname());
                        tfLname.setText(empval.getLname());
                        tfSalary.setText(""+empval.getSalary());
                        System.out.println("\nObject processed " + result);
                        repaint();
                   return true;
              catch(Exception e)
                   e.printStackTrace();
                   System.out.println("\n\n loadData()=> E X C E P T I O N : " + e + "\n");
                   return false;               
         public void saveData()
              //yet to be implemented..
    SERVLEt:
    package jdbcTest;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DBDetailsServlet extends HttpServlet
         public void doGet(HttpServletRequest req,HttpServletResponse res )throws ServletException, IOException
              System.out.println("\nInside the doGet()\n");
              ArrayList results = getDetails();
              ObjectOutputStream oos = new ObjectOutputStream(res.getOutputStream());
              oos.writeObject(results);
         public void doPost(HttpServletRequest req,HttpServletResponse res )throws ServletException, IOException
              System.out.println("\nInside the doPost()\n");
              doGet(req,res);
         public ArrayList getDetails()
              try
                   System.out.println("\nServlet : inside GetDetails...");
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:SandyDSN","","");
                   java.sql.Statement stmt = con.createStatement();
                   System.out.println("\n Statement created..");
                   java.sql.ResultSet rs = stmt.executeQuery("SELECT * FROM EMP WHERE EMP_NO = 222");
                   System.out.println("\n Query Executed...");
                   ArrayList results = new ArrayList();
                   while(rs.next())
                        EmployeeValue empval = new EmployeeValue();
                        empval.setEmp_no(rs.getLong("EMP_NO"));
                        empval.setFname(rs.getString("FNAME"));
                        empval.setLname(rs.getString("LNAME"));
                        empval.setSalary(rs.getLong("SALARY"));
                        results.add(empval);
                   System.out.println("\n Resultset Obtained...");
                   stmt.close();
                   con.close();
                   return results;
              catch(Exception e)
                   System.out.println("Error while retreiving details....." + e);
                   return null;
         public boolean saveDetails(EmployeeValue empval)
              try
                   return true;
              catch(Exception e)
                   System.out.println("Error while updating details....." + e);
                   return false;
    The utility class EMployeeValue is as below:
    package jdbcTest;
    import java.io.*;
    class EmployeeValue implements Serializable
         private long emp_no;
         private String fname;
         private String lname;
         private long salary;
         public EmployeeValue()
              super();
         public EmployeeValue(long eno, String fn, String ln,long sal)
              super();
              setEmp_no(eno);
              setFname(fn);
              setLname(ln);
              setSalary(sal);
         public long getEmp_no()
              return emp_no;
         public java.lang.String getFname()
              return fname;
         public java.lang.String getLname()
              return lname;
         public long getSalary()
              return salary;
         public void setEmp_no(long newEmp_no)
              emp_no = newEmp_no;
         public void setFname(java.lang.String newFname)
              fname = newFname;
         public void setLname(java.lang.String newLname)
              lname = newLname;
         public void setSalary(long newSalary)
              salary = newSalary;

  • Error in call _transaction into tx FB02

    Hi,
    I have a call transaction and I want to change  the  BSEG-ZFBDT field. But when I execute the program with the next sentence
    CALL TRANSACTION tcode  USING bdcdata  MODE lv_mode  UPDATE 'S'
          MESSAGES INTO messtab.
    I can see the correct data in the screen, it means, the result into messtab is a warning, but the record was not changed.
    What is the problem, maybe LUW or I am using of incorrectly way the CALL TRANSACTION.  If exist another way for change the position document can you let me know.
    Tkanks.
    Luis

    Dear Rob,
    Warning no. 23 "Condiciones de pago modificadas verifique".
    it means  in english should be "post conditions modified ckeck".
    best regards.
    Luis.

  • Exploring and Exploiting the Bridge Libraries

    One of the things we did when we developed the Bridge Workflow Automation Scripts, was create a set of libraries to make bridge scripting easier and more productive.
    The libraries are AdobeLibrary1.jsx and AdobeLibrary2.jsx. There is an AdobeLibrary3.jsx, but it's primarily patches for the other two.
    Over the next few weeks, I am going to post some messages about those libraries to help get folks started bridge scripting.
    First up are some file handling utilities.
    getBridgeThumbnails and getBridgeFiles are two library functions that return the selected (in Bridge) Thumbnail objects or File objects. getBridgeFiles takes the output from getBridgeThumbnails and converts them to File objects. These functions also ensure that any Version Cue files that were selected are up to date on the local file system prior to returning the selected objects.
    The definition is:
    getBridgeThumbnails = function( mask, getFolderChildren, filesOnly, firstOnly )
    Where:
    mask is a comma delimited list of file extensions or Mac file type strings. The function will only return Thumbnails that point to files of these types. It defaults to no mask, which will return everything. If the user selected Thumbnails that are not included in the mask, the user will be warned by an alert dialog (the user has the ability to opt not to be warned again).
    getFolderChildren is a boolean. Set to true, it will return the first level children of any selected folder. The concept is that if a user selects a folder in bridge, they can operate the files in that folder. It defaults to true.
    filesOnly is a boolean. Set to true, it will return only files, no folders. It defaults to false.
    firstOnly is a boolean. Set to true, it returns only the first valid file found. This is useful when you are attempting to do an example of the result of one of the selected files. It defaults to false.
    One more thing: If the user has a document open in bridge, but has not selected anything, it will assume the entire contents of the document are desired. It will flip up a warning dialog if this is the case (the user can opt to not be warned again).
    We also extended the File Object in bridge (not the point apps) to do the file filtering for us. Part of that was the creation of a number of standard masks.
    TYPES.PHOTOSHOP
    TYPES.PHOTOSHOP_OPENABLE
    etc.
    var thumbs = getBridgeThumbnails( TYPES.PHOTOSHOP_OPENABLE, true, true );
    for ( var i = 0; i < thumbs.length; i++ ) {
    thumb = thumbs[ i ];
    // do something with the selected thumbnail

    John,
    Thanks.
    I'll try to get some basic examples up here too. I think the docs on Exchange were replaced with a non-read only set. Try downloading them again.
    Next Topic: The basic Bridge Scripting Paradigm
    Bridge being what it is, the typical usage of a script is to select a set of files, then select a menu item to perform some magic on the selected files.
    Scripts, therefore, typically need to create a MenuElement at startup, and then wait patiently for the user to call them.
    There are 2 ways scripts get loaded. The first is by placing them in the startup scripts folder. The best way to find the startup scripts folder is to click the button in Preferences.
    The other way is via Adobe ScriptManager. Script Manager is shipped with the full Creative Suite. It does what it says, pretty much. Provides a way to control what scripts load at startup and what don't. With ScriptManager installed (in startup scripts), it automatically loads scripts in the Workflow Automation Scritps folder (child of startup scripts for the full CS2 installation) and one other folder that is settable by the user.
    The Script Manager also has some nice to have features for scripters. When a user selects a script, the Script Manager displays information provided by the scripter. The information includes stuff like the script's name, description, help, author, website, etc. As a scripter, you should always write your scripts assuming the Script Manager is present and loading your script.
    To do this, the minimum script template is:
    // first is a target directive - tells the extendscript engine that
    // this script should be loaded into bridge. Makes it so that if a
    // user opens the script in Bridge, it will load it rather than
    // display the raw script in the ESTK
    #target bridge
    // next - all point products attempt to load all scripts in the
    // startup scripts folder, if your's is bridge-only, make sure it
    // only loads in bridge by wrapping everything in a condition like
    // this
    if ( BridgeTalk.appName == "bridge" ) {
    // always make a namespace object for your script. Make it something
    // that will not likely be something someone else might use. This
    // avoids possible name collisions between scripts
    myScript = {}; // namespace object for this script
    // next ditty is for the Script Manager
    try {
    myScript.scriptInfo = new ScriptManager.ScriptInfo();
    myScript.scriptInfo.set( "name", "My Script" );
    myScript.scriptInfo.set( "description", "A Cool Script" );
    myScript.scriptInfo.set( "help", "Help text" );
    myScript.scriptInfo.set( "author", "Your Name" );
    myScript.scriptInfo.set( "company", "Your Company" );
    myScript.scriptInfo.set( "copyright", "It's mine and you can't have it );
    myScript.scriptInfo.set( "version", "1.0" );
    myScript.scriptInfo.set( "date", "06-27-2005" );
    myScript.scriptInfo.set( "website", "http://www.adobe.com" );
    } catch ( e ) {
    // Your Script Goes HERE.
    myScript.ui = function( menu ) {
    // this function puts up any UI your script needs, then executes
    // the script
    // create your menu
    var menu = MenuElement.create( "command", "My Menu", "at the end of Tools", "tools/myScript" );
    menu.onSelect = myScript.ui;
    // the last thing for the Script Manager - after your script has
    // loaded, send the script info object to it.
    try {
    ScriptManager.reportLoading( myScript.scriptInfo );
    } catch ( e ) {
    } // closing brace for the if (appName == bridge) condition

  • JDBC helper class

    Here is a class that I have written for my jdbc connection issues. Feel free to use it! HOWEVER YOU MUST CHANGE THE SID IN THE PRIVATE FUNCTION AT THE BOTTOM (connectToDatabase) TO MAKE IT WORK FOR YOU!!!
    import java.sql.*;
    import java.io.*;
    public class JBsxDatabase {
         //Local variables
         private Connection conn;
         private PreparedStatement pstmt;
         private ResultSet resultSet;
         private String warning;
    /////////////// Get Functions
         public Connection getConnection()
              return conn;
         public PreparedStatement getPreparedStatement()
              return pstmt;
         public ResultSet getResultSet()
              return resultSet;
         public String getWarning()
              return warning;
    //////////////// Public Functions
         public JBsxDatabase()
              this.conn = null;
                this.pstmt = null;
                this.resultSet = null;
                this.warning = null;
         public boolean initalizeDbConnection(String serverName, String userName, String password)
              try{
                   System.out.println("Connecting to "+serverName);
                   this.conn = ConnectToDatabase(serverName, userName, password);
                   if(conn.isClosed())
                        System.out.println(conn.getWarnings()+"\t"+
                             "Connection With DB could not be established!");
                        return false;
                   else
                        System.out.println("Connected to "+serverName);
              }catch (SQLException e) {
                   warning = e.getMessage();
                   System.out.println("initalizeDbConnection Warning: "+ warning );
                   e.printStackTrace();
                   System.exit(1);
              return true;
         public Statement createStatement(int parm1, int parm2)
              try{
                   return conn.createStatement(parm1, parm2);
              }catch(SQLException e){
                   warning = e.getMessage();
                   System.out.println("createStatement Warning" + warning);
                   e.printStackTrace();
              return null;
         public void setPreparedStatement(String str)
              try{
                   if(!conn.isClosed())
                        PreparedStatement stat = this.conn.prepareStatement(str,ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
                        pstmt = stat;
                   }else
                        System.out.println("setPreparedStatement Warning: connection was not present");
              catch(SQLException e)
                   warning = e.getMessage();
                   System.out.println("setPreparedStatement Warning: "+warning);
                   e.printStackTrace();
         public void addBatchVars()
              try{
                   this.pstmt.addBatch();
              }catch (SQLException eSql){
                   warning = eSql.getMessage();
                   System.out.println("addBatch Warning: "+warning);
         public boolean execPreparedStatement(){
              try{
                   if(pstmt.execute()== false){  //no result set returned
                        if(pstmt.getUpdateCount() == 1){
                             conn.commit();
                             return true;
                   }else{
                        resultSet = pstmt.getResultSet();
                        ResultSetMetaData rsmd = resultSet.getMetaData();
                        if(rsmd.getColumnCount() <= 0)
                             conn.rollback();
                             return false;
                   return true;
              }catch(SQLException e){
                   //e.printStackTrace();
                   warning = e.getMessage();
                   System.out.print("exePreparedStatement Warning: "+warning);
                   return false;
         public boolean execPreparedBatchStatement()
              int[] updateCounts;
              try{
                   conn.setAutoCommit(false);
                   updateCounts = this.pstmt.executeBatch();
                   if(processUpdateCounts(updateCounts) == true){
                        conn.commit();
                        return true;
                   }else{
                        conn.rollback();
                        return false;
              }catch (BatchUpdateException e) {
                   warning = e.getMessage();
                   System.out.println("execPreparedBatchStatement Warning: "+warning);
                   // Not all of the statements were successfully executed
                   updateCounts = e.getUpdateCounts();
                   // Some databases will continue to execute after one fails.
                   // If so, updateCounts.length will equal the number of batched statements.
                   // If not, updateCounts.length will equal the number of successfully executed statements
                   processUpdateCounts(updateCounts);
                  try{   conn.rollback();  }
                  catch (SQLException eSql){}
             }catch (SQLException e) {
                   warning = e.getMessage();
                   System.out.println("execPreparedBatchStatement Warning: "+warning);
              return true;
         public static boolean processUpdateCounts(int[] updateCounts)
              for (int i=0; i<updateCounts.length; i++) {
                   if (updateCounts[i] >= 0) {
                        //System.out.println("Successfull Executed Query.");
                   } else if (updateCounts[i] == Statement.SUCCESS_NO_INFO) {
                        // Successfully executed; number of affected rows not available
                   } else if (updateCounts[i] == Statement.EXECUTE_FAILED) {
                        System.out.println("Element #: "+i+" failed to execute.");
                        return false;
              return true;
         public void printResultSet(ResultSet rs)
              try{
                   ResultSetMetaData rsmd = rs.getMetaData();
                   int numCols = rsmd.getColumnCount();
                   rs.beforeFirst();
                   while(rs.next()){
                        for(int i = numCols; i < numCols; i++){
                             rs.getObject(i).toString();
              }catch(SQLException e) {
                   e.printStackTrace();
         public void bindIntVar(int num, int intVal)
              try{ this.pstmt.setInt(num, intVal); }
              catch(SQLException e) {
                   warning = e.getMessage();
                   System.out.println("bindIntVar Warning: "+ warning );
                   e.printStackTrace();
         public void bindStringVar(int num, String str)
              try{ this.pstmt.setString(num,str); }
              catch (SQLException e){
                   warning = e.toString();
                   System.out.println("bindStringVar Warning: "+warning);
                   e.printStackTrace();
         public void bindDoubleVar(int num, double dbl)
              try{ this.pstmt.setDouble(num,dbl);}
              catch(SQLException e){
                   warning = e.toString();
                   System.out.println("bindDoubleVar Warning: "+warning);
                   e.printStackTrace();
         public void bindArray(int num, Array array)
              try{ this.pstmt.setArray(num, array);}
              catch(SQLException e){
                   warning = e.toString();
                   System.out.println("bindArray Warning: "+warning);
                   e.printStackTrace();
         public void destroyDbConnection()
              try{
                   this.conn.close();
                   if(resultSet != null){
                        this.resultSet.close();
                   if(pstmt != null){
                        this.rs.close();
                   System.out.println("DB Connection was Disconnected.");
              }catch(SQLException e){
                   warning = e.getMessage();
                   System.out.println("destroyDbConnection Warning: "+warning);
                   e.printStackTrace();
    /////////////////  Private Functions
         private Connection ConnectToDatabase(String serverName, String username, String password)
              String sid = "????";
              String portNumber = "1521";
              String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
              Connection conn = null;
              try{
                   // Load the JDBC driver
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   //Connect to DB
                    conn = DriverManager.getConnection(url, username, password);
              }catch (SQLException e) {
                   warning = e.getMessage();
                   System.out.println("ConnectToDatbase Warning: " +e.getMessage());
              return conn;
    }

    http://java.sun.com/products/jndi/tutorial/
    This will explain it better than I could in the amount of space we have here.
    The point I was trying to make is this, it's a good crack at a db utility class, the problem with db utility classes is that there are lots of ways to skin the cat, and it's very complicated to cover all the bases one might need realistically much less trying to cover them all.

  • "com.mysql.jdbc.PacketTooBigException": Help needed urgently

    hi,
    I am using mm.mysql j/connector ver 3.0.6 and MYSQL server version 4.0.
    Max_allowed packet= 8MB at the server side
    I am getting PacketTooBigException when i am trying to update a particular column.
    What should i do.
    Any help will be greatly appreciated!!!

    the driver uses a 64 k max packet size by default. it is supposed to change this as neccessary upon connection but perhaps that is failing?
    below is the 3.0.7 connection code that i have slightly modified for you so that it prints out the connection properties after they have been initialized so that you can see what they are.
    try it out and i hope you find this helpful.
       Copyright (C) 2002 MySQL AB
          This program is free software; you can redistribute it and/or modify
          it under the terms of the GNU General Public License as published by
          the Free Software Foundation; either version 2 of the License, or
          (at your option) any later version.
          This program is distributed in the hope that it will be useful,
          but WITHOUT ANY WARRANTY; without even the implied warranty of
          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
          GNU General Public License for more details.
          You should have received a copy of the GNU General Public License
          along with this program; if not, write to the Free Software
          Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    /*Slight Modification by Max Stocker April 29, 2003 to trace what the connection values get initialized to. */
    package com.mysql.jdbc;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.Reader;
    import java.io.UnsupportedEncodingException;
    import java.math.BigDecimal;
    import java.net.URL;
    import java.sql.Clob;
    import java.sql.Date;
    import java.sql.ParameterMetaData;
    import java.sql.Ref;
    import java.sql.SQLException;
    import java.sql.Savepoint;
    import java.sql.Time;
    import java.sql.Timestamp;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Properties;
    import java.util.StringTokenizer;
    import java.util.TimeZone;
    * A Connection represents a session with a specific database.  Within the
    * context of a Connection, SQL statements are executed and results are
    * returned.
    * <P>A Connection's database is able to provide information describing
    * its tables, its supported SQL grammar, its stored procedures, the
    * capabilities of this connection, etc.  This information is obtained
    * with the getMetaData method.
    * @see java.sql.Connection
    * @author Mark Matthews
    * @version $Id: Connection.java,v 1.31.2.19 2003/03/28 22:42:24 mmatthew Exp $
    public class Connection implements java.sql.Connection {
        // The command used to "ping" the database.
        // Newer versions of MySQL server have a ping() command,
        // but this works for everything
        private static final String PING_COMMAND = "SELECT 1";
         * Map mysql transaction isolation level name to
         * java.sql.Connection.TRANSACTION_XXX
        private static Map mapTransIsolationName2Value = null;
         * The mapping between MySQL charset names
         * and Java charset names.
         * Initialized by loadCharacterSetMapping()
        private static Map charsetMap;
         * Table of multi-byte charsets.
         * Initialized by loadCharacterSetMapping()
        private static Map multibyteCharsetsMap;
         * Default socket factory classname
        private static final String DEFAULT_SOCKET_FACTORY = StandardSocketFactory.class
            .getName();
        static {
            loadCharacterSetMapping();
            mapTransIsolationName2Value = new HashMap(8);
            mapTransIsolationName2Value.put("READ-UNCOMMITED",
                new Integer(TRANSACTION_READ_UNCOMMITTED));
              mapTransIsolationName2Value.put("READ-UNCOMMITTED",
                   new Integer(TRANSACTION_READ_UNCOMMITTED));
            mapTransIsolationName2Value.put("READ-COMMITTED",
                new Integer(TRANSACTION_READ_COMMITTED));
            mapTransIsolationName2Value.put("REPEATABLE-READ",
                new Integer(TRANSACTION_REPEATABLE_READ));
            mapTransIsolationName2Value.put("SERIALIZABLE",
                new Integer(TRANSACTION_SERIALIZABLE));
         * Internal DBMD to use for various database-version
         * specific features
        private DatabaseMetaData dbmd = null;
         * The list of host(s) to try and connect to
        private List hostList = null;
          * A map of statements that have had setMaxRows() called on them
         private Map statementsUsingMaxRows;
         * The I/O abstraction interface (network conn to
         * MySQL server
        private MysqlIO io = null;
         * Mutex
        private final Object mutex = new Object();
         * The driver instance that created us
        private NonRegisteringDriver myDriver;
         * The map of server variables that we retrieve
         * at connection init.
        private Map serverVariables = null;
         * Properties for this connection specified by user
        private Properties props = null;
         * The database we're currently using
         * (called Catalog in JDBC terms).
        private String database = null;
         * If we're doing unicode character conversions,
         * what encoding do we use?
        private String encoding = null;
         * The hostname we're connected to
        private String host = null;
         * The JDBC URL we're using
        private String myURL = null;
         * The password we used
        private String password = null;
         * Classname for socket factory
        private String socketFactoryClassName = null;
         * The user we're connected as
        private String user = null;
         * The timezone of the server
        private TimeZone serverTimezone = null;
         * Allow LOAD LOCAL INFILE (defaults to true)
        private boolean allowLoadLocalInfile = true;
         * Are we in autoCommit mode?
        private boolean autoCommit = true;
         * Should we capitalize mysql types
        private boolean capitalizeDBMDTypes = false;
         * Should we continue processing batch commands if
         * one fails. The JDBC spec allows either way, so
         * we let the user choose
        private boolean continueBatchOnError = true;
         * Should we do unicode character conversions?
        private boolean doUnicode = false;
         * Are we failed-over to a non-master host
        private boolean failedOver = false;
        /** Does the server suuport isolation levels? */
        private boolean hasIsolationLevels = false;
         * Does this version of MySQL support quoted identifiers?
        private boolean hasQuotedIdentifiers = false;
        // This is for the high availability :) routines
        private boolean highAvailability = false;
         * Has this connection been closed?
        private boolean isClosed = true;
         * Should we tell MySQL that we're an interactive client?
        private boolean isInteractiveClient = false;
         * Is the server configured to use lower-case
         * table names only?
        private boolean lowerCaseTableNames = false;
         * Has the max-rows setting been changed from
         * the default?
        private boolean maxRowsChanged = false;
         * Do we expose sensitive information in exception
         * and error messages?
        private boolean paranoid = false;
         * Should we do 'extra' sanity checks?
        private boolean pedantic = false;
         * Are we in read-only mode?
        private boolean readOnly = false;
        /** Do we relax the autoCommit semantics? (For enhydra, for example) */
        private boolean relaxAutoCommit = false;
         * Do we need to correct endpoint rounding errors
        private boolean strictFloatingPoint = false;
         * Do we check all keys for updatable result sets?
        private boolean strictUpdates = true;
        /** Are transactions supported by the MySQL server we are connected to? */
        private boolean transactionsSupported = false;
         * Has ANSI_QUOTES been enabled on the server?
        private boolean useAnsiQuotes = false;
         * Should we use compression?
        private boolean useCompression = false;
         * Can we use the "ping" command rather than a
         * query?
        private boolean useFastPing = false;
         * Should we tack on @hostname in DBMD.getTable/ColumnPrivileges()?
        private boolean useHostsInPrivileges = true;
         * Should we use SSL?
        private boolean useSSL = false;
         * Should we use stream lengths in prepared statements?
         * (true by default == JDBC compliant)
        private boolean useStreamLengthsInPrepStmts = true;
         * Should we use timezone information?
        private boolean useTimezone = false;
        /** Should we return PreparedStatements for UltraDev's stupid bug? */
        private boolean useUltraDevWorkAround = false;
        private double initialTimeout = 2.0D;
         * How many hosts are in the host list?
        private int hostListSize = 0;
         * isolation level
        private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
         * The largest packet we can send (changed
         * once we know what the server supports, we
         * get this at connection init).
        private int maxAllowedPacket = 65536;
        private int maxReconnects = 3;
         * The max rows that a result set can contain.
         * Defaults to -1, which according to the JDBC
         * spec means "all".
        private int maxRows = -1;
        private int netBufferLength = 16384;
         * The port number we're connected to
         * (defaults to 3306)
        private int port = 3306;
         * How many queries should we wait before we try to re-connect
         * to the master, when we are failing over to replicated hosts
         * Defaults to 50
        private int queriesBeforeRetryMaster = 50;
         * What should we set the socket timeout to?
        private int socketTimeout = 0; // infinite
         * When did the last query finish?
        private long lastQueryFinishedTime = 0;
         * When did the master fail?
        private long masterFailTimeMillis = 0L;
         * Number of queries we've issued since the master
         * failed
        private long queriesIssuedFailedOver = 0;
         * How many seconds should we wait before retrying to connect
         * to the master if failed over? We fall back when either
         * queriesBeforeRetryMaster or secondsBeforeRetryMaster is
         * reached.
        private long secondsBeforeRetryMaster = 30L;
         * The type map for UDTs (not implemented, but used by
         * some third-party vendors, most notably IBM WebSphere)
        private Map typeMap;
         * Ignore non-transactional table warning for rollback?
        private boolean ignoreNonTxTables = false;
         * Creates a connection to a MySQL Server.
         * @param host the hostname of the database server
         * @param port the port number the server is listening on
         * @param info a Properties[] list holding the user and password
         * @param database the database to connect to
         * @param url the URL of the connection
         * @param d the Driver instantation of the connection
         * @exception java.sql.SQLException if a database access error occurs
        Connection(String host, int port, Properties info, String database,
            String url, NonRegisteringDriver d) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { host, new Integer(port), info, database, url, d };
                Debug.methodCall(this, "constructor", args);
            this.serverVariables = new HashMap();
            hostList = new ArrayList();
            if (host == null) {
                this.host = "localhost";
                hostList.add(this.host);
            } else if (host.indexOf(",") != -1) {
                // multiple hosts separated by commas (failover)
                StringTokenizer hostTokenizer = new StringTokenizer(host, ",", false);
                while (hostTokenizer.hasMoreTokens()) {
                    hostList.add(hostTokenizer.nextToken().trim());
            } else {
                this.host = host;
                hostList.add(this.host);
            hostListSize = hostList.size();
            this.port = port;
            if (database == null) {
                throw new SQLException("Malformed URL '" + url + "'.", "S1000");
            this.database = database;
            this.myURL = url;
            this.myDriver = d;
            this.user = info.getProperty("user");
            this.password = info.getProperty("password");
            if ((this.user == null) || this.user.equals("")) {
                this.user = "nobody";
            if (this.password == null) {
                this.password = "";
            this.props = info;
            initializeDriverProperties(info);
            if (Driver.DEBUG) {
                System.out.println("Connect: " + this.user + " to " + this.database);
            try {
                createNewIO(false);
                this.dbmd = new DatabaseMetaData(this, this.database);
            } catch (java.sql.SQLException ex) {
                cleanup();
                // don't clobber SQL exceptions
                throw ex;
            } catch (Exception ex) {
                cleanup();
                StringBuffer mesg = new StringBuffer();
                if (!useParanoidErrorMessages()) {
                    mesg.append("Cannot connect to MySQL server on ");
                    mesg.append(this.host);
                    mesg.append(":");
                    mesg.append(this.port);
                    mesg.append(".\n\n");
                    mesg.append("Make sure that there is a MySQL server ");
                    mesg.append("running on the machine/port you are trying ");
                    mesg.append(
                        "to connect to and that the machine this software is "
                        + "running on ");
                    mesg.append("is able to connect to this host/port "
                        + "(i.e. not firewalled). ");
                    mesg.append(
                        "Also make sure that the server has not been started "
                        + "with the --skip-networking ");
                    mesg.append("flag.\n\n");
                } else {
                    mesg.append("Unable to connect to database.");
                mesg.append("Underlying exception: \n\n");
                mesg.append(ex.getClass().getName());
                throw new java.sql.SQLException(mesg.toString(), "08S01");
         * If a connection is in auto-commit mode, than all its SQL
         * statements will be executed and committed as individual
         * transactions.  Otherwise, its SQL statements are grouped
         * into transactions that are terminated by either commit()
         * or rollback().  By default, new connections are in auto-
         * commit mode.  The commit occurs when the statement completes
         * or the next execute occurs, whichever comes first.  In the
         * case of statements returning a ResultSet, the statement
         * completes when the last row of the ResultSet has been retrieved
         * or the ResultSet has been closed.  In advanced cases, a single
         * statement may return multiple results as well as output parameter
         * values.  Here the commit occurs when all results and output param
         * values have been retrieved.
         * <p><b>Note:</b> MySQL does not support transactions, so this
         *                 method is a no-op.
         * @param autoCommit - true enables auto-commit; false disables it
         * @exception java.sql.SQLException if a database access error occurs
        public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Boolean(autoCommit) };
                Debug.methodCall(this, "setAutoCommit", args);
            checkClosed();
            if (this.transactionsSupported) {
                // this internal value must be set first as failover depends on it
                // being set to true to fail over (which is done by most
                // app servers and connection pools at the end of
                // a transaction), and the driver issues an implicit set
                // based on this value when it (re)-connects to a server
                // so the value holds across connections
                this.autoCommit = autoCommit;
                String sql = "SET autocommit=" + (autoCommit ? "1" : "0");
                execSQL(sql, -1, this.database);
            } else {
                if ((autoCommit == false) && (this.relaxAutoCommit == false)) {
                    throw new SQLException("MySQL Versions Older than 3.23.15 "
                        + "do not support transactions", "08003");
                } else {
                    this.autoCommit = autoCommit;
            return;
         * gets the current auto-commit state
         * @return Current state of the auto-commit mode
         * @exception java.sql.SQLException (why?)
         * @see setAutoCommit
        public boolean getAutoCommit() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getAutoCommit", args);
                Debug.returnValue(this, "getAutoCommit",
                    new Boolean(this.autoCommit));
            return this.autoCommit;
         * A sub-space of this Connection's database may be selected by
         * setting a catalog name.  If the driver does not support catalogs,
         * it will silently ignore this request
         * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
         * @param catalog the database for this connection to use
         * @throws java.sql.SQLException if a database access error occurs
        public void setCatalog(String catalog) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { catalog };
                Debug.methodCall(this, "setCatalog", args);
            checkClosed();
            String quotedId = this.dbmd.getIdentifierQuoteString();
            if ((quotedId == null) || quotedId.equals(" ")) {
                quotedId = "";
            StringBuffer query = new StringBuffer("USE ");
            query.append(quotedId);
            query.append(catalog);
            query.append(quotedId);
            execSQL(query.toString(), -1, catalog);
            this.database = catalog;
         * Return the connections current catalog name, or null if no
         * catalog name is set, or we dont support catalogs.
         * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
         * @return the current catalog name or null
         * @exception java.sql.SQLException if a database access error occurs
        public String getCatalog() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getCatalog", args);
                Debug.returnValue(this, "getCatalog", this.database);
            return this.database;
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public boolean isClosed() {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "isClosed", args);
                Debug.returnValue(this, "isClosed", new Boolean(this.isClosed));
            return this.isClosed;
         * Returns the character encoding for this Connection
         * @return the character encoding for this connection.
        public String getEncoding() {
            return this.encoding;
         * @see Connection#setHoldability(int)
        public void setHoldability(int arg0) throws SQLException {
            // do nothing
         * @see Connection#getHoldability()
        public int getHoldability() throws SQLException {
            return ResultSet.CLOSE_CURSORS_AT_COMMIT;
         * NOT JDBC-Compliant, but clients can use this method
         * to determine how long this connection has been idle.
         * This time (reported in milliseconds) is updated once
         * a query has completed.
         * @return number of ms that this connection has
         * been idle, 0 if the driver is busy retrieving results.
        public long getIdleFor() {
            if (this.lastQueryFinishedTime == 0) {
                return 0;
            } else {
                long now = System.currentTimeMillis();
                long idleTime = now - this.lastQueryFinishedTime;
                return idleTime;
         * Should we tell MySQL that we're an interactive client
         * @return true if isInteractiveClient was set to true.
        public boolean isInteractiveClient() {
            return isInteractiveClient;
         * A connection's database is able to provide information describing
         * its tables, its supported SQL grammar, its stored procedures, the
         * capabilities of this connection, etc.  This information is made
         * available through a DatabaseMetaData object.
         * @return a DatabaseMetaData object for this connection
         * @exception java.sql.SQLException if a database access error occurs
        public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException {
            checkClosed();
            return new DatabaseMetaData(this, this.database);
         * You can put a connection in read-only mode as a hint to enable
         * database optimizations
         * <B>Note:</B> setReadOnly cannot be called while in the middle
         * of a transaction
         * @param readOnly - true enables read-only mode; false disables it
         * @exception java.sql.SQLException if a database access error occurs
        public void setReadOnly(boolean readOnly) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Boolean(readOnly) };
                Debug.methodCall(this, "setReadOnly", args);
                Debug.returnValue(this, "setReadOnly", new Boolean(readOnly));
            checkClosed();
            this.readOnly = readOnly;
         * Tests to see if the connection is in Read Only Mode.  Note that
         * we cannot really put the database in read only mode, but we pretend
         * we can by returning the value of the readOnly flag
         * @return true if the connection is read only
         * @exception java.sql.SQLException if a database access error occurs
        public boolean isReadOnly() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "isReadOnly", args);
                Debug.returnValue(this, "isReadOnly", new Boolean(this.readOnly));
            return this.readOnly;
         * @see Connection#setSavepoint()
        public java.sql.Savepoint setSavepoint() throws SQLException {
            throw new NotImplemented();
         * @see Connection#setSavepoint(String)
        public java.sql.Savepoint setSavepoint(String arg0)
            throws SQLException {
            throw new NotImplemented();
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public TimeZone getServerTimezone() {
            return this.serverTimezone;
         * DOCUMENT ME!
         * @param level DOCUMENT ME!
         * @throws java.sql.SQLException DOCUMENT ME!
        public void setTransactionIsolation(int level) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Integer(level) };
                Debug.methodCall(this, "setTransactionIsolation", args);
            checkClosed();
            if (this.hasIsolationLevels) {
                StringBuffer sql = new StringBuffer(
                        "SET SESSION TRANSACTION ISOLATION LEVEL ");
                switch (level) {
                case java.sql.Connection.TRANSACTION_NONE:
                    throw new SQLException("Transaction isolation level "
                        + "NONE not supported by MySQL");
                case java.sql.Connection.TRANSACTION_READ_COMMITTED:
                    sql.append("READ COMMITTED");
                    break;
                case java.sql.Connection.TRANSACTION_READ_UNCOMMITTED:
                    sql.append("READ UNCOMMITTED");
                    break;
                case java.sql.Connection.TRANSACTION_REPEATABLE_READ:
                    sql.append("REPEATABLE READ");
                    break;
                case java.sql.Connection.TRANSACTION_SERIALIZABLE:
                    sql.append("SERIALIZABLE");
                    break;
                default:
                    throw new SQLException("Unsupported transaction "
                        + "isolation level '" + level + "'", "S1C00");
                execSQL(sql.toString(), -1, this.database);
                isolationLevel = level;
            } else {
                throw new java.sql.SQLException("Transaction Isolation Levels are "
                    + "not supported on MySQL versions older than 3.23.36.", "S1C00");
         * Get this Connection's current transaction isolation mode.
         * @return the current TRANSACTION_* mode value
         * @exception java.sql.SQLException if a database access error occurs
        public int getTransactionIsolation() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getTransactionIsolation", args);
                Debug.returnValue(this, "getTransactionIsolation",
                    new Integer(isolationLevel));
            if (this.hasIsolationLevels) {
                 java.sql.Statement stmt = null;
                 java.sql.ResultSet rs = null;
                 try {
                      stmt = this.createStatement();
                      String query = null;
                      if (this.io.versionMeetsMinimum(4, 0, 3)) {
                           query = "SHOW VARIABLES LIKE 'tx_isolation'";
                      } else {
                           query = "SHOW VARIABLES LIKE 'transaction_isolation'";
                      rs = stmt.executeQuery(query);
                      if (rs.next()) {
                           String s = rs.getString(2);
                           if (s != null) {
                                  Integer intTI = (Integer) mapTransIsolationName2Value.get(s);
                                  if (intTI != null) {
                                       return intTI.intValue();
                           throw new SQLException("Could not map transaction isolation '" + s + " to a valid JDBC level.", "S1000");
                      } else {
                           throw new SQLException("Could not retrieve transaction isolation level from server", "S1000");
                 } finally {
                      if (rs != null) {
                           try {
                                rs.close();
                           } catch (Exception ex) {
                                // ignore
                           rs = null;
                      if (stmt != null) {
                           try {
                                stmt.close();
                           } catch (Exception ex) {
                                // ignore
                           stmt = null;
            return isolationLevel;
         * JDBC 2.0
         * Install a type-map object as the default type-map for
         * this connection
         * @param map the type mapping
         * @throws SQLException if a database error occurs.
        public void setTypeMap(java.util.Map map) throws SQLException {
            this.typeMap = map;
         * JDBC 2.0
         * Get the type-map object associated with this connection.
         * By default, the map returned is empty.
         * @return the type map
         * @throws SQLException if a database error occurs
        public synchronized java.util.Map getTypeMap() throws SQLException {
            if (this.typeMap == null) {
                this.typeMap = new HashMap();
            return this.typeMap;
         * The first warning reported by calls on this Connection is
         * returned.
         * <B>Note:</B> Sebsequent warnings will be changed to this
         * java.sql.SQLWarning
         * @return the first java.sql.SQLWarning or null
         * @exception java.sql.SQLException if a database access error occurs
        public java.sql.SQLWarning getWarnings() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getWarnings", args);
                Debug.returnValue(this, "getWarnings", null);
            return null;
         * Allow use of LOAD LOCAL INFILE?
         * @return true if allowLoadLocalInfile was set to true.
        public boolean allowLoadLocalInfile() {
            return this.allowLoadLocalInfile;
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public boolean capitalizeDBMDTypes() {
            return this.capitalizeDBMDTypes;
         * After this call, getWarnings returns null until a new warning
         * is reported for this connection.
         * @exception java.sql.SQLException if a database access error occurs
        public void clearWarnings() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "clearWarnings", args);
            // firstWarning = null;
         * In some cases, it is desirable to immediately release a Connection's
         * database and JDBC resources instead of waiting for them to be
         * automatically released (                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

  • How can I dismiss formula warnings?

    I wrote a formula that is giving me a warning "The formula uses a Boolean in place of a number.", but I'm getting the result I wanted. How can I get rid of the blue warning triangle? I am using Numbers 3.2.2.
    Formulas and Functions Help was no help at all:
    Review errors and warnings in formulas
    When a formula in a table cell is incomplete, contains invalid cell references, or is otherwise incorrect, or when an import operation creates an error condition in a cell, an icon is displayed in the cell.
    A blue triangle in the upper left of a cell indicates one or more warnings.
    A red triangle in the middle of a cell means that a formula error occurred.
    To review the error or warning, tap or click the icon.A message window summarizes each error and warning condition associated with the cell.
    I can see this... I just want to get rid of the distracting triangles all over my spreadsheet.

    What I did was I created a Pop-Up Menu with about 10 different names. I have text in this cells, not numbers. Then, based on the option selected in that cell I want to populate an entire table with values I have in a different sheet. An example below:
    =IF($B$1=Table 2::$B$1,Table2::B3)+IF($B$1=Table 3::$B$1,Table3::B3)+IF($B$1=Table 4::$B$1,Table4::B3)+...
    The warning I get says I'm using boolean instead of numbers, which is fine by me. It does recognize ABC=ABC, TRUE, but I get this warning.

  • Problems JDBC Dynamic Credentials

    Considered:
    I am using Jdev 10.1.2 with ADF, and in the application that I use we have implemented the use of DynamicJDBCCredentials. The particularitity is that the work form is the following one, When initiating, the application must be connected with a user that is taken pre-defined from a file properties, this will show the screen of login, in which the user along with enters his data the selection of the company that wish, when doing this and to press ok, the application would have to change to the user and password of which appmod this connecting itself to the DB, the seteos of user/password takes control correctly, but appmodule does not change the connection and I do not understand because… somebody Will be able to help me with this? From already thank you very much.
    Estimados: Estoy usando Jdev 10.1.2 con ADF, y en la aplicacion que utilizo hemos implementado el uso de DynamicJDBCCredentials. La particularidad es que la forma de trabajo es la siguiente, Al iniciar, la aplicacion debe conectarse con un usuario que se toma pre-definido desde un archivo properties, esto mostrará la pantalla de login, en la cual el usuario ingresa sus datos junto con la seleccion de la empresa que desea, al hacer esto y presionar ok, la aplicacion debería cambiar el usuario y password con el cual el appmod se esta conectando a la DB, los seteos de user/password se hacen correctamente, pero el appmodule no cambia la conexion y no entiendo porque ... Podrá alguien ayudarme con esto? Desde ya muchas gracias.

    I should preface this with a warning that I'm not all that familiar with what you are trying to do. However, it should be possible to use very similar code to what is shown in the How To document for JSPs. In the JSP example, the code is inline part of the JSP. uiXML doesn't mix code and UI, so this code would therefore be located in a method event handler.
    The first thing to do would be to create a uiXML page with form fields for username and password. I would use a messageTextInput for these fields (with the secret attribute set to true for the password field). I would add a "Login" submitButton, and then add a ctrl:event="Login" attribute to the button so that it will fire a UIX Controller "Login" event.
    I would add a handler for the "Login" event in the handlers section of the uiXML page, and use a method event handler to call out to Java code. The method event handler has access to the HTTPSession and the submitted username and password, so you should be able to get the HTTPContainer and manipulate the session. The only major difference with the JSP example, would be that the JSP example uses the <jbo:ApplicationModule> tag in a try/catch block to attempt the connection, and you would need to use the regular BC4J Java APIs. If the connection was sucessful, your event hander would return an EventResult for the next paeg in your application, if there was an error you could return an event result for the same page displaying the error (as discussed in the Handling Errors chapter of the UIX Developer's Guide).
    Whenever discussing login procedures, it is worth pointing out the TrivialPageFlowEngine in the UIX Controller which is useful in enforcing that the user has gone through your login procedure prior to jumping to any page in the application.
    Hope this helps!

Maybe you are looking for

  • Problem in execution of a function having clob datatype

    [http://www.orafaq.com/forum/t/128331/98870/] Hi, I had a Problem in executing a function having clob datatype. Here below is my function. create or replace type split_obj as object     occurence_id number(10,0),     splitvalue varchar2(1000) create

  • How do I boot from a new hard drive?

    I have a 15" MacbookPro (pretty much stock) that I purchased new in Jan. 2012.  I had to replace the hard drive and just got the new drive installed.  Now I need a disc with an OS on it to boot from to get it all working again.  I originally had OS X

  • Can't open photos from later version....

    Hi- I have a mini at home and a G4 at work. I burned a DVD with photos @ home and when I try to open them at work it says that they were created with a newer version of iPhoto. I understand this part but my question is....is the only way to get the n

  • Qosmio G20: How to replace a HDD

    I would like to replace the second HDD with a bigger one and use the replaced one as a backup-clone of my system disk. Just did the cloning and would like to insert the clone as 1st HDD for testing purposes, but I don't know how to actually do this.

  • Need help with flash menu

    i have a drop-down flash menu and i would like it to be centered on my page. i use dreamweaver. when i put the code in, it automatically puts the flash menu to the left, and the drop-down submenus are layered (they will fall over any text that is und