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]

Similar Messages

  • Class not Found when accessing Proxy class from backing bean in VC.

    Hi All,
    I'm attempting to access a class of a webservice(generated as a proxy) within my ADF application and invoke the method within a backing bean of the View Controller(bean scope : backing bean). The proxy has generated an ObjectFactory class among other classes. When I access this Object factory class from within the backing bean, the application throws a Class not found error.
    I don't know where the error lies since I've declared the View Controller of the ADF application dependent on the Proxy and I've imported the class and accessing it within a backing bean. How would you suggest I approach resolveing this.
    JDev : 1.1.1.4
    Thank you.
    Regards
    PP.

    Hello Arun,
    Thank you for suggesting a Data control, but my requirement isn't to drag and drop the method as a button. It's more of a behind the scnes updating data via a database adapter requirement.
    I've resolved the issue. turns out, my deployment archive didn't include the proxy.jpr. Once included it works likea charm.
    Thanks
    PP.

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

  • Class not found when generating deployment xml in MW

    any ideas anyone?
    java.lang.RuntimeException: Class not found:
         at oracle.toplink.workbench.persistence.BldrProjectToRuntimeProjectConverter.convert(Unknown Source)
         at oracle.toplink.workbench.ui.BldrSession.generateDeploymentXML(Unknown Source)
         at oracle.toplink.workbench.ui.BldrMainView.generateDeploymentXMLForSelectedProjects(Unknown Source)
         at oracle.toplink.workbench.ui.BldrActionManager$61.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    Hi,
    'Class not found' in the Mapping Workbench usually means that one of your classes was not included in the 'class path' panel. In the Mapping Workbench select the project -&gt; Class Path -&gt; Add Entry...
    For example, in my case I have Person.class, which is part of the package com.toplink.course. 'C:\dev\tl400\classes\com\toplink\course&gt;Person.class'
    So in the Mapping Workbench -&gt; Class Path I put 'C:\dev\tl400\classes'
    Raanan.

  • Compiling error C++: float.h not found

    Dear All,
    I am using a Mid 2011 Macbook Air, 1.8 GHz Intel Core i7 running Mac OS 10.9.4. I have Xcode 5.1.1 and have installed the latest Command Line Tools (Late July 2014). I have homebrew installed the gcc compiler.
    I am currently trying to install the coin-or project BCP from here. I have followed the installation instructions as provided here. The "../configure" command works, I get a positive configure message "configure: Main configuration of Bcp successful". However, the next command "make" fails with the following error message
    $ make
    Making all in CoinUtils
    Making all in src
    /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
    if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I`echo ../../../CoinUtils/src`      -MT CoinBuild.lo -MD -MP -MF ".deps/CoinBuild.Tpo" -c -o CoinBuild.lo ../../../CoinUtils/src/CoinBuild.cpp; \
      then mv -f ".deps/CoinBuild.Tpo" ".deps/CoinBuild.Plo"; else rm -f ".deps/CoinBuild.Tpo"; exit 1; fi
    g++ -DHAVE_CONFIG_H -I. -I../../../CoinUtils/src -MT CoinBuild.lo -MD -MP -MF .deps/CoinBuild.Tpo -c ../../../CoinUtils/src/CoinBuild.cpp  -fno-common -DPIC -o .libs/CoinBuild.o
    In file included from ../../../CoinUtils/src/CoinBuild.cpp:10:0:
    /usr/local/include/c++/4.9.0/cfloat:41:19: fatal error: float.h: No such file or directory
    #include <float.h>
                       ^
    compilation terminated.
    make[3]: *** [CoinBuild.lo] Error 1
    make[2]: *** [all] Error 2
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1
    I have dug around a bit, and found threads about Mavericks moving/deleting some header files that gcc relies on. The suggested solution was to install the latest Developer tools, which I have done.
    It looks to me, like it is a compiling error, and the compiler isn't looking for the header at the right place. My problem is, I have no real knowledge about these things, I'm more of a front end programmer. I have tried all fixed I could find on the internet, but nothing seems to work.
    Any further suggestions on how I could get this to work would be very much appreciated.
    Thank you.

    When using GCC, consider replacing <float.h> with <cfloat> which also includes <float.h>, but likely relative to its placement in GCC, not in OS X.
    When you use the OS X command line tools, the implicit path for <float.h> is in /usr/include/c++/4.2.1/tr1
    Your homebrew installed GCC will be looking for <float.h> in:
    /usr/local/lib/gcc/x86_64-apple-darwin13.1.0/4.9.0/include
    You may have to educate GCC where its include files live, and not to be confused with those of Xcode command line tools.

  • Compile Error for Import com.sun.javadoc.*;

    I need to write some simple doclets and found some beginner code on the Sun website. The first line of the sample app is:
    import com.sun.javadoc.*;However, I get a compile error:
    C:\JavaDoc\Doclet\ListClass.java:1: package com.sun.javadoc does not exist
    import com.sun.javadoc.*;I found the com.sun.javadoc package in the tools.jar file in the lib directory of my sdk. So I added the following to my classpath:
    C:\j2sdk1.4.2_08\lib;Then I recompiled but received the same error. What have I done wrong? I'm on Windows XP.
    TIA.

    > C:\j2sdk1.4.2_08\lib;
    C:\j2sdk1.4.2_08\lib\tools.jar;

  • Using 'getClasses'  for reflection / introspection  - not found in Jdev

    Hi people,
    I am using Jdeveloper 10.1.3.0.4 and I am trying to use some of java's reflection / introspection features.
    - I am trying to use the getClasses method, part of the 'Class' class.
    However, Jdeveloper is telling me 'method not found.' The getClass method
    is found OK, but not getClasses, which looks like a standard method in 'Class' in the java doc. Anyone know how to pull this one in ? I am coding import java.lang.Class; explicitly as well.
    Specifically, my need is to determine, at runtime, a list of the lowest-level 'leaf node' subclasses in a specific class inheritance tree. I reckon I should be able to do this with a recursive routine that uses getClasses on each class; when this returns an empty array I know I am at a lowest-level subclass. However it's failing on the first hurdle -
    static House myHouse = new House(); // House is the simple class I want to test
    static Class[] array_of_classes ;
    array_of_classes = myHouse.getClasses();
    -> method getClasses not found in <current package.class>
    on a similar vein, I tried adding
    import java.lang.reflect;
    - this gives java.lang.reflect not found.
    My only alternative is to code my program in a totally non-OO way! :-(
    please help!
    thanks!!!

    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]

  • ADS: com.adobe.ProcessingException: Class not found exception while loading

    Hi All,
    While i'm trying to activate FORM (Interactive Form in Transaction SFP), i'm getting error -
    ADS: com.adobe.ProcessingException: Class not found exception while loading class SAPForm, classpath: /usr/sap/AHS/DVEBMGS00/exe/jstart7 1.jar/usr/sap/AHS/DVEBMGS00/exe.
    Could anyone let me know the way to resolve this issue.
    Thanks and Regards,
    Sunil

    Many Thanks for the reply-It's working now
    I added the MySQL connector in the following manner
    1)Open the Tom Cat server console by Selecting 'Servers' in Package Explorer
    2)Right Click 'Tomcat v5.5 at localhost.server'
    3)Select 'Open Launch Configuration' under 'General Information'
    4)Select the 'Classpath' tab in the Edit configuration window that opens
    5)Select 'Add External Jars' and add the required connector

  • Load: class .class not found.

    Load: class .class not found.
    java.lang.ClassNotFoundException: .class
    blah
    blah
    blah
    basically just stating where the class is expose to be.
    This is an applet that i try to run its be made on another computer and compiles fine on the other one. I reinstalled my desktop and i downloaded the jdk se 6 release 6 and i use textpad to wright and compile. My problem comes after i compile the first time i try to run the applet i get a ClassNotFoundException but then the second time it works. It is not the biggest problem in the world just a little annoying and something that i would like to fix if i can. Thanks for the help.

    yeah its kinda strange it happens for me every time consistently when a new class file is created with a compile the first time an applet is run it will give then class .class exception that i cant find information on. If there is no class in the folder such as i delete it and then run the applet the class "name".class a cures witch i see a few times on the internet but the first run failing is strange everything is in the right place and the class is in the right folder just the first time it is accessed it will fail but every time after it will work until a new compile and a new class is created
    does anyone else get this maybe i can figure out if its my jdk or my OS or the raid drives messing up or something i cant think of.
    i'm using the 6se update 6 maybe i should try beta release 10 i'm also using the 1.5 3d but i have not worked the bugs out of 3d yet. all on windows xp 32bit i was having to problem with 64 bit also but that os crashed and i haven't gotten to reinstall it. the class file is located in a single drive raid i mean the drive is considered raid but it has no link to the other drives. Drivers i believe to be up to date not more then a couple weeks old if they are.
    I removed and reinstalled the jdk but same problem any information is appreciated. thanks.

  • Error in compiling: file javax\servlet\jsp\PageContext.class not found

    Hi,
    i'm getting an error when I'm trying to compile an java file. The error is as follows:
    cannot access javax.servlet.jsp.PageContext
    file javax\servlet\jsp\PageContext.class not found
    Isn't the javax package included in jdk? I've installed jdk 1.3.1_03 and j2re1.4.0_02. Shouldn't this PageContext.class be automatically loaded when i've installed jdk?
    I'm getting desperated! I've tried almost everything: i've changed the classpath, moved the directory of the java file I'm trying to compile over and over but i'm getting no success!
    Any help is very welcome!
    Thankx,
    Nuno.

    hmmm... i had a look and it seems that what you are trying to "import" is actually in a package... instead of import try:
    package javax.servlet.jsp;you may need to go download this "package" and complile it in the directory you are working in.
    my advice: try the above statement (which does compile for me), if it doesn't work, you will need to find the source code for this package and compile it just like you do any other source code.
    hope this helps.

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • Class not found error for applet.

    This is probally a really simple mistake but I've tried everything and can't find it.
    My applet works fine with applet viewer - I'm running it from JBuilder. But when I open my html file in the browser it gives me a 'Class not found' error. I've tried running other applets (my own and demos on this site) and they work fine.This is the applet tag code:
    <applet code = "Rotary.class" width = "650" height = "580" align = "top">
    <!-- coordinates of sectors -->
    <param name = "sector0" value ="234,215,244,207,154,43,125,63">
    </applet>
    The class file is in the same directory as the HTML file. Do I need to specify the codebase? I tried that too - giving it the full pathname of the class.
    In the Java console it said that it couldn't find "C:Project\Rotary\javax\swing\japplet"
    I don't think it could have anything to do with the fact that I'm using swing because the other applets I used used swing.
    Please help - I'm really running out of ideas here!

    You have a similar problem like I had.
    You seem to have a too old JAVA environment for the browser - I had a too new environment.
    For all who are experiencing the same problem!
    Problem:
    You're compiling your applets with a quiet modern compiler (i.e. Netbeans Version 3.5.1)
    You are able to compile your applets without any problems but if you try your applets in "real life", the browsers can't interpret your applets [class not found]. (I tested Internet Explorer 6.0 and Netscape Navigator 4.7)
    So you need a plugin for the new JAVA environment because the JAVA environment of the browser is older than that which the applet needs.
    Well, you have the choice to demand to every user of your applet to download the new Java Runtime Environment, but then don't wonder why nobody visits your site!
    But, don't worry: I figuered out another solution, that Netbeans (www.netbeans.org) allows to compile in different JAVA versions.
    Solution:
    What you have to do is:
    - Install a previous version of JDK (i.e. JDK 1.3 - I would suggest, lower versions don't work with Netbeans 3.5.1 and JDK 1.3 is enough for IE 6.0 and NN 4.7, which I tested)
    - Go into the "bin"-directory of Netbeans (i.e. c:/netbeans3.5.1/bin)
    - Open the file "ide.cfg" (with notepad or any other texteditor)
    - You see a line like: jdkhome "C:\java\j2sdk1.4.2" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - Change the path to your other JDK you wish, like: jdkhome "C:\java\jdk1.3" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - That's it, you can compile your applets in a previous version of JAVA so that "older" browser user don't have to install a plugin for the new JAVA environment.
    Have fun!
    If you have any questions I would be pleased to help you.
    If this tip helped you already I would be pleased if you would send me a quick email with your experience.
    My email: [email protected]

  • Class not found error for COM.ibm.db2.jdbc.app.DB2Driver

    i have written this code:
    import java.io.*;
    import java.sql.*;
    public class tryjdbc
    {  public static void main (String args[])
    {  try
    {  Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");  }
    catch (java.lang.ClassNotFoundException e)
    {  System.out.print(e.getMessage());  }
    and once i try to run it, it gives out a class not found exception error.
    I haven't changed anything with the classpath since I don't think the problem is with the classpath. I have read in the IBM Developer Kit for Java documentaton that the AS/400 Developer Kit for Java automatically adds the db2_class.jar file to the classpath. So why do I get a class not found exception error?

    I was using Web Spehere 4.0.3 and trying to connect to a database on DB2 7.2. I was just following a tutorial and trying to get a handle on Web Sphere. I am running all of these on a Windows 2000 Operating System. Here are some of my observations :
    a. db2java.zip packaged under %DB2ROOT%\SQLLIB\JAVA, does not work.
    b. CLASSPATH needs to be set to %DB2ROOT%\sqllib\java12\db2java.zip
    c. Include this as one of the packages in the package defined in
    WebSphere, using the Java Perspective.
    d. Ensure that case sensitivity is respected. All though the package
    shows up as COM.ibm.db2.jdbc.app.DB2Driver, for some reason, it
    will only accept com.ibm.db2.jdbc.app.DB2Driver.
    With these settings, I was able to connect to a db2 database.
    I am a little puzzled on the following. I did not include java.io package, but still it could print the messages. Did anybody have a similar experience
    Thanks for this posting.

  • For weeks I have been viewing a doggy day care via their web cam.  This weekend I upgraded to Lion and have been unable to view the center since.  I get an error message for java webcam class not found.  All of my software is up to date--suggestions?

    For weeks I have been viewing a doggy day care center via their web cam.  This weekend I upgraded to Lion and have been unable to view the center.  I get an error message for Java plug-in 1.6.0_29 ....webcam class not found.  Any suggestions on how to fix this?

    Sorry, don't know what else to suggest unless there's a URL to the problem stream that someone here can try. Otherwise we can't test it to try and determine what might be wrong.
    BTW, make sure they're testing it with a Mac, not with a Windows system. If they test only with Windows, what they say is or is not working doesn't mean much.
    Regards.

  • Error 1046: Type was not found or was not a compile-time constant: Component Event.

    Hi Everyone..
    I am getting an Error 1046: Type was not found or was not a compile-time constant: Component Event.
    The ComponentEvent class has been imported,and also the event handling code is there. I am not sure what else is wrong, hope somebody can advise me. Thanks. The code is below, the point where the error occurs as indicated by the compiler has been highlighted.
    package 
    import flash.display.Sprite;
    import flash.media.Camera;
    import flash.media.Microphone;
    import flash.media.Video;
    import fl.controls.TextArea;
    import fl.controls.Button;
    import fl.controls.TextInput;
    import flash.events.SyncEvent;
    import flash.events.MouseEvent;
    import flash.events.FocusEvent;
    import flash.net.SharedObject;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.events.FocusEvent;
    import flash.events.ComponentEvent;
    public class VideoChat extends Sprite
      private var button:Button;
      private var text_so:SharedObject; 
      private var textArea:TextArea;
      private var textInput:TextInput;
      private var chatName:TextInput; 
      private var nc:NetConnection;
      private var nsOut:NetStream;
      private var nsIn:NetStream;
      private var rtmpNow:String;
      private var msg:Boolean; 
      private var cam:Camera;
      private var mic:Microphone;
      private var vid:Video;
      public function VideoChat ()
       //Set up UI
       textArea = new TextArea();
       textArea.setSize(500,280);
       textArea.move(20,54);
       addChild(textArea);
       textInput = new TextInput();
       textInput.setSize(500,24);
       textInput.move(20,340);
       textInput.addEventListener(ComponentEvent.ENTER,checkKey);
       addChild(textInput);
       button = new Button();
       button.width=50;
       button.label="Send";
       button.move(20,370);
       button.addEventListener(MouseEvent.CLICK, sendMsg);
       addChild(button);
       chatName = new TextInput;
       chatName.setSize (100,24);
       chatName.move (80,370);
       chatName.text="<Enter Name>";
       chatName.addEventListener (FocusEvent.FOCUS_IN, cleanName);
       addChild(chatName); 
       //Connect
       rtmpNow="rtmp:/VideoChat ";  
       nc=new NetConnection;
       nc.connect (rtmpNow);
       nc.addEventListener(NetStatusEvent.NET_STATUS,doSO);
       cam = Camera.getCamera();
       mic=Microphone.getMicrophone();
       //Camera Settings
       cam.setKeyFrameInterval(15);
       cam.setMode (240, 180, 15, false);
       cam.setMotionLevel(35,3000);
       cam.setQuality(40000 / 8,0);
       //Microphone Settings
       mic.gain = 85;
       mic.rate=11;
       mic.setSilenceLevel (25,1000);
       mic.setUseEchoSuppression (true);
       //Video Setup
       vid=new Video(cam.width, cam.height);
       addChild (vid);
       vid.x=10, vid.y=20;  
       //Attach local video and camera
       vid.attachCamera(cam);  
      private function doSO(e:NetStatusEvent):void
       good=e.info.code == "NetConnection.Connect.Success";
       if(good)
        //Set up shared object
        text_so=SharedObject.getRemote("test", nc.uri, false);
        text_so.connect (nc);
        text_so.addEventListener(SyncEvent.SYNC, checkSO);
      private function checkSO(e:SyncEvent):void
       for (var chung:uint; change<e.changeList.length; chng++)
        switch(e.chageList[chng].code)
         case "clear":
          break;
         case "success":
          break;
         case "change":
          textArea.appendText (text_so.data.msg + "\n");
          break;
      private function cleanName(e:FocusEvent): void
       chatName.text="";
      private function sendMsg(e:MouseEvent):void
       noName=(chatName.text=="<Enter Name>" || chatName.text=="");
       if (noName)
         textArea.appendText("You must enter your name \n");
       else
        text_so.setProperty("msg", chatName.text +": " + textInput.text);
        textArea.appendText (chatName.text +": "+textInput.text +"\n");
        textInput.text="";
      private function checkKey (e:ComponentEvent):void
       noName=(chatName.text=="<Enter Name>" || chatName.text=="");
       if (noName)
         textArea.appendText("You must enter your name \n");
       else
        text_so.setProperty("msg", chatName.text +": " + textInput.text);
        textArea.appendText (chatName.text +": "+textInput.text +"\n");
        textInput.text="";
      //Create NetStream instances
      private function checkConnect  (e:NetStatusEvent):void
       msg=e.info.code == "NetConnection.Connect.Success";
       if(msg)
        nsOut=new NetStream(nc);
        nsIn=new NetStream(nc);
        //NetStream
        nsOut.attachAudio(mic);
        nsOut.attachCamera(cam);
        nsOut.publish("camstream");
        nsIn.play("camstream");

    Hi Guys...
    I have found out what is wrong. I was importing the wrong package the correct one should have been:
    import fl.events.ComponentEvent;
    instead of
    import flash.events.ComponentEvent;
    I hope this is helpful for anyone caught in a simillar situation as me...Thanks..

Maybe you are looking for

  • I have 8 gb on my macbook pro, but it sometimes only recognizes 4 gb. Whats going on?

    I have 8 gb on my macbook pro, but it sometimes only recognizes one of the banks and thus only 4 gb. I was about to open my Macbook Pro mid 2010 2.66 up but it went back up to 8 gb of ram. I also noticed that the macbook would go to sleep and not wak

  • Unable to load persistence provider

    hi, i'm using spring context to reimplement some java methods in SOA suite. I have a deplyed and runnable Spring MVC project, which use hibernate to connect between database and project POJO classes. i use this spring project's java methods which are

  • Splitting the single field data to multiple fields

    Hi, I have the contents in fieldABC which i would like to copy based on the length of the value Eg: Field ABC has value 1 it need to be copied to Field1 FILEDABAC has 1234 it need to be copy in field 2 FILEDABC has 1234ABC It need to be copy in Field

  • Creating multiple tasks depending on field responsible

    I would like to create one task which has multiple charges. The system should createa task for each person who is in charge. Is there abuilt-in function? should I use designer ? Nikita

  • When are we going to get 64bit support ?????

    Post Author: barney_nicholls CA Forum: .NET I just fell off my chair Crystal 2008 is 32 bit only. What sort of software company ignores 64 bit