5.1 SP8 Custom ClassLoader ClassFormatError messages

We use a custom ClassLoader that unscrambles classfiles not understood by its parent.
When the Weblogic parent ClassLoader attempts discovers it can't decipher the
file, it writes a ClassFormatError message and stack trace to the console (though
not to the log) before delegating to its child (our code) which proceeds to load
the class with no trouble. The result is that our product runs fine, but appears
to be full of unloadable classes. How can we get the Weblogic ClassLoader to suppress
these misleading error messages? (IMHO, it shouldn't report errors until and unless
both it and its child have failed, but given that it does, is there some way to
make it shut up?)

You can use class preprocessor in WebLogic for that sort of thing (products
like Wily and Tangosol use this feature to instrument or customize classes when
they are loaded by WebLogic classloaders) without adding your own classloaders,
for example, in 6.1:
public class ExamplePreprocessor implements weblogic.utils.classloaders.ClassPreProcessor {
public void initialize(java.util.Hashtable ht) {}
public byte[] preProcess(String classname, byte[] classbytes) {
     ... unscramble or do whatever is that you do with classbytes ...
return classbytes;
and add this to the WebLogic command line :
-Dweblogic.classloader.preprocessor=preprocessorclassname
Jonathan Shultis <[email protected]> wrote:
We use a custom ClassLoader that unscrambles classfiles not understood by its parent.
When the Weblogic parent ClassLoader attempts discovers it can't decipher the
file, it writes a ClassFormatError message and stack trace to the console (though
not to the log) before delegating to its child (our code) which proceeds to load
the class with no trouble. The result is that our product runs fine, but appears
to be full of unloadable classes. How can we get the Weblogic ClassLoader to suppress
these misleading error messages? (IMHO, it shouldn't report errors until and unless
both it and its child have failed, but given that it does, is there some way to
make it shut up?)--
Dimitri

Similar Messages

  • The struggle of creating a Custom ClassLoader for Native libraries

    Hello Everyone,
    I'm having a really hard time writing and using my own ClassLoader in a Java Applet.
    Context :
    As the this link shows - http://codethesis.com/tutorial.php?id=1 - loading and especially unloading native libraries through Java requires defining our own ClassLoader, and use it to instantiate a class loading a library. When the class using native libraries has finished execution, setting all references to the classloader and calling the garbage collector will cause the native library to be unloaded. The class to load within the custom classloader is thus read byte after byte from the jar and defined using the Classloader.defineClass(..) function. So that's what I did. But I've got two problems.
    Problem 1 :
    On one single machine over 15 tested, the magic number of a given class read from the Jar using Applet.class.getResourceAsStream(classname) takes a value different from CAFEBABE and the defineClass function then throws an "Incompatible magic value" exception (see below). The workaround I found is to force the first 4 bytes of the byte array read from the class with CAFEBABE. But I still would like to understand why it takes a different value on this machine.
    Exception in thread "thread applet-MyApplet.class-1" java.lang.ClassFormatError: Incompatible magic value 409165630 in class file Reader
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at NativeClassLoader.findClass(Unknown Source)
    Problem 2 :
    On windows, the NativeClassLoader works perfectly, but on Linux, I'm getting a java.lang.VerifyError (see below).
    Code is compiled with java 1.6.0_06 on windows XP. I tried to remove everything related to native code (remove .so load), the same error is raised.
    java.lang.VerifyError: (class: Reader, method: <clinit> signature: ()V) Illegal instruction found at offset 1
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    Code :
    NativeClassReader (custom) :
    public class NativeClassLoader extends ClassLoader {
        //the unique instance of the NativeClassLoader
        private static NativeClassLoader instance;
        private NativeClassLoader () {
            super(NativeClassLoader.class.getClassLoader());
         * Get the Singleton instance of the class
        public static NativeClassLoader getInstance () {
            if (instance == null)
                instance = new NativeClassLoader();
            return instance;
        public static void dispose () {
            instance = null;
         * Load a class using its full java name (prefixed with package)
        public Class findClass (String theName) {
            byte[] b = null;
            try {
                b = loadClassDataFromJar(theName);
                Class clazz = defineClass(theName, b, 0, b.length);
                resolveClass(clazz);
                return clazz;
            } catch (Exception e) {
                return null;
         * Gets the bytes of a class file stored in the current jar using
         * its full class name
        public byte[] loadClassDataFromJar (String theName)
                                     throws Exception {
            String filename = "/" + theName.replace('.', '/') + ".class";
            InputStream is = SawsApplet.class.getResourceAsStream(filename);
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            //compute file size
            Vector vChars = new Vector();
            int c;
            while ((c = br.read()) != -1)
                vChars.add(new Byte((byte) c));
            //fill in byte array with chars read from the buffer
            byte[] buff = new byte[vChars.size()];
            //workaround for a bug on one (some) Vista machine(s)
            //force magic number to CAFEBABE instead of 18635F3E
            if (vChars.size() > 3) {
                buff[0] = (byte) 0xCA;
                buff[1] = (byte) 0xFE;
                buff[2] = (byte) 0xBA;
                buff[3] = (byte) 0xBE;
            for (int i = 4; i < vChars.size(); ++i)
                buff[i] = ((Byte) vChars.get(i)).byteValue();
            return buff;
    }Reader (loading native libary) :
    public class Reader {
       static {
         System.loadLibrary("myLib");
        public static native String getData();
    }Main :
        NativeClassLoader cLoader = NativeClassLoader.getInstance();
        Class clazz = cLoader.findClass("Reader"); // ClassFormatError thrown here
        Object reader = clazz.newInstance(); // VerifyError thrown here
        Method m = clazz.getMethod("getData");
        String s = m.invoke(reader);
        print(s);
        s = null;
        m = null;
        reader = null;
        clazz = null;
        cLoader = null;
        NativeClassLoader.dispose();
        System.gcAny ideas would be really appreciated :-)
    Guillaume

    Are you using the executable exe file and the filename as a parameter in the custom task?
    Andreas Baumgarten | H&D International Group

  • Creation of Custom IDoc with Message control for sales Order

    Hi all,
    I am trying to create custom Outbound IDoc with message control.
    I wrote the code in a function module and i want to register that function module. (as in inbound registration of function module as in BD51).I am not knowing if that registration is necessary for outbound Idoc, if so in which transacition?
    Please list me the steps to create a custom IDoc for Message control.
    Thanks in advance,
    Regards,
    John.

    Hi,
    You need to use FM : MASTER_IDOC_DISTRIBUTE to create outbound idoc.fill the data in the tables EDIDC,EDIDD and generate the IDOC.
    check this link:
    Re: Master_IDoc_Distribute
    and use transaction : WEDI for IDOC configurations.
    here you will have all the transactions(step by step) to set the outbound IDOC configurations.
    Regards
    Appana

  • Page has a custom page size message

    On the master pages, on a locked layer, we have a frame whose content is set to "Undefined" that is sized to exactly match the page size. This is so the page trim can easily be seen and measured in PDF and when printed and we've never had any trouble with it before.
    We have a file in which when we change the starting page number that frame goes out of position by 9 pts toward the outside of the pages. When we reapply a master to that page (even if its the SAME master) we get the message "Page ## has a custom page size. This page can retain its current size or be resized to match the new master."
    If we select "Keep current size" the outer frame to mark the page trim stays in the wrong position. If we select "Use master page size" that frame gets set correctly.
    I've checked the page size at all stages using both the page tool and the button on the pages pallet and it shows the page size to be exactly what the rest of the pages and the document are set to, so I don't understand why I'm getting this message.
    The first problem I was made aware of with this file is that when we ran our script to auto flow text the script was overriding the master items on to the page in the wrong position. Thinking it had something to do with the script command (which works correctly on other files) I posted this http://forums.adobe.com/message/5206889#5206889 to the scripting forum.
    Now that I've been made aware of this custom page size message I'm thinking this and the script not working correctly are related.
    Thanks for any insight anyone can offer.
    Ken

    I wondered whether my operator had accidentally changed the page size with the page tool selected and that the sizes showing in the dialog and on the tool bar were, maybe, rounded. When I saw your message I was hopeful that, maybe, the preflight would detect an incorrect page size.
    But, alas, it did not! It is showing on errors.
    Thinking that maybe InD was "seeing" the frame that was sitting outside the page as making the page larger I tried repositioning it and removing it before applying the master. But, I received the message again.
    Thanks for taking the time to respond!

  • XMLEncoder stackoverflow problem with custom classloader

    Hi, All
    I'm tring encoding my object using XMLEncoder, the objects are from the custom classloader like URLClassLoader which is importing several jar files at run-time.
    source code is like this:
    XMLEncoder e = new XMLEncoder(new BufferedOutputStream(os));
    e.writeObject( sourceObj);
    When I run it, I experienced this error:
    XMLEncoder has "ClassNotFoundException" or "InstantiationException" problem.
    so I found very similar posting for this problem and modified it so that the XMLEncoder can find my classes from custom classloader:
    ClassLoader cl = this.getClass().getClassLoader();
    URLClassLoader urlClassLoader = new URLClassLoader(urls, cl);
    Thread.currentThread().setContextClassLoader(urlClassLoader);
    XMLEncoder e = new XMLEncoder(new BufferedOutputStream(os));
    e.writeObject( sourceObj);
    The result was slightly changed. However, still disappointing:
    java.lang.StackOverflowError
         at java.lang.Class.getMethod0(Class.java:1734)
         at java.lang.Class.getMethod(Class.java:951)
         at java.beans.Statement.findPublicMethod(Statement.java:230)
         at java.beans.Statement.findMethod(Statement.java:270)
         at java.beans.Statement.getMethod(Statement.java:366)
         at java.beans.Statement.invoke(Statement.java:439)
         at java.beans.Expression.getValue(Expression.java:101)
         at java.beans.Encoder.getValue(Encoder.java:84)
         at java.beans.Encoder.get(Encoder.java:186)
         at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:97)
         at java.beans.Encoder.writeObject(Encoder.java:55)
         at java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
         at java.beans.Encoder.writeExpression(Encoder.java:260)
         at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:351)
         at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
         at java.beans.Encoder.writeObject(Encoder.java:55)
         at java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
         at java.beans.Encoder.writeExpression(Encoder.java:260)
         at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:351)
         at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
         at java.beans.Encoder.writeObject(Encoder.java:55)
         at java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
         at java.beans.Encoder.writeExpression(Encoder.java:260)
         at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:351)
         at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
         at java.beans.Encoder.writeObject(Encoder.java:55)
    When I finally include the jar files into the classpath so that the default classloader can reference them, the encoder worked properly.
    Anyone can help me?

    StackOverFlow is quite a gotcha in XMLEncoder it is often because of the following code in java.beans.PersistenceDelegate:
    public void writeObject(Object oldInstance, Encoder out) {
    Object newInstance = out.get(oldInstance);
    if (!mutatesTo(oldInstance, newInstance)) {
    out.remove(oldInstance);
    out.writeExpression(instantiate(oldInstance, out));
    else {
    initialize(oldInstance.getClass(), oldInstance, newInstance, out);
    and the following code in java.beans.DefaultPersistenceDelegate:
    protected boolean mutatesTo(Object oldInstance, Object newInstance) {
    // Assume the instance is either mutable or a singleton
    // if it has a nullary constructor.
    return (constructor.length == 0) || !definesEquals(oldInstance) ?
    super.mutatesTo(oldInstance, newInstance) :
    oldInstance.equals(newInstance);
    What this means is if you have a class (you want to persist) that has a constructor that takes arguments AND defines an equals method AND you have overridden initialize in DefaultPersistenceDelegate to do some extra work after it instantiates newInstance, then while the PersistenceDelegate is trying to generate you newInstance, oldInstance.equals(newInstance) will return false, and PersistenceDelegate will keep trying to instantiate a newInstance that does equal the oldInstance.
    So if you do use DefaultPersistenceDelegate then ensure that you override mutatesTo so that it is:
    protected boolean mutatesTo(Object oldInstance, Object newInstance) {
    return (newInstance != null && oldInstance.getClass() == newInstance.getClass());
    Here is an example PersistenceDelegate that persistence a class called PersistentBeanCollection, it calls its constructor with the property "type" and then calls the method add() on the newInstance.
    new DefaultPersistenceDelegate(new String[]{"type"}) {
    protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) {
    PersistentBeanCollection oldBeanCollection = (PersistentBeanCollection) oldInstance;
    for (Iterator iterator = oldBeanCollection.iterator(); iterator.hasNext();) {
    out.writeStatement(new Statement(oldInstance, "add", new Object[]{iterator.next()}));
    protected boolean mutatesTo(Object oldInstance, Object newInstance) {
    return (newInstance != null && oldInstance.getClass() == newInstance.getClass());
    Cheers
    Parwy

  • Customized Error/Info  Messages in ADF FACES Pages

    hi every one...
    I need to display customized eerror/info messages in a ADF Faces application.
    How can i use adf:message componenet to do this...

    Hi,
    af:messages show all messages added to the JSF message stack
    FacesContext fctx = FacesContext.getCurrenInstance();
    fctx.addMessage("Some Name Strinng here", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Your error message here",null));
    If <"Some Name Strinng here"> is the id of a component then the error message is also shown below this component
    For customizing error messages - e.g. translating Exceptions into useful user information, see SRDemo, which can be downloaded and installed through JDeveloper Help-->Check for Updates.
    Frank

  • Best way to call custom classloader

    I have created a custom classloader to perform hot deployment for application server. How do I let JVM to use my class loader instead of system class loader?
    a. Using the command line argument -Djava.system.class.loader
    b. Using -javaagent and setting System.setProperty("java.system.class.loader", myclass) in premain method.
    c. Is there any other alternative?
    If I am using the command line approach, I will need to have my jar file in the classpath. What is the best way to do this?
    Thanks for your help

    Or you could write a small program which sets up the classloader and then loads the target program with it.

  • Customer ClassLoader:  keeping JWS from loading jars

    I really like the ability of JWS to be able to download jars required for my application to run, but there are several jars that I need the ability to load up via a custom ClassLoader. But because JWS includes all of these jars in the classpath upon application start, the system class loader will take the first class it can find. Because I need to load classes from these jars based upon something a user selects, I need to have control over the codesource for these classes. Does anyone have any ideas on how to tackle this problem? Not include the jars in the jnlp and then download if not cached locally, if that's the case what's the best way to do that? Include in jnlp and be able to load with custom classloader(I dont think this will work)? Any ideas on this would greatly be appreciated.

    Easiest solution to your problem and still being able to use the update mechanism of JWS is to include your JAR-file in another JAR-file that JWS loads, and then write up your own classloader, which tries to fetch your JAR-file from the downloaded JAR-file (if JWS already downloaded it, otherwise JWS will download it).
    The contents of the jws-stub.jar would be something
    of the following ;).
    jws-stub.jar
    --> myjar1.jar
    --> myjar2.jar
    org.myjar.MyJarClassloader
    Then based on your user selecting something you
    can decide which JAR-file you want to load, and thus
    which class.
    Hope this helped,
    Manfred.

  • Custom ClassLoader - trying to use different version of SNMP library than WebLogic Server 8.1 uses

    Problem: my J2EE ear file uses the AdventNet third-party library to do
    SNMP work. WebLogic Server 8.1 also uses this AdventNet third-party
    library to do its own SNMP work. The problem is the version used by
    WebLogic 8.1 is older than the version I use, so my code tries to run
    and finds the wrong version of the library that WebLogic 8.1 has supplied.
    Possible solution: I plan to have a custom classloader (derived from
    java.lang.ClassLoader) that gets hooked in to my threads using
    Thread.setContextClassLoader(). This custom classloader would look for
    the AdventNet library jars in a spot I specify so it would find the
    correct ones. Since I want to change the usual classloader behavior of
    "look in parent classloaders first, then child classloader" to "look in
    child classloader first, then in parent classloaders" I can't just
    override ClassLoader.findClass(). I, at a minimum, have to override
    ClassLoader.loadClass() to look in my classloader first. I have
    questions about this:
    1. What other methods do I have to override? For example, which of the
    resource-related methods do I need to override so that resources are
    searched for first in my classloader then in parent classloaders?
    2. I was thinking of using a URLClassLoader as a helper to my
    classloader, invoking its method(s) from my custom classloader's
    method(s) to actually load the classes from URLs that are not on the
    standard classpath. I was planning to set it up with a custom parent
    classloader that can't find anything, so that the helper URLClassLoader
    would only ever find classes/resources in the URLs I provide to it. Does
    this approach make sense? Have you seen anything like this done before?
    3. Is there any way around this problem besides a custom ClassLoader? A
    buggy custom ClassLoader would have problems which AFAIK would be
    difficult to track down as ClassLoader problems.
    Thanks in advance for any help you can provide.

    Alvin wrote:
    Hi,
    I am experiencing the same problme and
    even I tried to put the AdventNet jar files
    before weblogic.jar I still cannot get it
    to work
    Would you help me out here.
    Thanks,
    -AlvinI finally figured out a way to do it using a custom classloader that
    looked in the directory where I kept the version of AdventNet I wanted
    before looking in the normal places classloaders look.
    How it works is I hook two classloaders at the bottom of the chain of
    classloaders. My custom BlockingClassLoader is hooked as a child of the
    normal chain of classloaders, then a URLClassLoader is hooked under
    that. The BlockingClassLoader's findClass method checks if the class
    starts with a package prefix I want to control (like "com.adventnet.").
    If it does, then it acts like it can't find the class. This makes its
    child, the URLClassLoader, try to find the class. The URLClassLoader
    is given the URL of places to look for classes that match the directory
    I keep the version of AdventNet I want in. When I load a class, I
    directly tell the URLClassLoader to load it so that it is loaded as I want.
    There's more to it than this. I had to override some other methods in
    my BlockingClassLoader and do some other stuff. I'm not sure if I can
    share the source code, as it was developed on company time and thus is
    owned by the company. Feel free to ask questions though.
    I haven't tried this solution very long (basically just unit tested it)
    but it looks promising.

  • Custom ClassLoader

    I do not understand much how to create a simple custom class loader. I found many explaination about it. I don't really get what it means.
    Can anyone explain to me in simple code? My custom classloader doesn't work at all.
    I want to load a class in another package. How can I do it?
    Thanks

    What do you mean by "package"?

  • Custom classloader in Applet?

    Hi
    I have for some time tried to load an Applet from within an Applet by means of custom classloader.
    However when reading various specifications for classloader they state it is not possible for an Applet to do so.
    Does anyone know otherwise?

    Hi
    To be more specific.. I have 2 Applets yes. In the first signed Applet I run as a jar I have created a custom classloader that extends ClassLoader hence the java bytecode I wish to load (also an Applet) must be (a) class file(s). As far as I know the ClassLoader is not able to define classes from jars right?
    It is only the loading Applet that is packed as a jar and there is no nested jars. However the loaded Applet is now loaded as a class file but I would like to load is a jar for speeding up loading time.
    Quote from http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html:
    There is a cost, however, because the class loader is so powerful (for example, it can replace java.lang.Object with its own version), Java classes like applets are not allowed to instantiate their own loaders. (This is enforced by the class loader, by the way.) This column will not be useful if you are trying to do this stuff with an applet, only with an application running from the trusted class repository (such as local files).

  • Customized ClassLoader

    Can anyone tell me how to write a customized Classloader which can create an instance of any class other than the one stated in the code.
    like, in
    Socket s = new Socket ();
    rather than creating an instance of Socket class, if I want to create instance of any other class, how can I do that?
    -Rohit

    Can anyone tell me how to write a customized
    Classloader which can create an instance of any class
    other than the one stated in the code.Sorry, this can't be done just by writing your own class loader. You would need to tweak the JVM or bytecode.
    It also depends on what you mean by "any other class". If you want to load a modified version of the same class, then along the bytecode route, AspectJ might be able to do the job. There may be other bytecode post-processors that can help as well.
    Exactly what class do you plan on substituting? If you don't know already, any program will fail miserably if the classes loaded behave substantially differently than what was expected.

  • Customizing incorrectly maintained message is appearing in SES, w/o Mat Doc

    Dear all
    Customizing incorrectly maintained message is appearing in service entry sheet in ML81N without showing the mat doc no.  We want to get rid off this message and material document number has to appear.
    When we create SES message came "Customizing incorrectly maintained" & Message no. SE729. When we release the SES then Material Document is not showing in foreground.

    Dear Santosh,
    Reason and Prerequisites
    You have recently made an upgrade
    Number of entries in table T162V is different to the number of columns in table control for screen SAPLMLSP/400.
    Solution
    The variants maintained before and after upgrade are probably different.
    Since different customers maintain different number of entries for each variant, it would not be possible to release a standard note to all customers to fix this. Moreover this cannot be fixed using the Note Assistant, the changes have to be done manually.
    The entries in the Table 'T162V'(for each of the 6 variants) should always be the same as that of the columns in the table control(TC_View).
    Table Control(Screen)  Screen 400 SAPLMSP(TC for services ).
    Below is the standard logic to verify if the customising is correct.
    Determine number of lines in customizing tables
      describe table t162v_tab lines lv_t162vlines.
    Determine number of columns in table control
        describe table tc_view-cols lines lv_tclines.
      lv_tclines = 6 * lv_tclines.
      Here 6 signifies the 6 variants for the TC.
      if lv_t162vlines ne lv_tclines.
        message s729.
      endif.
    Please make sure that the entries maintained in T162V are the same as the columns maintained in the Table Control (TC).
    For this case, you can use SM31 transaction to maintain the same number of entries in table T162V as in TC.
    Please see the attached files "SE729_A.doc" and "SE729_B.doc" for further help, that explain exactly how to check the situation and how to use SM31.
    The most important thing is that you have the same number of entries in lv_t162vlines as in lv_tclines.
    After all changes are made please test the behaviour again.
    =======================================
    Issue two
    The button for services selection is missing and when you want to record a new entry sheet, the system show messagge SE 729.
    This is owing to the incomplete coding of the user-exit that must be performed by the user.
    When the SAP enhancement SRVEDIT is not active, the call of the user-exit is not performed and the value of I_EDIT_KZ is set to 'X', and never changed.
    When you activate your project, which contains the SAP enhancement, you
    need to write the code of the include ZXMLUU18, so that the export parameter E_EDIT of EXIT_SAPLMLSR_001 returns a value. Without code, the parameter value will be blank, hence I_EDIT_KZ will be blank, and the end result is the [Service selection] button disappears. Time out's can also be a result.
    Regards
    Utsav

  • Implementing a custom ClassLoader

    Hi. I have found plenty of tutorials online about how to create your own custom ClassLoader but how do you actually go about indicating to the JVM that it should be using a custom ClassLoader for a given application? I can't figure it out.

    It's quite interesting. Often I find that inquiries on ClassLoader are related to the poster's misunderstanding something, but yes, sometimes interesting things come up.
    I want
    to contrive some sort of mechanism for embedding java
    code or some custom templating language in HTML. Hmm, like JSP?
    I want to avoid having to recompile my whole
    application each time i or someone else updates an
    HTML template. It seems that a custom classloader is
    the answer here where i could write a custom loader
    that would detect recently modified HTML templates
    and re-compile their associated .class file on the
    fly before re-loading the class.I wrote one of these along time ago. Its a bit tricky, but its been done.
    Why reinvent the wheel? I believe you could find one by doing a google for
    DynamicClassLoader.
    Take a look at janino, too.
    Good luck.

  • Creating a Custom Pop-up Message?

    I would like to create a custom pop-up message for a form.  What I'm looking for is when the user types in a series of numbers and if the total is under 650,000 a pop-up message will appear explaining what to do next and then the user clicks okay and the box disappears.  Thanks in advance for any help.

    For the messageBox method see http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001368.html
    The attached contains the following logic on the calculate event on the field 'total'
    // form1.page1.subform1.total::calculate - (JavaScript, client)
    if (form1.page1.subform1.nf1.isNull || form1.page1.subform1.nf2.isNull || form1.page1.subform1.nf3.isNull || form1.page1.subform1.nf4.isNull) {
      this.rawValue = null;
    else {
      var total_ = form1.page1.subform1.nf1.rawValue +
          form1.page1.subform1.nf2.rawValue +
          form1.page1.subform1.nf3.rawValue +
          form1.page1.subform1.nf4.rawValue;
      if (total_ < 650000) {
        xfa.host.messageBox("The total must be 650,000 or greater. Please review...","Total LT 650,000",1);
      this.rawValue = total_;
    The code assumes that fields n1 - nf4 are mandatory. If you need to do the validation prior to an action such as print or save, you will need additional logic to force the calculate to fire.
    Steve

Maybe you are looking for

  • Printer Sensor

    Having a problem with HP Color LaserJet 3800 Printer toner cartridge sensor is saying that toner is out when the color has not even begun to fade and then of course the printer stops printing. Anyone else had this problem or know how to fix it?

  • Open PDF in self service using oaf

    Hello, Can someone brief me how to open a rtf file created in xml publisher directly in selfservice instead of opening using a pdf editor externally? Can we have an option to enter some extra information in that opened rtf document and can we save th

  • Probleme mit Kontakt-Widgets - Weiß jemand einen Rat? Vielen Dank.

    In meiner Homepage funktionieren alle 3 Widgets für Anfragen, Newsletter und Gästebuch nicht. Die E-Mail-Adresse ist richtig eingegeben und die E-Mails landen auch nicht im Spam-Ordner. Bei der Eingabe in den Formularen wird die Anfrage auch richtig

  • Looking for local VRU-PIM TCP port

    Hi Team, I am setting a VRU-PG to connect an external IVR, however I couldn't find anywhere what is the TCP port number used by the vrupim.exe process to open our firewall port accordingly. Is the VRU port dynamic ? "The port Port Utilization Guide f

  • How to solve slow processor speed

    How do you troubleshoot extremely slow processing speed on an Intel based iMac? I have already emptied cache memory, force quit or closed all programs and rebooted. This did not solve the problem.