Newbie Simple AS 2 Problem

Help!
I have created a .flv-clip in After Effects (CS3) and I have a .FLA-File with animation and buttons. I need to show the .FLV-clip and then continue seamlessly with the .FLA-File. The .FLV-Clip is in Frame one and the .FLA-Animation starts in frame 2.
If I don't use a script, the .FLV-Clip gets skipped. If I use "stop()" in frame one, the FLV-Clip plays but stops (with a rewind to the beginning). How can I get it to keep playing after the end of the .FLV-Clip?
Thank you for any help!

Thanks for the first step. Now I'm having trouble with:
"once you've done that and your flv plays successfully you can add code that will advance your timeline to frame 2 when your flv completes play."
I have the following script in Frame 1 where the FLVPlayback Component is:
my_FLVPlayback.contentPath = "RVR-Film_1_1.flv";//das zu spielende FLV
vidListnr = new Object();
vidListnr.complete = function(evtObject){
    trace("video-ende");     
        _root.gotoAndPlay(2);
RVR-Film_1_1.addEventListener("complete",vidListnr);
stop(); 
The Clip (RVR-Film_1_1.flv) plays, but then it stops.
Thanks for helping!

Similar Messages

  • SIMPLE Database Design Problem !

    Mapping is a big problem for many complex applications.
    So what happens if we put all the tables into one table called ENTITY?
    I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
    Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
    Definition of the table
    ENTITY
    EntityID > uniqueidentifier
    EntityType > Tells the entityTypeName
    Name >
    LastName >
    CompanyName > 300 attributeTypes
    OppurtunityPeriod >
    PS:There is also another table called RELATION that points the relations between entities.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    check the coloumn with WHERE _entityType='PERSON'
    as there is is clustered index on entityType...there
    is NO performance decrease.
    there is also a clustered index on RELATION table on
    relationType
    when we say WHERE _entityType ='PERSON' or
    WHERE relationType='CONTACTMECHANISM'.
    it scans the clustered index first.it acts like a
    table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
    WHERE _entityType ='PERSON'
      AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Have you ever thought of using constraints in your
    modell? How would you realize those?
    ...in fact we did.We have arranged the generic object
    model in an object database.The knowledge information
    is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
    But the data schema is held in the RDBMS with code
    generation that creates a schema to hold data.If you think that this approach makes sense, why not.
    But in able to have a efficent mapping and a good
    performance we have thought about building only one
    table.The problem is we know we are losing some space
    but the thing is harddisk is much cheaper than RAM
    and CPU.So our trade off concerated on the storage
    cost.But I still wonder if there is a point that I
    have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
    PS: it is not wise effective using generic object
    models also in object databases as CPU cost is a lot
    when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
    PS2: RDBMS is a value based system where object
    databases are identity based.we are trying to be in
    the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
    What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
    C.

  • Simple Travelling salesman problem

    Dear Anyone,
    i know this query mite sound silly but the fact is i haven found a neat solution to this simple problem on the internet or the forum.. All existing solutions are way too complicated using Genetic algorithms or annealing etc.
    I have a list of 10 places with respective lat/lon. I want to sort them in the travelling Salesman problem taking the first place as origin. Since there are only 10 places, i guess even Brute Force method is practical. So can anyone help out with sample codes or links??? I am kinda newbie in this area of coding..

    Well there are a tonne of ways to tackle this. Since you want to do it brute force, then I suggest you tackle it the simplest possible way:
    Enumerate all of the possible routes through the graph.
    If you think this is too difficult and don't know where to start... then you're going to have to think about it some more. I'm not just going to give you the code - that's not what these forums are for. Frankly this is a homework problem, and regardless of whether it's literally your homework, you're not going to learn anything unless you tackle it yourself.
    I'm happy to give you some advice though. Start off figuring out the steps you'd have to do to tackle this manually. Start with a graph with two nodes. That should be easy. Then try one with three. Doable. Try four. At that point you should have figured out the general algorithm that you're using.
    Once you've figured out how you solve this manually, you need to start coding this up. As indicated, you need to decide what your data structures are going to be - concentrate on how you're going to represent the nodes, the permitted routes between them, and their distances.
    If you get stuck with the coding we can help you with that too, but you have to show that you've made an effort. No free lunch.

  • Newbie: Simple Reads, Transactions, Pooling and Code Form

    I am currently refactoring a set of code (assembly) called by a windows service that provides persistence to an Oracle DB (DataAccessComponent). The motivation for the request to perform this work was to reduce connections to the Oracle DB.
    The most salient cause I believe of the excessive connections is the intermingling of ODP and the MS.Net Oracle provider. This has been removed and all code now utilizes ODP.
    My problem: The DataAccessComponent undergoing a refactor itself depends (half of the code access methods) heavily on another external assembly that was created to manage all access to the Oracle DB (DataManagment). This DataManagment component Requires a call to its own BeginTransaction() method. This BeginTransaction() behavioral facade then proceeds to create a new OracleConnection then OracleTransaction and adds it to an internal STACK. From what I can tell this stack is and its Transactions are initially independent of an OracleCommand. Then when a Command is executed in this DataManagment component it checks its internal state/stack for an active Transaction and either: joins the currently executing internally-referenced Transaction if it has not been committed or POPs the STACK for an available Transaction. The ostensible reason (assumptions) for this architecture are a) a joined Transaction only utilizes one Connection to the Oracle DB - thereby minimizing connections and b) an attempt to execute two Transactions on a single Connection will (reportedly) cause an exception and c) served as a basis for a home-grown code data access code generation tool.
    The side effects (as I see them) of utilizing this external DataManagment assembly (with its Transaction stack) are that even simple ExecuteReader() (database read only) must participate in a Transaction (indeed create one if none exists). Furthermore, in my more familiar MS SQL .Net provider world, the general rule I believe is that the .Net provider takes care of caching the Connection and two separate Transactions that attempt execute a command at roughly the same time (overlap) will not throw an exception. Furthermore, I am not accustomed to wrapping simple database reads in Transactions - seems like overkill to me.
    My preferred method of performing reads and writes to Oracle would be to utilize what I know of ADO styled data access in general:
    using(OracleConnection conn = new OracleConnection(ConnectionString))
         using(OracleCommand cmd = new OracleCommand(SqlStatementString,conn))
              cmd.CommandType = CommandType.Text;
              cmd.Connection.Open();
              using(OracleDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
                   while(rdr.Read())
                        //Do something with reader data
                   rdr.Close();
         //Should I call conn.Close();
    using (OracleConnection conn = new OracleConnection(ConnectionString))
         using (OracleCommand cmd = new OracleCommand(OraclePackageString, conn))
              cmd.CommandType = CommandType.StoredProcedure;
              //cmd.Parameters.Add(...);
              //cmd.Parameters.Add(...);
              cmd.Connection.Open();
              using(OracleTransaction tran = cmd.Connection.BeginTransaction())
                   try
                        cmd.ExecuteNonQuery();
                        tran.Commit();
                   catch
                        tran.Rollback();
                        //Handle exception
         //Should I call conn.Close();
    So I have done some research and know that Transactions are scoped to connections. Do that mean that if the above two routines execute simultaneously they will a) create two separate connections? b) throw an exception?
    Furthermore, if I call two of the second routines (Transacted) simultaneously with I a) get an exception? b) create two separate connections?
    And lastly, if I am calling a bunch of the first type of routine above (non-transacted, read-only) will I a) create a new connection with every call? b) use the same ODP provider cache connection?
    Also most of these access routines that do writes, only update a single table and row. If that’s all that is being done and I am not participating in Save Points for rollback do I need a transaction on the writes at all? (Given that I would need to respond to an exception as part of the application logic)
    I am not familiar with Oracle connection pooling so I am also not sure if I should be implicitly calling Dispose() on the Connection object(s) above -> which in turn calls Close() or even calling close manually. I read in a post on these boards that if you are running connection pooling you should leave the connection open?
    Any help much appreciated... I
    Thanks, Brad

    I may not be able to answer all of your questions but I can certainly attempt to answer your questions related to connection pooling. Based on the code samples you posted, I do not see any threading issue with connection or transaction since you are always creating a new connection object and always a new txn.
    Once you are done with the connection, you should call conn.Close() so that the underlying session returned to the ODP.NET connection pool as you need not keep connection open to utilize ODP.NET connection pooling. Obviously, in your sample, you are using the "using" clause which will implicitly dispose the connection object hence you do not need to call Close here as Dispose should close the connection.

  • Simple SWF File problems

    Hello all, im trying to create a very simple swf file, but have come  across some problems.
    The file i want to create is very much like this - http://davidtest.webcastglobal.com/swf2/flash.swf
    This swf allows me to import it into Flex, and control which frame is  being viewed.
    I achieve this using a app that can be found here -
    http://davidtest.webcastglobal.com/swf2/Main.html
    When you press Next or Previous, it jumps forward or backward a frame.
    Now i want to create a swf file like the ball file, although it will  just contain a series of images, 5 for example.
    I tried creating such a file in Flash, using both AS2 and AS3.
    I created a project with 5 frames, and put an image on each frame,  i  then put the "stop();" tag on each frame.
    When i imported it into my flex app, flex cudnt communicate with it.
    So the ball flash file has been made in a different way ?
    Can anyone shed some light on the situation please?

    Can no one help me on this ?

  • Simple query performance problem

    Hey!
    I'm using two simple XQUpdate queries in my wholedoc container.
    a) insert nodes <node name="my_name"/> as last into collection('xml_content.dbxml')[dbxml:metadata('dbxml:name')='document.xml']/nodes[1]
    b) delete node collection('xml_content.dbxml')[dbxml:metadata('dbxml:name')='document.xml']/nodes[1]/node[@name='my_name'][last()]
    The queries are operating on the same document.
    1) First a bunch of 'insert' queries has been executed (ca.50),
    2) Then a bunch of delete queries (ca. 50).
    The attribute name of element node varies.
    After a couple of iterations 1) and 2) each XQUpdate statement takes a lot of time to be completed (ca. 5-10 secs, whereas before it took much less then a second).
    The number of node elements in nodes element never exceeded 50. And eventually it works very slow even with 2 node elements.
    Does anybody have an idea what goes wrong after certain number of queries? What are the possible solutions here? How can I examine what is wrong?
    I didn't find relevant information in DB XML docs. Maybe I should look at BDB docs?
    Thanks in advance,
    Vyacheslav

    Here is a patch to fix the problem in 2.4.16. Note that the slowdown that this patch fixes only applies to whole document containers.
    Lauren Foutz
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.cpp dbxml-2.4.16/dbxml/src/dbxml/Indexer.cpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.cpp     2008-10-21 17:27:22.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/Indexer.cpp     2009-04-27 14:06:40.000000000 -0400
    @@ -477,7 +477,8 @@
                        if(updateStats_) {
                             // Get the size of the node
                             size_t nodeSize = 0;
    -                         if(ninfo != 0) {
    +                         // Node size is kept only for node containers
    +                         if(ninfo != 0 && container_->isNodeContainer()) {
                                  const NsFormat &fmt =
                                       NsFormat::getFormat(NS_PROTOCOL_VERSION);
                                  nodeSize = ninfo->getNodeDataSize();
    @@ -487,18 +488,22 @@
                                                        0, /*count*/true);
    -                         // Store the node stats for this node
    +                         /* Store the node stats for this node, only the descendants
    +                          * of the node being partially indexed are being removed/added
    +                          */
                             StructuralStats *cstats = &cis->stats[0];
    -                         cstats->numberOfNodes_ = 1;
    +                         cstats->numberOfNodes_ = this->getStatsNumberOfNodes(ninfo);
                             cstats->sumSize_ = nodeSize;
                             // Increment the descendant stats in the parent
                             StructuralStats *pstats = 0;
                             if (pis) {
                                  pstats = &pis->stats[0];
    -                              pstats->sumChildSize_ += nodeSize;
    -                              pstats->sumDescendantSize_ +=
    -                                   nodeSize + cstats->sumDescendantSize_;
    +                              if (container_->isNodeContainer()) {
    +                                   pstats->sumChildSize_ += nodeSize;
    +                                   pstats->sumDescendantSize_ +=
    +                                        nodeSize + cstats->sumDescendantSize_;
    +                              }
                                  pstats = &pis->stats[k.getID1()];
                                  pstats->sumNumberOfChildren_ += 1;
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.hpp dbxml-2.4.16/dbxml/src/dbxml/Indexer.hpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.hpp     2008-10-21 17:27:18.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/Indexer.hpp     2009-04-27 14:08:20.000000000 -0400
    @@ -19,6 +19,7 @@
    #include "OperationContext.hpp"
    #include "KeyStash.hpp"
    #include "StructuralStatsDatabase.hpp"
    +#include "nodeStore/NsNode.hpp"
    namespace DbXml
    @@ -181,6 +182,8 @@
         void checkUniqueConstraint(const Key &key);
         void addIDForString(const unsigned char *strng);
    +     
    +     virtual int64_t getStatsNumberOfNodes(const IndexNodeInfo *ninfo) const { return 1; }
    protected:     
         // The operation context within which the index keys are added
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.cpp dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.cpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.cpp     2008-10-21 17:27:22.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.cpp     2009-04-27 14:04:42.000000000 -0400
    @@ -103,6 +103,7 @@
              const DocID &did = document_.getID();
              DbWrapper &db = *document_.getDocDb();
              ElementIndexList nodes(*this);
    +          partialIndexNode_ = node->getNid();
              do {
                   bool hasValueIndex = false;
                   bool hasEdgePresenceIndex = false;
    @@ -124,6 +125,7 @@
              nodes.generate(*this);
    +     partialIndexNode_ = 0;
         return ancestorHasValueIndex;
    @@ -203,6 +205,19 @@
    +
    +int64_t NsReindexer::getStatsNumberOfNodes(IndexNodeInfo *ninfo) const
    +{
    +     /* Get the number of this node being removed or added, only the descendants
    +      * of the node being partially indexed are being removed/added
    +      */
    +     DBXML_ASSERT(!partialIndexNode_ || (ninfo != 0));
    +     if (!partialIndexNode_ || (partialIndexNode_.compareNids(ninfo->getNodeID()) < 0)) {
    +          return 1;     
    +     }
    +     return 0;
    +}
    +
    const char *NsReindexer::lookupUri(int uriIndex)
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.hpp dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.hpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.hpp     2008-10-21 17:27:18.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.hpp     2009-04-27 14:09:04.000000000 -0400
    @@ -45,6 +45,7 @@
         const char *lookupUri(int uriIndex);
         void indexAttribute(const char *aname, int auri,
                       NsNodeRef &parent, int index);
    +     virtual int64_t getStatsNumberOfNodes(IndexNodeInfo *ninfo) const;
    private:
         IndexSpecification is_;
         KeyStash stash_;
    @@ -54,6 +55,9 @@
         // this is redundant wrt Indexer, but dict_ in Indexer triggers
         // behavior that this class does not want
         DictionaryDatabase *dictionary_;
    +          
    +     // The node being indexed in partial indexing
    +     NsNid partialIndexNode_;
    }Edited by: LaurenFoutz on May 1, 2009 5:47 AM

  • Simple VISA Setup Problem

    Hi all,
    I'm having issues working with VISA in LabVIEW. Previously, I've used Peek/Poke VIs (before they were VISA VIs) that allowed me to read and write directly to registers at a given Windows address. I have a new, custom PCI Express board that uses the same architecture that I've worked with previously only this time I'm trying to access the registers using VISA.
    As this is my first time using VISA, I'm having some setup problems. Yesterday I got to a state where logically things should work but I still end up getting an error when I try to run a simple VISA Open command (see attached screenshot).
    The initial problem I had was I was not able to acquire a VISA resource that opens a session to my PCIe board...it would simply not show up on the resource list. After reading around I discovered I needed to create a custom VISA driver for my board. Once I did that using the VISA Driver Wizard, the device showed up in my list (as seen in the screenshot). I wrote the simplest of all VIs where I simply open that VISA resource, however, the error seen in the screenshot is produced.
    I'm pretty sure this is a simple setup issue, but does anyone know what I'm doing wrong?
    Attachments:
    Screenshot1.JPG ‏145 KB

    Hi bonhomme,
    I see you're having some issues using VISA. It sounds like you're new to VISA, so I wanted to pass along some information that we have availble on this software. This link gives good general information about VISA, and the related links are extremely helpful in finding specific issues.
    Thank you for attaching your error. This is extremely helpful in debugging since we can actually see the numbers. There is another forumn that talks about these at this link and at this link. 
    Hope this helps you out!!
    Lea D.
    Applications Engineering
    National Instruments

  • Simple DataGrid validation Problem

    hi friends
                   I am working on a application in which i  m facing a problem.i have a datagrid having two column field one is simple datagrid column and in other  datagrid column i render textinput as a component. there are only two row in my datagrid.so now i have to apply validation on that data grid.i mean if any textinput componet which is render in second column in data grid left blank and i click on save button then there should be validation Alert messg.
    i am facing a problem on gettin id(instance) of that two rendered textinput component.Please help me out.
    Thanks and Regards
       Vineet Osho

    Hi Vineet Osho,
    You can try this...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        >
        <mx:Script>
            <![CDATA[
             import mx.utils.StringUtil;
             import mx.collections.ArrayCollection;
                import mx.controls.TextInput;
                import mx.events.DataGridEvent;
                import mx.controls.Alert;
                public var arr:Array = [];
                public  var incrementer:int;
                private function validateTextInputs():void
                 var strIndexes:String="";
                 var gridDP:ArrayCollection = dataGrid.dataProvider as ArrayCollection;
                 for(var i:int=0;i<gridDP.length;i++)
                  if(StringUtil.trim(gridDP.getItemAt(i).displayText) == "")
                   strIndexes += (i + 1) + ",";
                 if(strIndexes.length > 0)
                  strIndexes = strIndexes.substring(0,strIndexes.length-1);
                  Alert.show("The TextInputs " + strIndexes + " are empty.");
            ]]>
        </mx:Script>
        <mx:DataGrid id="dataGrid" horizontalCenter="0" verticalCenter="0" width="400" height="200">
            <mx:columns>
                <mx:DataGridColumn headerText="First" width="60" dataField="artist" editable="false"/>
                 <mx:DataGridColumn   width = "60" headerText = "Premium %(e.g. Percentage as 100)" >
                       <mx:itemRenderer>
                            <mx:Component>
                                 <mx:TextInput styleName="TextInputRight" focusOut="data.displayText=this.text;" width="100" text="{data.displayText}">
                                 </mx:TextInput>
                            </mx:Component>
                        </mx:itemRenderer>
                  </mx:DataGridColumn>
           </mx:columns> 
                  <mx:dataProvider>
                    <mx:ArrayCollection>
                      <mx:Array>
                        <mx:Object title="Stairway to Heaven" artist="Led Zepplin" displayText=""/>
                        <mx:Object title="How to Save a Life" artist="Fray" displayText=""/>
                      </mx:Array>
                    </mx:ArrayCollection>
                  </mx:dataProvider>
          </mx:DataGrid> 
          <mx:Button id="btn" label="click"  x="527" y="450" click="validateTextInputs()" />
    </mx:Application>
    Thanks,
    Bhasker

  • Simple Mobile Bookshop problem

    Hello,
    I have to write some simple program using choicegroups, textfields, forms and other basic elements. I's kind of bookshop, I have written almost everything, but I have huge problem with displaying basket.
    this is the code for whole my app [ if anybody want to run it, just delete the lines with images ]
    [http://www.iie.org.pl/book.java]
    u see, there are 5 categories of books [ and five ChoiceGroups for them ], user can choose couple of books from different categories, and he/she get the price, this is working just fine, the problem is to display them, I've try to move choosen to separate array, but it can hold just 5 values [ ( no, I can't make it larger ) check the code [ public int checker () ]]. To be honest I don't know how to move it on, try different things [ ignore the last two methods, just for testing reasons ], but without success. Can You just focus on this basket and not making comments about the rest of the code [ I know its messy ]. This is my first larger progam for mobiles.

    OK, this will add the books in the array:
    public int checker( ChoiceGroup chg, int temp[], Form fr){
            String message="";
            boolean arra [] = new boolean[chg.size()];
             chg.getSelectedFlags(arra);
          for (int i = 0; i < arra.length; i++) {
              if (arra) {
    //this will add the books in the array books[]
    books[co] = chg.getString(i);
    //checking the array
    System.out.println(books[co]+" co = "+co);
    co += 1;
    fsuma = temp[i]+ fsuma;
    message = "" + fsuma ;
    //bask_help(chg.getString(i));
    }Edited by: Sypress on Mar 15, 2010 2:11 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Simple project,serious problem

    my flex mobile project for android is so simple that it just outputs a string "hello world",but i get serious problem on many android devices when launch it after successfully installed while some devices work well.can anybody explain why?i use FB4.6+air3.3.

    Hi
    Easy answer is - No not with standard iMovie any version (with plug-ins and
    iMovie prior to iM '08 or 09 - may be)
    Suggested one - Yes but You don't need pro version Express will do it as nicely.
    I think it also can be done with QuickTime-pro.
    I would use FinalCut Express and import the movie here and re-size.
    If only a DVD copy I would either
    • copy back to a new miniDV tape (via a DVD-Player and Camera) - or -
    • use Roxio Toast™ and back convert to streamingDV
    then use this in FCE
    Yours Bengt W

  • Simple action creating problem

    Hi. I'm having a problem with this simple script. All I want
    to is "onClipEvent" go to the next frame in the current movie. I
    have it set to _root - but want to use the next frame in the movie
    symbol only. Anyone have advice?

    Is there any sites you guys know of that actually teaches you
    the concept of coding.(actionscript)

  • Simple win32 JNIEnv problem

    I am very new to using jni on windows and am having a C++ compile time problem with a seemingly very simple program. Basically I am trying to do a callback on a java file from my native C++ code. The problem is listed after the following source code excerpts:
    <Java file>
    class TestJni
         static
              System.loadLibrary("TestJni");
         private native void print();
         public static void main( String [] args )
              new TestJni().print();     
         public void callback()
              System.out.println( "Callback called" );     
    <C++ file>
    #include <TestJni.h>
    #include <iostream.h>
    JNIEXPORT void JNICALL Java_TestJni_print( JNIEnv *env, jobject obj )
         cout << "Inside C++" << endl;
         jclass cls = (*env)->GetObjectClass( env, obj );
         jmethodID mid = (*env)->GetMethodId( env, cls, "callback", "()V" );
         if( mid == NULL )
              cout << "Method id was NULL, returning" << endl;
              return;
         (*env)->CallVoidMethod( env, obj, mid );
         return;
    Now the actual compile time errors that I am getting from either Visual C++ or command line "cl -I. -IC:\j2sdk1.4.0_01\include -IC:\j2sdk1.4.0_01\include\win32 -MD -LD TestJni.cpp -FeTestJni.dll" are:
    d:\java\code\jni_test\testjni.cpp(9) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
    c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
    d:\java\code\jni_test\testjni.cpp(9) : error C2227: left of '->GetObjectClass' must point to class/struct/union
    d:\java\code\jni_test\testjni.cpp(10) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
    c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
    d:\java\code\jni_test\testjni.cpp(10) : error C2227: left of '->GetMethodId' must point to class/struct/union
    d:\java\code\jni_test\testjni.cpp(18) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
    c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
    d:\java\code\jni_test\testjni.cpp(18) : error C2227: left of '->CallVoidMethod' must point to class/struct/union
    Any help would be greatly appreciated. This example is pretty much taken from the book "The Java Native Interface: Programmer Guide and Specification". Thats why I can't understand why it doesn't work.

    It was listed this way in the book, honestly. It was almost a complet copy and paste. I would like to know if this is due to the fact that I am on win32 and their are differences between platforms. Do you have any ideas here? It is even a sun certified book, i thought this thing was like the bible for jni.
    in the book they always seem to pass env into all the methods, whereas when i looked at jni.h it doesn't expect env because it simply wraps that up for you, for example:
    jmethodID GetMethodID(jclass clazz, const char *name,
                   const char *sig) {
    return functions->GetMethodID(this,clazz,name,sig);
    What the hell is going on here, is this book out of date or just plain wrong?

  • Simple SQL syntax problem

    Ok, I'm sure this is a very simple problem but I'm confused.
    Statement s = con.createStatement();
    s.execute("SELECT COUNT (*) FROM table WHERE id = 6 AND somechar = 'N'");java.sql.SQLException: Syntax error or access violation message from server: "You have an error in y
    our SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax
    to use near '(*) FROM table WHERE id = 6 AND somechar = 'N'' at line 1"
    This works fine when input into the phpMyAdmin database interface. Is there something blatantly wrong with my syntax, or...?

    Maybe it doesn't like the space between COUNT and (*)
    %Yuck.
    Yep, that was it. Thanks.
    Weird, I'm accustomed to programs ignoring most whitespace as long as it doesn't create ambiguity.

  • Simple FileNotFound exception problems.

    Hello all, just got a quick question if anyone can find the time. I have been having difficulty getting Sun 1.4.1 CE to find textfiles for me, no matter how I do it. (These same exact programs run fine on the UNIX machines we use at school) An example could best illustrate this i suppose
    //HelloFileRead.java - reading a text file
    import tio.*;
    class HelloFileRead {
    public static void main(String[] args)
    ReadInput in = new ReadInput("hello.txt");
    System.out.println(in.readLine());
    This program is straight from the Textbook that we use (Java by Dissection) and again, works fine at school (as long as the hello.txt file is located in the same directory that the source code is located)
    however, no matter where I put the hello.txt file(same dir as the Source, and practically every other directory on my machine :D ) it gives me a single FileNotFoundException.
    I am assuming that there is an option that I am missing, but after pouring over the documentation and trying every concievable option(including uninstall/delete/reinstall) to no avail.
    Any help would be appreciated. this supposedly simple problem is driving me mad!

    '\' is the escape character. To indicate you're not using it in this sense, place another '\' in front of it, like this
    ReadInput in = new ReadInput("c:\\helloproj\\hello.txt");"
    Also, you have to check whether your text file is in the same directory as your class file.
    Cheers.

  • * newbie alert * kodo persistence problem

    Trying to follow this oh so easy example:
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/JDev11gExperience/JDev11gExperience.html
    Here's the last few lines of the exception error...
    The following providers:
    kodo.persistence.PersistenceProviderImpl
    org.apache.openjpa.persistence.PersistenceProviderImpl
    Returned null to createEntityManagerFactory.
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
         at sample.model.JavaServiceFacade.<init>(JavaServiceFacade.java:12)
         at sample.model.JavaServiceFacade.main(JavaServiceFacade.java:19)
    Process exited with exit code 1.
    Connecting through an JDBC-ODBC bridge to an Ingres database (other locking issues make it difficult to connect using native ODBC driver)
    fairly simple logic... connect to a single table then display one field out of the table to the console
    [Tuserprof.java]
    @Entity
    @NamedQueries({
    @NamedQuery(name = "TUserprof.findAll", query = "select o from TUserprof o")
    [JavaServiceFacade.java]
    public static void main(String [] args) {
    final JavaServiceFacade javaServiceFacade;
    javaServiceFacade = new JavaServiceFacade();
    // TODO: Call methods on javaServiceFacade here...
    List<TUserprof> emps = javaServiceFacade.getTUserprofFindAll();
    for (TUserprof tUserprof : emps) {
    System.out.println(tUserprof.getFirst_name());
    Here's the persistence.xml file
    <?xml version="1.0" encoding="windows-1252" ?>
    - <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
    - <persistence-unit name="Model-1" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>sample.model.TUserprof</class>
    - <properties>
    <property name="eclipselink.jdbc.driver" value="sun.jdbc.odbc.JdbcOdbcDriver" />
    <property name="eclipselink.jdbc.url" value="jdbc:odbc:sys10 sql" />
    <property name="eclipselink.jdbc.user" value="report" />
    <property name="eclipselink.jdbc.password" value="C21EECE0FBC5CC41A77C390BE52548ED" />
    <property name="eclipselink.logging.level" value="FINER" />
    <property name="eclipselink.target-server" value="WebLogic_10" />
    </properties>
    </persistence-unit>
    - <persistence-unit name="Model">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>java:/app/jdbc/jdbc/sys10sqlDS</jta-data-source>
    <class>sample.model.TUserprof</class>
    - <properties>
    <property name="eclipselink.target-server" value="WebLogic_10" />
    <property name="javax.persistence.jtaDataSource" value="java:/app/jdbc/jdbc/sys10sqlDS" />
    </properties>
    </persistence-unit>
    </persistence>
    NO CLUE on how to solve the error... any assistance would be appreciated...
    Edited by: shawnc on Mar 14, 2011 2:58 PM

    NO CLUE on how to solve the errorFirst step STOP using a JEE server to figure out the problem.
    Write a simple Java console app to test your ODBC set up. If you can't get that to work then you can't get it to work in JEE.

Maybe you are looking for

  • Purchase Requisition item Text

    Sir, IN PR WHEN I IGO TO ITEM DETAILS in TEXT TAB 1 Item text 2 item note 3 Delivery Text 3 material Po text were are the inputs reflected Regards

  • E-Rec CANDIDATE SEARCH  (debug)

    I go "candidates search" (un filtered by nothing) and does not leave any results. I want to debug to find out you're looking for the system. Which program or function  can i used for debug  in SAP R3? Greetings

  • Xfinity TV app iPhone

    My app is messed up. When I go to networks and select Cinemax I get HBO movies. If I go to a network and then Series I get HBO series like Game of Thrones. How do I fix the app!

  • Playing .asx file on iPhone

    Is there a way to play an .asx file on the iPhone? I am trying to listen to the online feed of a radio station via iPhone. I tried to go directly to the link and it says its unable to play. Thanks in advance!

  • [Ai CS4 vs iD CS4 - MAC]

    Hola a todos. Me pasan un nuevo proyecto. Un dossier de varias páginas que hicieron mis compañeros hace unos años en Freehand y hay que actualizarlo. Mi duda es las siguiente. Illustrator o Indesign. Ahora con los diferentes espacios de trabajo que o