Logic error in a class I wrote...help

I wrote this class to filter a simplified version of Military time; basically it
returns a true or false statement to whether a specified string contains
the appropriate character sequence. My problem is that it seems to
report false even if my time format is correct.
example:
correct time: "0700"
incorrect time: "700" or invlalid characters "asdf "
maybe you all could catch me logic error...my head is bust
class SimpleMilitaryTime
     //Verify that their are only 4 characters in the string
     public boolean verifyLength(String time)
          int textFieldLength;
          boolean flag = true;
          textFieldLength = time.length();
          if (textFieldLength == 4)
               flag = true;
          else
               flag = false;
          return flag;
     }//end verify length
     //Method for comparing characters that can be used
     public boolean verifyNumerals( String time )
          boolean flag = true;
          int flagCounter = 0;
          char theChar;
//testing characters to see if they match or dont
//match the below lists of char numerals
//If they don't, the flagcounter is increased by 
//one and the flag is returned as false
//because the flagcounter is greater than 0 
//indicating that they are not all numerals but
//some other sort of character
          for (int i = 0; i <= time.length(); i++)
                 theChar = (char)time.indexOf(i);
               switch (theChar)
                    case '0':
                         break;
                    case '1':
                         break;
                    case '2':
                         break;
                    case '3':
                         break;
                    case '4':
                         break;
                    case '5':
                         break;
                    case '6':
                         break;
                    case '7':
                         break;
                    case '8':
                         break;
                    case '9':
                         break;
                    default:
                          flagCounter = flagCounter + 1;
               }//end of switch
          }//end of for loop
          if (flagCounter < 0 )
               flag = true;
          else
               flag = false;
          return flag;
     }//End of Method
     //Method to determine numeral format
     public boolean verifyFormat( String time )
          boolean flag = true;
          boolean hrFlag = true;
          boolean minFlag = true;
          String hr, min;
          hr = time.substring(0, 1);
          min = time.substring(2, 3);
          hrFlag = verifyHrRange( hr );
          //return true if its in the hour range of 0 to 23
          minFlag = verifyMinRange( min );     
                                          //return true if its in the minutes range of 0 to 59
          //If hrFlag or minFlag is false then format does
                                           //not meet the Military Time Format
          if (hrFlag == false || minFlag == false)
               flag = false;
          else
               flag = true;
     return flag;
     }//end of Method
     //Verify the Range of Hr  between 0 and 23
     public boolean verifyHrRange( String hr )
          int hrTime;
          boolean flag = true;
          hrTime = Integer.parseInt( hr );
          if ( hrTime >= 0 && hrTime <= 23 )
               flag = true;
          else
               flag = false;
     return flag;
     }//End of Method
     //Verify the Range of Minutes  between 0 and 59
     public boolean verifyMinRange( String min )
          int minTime;
          boolean flag = true;
          minTime = Integer.parseInt( min );
          if ( minTime >= 0 && minTime <= 59 )
               flag = true;
          else
               flag = false;
     return flag;
     }//End of Method
     //Method validates total time content
     public boolean validateTime( String time )
          boolean flag = true;
          boolean flagLength = true;
          boolean flagNumerals = true;          
          boolean flagFormat = true;          
          flagLength = verifyLength( time );                         //Is the length  == to 4 characters long
          if( flagLength == true )
               flagNumerals = verifyNumerals( time );               //Is the content made up of numerals
               if( flagNumerals == true )
                    flagFormat = verifyFormat( time );               //Is the format within MilitaryTime Specs
                    if( flagFormat == true )
                         flag = true;
                    else
                         flag = false;                                             //IF one or all are FALSE then FLAG is set to false
               else
                    flag = false;
          else
               flag = false;
          //return status of test run
          return flag;               
     }//End of Method
}//End of Class

Interestingly enough, although both examples simplify the logic, I still
recieve a "false" when testing it. Here is some more code that I use
when a text field has lost focus. Right now the code is set to just test
the input.
The field is inialized to "1234". Once the field gains focus, it immediately sets to "false"...not sure why.?.? Even after resetting field
to another 4 digit numeral sequence I still get a "false" return instead of
verifying it as "true. " any ideas?
here is the code for testing the MilitaryTime class:
private class TextFieldListener extends FocusAdapter
     //method that listens losing focus of textfield
     public void focusLost( FocusEvent ev )
          boolean flag;
          String indFALSE, indTRUE;
          indFALSE = "FALSE";
          indTRUE = "TRUE";
          int strLength;
          flag = mt.isValidTime(sunMornStartTime_str); //mt is for MilitaryTime
          if (flag == false)
          sunMornStartTime.setText(new String(indFALSE));
          if (flag == true)
          sunMornStartTime.setText(new String(indTRUE));
     }//End of Method
}//End of private class TextFieldAction

Similar Messages

  • Error in Dev Class - Plz help

    Hi Gurus
    Can anyone tell me why am getting this error meaage while transporting Business Content Sales Query.
    "Error in development class, object ELEM 2BFTY8LWFAIM6KOWLONOC7WYO not saved to the order"
    Shreya

    Shreya,
    BW objects should be transported in the following order: 
    -R/3 objects must be transported in a CTS before BW transports can begin.
    -Objects needs to be transported as per their dependencies.
    Also use the Transport Connection Tool to analyze your objects.
    Hope this helps.
    G.

  • Help!! error of remark classes.zip when build midp2.0

    i changed back to CLDC1.04 + midp2.0
    using cygwin under winxp
    there is no problem when i build cldc, but error occur when i build midp
    error message
    ...classes.zip
    c:\DOCUME~1\owner\LOCALS~1\Temp\make283218.sh: line 1: zip : command not found
    c:\GNU\gnumake.exe:***[classes.zip] Error 127
    all the src files have been complied into class files, the error i guess is during packing jcc's class files into classes.zip, but cannot find the "zip"
    but to my understanding, cldc do not use something like "zip.exe" to pack the class files but the "jar", why midp defnied the following lines in
    {midpdir}\build\share\makefiles\Defs.gmk
    #MIDP tools
    ZIP = zip
    UNZIP = unzip
    is this place where the error comes from?
    anyone can help me? thanks a lot.

    Well just an update. I managed to solve the problem by installing the latest version of IMAQ for LV 8.0 which is IMAQ 3.5.1 instead of the original 3.5.0. I hope this helps someone.

  • HT1338 Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help neede

    Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help needed !

    Hello:
    I would trot back into the Apple store and have them fix the problem (or call Applecare with a warranty issue).  There is no sense in you wasting your time trying to troubleshoot things on a new computer.
    Barry

  • Error while resolving class. Help needed

    I've just installed J2SE JDK 5.0 under Ubuntu Linux 5.10. I used to have it installed under Ubuntu 5.04, and then I did not experience the problem I'm having now.
    I had no problems during the install, and I can compile all .java files I've tried. I can also run a simple program like this:
    class SimpleProgram {
        public static void main(String[] args) {
         String something = "Hello";
         System.out.println(something);
    //     System.out.println("Length: " + something.length());
         System.out.println(something.length());
    }but when I uncoment the line System.out.println("Length: " + something.length()); I get the following error when running the program (it compiles just fine though):
    snow@ubuntu:~/data/Java$ java SimpleProgram
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: SimpleProgram
       at ._ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9Throwable16fillInStackTraceEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5ErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang12LinkageErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang20NoClassDefFoundErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang13VMClassLoader18transformExceptionEPNS0_5ClassEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)   at ._ZN4java4lang13VMClassLoader12resolveClassEPNS0_5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class15initializeClassEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class7forNameEPNS0_6StringEbPNS0_11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN3gnu4java4lang10MainThread3runEv (/usr/lib/libgcj.so.6.0.0)
       at ._Z13_Jv_ThreadRunPN4java4lang6ThreadE (/usr/lib/libgcj.so.6.0.0)
       at ._Z11_Jv_RunMainP14_Jv_VMInitArgsPN4java4lang5ClassEPKciPS6_b (/usr/lib/libgcj.so.6.0.0)
       at .main (/usr/lib/libgij.so.6.0.0)
       at .__libc_start_main (/lib/tls/i686/cmov/libc-2.3.5.so)
    Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
       at ._ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9Throwable16fillInStackTraceEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringEPS1_ (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ExceptionC1EPNS0_6StringEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang22ClassNotFoundExceptionC1EPNS0_6StringEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang22ClassNotFoundExceptionC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java3net14URLClassLoader9findClassEPNS_4lang6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang11ClassLoader9loadClassEPNS0_6StringEb (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang11ClassLoader9loadClassEPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._Z13_Jv_FindClassP13_Jv_Utf8ConstPN4java4lang11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class7forNameEPNS0_6StringEbPNS0_11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN20_Jv_BytecodeVerifier21verify_instructions_0Ev (/usr/lib/libgcj.so.6.0.0)
       at ._Z16_Jv_VerifyMethodP16_Jv_InterpMethod (/usr/lib/libgcj.so.6.0.0)
       at ._ZN21_Jv_InterpreterEngine9do_verifyEPN4java4lang5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN10_Jv_Linker12verify_classEPN4java4lang5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN10_Jv_Linker14wait_for_stateEPN4java4lang5ClassEi (/usr/lib/libgcj.so.6.0.0)
       ...8 moreI get this error with all class files I try to execute that aren't very basic. I've been searching this forum and Google, and the string "Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class:" seems to be related to the class path. However that doesn't make sense to me in this case as I have no problem running the first example program. The .java and .class file is in the same directory (where it also was compiled), and typing "java -classpath . SimpleProgram" returns the same error.
    I hope someone can help me. I'd appreciate it

    I've solved it. I never found out what caused the error, but I installed Debian Sarge instead of Ubuntu 5.10 (not 'cause of this error though ...), and now everything works just fine =)

  • I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found  Help!

    I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found 

    Then, talk to the person running the lab.

  • Error while deployiong bpel process plz help

    i am geting an error while deployiong bpel process plz help
    BUILD FAILED
    E:\jdevstudio10132\jdev\mywork\Application4\vinayread\build.xml:79: A problem occured while connecting to server "chdsez116553d" using port "8888": bpel_vinayread_1.0.jar failed to deploy. Exception message is: ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "vinayread" (revision "1.0"): BPEL validation failed.
    BPEL source validation failed, the errors are:
    [Error ORABPEL-10902]: compilation failed
    [Description]: in "bpel.xml", XML parsing failed because "undefined part element.
    In WSDL at "file:/D:/product/10.1.3.1/OracleAS_8/bpel/domains/default/tmp/.bpel_vinayread_1.0_679323b0585449e9fd1887e6ee2bf444.tmp/vinayred.wsdl", message part element "{http://TargetNamespace.com/vinayred}Root-Element" is not defined in any of the schemas.
    Please make sure the spelling of the element QName is correct and the WSDL import is complete.
    [Potential fix]: n/a.
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
    at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:285)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deployProcess(DeploymentManager.java:862)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:728)
    at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:445)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:646)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at DomainManagerBean_RemoteProxy_4bin6i8.deploySuitcase(Unknown Source)
    at com.oracle.bpel.client.BPELDomainHandle.deploySuitcase(BPELDomainHandle.java:319)
    at com.oracle.bpel.client.BPELDomainHandle.deployProcess(BPELDomainHandle.java:341)
    at deployHttpClientProcess.jspService(_deployHttpClientProcess.java:376)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Total time: 1 second
    plz give sme solutions

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="vinayread"
    targetNamespace="http://xmlns.oracle.com/vinayread"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/vinayread"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and use them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://xmlns.oracle.com/vinayread" schemaLocation="vinayread.xsd" />
              </schema>
         </types>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <message name="vinayreadRequestMessage">
              <part name="payload" element="client:vinayreadProcessRequest"/>
         </message>
         <message name="vinayreadResponseMessage">
              <part name="payload" element="client:vinayreadProcessResponse"/>
         </message>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- portType implemented by the vinayread BPEL process -->
         <portType name="vinayread">
              <operation name="process">
                   <input message="client:vinayreadRequestMessage" />
                   <output message="client:vinayreadResponseMessage"/>
              </operation>
         </portType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <plnk:partnerLinkType name="vinayread">
              <plnk:role name="vinayreadProvider">
                   <plnk:portType name="client:vinayread"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    how to check the
    which xsd contains
    "{http://TargetNamespace.com/vinayred}Root-Element"????
    how to check this plz tell me

  • ABAP LOGICAL ERRORS

    Expalin about ABAP Logical errors?
    Help me sending appropriate link to understand more.
    Moderator Message: Read the Rules of Engagement of this forum.
    Edited by: kishan P on Dec 27, 2011 9:50 PM

    Hi Vinay,
         You can't delete the ABAP Runtime errors. But  you can catch the errors using catch exception Statement.
    For Example,
    Class-based exceptions are handled in the following control structure:
    TRY.
      ...                       " TRY block (application coding)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
      CLEANUP.
        ...                     " CLEANUP block (cleanup context)
    ENDTRY.
    Try This Sample Code,
    *--EXAMPLE FOR RUNTIME ERROR--
    *DATA : VALUE1 TYPE I.
    *VALUE1 = 1 / 0.        -
    >>>>>> IT MAKES RUN TIME ERROR.
    *WRITE : VALUE1.
    *-EXAMPLE FOR HOW TO CATCH THE ARITHMETIC ERROR AT THE RUN TIME USING SUBRC----
    DATA : VALUE1 TYPE I.
    CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
    VALUE1 = 1 / 0.
    WRITE : VALUE1.
    ENDCATCH.
    IF SY-SUBRC = 1.
    WRITE : ' IT MAKES ERROR'.
    ELSE.
    WRITE : VALUE1.
    ENDIF.
    Thanks,
    Reward If Helpful.

  • Compilation Error for import classes not found in generated Proxy Class

    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

    Hi,
    I resolved the other errors by changing all references from com.bea.jcom.Variant
    etc to com.linar.jintegra.class name..all were present under the com.linar.jintegra
    package.
    Thank you all anyways,
    Regards,
    rahul
    "Rahul Srivastava" <[email protected]> wrote:
    >
    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling
    the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch
    class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used
    by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found
    inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface
    with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch
    to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the
    COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

  • Newbie - JSP & bean shopping cart logic error?

    Hello,
    I am attempting to bulid a shopping cart facility on a JSP site that I am building.
    I am having difficulties adding an item to the basket.
    The page below (bookDetail.jsp) displays items for sale from a database. At the foot of the page, I have set up a hyperlink to add an item to a basket bean instance created in this page.
    What happens is the page will load correctly, when i hover the mouse over the hyperlink to add the item to the basket, the status bar shows the URL of the current page with the details of the book appended. This is what I want. But when I click the link, the page will only reload showing 20% of the content.
    Netbeans throws up no errors, neither does Tomcat, so I am assuming I have made a logical error somewhere.
    I have enclosed the Book class, and the ShoppingCart class for your reference.
    Any help would be really appreciated as I am at a loss here.
    Cheers.
    Edited highlights from bookDetail.jsp
    //page header importing 2 classes - Book and ShoppingCart
    <%@ page import="java.util.*, java.sql.*, com.shopengine.Book, com.shopengine.ShoppingCart" errorPage="errorpage.jsp" %>
    //declare variables to store data retrieved from database
    String rs_BookDetail_bookRef = null;
    String rs_BookDetail_bookTitle = null;
    String rs_BookDetail_author = null;
    String rs_BookDetail_price = null;
    //code that retrieves recordset data, displays it, and places it in variables shown above
    <%=(((rs_BookDetail_bookRef = rs_BookDetail.getString("book_ref"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_bookRef)%>
    <%=(((rs_BookDetail_author = rs_BookDetail.getString("author"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_author)%>
    <%=(((rs_BookDetail_bookTitle = rs_BookDetail.getString("book_title"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_bookTitle)%>
    <%=(((rs_BookDetail_price = rs_BookDetail.getString("price"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_price)%>
    //this link is to THIS PAGE to send data to server as request parameters in Key/Value pairs
    // this facilitates the add to basket function
    <a href="<%= response.encodeURL(bookDetail.jsp?title=
    "+rs_BookDetail_bookTitle+"
    &item_id=
    "+rs_BookDetail_bookRef +"
    &author="+rs_BookDetail_author +"
    &price=
    "+rs_BookDetail_price) %> ">
    <img src="images\addtobasket.gif" border="0" alt="Add To Basket"></a></td>
    // use a bean instance to store basket items
    <jsp:useBean id="basket" class="ShoppingCart" scope="session"/>
    <% String title = request.getParameter("title");
    if(title!=null)
    String item_id = request.getParameter("item_id");
    double price = Double.parseDouble(request.getParameter("price"));
    Book item = new Book(item_id, title, author, price);
    basket.addToBasket( item );
    %>
    ShoppingCart class that is used as a bean in bookDetail.jsp shown above
    package com.shopengine;
    //import packages
    import java.util.*;
    //does not declare explicit constructor which automatically creates a zero argument constructor
    //as this class will be instantiated as a bean
    public class ShoppingCart
    //using private instance variables as per JavaBean api
         private Vector basket;
         public ShoppingCart()
              basket = new Vector();
         }//close constructor
    //add object to vector
         public void addToBasket (Book book)
              basket.addElement(book);
         }//close addToBasket method
    //if strings are equal, delete object from vector
         public void deleteFromBasket (String foo)
    for(Enumeration enum = getBasketContents();
    enum.hasMoreElements();)
    //enumerate elements in vector
    Book item = (Book)enum.nextElement();
    //if BookRef is equal to Ref of item for deletion
    //then delete object from vector.
    if (item.getBookRef().equals(foo))
    basket.removeElement(item);
    break;
    }//close if statement
    }//close for loop
         }//close deleteFromBasket method
    //overwrite vector with new empty vector for next customer
         public void emptyBasket()
    basket = new Vector();
         }//close emptyBasket method
         //return size of vector to show how many items it contains
    public int getSizeOfBasket()
    return basket.size();
         }//close getSizeOfBasket method
    //return objects stored in Vector
         public Enumeration getBasketContents()
    return basket.elements();
         }//close getBasketContents method
         public double getTotalPrice()
    //collect book objects using getBasketContents method
    Enumeration enum = getBasketContents();
    //instantiate variable to accrue billng total for each enummeration
    double totalBillAmount;
    //instantiate object to store data for each enummeration
    Book item;
    //create a loop to add up the total cost of items in basket
    for (totalBillAmount=0.0D; enum.hasMoreElements(); totalBillAmount += item.getPrice())
    item = (Book)enum.nextElement();
    }//close for loop
    return totalBillAmount;
         }//close getTotalPrice method
    }//close shopping cart class
    Book Class that is used as an object model for items stored in basket
    package com.shopengine;
    import java.util.*;
    public class Book{
         //define variables
    private String bookRef, bookTitle, author;
         private double price;
    //define class
    public Book(String bookRef, String bookTitle, String author, double price)
    this.bookRef= bookRef;
    this.bookTitle=bookTitle;
    this.author=author;
    this.price=price;
    //create accessor methods
         public String getBookRef()
              return this.bookRef;
         public String getBookTitle()
              return this.bookTitle;
         public String getAuthor()
              return this.author;
         public double getPrice()
              return this.price;
    }//close class

    page will only reload showing 20% of the content.Im building some carts too and I had a similiar problem getting null values from the mysql database. Are you getting null values or are they just not showing up or what?
    On one of the carts I'm building I have a similiar class to yours called products that I cast onto a hashmap works alot better. Mine looks like this, maybe this is no help I don't know.......
    public class Product {
        /**An Item that is for sale.*/
          private String productID = "Missing";
          private String categoryID = "Missing";
          private String modelNumber = "Missing";
          private String modelName = "Missing";
          private String productImage = "Missing";
          private double unitCost;
          private String description = "Missing";
          public Product( 
                           String productID,
                           String categoryID,
                           String modelNumber,
                           String modelName,
                           String productImage,
                           double unitCost,
                           String description) {
                           setProductID(productID);
                           setCategoryID(categoryID);
                           setModelNumber(modelNumber);
                           setModelName(modelName);
                           setProductImage(productImage);
                           setUnitCost(unitCost);
                           setDescription(description);        
          public String getProductID(){
             return(productID);
          private void setProductID(String productID){
             this.productID = productID;
          public String getCategoryID(){
             return(categoryID);
          private void setCategoryID(String categoryID){
             this.categoryID = categoryID;
          public String getModelNumber(){
             return(modelNumber);
          private void setModelNumber(String modelNumber){
             this.modelNumber = modelNumber;
          public String getModelName(){
             return(modelName);
          private void setModelName(String modelName){
             this.modelName = modelName;
          public String getProductImage(){
             return(productImage);
          private void setProductImage(String productImage){
             this.productImage = productImage;
          public double getUnitCost(){
              return(unitCost);
          private void setUnitCost(double unitCost){
              this.unitCost = unitCost;
          public String getDescription(){
              return(description);
          private void setDescription(String description){
              this.description = description;

  • Identifying syntax and logical errors

    Hey guys,
    I'm new to java and I can't figure out this problem as I can't make JDK work with comand prompt for some reason and when trying to write the java in a web page it won't work.
    Can anyone tell me what the three syntax errors and one logical error in the following code is?
    public class Add
    public static void main(String[] args)
    double weight1 = 85.5
    double weight2 = 92.3
    double averWeight = weight1 + weight2 / 2;
    System.out.println("Average is " + aver);
    Any help would be very much appreciated.

    Ok. I'm new to Java. Thanks to the both of you for your help.You're welcome of course; here's a tip: type in these little exercises
    and try to compile them; carefully read what the compiler has to say
    about the possible errors. Note that the compiler is totally blind to
    most "logical errors".
    kind regards,
    Jos

  • Xcode encountered an internal logic error

    I have just installed xcode 4 on my MacMini. I am new to developing and just today have started learning objective c. when i open xcode 4 it gives me an error:
    Internal Error
    Xcode encountered an internal logic error. Choose "Continue" to continue running Xcode in an inconsistent state. Choose "Crash" to halt Xcode and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.
    and also when i click on the show details button it gives me this:
    ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-215/Framework/Classes/PlugInArchitectu re/DVTPlugInManager.m:215
    Details: (extensionPoint) should not be nil.
    Object: <DVTPlugInManager: 0x2000a3c20>
    Method: -_extensionsForExtensionPoint:matchingPredicate:
    Thread: <NSThread: 0x200020600>{name = (null), num = 1}
    Hints: None
    Backtrace:
    0 0x000000010092e613 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
    1 0x000000010006d974 _DVTAssertionFailureHandler (in DVTFoundation)
    2 0x000000010001b2b7 -[DVTPlugInManager _extensionsForExtensionPoint:matchingPredicate:] (in DVTFoundation)
    3 0x000000010001b23d -[DVTPlugInManager sharedExtensionsForExtensionPoint:matchingPredicate:] (in DVTFoundation)
    4 0x0000000100a2a771 __61+[IDEDocumentController THREAD_allOrganizerSourceExtensions]_block_invoke0 (in IDEKit)
    5 0x00007fff889bbc65 dispatchoncef (in libSystem.B.dylib)
    6 0x0000000100a2a704 +[IDEDocumentController THREADallOrganizerSourceExtensions] (in IDEKit)
    7 0x0000000100a2b162 +[IDEDocumentController _organizerSourceExtensionForDocumentType:] (in IDEKit)
    8 0x00000001009286f0 -[IDEApplicationController _openFiles:] (in IDEKit)
    9 0x00007fff81c0f9d6 -[NSApplication(NSAppleEventHandling) _handleAEOpenDocumentsForURLs:] (in AppKit)
    10 0x00007fff81adc00d -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] (in AppKit)
    11 0x00007fff82e78f62 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] (in Foundation)
    12 0x00007fff82e78d92 _NSAppleEventManagerGenericHandler (in Foundation)
    13 0x00007fff8841a323 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) (in AE)
    14 0x00007fff8841a21c dispatchEventAndSendReply(AEDesc const*, AEDesc*) (in AE)
    15 0x00007fff8841a123 aeProcessAppleEvent (in AE)
    16 0x00007fff86e45765 AEProcessAppleEvent (in HIToolbox)
    17 0x00007fff819e104b _DPSNextEvent (in AppKit)
    18 0x00007fff819e07a9 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
    19 0x00007fff819a648b -[NSApplication run] (in AppKit)
    20 0x00007fff8199f1a8 NSApplicationMain (in AppKit)
    21 0x0000000100000eec
    Can anyone help? Or can they at least tell me the problem. Thanks, Ivanthehackerful.

    I just upgraded to Lion and upgraded to Xcode 4. Everytime I open Xcode 4 I get the same "Xcode encountered an internal logic error. Choose "Continue" to continue running Xcode in an inconsistent state.  Choose "Crash" to halt Xcode and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data." error.
    The details show a problem with "iPhonePlaceholder". Could this be something from the older version?
    UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Couldn't load plug-in 'com.apple.dt.IDE.IDEiPhoneSupport' while firing fault for extension 'Xcode.Device.iPhonePlaceholder'
    UserInfo: {
        NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\" UserInfo=0x40015aa80 {DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEiPhoneSupport, DVTPlugInExecutablePathErrorKey=/Developer/Platforms/iPhoneOS.platform/Develope r/Library/Xcode/PrivatePlugIns/IDEiPhoneSupport.ideplugin/Contents/MacOS/IDEiPho neSupport, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Priva tePlugIns/IDEiPhoneSupport.ideplugin, NSLocalizedFailureReason=The plug-in \U201ccom.apple.dt.IDE.IDEiPhoneSupport\U201d at path \U201c/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlu gIns/IDEiPhoneSupport.ideplugin\U201d could not be loaded.  The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x40039d3a0 \"The bundle \U201cIDEiPhoneSupport\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\"}";
    Hints: None
    Backtrace:
      0  0x00007fff8290c96a __exceptionPreprocess (in CoreFoundation)
      1  0x00007fff8a074d5e objc_exception_throw (in libobjc.A.dylib)
      2  0x00000001007c9c98 -[DVTExtension _fireExtensionFault] (in DVTFoundation)
      3  0x00000001007b47f9 __38-[DVTDispatchLock performLockedBlock:]_block_invoke_0 (in DVTFoundation)
      4  0x00007fff89599afd _dispatch_barrier_sync_f_invoke (in libdispatch.dylib)
      5  0x00000001007b47a9 -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
      6  0x00000001007c9a45 -[DVTExtension _valueForKey:inParameterData:usingSchema:] (in DVTFoundation)
      7  0x00000001007c99ab -[DVTExtension valueForKey:] (in DVTFoundation)
      8  0x00000001007c9167 +[DVTDevice _knownDeviceLocators] (in DVTFoundation)
      9  0x00000001007c8cea -[DVTDeviceManager startLocating] (in DVTFoundation)
    10  0x0000000100cfe07a IDEInitialize (in IDEFoundation)
    11  0x0000000101072c0b -[IDEApplicationController applicationWillFinishLaunching:] (in IDEKit)
    12  0x00007fff89d42716 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 (in Foundation)
    13  0x00007fff828b551a _CFXNotificationPost (in CoreFoundation)
    14  0x00007fff89d2e9cb -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
    15  0x00007fff8111d6c8 -[NSApplication finishLaunching] (in AppKit)
    16  0x00007fff8111d27d -[NSApplication run] (in AppKit)
    17  0x00007fff8139b52a NSApplicationMain (in AppKit)
    18  0x00000001007aceec (in Xcode)
    19  0x0000000000000002

  • Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CR...

    Post Author: lkamesam
    CA Forum: Integrated Solutions
    Hi,
            I am running Crystal Reports version 10 from IBM Rational 6.0.1  build 20050725_1800 XML data source. When I try to run the report under WAS 6.0.1 I get the following error:
    Does any body have any clue how to resolve my problem? Thanks
    Error 500: Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CRDB_XMLImpl This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ==>&#91;0&#93; com.ibm.ws.classloader.CompoundClassLoader@163dd786 Local ClassPath: C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\classes;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\bobj_platform_jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cecore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\celib.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ceplugins.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cereports.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cesession.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\clientlogic.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\Concurrent.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CorbaIDL.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLExternal.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLServer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCharting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalContentModels.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExporters.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExportingBase.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalFormulas.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalQueryEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportingCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ebus405.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\icu4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jrcerom.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jsf_common.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\keycodeDecoder.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\log4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\MetafileRenderer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rasapp.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rascore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rpoifs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\serialization.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\URIUtil.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting-jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xercesImpl.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xmlParserAPIs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent; Delegation Mode: PARENT_FIRST &#91;1&#93; com.ibm.ws.classloader.JarClassLoader@338761606 Local Classpath: Delegation mode: PARENT_FIRST &#91;2&#93; com.ibm.ws.classloader.ProtectionClassLoader@38e75786 &#91;3&#93; com.ibm.ws.bootstrap.ExtClassLoader@7e475784 &#91;4&#93; sun.misc.Launcher$AppClassLoader@7e5a5784 &#91;5&#93; sun.misc.Launcher$ExtClassLoader@7e565784 -Original exception- java.lang.NoClassDefFoundError: OCA/OCAdbdll/DbDLLOperations at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:576) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.crystaldecisions.reports.queryengine.driver.i.<init>(Unknown Source) at com.crystaldecisions.reports.queryengine.driver.i.case(Unknown Source) at com.crystaldecisions.reports.queryengine.av.ak(Unknown Source) at com.crystaldecisions.reports.queryengine.av.else(Unknown Source) at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source) at com.crystaldecisions.reports.queryengine.av.do(Unknown Source) at com.crystaldecisions.reports.queryengine.as.new(Unknown Source) at com.crystaldecisions.reports.queryengine.at.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source) at com.crystaldecisions.reports.common.ab.a(Unknown Source) at com.crystaldecisions.reports.common.ab.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory.createReportSource(Unknown Source) at com.crystaldecisions.report.web.a.a.K(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.bx.a(Unknown Source) at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source) at com.crystaldecisions.report.web.event.as.a(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source) at com.crystaldecisions.report.web.ServerControl.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ServerControlTag.doEndTag(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ReportServerControlTag.doEndTag(Unknown Source) at com.ibm._jsp._sample._jspx_meth_crviewer_viewer_0(_sample.java:135) at com.ibm._jsp._sample._jspService(_sample.java:77) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117) at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171) at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021) at

    For those who would have the same problem, here is how I could eventually fix it.
    Since the Flex Test Drive is sometimes out of sync with flash builder 4, I recreated a project using other help pages on Adobe site :
    Entry point :
    http://help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08- 7ffd.html
    As suggested, I used the New Project wizard to create a new project, with :
    Application server type : J2EE
    Check the radio button "Use remote object access service : BlazeDS"
    Then, as indicated in following pages (section "Accessing BlazeDS")... :
    file:///C:/Mes%20documents%20C/Commun/Developpement/Documentation/HT-Tracks/AccessingData/ help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08-7ffe.ht ml#WSbde04e3d3e6474c4-19a3f0e0122be55e1b7-8000
    ...I selected the "Data / Connect to Data/Services..." menu option, which started the Data/service connection wizard.
    There, I selected a BlazeDS (and not Web Services) service type, and everything went fine.
    Suggestion to adobe staff : maybe it would be useful to update the Flex Test Drive to reflect Flash Builder 4 ?
    Very nice product anyway, so far, congratulations...
    Rgds
    Marc.

  • Logical error in the query

    create table my_employee
    (id number(4)primary key,
    last_name varchar2(25),
    first_name varchar2(25),
    userid varchar2(8),
    salary number(9,2)
    I want to write an INSERT statement to MY_EMPLOYEE table . Concatenate the first letter of the first name and first seven characters of the last name to produce user ID using a single sql statement
    I wrote the query like this and i am getting logical error
    insert into my_employee
    values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SQL> insert into my_employee
    2 values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&sal
    ary);
    Enter value for id: 20
    Enter value for last_name: popopopp
    Enter value for last_name: qwertyyuu
    Enter value for salary: 300000
    old 2: values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),
    new 2: values(20,'popopopp','o',substr('o',1,1)||substr('qwertyyuu',1,7),300000)
    1 row created.
    it is asking the last_name two times

    you can do it with a .sql script
    c:\my_emp.sql
    PROMPT
    PROMPT instering my_employees
    PROMPT
    ACCEPT ID NUMBER PROMPT 'ID ? : '
    ACCEPT FIRST_NAME CHAR PROMPT 'FIRST_NAME ?: '
    ACCEPT LAST_NAME CHAR PROMPT 'LAST_NAME ?: '
    ACCEPT SALARY NUMBER PROMPT 'SALARY ? : '
    insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SELECT * FROM my_employee where id=&&id;
    and then from sqlplus @c:\my_emp.sql
    scott@ORCL> @C:\MY_EMP
    instering my_employees
    ID ? : 20
    FIRST_NAME ?: john
    LAST_NAME ?: papas
    SALARY ? : 1000
    old 1: insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary)
    new 1: insert into my_employee values( 20,'papas','john',substr('john',1,1)||substr('papas',1,7), 1000)
    1 row created.
    old 1: SELECT * FROM my_employee where id=&&id
    new 1: SELECT * FROM my_employee where id= 20
    ID LAST_NAME FIRST_NAME USERID SALARY
    20 papas john jpapas 1000
    scott@ORCL>

  • Error When Using Class :(

    Hey,
    Class:
    package
        import flash.display.MovieClip;
        import flash.events.Event;
        public class Main extends MovieClip
            public var enemyA:Array = [];
            public var birdA:Array = [];
            public var rowNum:int = 2;
            private var gap:int = 100;
            private var obj_no = 2;
            public var enemy1:mychar = new mychar();
            public var TheBird:BirdChar = new BirdChar();
            public function Main()
                // constructor code
                createEnemyF();
                createBirdF();
                this.addEventListener(Event.ENTER_FRAME,loopF);
            public function createEnemyF()
                for (var i:int = 0; i < rowNum; i++)
                    for (var j:int = 0; j < obj_no; j++)
                        enemy1.x = Math.random() * stage.stageWidth - enemy1.width;
                        enemy1.y = - i * (gap + enemy1.height) - 30.65;
                        enemyA.push(enemy1);
                        addChild(enemy1);
            public function createBirdF() {
                TheBird.x = 270.95;
                TheBird.y = 350.95;
                birdA.push(TheBird);
                addChild(TheBird);
            public function loopF(event:Event) {
                updateEnemyPositionsF();
                updateBirdPositionsF();
                hitTestF();
            public function updateEnemyPositionsF() {
                enemy1.y +=  2;
            public function updateBirdPositionsF() {
                TheBird.x = mouseX;
            public function hitTestF() {
                if(TheBird.hitTestObject(enemy1))
                    gotoAndPlay(5);
                    trace('The Bird Hit Enemy 1');
    This conflicts and causes this error:
    1046: Type was not found or was not a compile-time constant: MouseEvent
    ^ ^ Code repeats to all of my event listeners
    Thanks for your time.

    Thanks, i thought it might be this because of previous problems but i seen i already had : import flash.events.Event; so i thought that would be OK!
    Second Error:
    1180: Call to an undefined method Timer.
    I think this is the same sort of thing but what to import to fix this?
    So far these are my imports:
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.events.TimerEvent;
    Thanks for helping.
    Date: Thu, 3 Nov 2011 05:36:22 -0600
    From: [email protected]
    To: [email protected]
    Subject: Error When Using Class
        Re: Error When Using Class
        created by markerline in Flash Pro - General - View the full discussion
    Looks like you imported events.Event but not events.MouseEvent (or some similar syntax) basically you must import MouseEvents separately from other Events.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4005227#4005227
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4005227#4005227. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for