Bind a Sequence

Is it posible to bind a Sequence?
I've a menu in which i change a Sequence of own object (Card) called cards and I've a List which shows the names of the objects. But how can I bind the changes I made with the menu with the list.
MenuItem {
                    text: "All"
                    action: function() {
                        model.cards = model.getAllCards()
List {        // left = west in JavaBorderLayout
                items: [
                    for (card:Card in model.cards) {
                        ListItem {
                            text: bind "<html><font color='blue'>{card.getName()}</font></html>"
            }

ohhh sry I just forgot the bind in front of List
... sry!!

Similar Messages

  • Bind a sequence of objects to a listview

    Hi all,
    inside of a class in fx file, I have the following code segment
    var test1 : IdObject [] = dataHandler_new.getIdList(); // getIdList() will return a sequence of instances of IdObject
    var list: ListView = ListView {
    items: bind
    for(element in test1)
    element;
    getIdList() will return a sequence of instances of IdObject. so when I delete an element in this sequence, the change is reflected in the listview. However, if I change to,
    var list: ListView = ListView {
    items: bind
    for(element in dataHandler_new.getIdList())
    element;
    delete an element in the sequence will not be reflected in the listview
    modifying an element in the sequence will be reflected in the listview
    adding and element will not be reflected in the listview
    May i know why ?
    thanks
    nedved

    Since I've been mentioned in this thread I suppose I must reply. :-)
    The general rule for bind is that the expression gets re-evaluated when any variables in the expression change (not including variables local to that expression). Consider the code:
    ListView {
        items: bind for (element in test1) { ... }
    }If the value of test1 changes, the bind expression is re-evaluated, and the contents of the ListView changes. Since test1 is a sequence, this occurs if any element of that sequence is added, modified, or removed. Now consider this code:
    ListView {
        items: bind for (element in getIdList()) { ... }
    }The getIdList() function is called once and its value is used for items the first time. However, there are no variables in the bind expression, so there is no way for the bind expression to be re-evaluated. Note that element is a local variable in this expression so nothing outside can cause it to be modified, thus it can't cause the bind expression to be re-evaluated.
    Now, I'm simplifying things a bit here. The rules are somewhat different if getIdList() is a bound function. If it is, then the bind expression will be re-evaluated if any variables used within that function are modified. However, there are many restrictions on what can appear in a bound function. In particular, assignment statements and general control structures are not allowed. I don't know what getIdList() does, but if for instance it fetches data from the network, it cannot be a bound function.
    For more on bound functions see here:
    [http://openjfx.java.sun.com/current-build/doc/reference/ch07s01.html#BoundFunctions|http://openjfx.java.sun.com/current-build/doc/reference/ch07s01.html#BoundFunctions]
    But bound functions are probably irrelevant to this discussion.
    Back to the question posed by nedved.yang.
    In the first snippet of code, the sequence is stored in test1 which is bound to ListView.items. If elements are added or removed from test1, (e.g. "delete test1[3]" or "insert newId into test1") it affects the ListView. So far so good.
    In the second snippet of code, the sequence returned from getIdList() is copied by the for-loop and then simply stored into ListView.items. There's no variable associated with this sequence. But nedved.yang asked,
    delete an element in the sequence will not be reflected in the listview
    modifying an element in the sequence will be reflected in the listview
    adding and element will not be reflected in the listviewWhat is the code that is doing this? There's no variable like test1 that holds the sequence, so how is it possible to add or delete or modify elements in it? There's some code missing that we need to see before we can fully understand the question.

  • Binding a sequence XSD Schema to repeating subform elements

    Hi, I am creating a form with repeated table rows using an Add button to add rows dynamically. I am binding the row with the xsd schema with [*] at the end in the data binding option with checked repeat row for each data item. While submitting the form as XML data to the java controller I am getting only one table row and not other rows added dynamically by add button functionality.
    I want to know that how to generate the xml of dynamically added rows bonded with XSD schema.
    I have also explore the below link but doesn't resolve the issues:
    http://www.adobe.com/devnet/livecycle/articles/binding-xsd.html
    Thanks in advance

    I have resolved the issues by adding maxOccurs="unbounded" in xsd schema with the binded element name.

  • Binding a sequence of nodes  to path animation

    I have a set of image nodes as shown below(I have five images but have just shown two here)def walk = ImageView {
        image: Image {
            url: "{__DIR__}WWalk1.png"
        translateX: 100
        translateY: 100
    def walk2 = ImageView {
        image: Image {
            url: "{__DIR__}WWalk2.png"
        translateX: 100
        translateY: 100
    I have a path for which as shown below
    def straightline = Path {
        elements: [
            MoveTo {
                x: 0,
                y: 0
            LineTo {
                x: 2,
                y: 0
            LineTo {
                x: 733,
                y: 1
        translateX: 25
        translateY: 370
        stroke: Color.GREEN
        strokeWidth: 1
        fill: null
    }and i have created a path animation and it works perfectly for a single node like this shown below
    var straightlinePathAnimaiton: PathTransition = PathTransition {
        repeatCount: Timeline.INDEFINITE
        orientation: OrientationType.ORTHOGONAL_TO_TANGENT
        node: walk
        path: AnimationPath.createFromPath(straightline)
        duration: 1500ms
    straightlinePathAnimaiton.play();Is there a way to dynamically change the nodes like walk walk1,walk2,walk3,walk4 (Each being images)
    and for a duration of 150ms walk has to be displayed then after 150ms walk1 has to be displayed and after another
    150s walk2 has to be done.Further on appearance of walk2(Image),walk1 has to disappear
    Thanks for your help in advance and expecting a reply...
    Regards
    Sree Aurovindh Viswanathan
    Sun Certified Web Component Developer
    Edited by: SreeVisu on Mar 29, 2009 10:51 AM

    Thanks for your reply PhiLho but i would be really grateful if I could know how he had added the images.I could just see one image declaration(for the background) there.Further
    i could not understand what "standRight" means in that blog.I would really appreciate if you could explain how each image is added and/or declared and how the author adds images and moves around in the above mentioned blog post would be helpful.
    I have a basic understanding of Animation and other stuff and could understand the code.But I could not understand the Player class in detail as the "standRight" and standRight is quite unknown and i could not understand what type it is.There was no declaration of and how the images are added etc....
    Thanks a lot for your reply
    Expecting an answer
    Regards
    Sree Aurovindh Viswanathan
    Sun Certified Web Component Developer
    Edited by: SreeVisu on Mar 29, 2009 7:18 PM

  • Servicegen issue with binding webservice.jar

    Hey, I am trying to build a ejb webservice using ant and servicegen. When I run it, it blows up and gives me a ton of binding errors. The problem is the binding errors are on files from the webservices.jar not from my jar. What is wrong with my script?
    Script:
    <project name="HEOOrdersService" default="build" basedir=".">
    <!-- Load the standard properties -->
    <loadproperties srcfile="${user.home}/ant_build.properties" />
    <!-- Define the project classpath -->
    <path id="classpath">
    <pathelement location="${bin}" />
    <pathelement location="${env10.dev.lib}/epicentric.jar" /> <!-- Example: 'oracle_jdbc_8_1_6.zip' -->
    <pathelement location="${env10.dev.lib}/hef.jar" />
    <pathelement location="${env10.dev.lib}/weblogic.jar" />
    <pathelement location="c:/bea/weblogic81/server/lib/webservices.jar" />
    <pathelement location="${env10.dev.libext}/servlet.jar"/>
    <pathelement location="${env10.dev.classes}"/> <!-- For un-jared class files on the app server -->
    </path>
    <!-- Jar and car file names for deployment -->
    <property name="jar.file" value="heounsorders.jar" /> <!-- Example: 'mercytransc.car' -or- 'mercyrad.car' -->
    <property name="namespace" value="http://www.bea.com/servers/wls70/samples/examples/webservices/basic/statelessSession"/>
    <taskdef name="servicegen" classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask">
    <classpath path="c:/bea/weblogic81/server/lib/webservices.jar"/>
    <classpath path="c:/bea/weblogic81/server/lib/weblogic.jar"/>
    </taskdef>
    <target name="clean"
    description="Delete all of the compiled classes and documentation">
    <delete dir="${bin}" />
    <delete dir="${jar}" />
    <delete dir="${car}" />
    <delete dir="${doc}" />
    </target>
    <target name="init" depends="clean"
    description="Create the build directory structures used by compile, package, and doc">
    <mkdir dir="${bin}" />
    <mkdir dir="${bin}/classes" />
    <mkdir dir="${jar}" />
    <mkdir dir="${car}" />
    <mkdir dir="${doc}" />
    </target>
    <target name="compile" depends="init"
    description="Compile the java code from ${src} into ${bin}">
    <javac srcdir="${src}" destdir="${bin}/classes" >
    <classpath refid="classpath" />
    </javac>
    </target>
    <!-- Document when the libraries were created for versioning purposes -->
    <target name="create-tstamp">
    <tstamp>
    <format property="build.time" pattern="yyyy-MM-dd HH:mm:ss" />
    </tstamp>
    </target>
    <!-- Document which developer created the libraries -->
    <target name="create-manifest" depends="create-tstamp">
    <manifest file="${bin}/MANIFEST.MF">
    <attribute name="Built-By" value="${developer.name}" />
    <attribute name="Contact" value="${developer.contact}" />
    <attribute name="Built-On" value="${build.time}" />
    </manifest>
    </target>
    <target name="jar" depends="compile, create-manifest">
    <delete dir="${car.work}" />
    <mkdir dir="${car.work}" />
    <copy todir="${car.work}">
    <fileset dir="${bin}/classes" />
    </copy>
    <copy todir="${car.work}/META-INF">
    <fileset dir="./xml" />
    </copy>
    <jar destfile="${car}/${jar.file}" manifest="${bin}/MANIFEST.MF">
    <fileset dir="${car.work}" />
    </jar>
    <delete dir="${car.work}" />
    </target>
    <target name="build" depends="jar" >
    <delete dir="build_dir" />
    <mkdir dir="build_dir" />
    <copy todir="build_dir" file="${car}/${jar.file}"/>
    <servicegen
    destEar="build_dir/heounsorders.ear"
    warName="heounsorders.war"
    contextURI="WebService">
    <service
    ejbJar="build_dir/heounsorders.jar"
    targetNamespace="http://www.bea.com/webservices/basic/statelesSession"
    serviceName="HEOOrdersService"
    serviceURI="/HEOOrdersService"
    generateTypes="True"
    expandMethods="True" >
    </service>
    </servicegen>
    </target>
    </project>
    Part of the resulting errors which are in the servicegen:
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:37: package weblogic.xml.stream does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","account",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:38: package weblogic.xml.stream does not exist
    [servicegen] weblogic.xml.stream.ElementFactory.createXMLName("http://ww
    w.w3.org/2001/XMLSchema","string",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:52: package weblogic.xml.schema.binding.util.runtime does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","count",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:52: package weblogic.xml.stream does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","count",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:53: package weblogic.xml.stream does not exist
    [servicegen] weblogic.xml.stream.ElementFactory.createXMLName("http://ww
    w.w3.org/2001/XMLSchema","int",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:158: package weblogic.xml.schema.binding does not exist
    [servicegen] return weblogic.xml.schema.binding.ModelGroupCompositor.SEQUENCE ;
    [servicegen] ^
    [servicegen] 57 errors
    [servicegen] weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:145)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [servicegen] Caused by: weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:572)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] ... 16 more
    [servicegen] --- Nested Exception ---
    [servicegen] java.io.IOException: Compiler failed executable.exec
    [servicegen] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:470)
    [servicegen] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:566)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [servicegen]
    nested within:
    [servicegen] weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:572)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    Please tell me why it is doing this.

    Hi Nag,
    With little reference to Sir Walter Scott, it would be a very tangled
    web we weave in an attempt to factor out the inter-relationships of
    javax interfaces that are hindering your effort. All to say, we don't
    currently support JSR 110 (javax.wsdl.*) and it is not on the near term
    horizon.
    Have you considered using autotype [1]?
    Regards,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/anttasks.html#1080062
    Nag wrote:
    >
    Hi,
    Here is a very small program, for which i am facing the problem of getting the
    types from the wsdl. It works fine, as standalone....You do not have to deploy
    the code any where..just have weblogic.jar in the classpath. It does not work.
    It works when weblogic.jar is not in the classpath..any help is GREATLY APPRECIATED...
    java.wsdl.Types from the java.wsdl.Definition object and the schema in the types
    is null ( when weblogic.jar is present in the
    I am always getting null in the schema (
    import javax.wsdl.Definition;
    //import weblogic.soap.wsdl.binding.Definition;
    import javax.wsdl.xml.WSDLReader;
    import javax.wsdl.factory.WSDLFactory;
    public class Test {
    Definition definition = null;
    public static void main(String args[] ) {
    Test test = new Test();
    test.parseWSDL(args[0]);
    public void parseWSDL(String WSDLName)
    try
    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
    wsdlReader.setFeature("javax.wsdl.verbose",false);
    wsdlReader.setFeature("javax.wsdl.importDocuments",true);
    definition = wsdlReader.readWSDL(WSDLName);
    System.out.println("-----------" + definition.getTypes() );
    catch( Exception e ) {
    System.out.println("Exception" + e ); }
    Thank for your help.
    Nag

  • Servicegen issue with binding webservices.jar

    Hey, I am trying to build a ejb webservice using ant and servicegen. When I run it, it blows up and gives me a ton of binding errors. The problem is the binding errors are on files from the webservices.jar not from my jar. What is wrong with my script?
    Script:
    <project name="HEOOrdersService" default="build" basedir=".">
    <!-- Load the standard properties -->
    <loadproperties srcfile="${user.home}/ant_build.properties" />
    <!-- Define the project classpath -->
    <path id="classpath">
    <pathelement location="${bin}" />
    <pathelement location="${env10.dev.lib}/epicentric.jar" /> <!-- Example: 'oracle_jdbc_8_1_6.zip' -->
    <pathelement location="${env10.dev.lib}/hef.jar" />
    <pathelement location="${env10.dev.lib}/weblogic.jar" />
    <pathelement location="c:/bea/weblogic81/server/lib/webservices.jar" />
    <pathelement location="${env10.dev.libext}/servlet.jar"/>
    <pathelement location="${env10.dev.classes}"/> <!-- For un-jared class files on the app server -->
    </path>
    <!-- Jar and car file names for deployment -->
    <property name="jar.file" value="heounsorders.jar" /> <!-- Example: 'mercytransc.car' -or- 'mercyrad.car' -->
    <property name="namespace" value="http://www.bea.com/servers/wls70/samples/examples/webservices/basic/statelessSession"/>
    <taskdef name="servicegen" classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask">
    <classpath path="c:/bea/weblogic81/server/lib/webservices.jar"/>
    <classpath path="c:/bea/weblogic81/server/lib/weblogic.jar"/>
    </taskdef>
    <target name="clean"
    description="Delete all of the compiled classes and documentation">
    <delete dir="${bin}" />
    <delete dir="${jar}" />
    <delete dir="${car}" />
    <delete dir="${doc}" />
    </target>
    <target name="init" depends="clean"
    description="Create the build directory structures used by compile, package, and doc">
    <mkdir dir="${bin}" />
    <mkdir dir="${bin}/classes" />
    <mkdir dir="${jar}" />
    <mkdir dir="${car}" />
    <mkdir dir="${doc}" />
    </target>
    <target name="compile" depends="init"
    description="Compile the java code from ${src} into ${bin}">
    <javac srcdir="${src}" destdir="${bin}/classes" >
    <classpath refid="classpath" />
    </javac>
    </target>
    <!-- Document when the libraries were created for versioning purposes -->
    <target name="create-tstamp">
    <tstamp>
    <format property="build.time" pattern="yyyy-MM-dd HH:mm:ss" />
    </tstamp>
    </target>
    <!-- Document which developer created the libraries -->
    <target name="create-manifest" depends="create-tstamp">
    <manifest file="${bin}/MANIFEST.MF">
    <attribute name="Built-By" value="${developer.name}" />
    <attribute name="Contact" value="${developer.contact}" />
    <attribute name="Built-On" value="${build.time}" />
    </manifest>
    </target>
    <target name="jar" depends="compile, create-manifest">
    <delete dir="${car.work}" />
    <mkdir dir="${car.work}" />
    <copy todir="${car.work}">
    <fileset dir="${bin}/classes" />
    </copy>
    <copy todir="${car.work}/META-INF">
    <fileset dir="./xml" />
    </copy>
    <jar destfile="${car}/${jar.file}" manifest="${bin}/MANIFEST.MF">
    <fileset dir="${car.work}" />
    </jar>
    <delete dir="${car.work}" />
    </target>
    <target name="build" depends="jar" >
    <delete dir="build_dir" />
    <mkdir dir="build_dir" />
    <copy todir="build_dir" file="${car}/${jar.file}"/>
    <servicegen
    destEar="build_dir/heounsorders.ear"
    warName="heounsorders.war"
    contextURI="WebService">
    <service
    ejbJar="build_dir/heounsorders.jar"
    targetNamespace="http://www.bea.com/webservices/basic/statelesSession"
    serviceName="HEOOrdersService"
    serviceURI="/HEOOrdersService"
    generateTypes="True"
    expandMethods="True" >
    </service>
    </servicegen>
    </target>
    </project>
    Part of the resulting errors which are in the servicegen:
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:37: package weblogic.xml.stream does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","account",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:38: package weblogic.xml.stream does not exist
    [servicegen] weblogic.xml.stream.ElementFactory.createXMLName("http://ww
    w.w3.org/2001/XMLSchema","string",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:52: package weblogic.xml.schema.binding.util.runtime does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","count",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:52: package weblogic.xml.stream does not exist
    [servicegen] new weblogic.xml.schema.binding.util.runtime.PropertyInfo(weblogic.xml.stream.ElementFactory.createXMLName("java:com.
    mckesson.hcsp.heoorders","count",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:53: package weblogic.xml.stream does not exist
    [servicegen] weblogic.xml.stream.ElementFactory.createXMLName("http://ww
    w.w3.org/2001/XMLSchema","int",null),
    [servicegen] ^
    [servicegen] C:\Documents and Settings\e7nw1fu\Local Settings\Temp\web-services.war-136753285\WEB-INF\classes\com\mckesson\hcsp\heoo
    rders\UnsignedOrdersResultCodec.java:158: package weblogic.xml.schema.binding does not exist
    [servicegen] return weblogic.xml.schema.binding.ModelGroupCompositor.SEQUENCE ;
    [servicegen] ^
    [servicegen] 57 errors
    [servicegen] weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:145)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [servicegen] Caused by: weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:572)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] ... 16 more
    [servicegen] --- Nested Exception ---
    [servicegen] java.io.IOException: Compiler failed executable.exec
    [servicegen] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:470)
    [servicegen] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:566)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [servicegen]
    nested within:
    [servicegen] weblogic.xml.schema.binding.BindingException: ERROR: during code compilation - with nested exception:
    [servicegen] [java.io.IOException: Compiler failed executable.exec]
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.invoke_compiler(Compiler.java:572)
    [servicegen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:169)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:91)
    [servicegen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:104)
    [servicegen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:180)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.addMapping(ComponentAutoTyper.java:88)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.mapComponent(ComponentAutoTyper.java:141)
    [servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.run(EJBAutoTyper.java:115)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.runAutoTyper(ServiceGenTask.java:377)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:322)
    [servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:190)
    [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
    [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
    [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    Please tell me why it is doing this.

    Hi Nag,
    With little reference to Sir Walter Scott, it would be a very tangled
    web we weave in an attempt to factor out the inter-relationships of
    javax interfaces that are hindering your effort. All to say, we don't
    currently support JSR 110 (javax.wsdl.*) and it is not on the near term
    horizon.
    Have you considered using autotype [1]?
    Regards,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/anttasks.html#1080062
    Nag wrote:
    >
    Hi,
    Here is a very small program, for which i am facing the problem of getting the
    types from the wsdl. It works fine, as standalone....You do not have to deploy
    the code any where..just have weblogic.jar in the classpath. It does not work.
    It works when weblogic.jar is not in the classpath..any help is GREATLY APPRECIATED...
    java.wsdl.Types from the java.wsdl.Definition object and the schema in the types
    is null ( when weblogic.jar is present in the
    I am always getting null in the schema (
    import javax.wsdl.Definition;
    //import weblogic.soap.wsdl.binding.Definition;
    import javax.wsdl.xml.WSDLReader;
    import javax.wsdl.factory.WSDLFactory;
    public class Test {
    Definition definition = null;
    public static void main(String args[] ) {
    Test test = new Test();
    test.parseWSDL(args[0]);
    public void parseWSDL(String WSDLName)
    try
    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
    wsdlReader.setFeature("javax.wsdl.verbose",false);
    wsdlReader.setFeature("javax.wsdl.importDocuments",true);
    definition = wsdlReader.readWSDL(WSDLName);
    System.out.println("-----------" + definition.getTypes() );
    catch( Exception e ) {
    System.out.println("Exception" + e ); }
    Thank for your help.
    Nag

  • Use of bind keyword

    Hi all,
    I read that 'bind' keyword would create relationship between two variables. I tried out an example but i could not make out the difference with and without this variable.
    //Bind a sequence
    var s1 = [1,2,3,4,5];
    def s2 = bind for(item in s1){
        item * 2
    printSeqs();
    function printSeqs(){
        println("First Sequence");
        for(i in s1){
             println(i);
        println("Second Sequence");
        for(i in s2){
              println(i);
    }The output is same. i.e the value change in s1 gets reflected in s2 without the bind keyword also. Then what is actual usage and benefit of this keyword. When should i go for this 'bind'?

    PhiLho wrote:
    Your question, mattmo, is relevant and opportune. Actually, I totally overlooked the 'def'... :-)
    I think that it is like 'fixed' in Java: the variable is constant, it is a reference on an object and you can't change this ref. But the content of the referenced object isn't constant...Thanks PhiLho. Do you mean 'final'? If so, that's what I figured, and it's clear to me in that context.
    I wonder if there is a better word than "constant" when talking about the "def" keyword in JavaFX. I guess I'll have to get used to it since that seems to be the way it's described in the documentation.
    Side note: on some examples on the Net, I saw stuff like
    content: bind "Foo"
    I thought it was absurd, and it is confirmed by a Sun authority.I agree, binding a "def" to an immutable object would be absurd.

  • Persist problem in cascade using @OneToMany

    We are trying to persist an object which has a OneToMany relationship to other objects with CascadeType.ALL
    When we persist, the log shows that it creates the INSERT statement with the correct bind variables (sequence-generated REPORT_ID, etc.) for the first object.
    The problem happens when it tries to cascade and insert the Many part. The log shows the it tries to create the INSERT statement for the second object but the bind variable for the REPORT_ID is null.
    Since we defined the relationship of the OneToMany using the REPORT_ID, we assumed that the REPORT_ID that was auto-generated for the first object would be used for the @Many objects.
    What are we missing ??????
    First Object:
    @Id
    @SequenceGenerator(name = "REPORT_HEADER_S", initialValue = 1, allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "REPORT_HEADER_S")
    @Column(name = "REPORT_ID", nullable = false)
    private Long reportId;
    @OneToMany(mappedBy = "report", cascade = { CascadeType.ALL})
    private List<Summary> summaryList;
    Second Object
    @ManyToOne
    @JoinColumn(name = "REPORT_ID", referencedColumnName = "REPORT_ID")
    private Report report;

    Hello, Chris.
    Thank you for your reply.
    The structure of my tables is:
    table document (id int not null constraint document_pk primary key,
    table document_price (document_id int not null constraint document_price_fk references document (id),
    date date not null default current_date,
    price decimal(9,2) not null,
    primary key (document_id, date)).
    The entity classes are:
    @Entity @Table(name = "DOCUMENT")
    public class Document implements Serializable {
    @TableGenerator(name = "document_generator", table = "ID_GENERATION", pkColumnName = "TABLE_NAME", valueColumnName = "ID_VALUE",
    pkColumnValue = "DOCUMENT", allocationSize = 1)
    @Id
    @GeneratedValue(generator = "document_generator")
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    // other fields
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "document", fetch = FetchType.LAZY)
    private Collection<DocumentPrice> documentPriceCollection;
    // constructors, getters, setters ...
    @PostPersist
    public void initializePrices() {
    for (DocumentPrice dp : documentPriceCollection) {
    dp.documentPricePK.setDocumentId(id);
    @Entity
    @Table(name = "DOCUMENT_PRICE")
    public class DocumentPrice implements Serializable {
    @EmbeddedId
    protected DocumentPricePK documentPricePK;
    @Basic(optional = false)
    @Column(name = "PRICE")
    private BigDecimal price;
    @JoinColumn(name = "DOCUMENT_ID", referencedColumnName = "ID", insertable = false, updatable = false)
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    private Document document;
    // constructors, getters, setters ...
    @Embeddable
    public class DocumentPricePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "DOCUMENT_ID")
    private int documentId;
    @Basic(optional = false)
    @Column(name = "DATE")
    @Temporal(TemporalType.DATE)
    private Date date;
    // constructors, getters, setters ...
    I create first Document entity, create DocumentPrice entity and add DocumentPrice entity to the documentPriceCollection of the first Document entity. I invoke commit method of my entity manager, and corresponding rows are added to the document and document_price tables.
    I invoke clear method of my entity manager.
    Then I create new entities Document and DocumentPrice and add new DocumentPrice entity to the documentPriceCollection of the new Document entity. I invoke commit method and get the following exception:
    oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Cannot persist detached object [entities.DocumentPrice[documentPricePK=.entities.DocumentPricePK[documentId=0;
    date=Sat May 29 00:00:00 MSD 2010];
    price=11]].
    Class> entities.DocumentPrice Primary Key> [2010-05-29, 0]
    at oracle.toplink.essentials.exceptions.ValidationException.cannotPersistExistingObject(ValidationException.java:2171)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:3251)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:339)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3220)
    at oracle.toplink.essentials.mappings.CollectionMapping.cascadeRegisterNewIfRequired(CollectionMapping.java:265)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.cascadeRegisterNewForCreate(ObjectBuilder.java:1294)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3226)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:205)
    And I see through debugging that @PostPersist method of the Document entity isn't invoked during second commit before the exception is generated.
    What should I do to avoid exception during second commit?

  • FileLock Doesn't Work Across Network

    I have found a case in which FileLock doesn't work. I'm trying to use FileLock to prevent two instances of the same process to run simultaneously on different machines (or the same machine) on the network. I actually saw two processes, one on each of two Linux machines obtain a lock on the same file at the same time.
    Can I be sure that FileLock is calling fcntl and not flock (which wouldn't work over the network)?
    Is there any way to fix this or get around it??
    Here is the relevant code:
    try{
         File lockFile = new File(getLockFilename());
         lockFile.createNewFile();  // Throw out the boolean return value; it doesn't matter if this succeeded.
         FileChannel fc = new FileOutputStream(lockFile).getChannel();
         fileLock = fc.lock();
    catch (FileLockInterruptionException flie){
         // Allow this one.
    catch (IOException ioe){
            // Report the exception, release the lock if obtained and exit.
    // Code executed while the file is locked includes setting up and registering an RMI server object.
    try{
         fileLock.release();
    catch (IOException ioe){
         logger.warn("Unable to relase file lock:  " + ioe.getClass().getName() + ":  " + ioe.getMessage());
    }

    I suppose when you say "across network", you mean via
    nfs?Yes.
    Have each machine check some central point (or all
    other nodes) for the existence of a server. Of course
    there could be some synchronization problems, so you
    might check several times. Even if the remote
    interface is successfully exported, have it check one
    final time to ensure. To be paranoid, you could have
    it check often.We have a strong requirement not to have a central server, which has made coding this a headache. It would be pretty unacceptable to query every machine on our network (most of which probably aren't running any related process at any one time and are probably running other jobs) any time someone wants to start one of these processes on any machine. (There could be hundreds of these processes running at once with different parameters; it's just that no two with the same parameters are allowed to run at once. Each of these will act as a separate RMI server so other processes can communicate with the running process for other purposes besides just determining whether it is running.) A registry can only contain objects on one machine, right? Or can I somehow bind everything on the same host even though that's not where the objects are?? I am already writing the name of the successful host for one parameter set to a file and barring other processes with the same parameters from executing if looking up the process on that host succeeds. This works in most cases, but there is a race condition if two processes start around the same time and both read the file before either has written its host name there. That's why I'm trying to use a file lock on a different file so the read-bind-write sequence happens while the file is locked.

  • LiveView plugin Service not registered: com.sonyericsson.extras.liveview.plugins.AbstractPluginService

    I've been working with the LiveView SDK.
    First let me commend whoever worked on this... very well done both documentation and design.
    I'm incorporating into a project that binds to the service extending AbstractPluginService.  When the bind/destroy sequence happens without onStart I noticed a crash in the application:
    "LiveView plugin Service not registered: com.sonyericsson.extras.liveview.plugins.AbstractPluginService"
    To fix I made a small change to AbstractPluginService to set mServiceConnection to null until first bound in connectToLiveView()
    The resulting diff is below.  This change allows onDestroy() to skip the unbind step when the service was never bound with onStart()
    diff -u ../LiveView_SDK_v1.01/pluginTemplate/src/com/sonyericsson/extras/liveview/plugins/AbstractPluginService.java src/com/sonyericsson/extras/liveview/plugins/AbstractPluginService.java
    --- ../LiveView_SDK_v1.01/pluginTemplate/src/com/sonyericsson/extras/liveview/plugins/AbstractPluginService.java 2011-02-20 23:03:07.538911948 -0700
    +++ src/com/sonyericsson/extras/liveview/plugins/AbstractPluginService.java 2011-02-24 23:15:56.436119002 -0700
    @@ -312,7 +312,18 @@
          * When connected to the service, the plugin is registered. When
          * disconnected to the service, the plugin is unregistered.
    -    private ServiceConnection mServiceConnection = new ServiceConnection() {
    +    private AbstractPluginServiceConnection mServiceConnection = null;
    +   
    +    /**
    +     * Dan Walkes 2/24/2011:
    +     * I added this class instead of an inline class declaration/assignment to
    +     * mServiceConnection.  Initializing mServiceConnection to null
    +     * allows onDestroy() to be called before a service connection
    +     * is made with onStart(), for instance in the case the service binds but does not start
    +     * and is destroyed without ever calling onStart()
    +     */
    +    class AbstractPluginServiceConnection implements ServiceConnection
    +    {
             @Override
             public void onServiceConnected(final ComponentName className, IBinder service) {
    @@ -379,10 +390,17 @@
    +   
          * Connects to the LiveView service.
         private void connectToLiveView() {
    +    /*
    +    * DW: support onBind() before/instead of onStart()
    +    */
    +    if( mServiceConnection == null ) {
    +    mServiceConnection = new AbstractPluginServiceConnection();
    +    }
             boolean result = bindService(new Intent(PluginConstants.LIVEVIEW_SERVICE_BIND_INTENT),
                     mServiceConnection, 0);
             if (result) {
    Hopefully this saves someone else some time.

    Hi,
    It's been a while since I've looked at this but I believe it happens when you bind the service with http://developer.android.com/reference/android/content/Context.html#bindService(android.content.Inte... and http://developer.android.com/reference/android/content/Context.html#BIND_AUTO_CREATE but don't call startService() http://developer.android.com/reference/android/content/Context.html#startService(android.content.Int...

  • Problem using secondary database, sequence (and custom tuple binding)

    I get an exception when I try to open a Sequence to a database that has a custom tuple binding and a secondary database. I have a guess what the issue is (below), but it boils down to my custom tuple-binding being invoked when opening the sequence. Here is the exception:
    java.lang.IndexOutOfBoundsException
    at com.sleepycat.bind.tuple.TupleInput.readUnsignedInt(TupleInput.java:4
    14)
    at com.sleepycat.bind.tuple.TupleInput.readInt(TupleInput.java:233)
    at COM.shopsidekick.db.community.Shop_URLTupleBinding.entryToObject(Shop
    _URLTupleBinding.java:72)
    at com.sleepycat.bind.tuple.TupleBinding.entryToObject(TupleBinding.java
    :73)
    at COM.tagster.db.community.SecondaryURLKeyCreator.createSecondaryKey(Se
    condaryURLKeyCreator.java:38)
    at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.
    java:546)
    at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.ja
    va:42)
    at com.sleepycat.je.Database.notifyTriggers(Database.java:1343)
    at com.sleepycat.je.Cursor.putInternal(Cursor.java:770)
    at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:352)
    at com.sleepycat.je.Sequence.<init>(Sequence.java:139)
    at com.sleepycat.je.Database.openSequence(Database.java:332)
    Here is my code:
    // URL ID DB
    DatabaseConfig urlDBConfig = new DatabaseConfig();
    urlDBConfig.setAllowCreate(true);
    urlDBConfig.setReadOnly(false);
    urlDBConfig.setTransactional(true);
    urlDBConfig.setSortedDuplicates(false); // No sorted duplicates (can't have them with a secondary DB)
    mURLDatabase = mDBEnv.openDatabase(txn, "URLDatabase", urlDBConfig);
    // Reverse URL lookup DB table
    SecondaryConfig secondaryURLDBConfig = new SecondaryConfig();
    secondaryURLDBConfig.setAllowCreate(true);
    secondaryURLDBConfig.setReadOnly(false);
    secondaryURLDBConfig.setTransactional(true);
    TupleBinding urlTupleBinding = DataHelper.instance().createURLTupleBinding();
    SecondaryURLKeyCreator secondaryURLKeyCreator = new SecondaryURLKeyCreator(urlTupleBinding);
    secondaryURLDBConfig.setKeyCreator(secondaryURLKeyCreator);
    mReverseLookpupURLDatabase = mDBEnv.openSecondaryDatabase(txn, "SecondaryURLDatabase", mURLDatabase, secondaryURLDBConfig);
    // Open the URL ID sequence
    SequenceConfig urlIDSequenceConfig = new SequenceConfig();
    urlIDSequenceConfig.setAllowCreate(true);
    urlIDSequenceConfig.setInitialValue(1);
    mURLSequence = mURLDatabase.openSequence(txn, new DatabaseEntry(URLID_SEQUENCE_NAME.getBytes("UTF-8")), urlIDSequenceConfig);
    My secondary key creator class looks like this:
    public class SecondaryURLKeyCreator implements SecondaryKeyCreator {
    // Member variables
    private TupleBinding mTupleBinding; // The tuple binding
    * Constructor.
    public SecondaryURLKeyCreator(TupleBinding iTupleBinding) {
    mTupleBinding = iTupleBinding;
    * Create the secondary key.
    public boolean createSecondaryKey(SecondaryDatabase iSecDB, DatabaseEntry iKeyEntry, DatabaseEntry iDataEntry, DatabaseEntry oResultEntry) {
    try {
    URLData urlData = (URLData)mTupleBinding.entryToObject(iDataEntry);
    String URL = urlData.getURL();
    oResultEntry.setData(URL.getBytes("UTF-8"));
    catch (IOException willNeverOccur) {
    // Success
    return(true);
    I think I understand what is going on, and I only noticed it now because I added more fields to my custom data (and tuple binding):
    com.sleepycat.je.Sequence.java line 139 (version 3.2.44) does this:
    status = cursor.putNoOverwrite(key, makeData());
    makeData creates a byte array of size MAX_DATA_SIZE (50 bytes) -- which has nothing to do with my custom data.
    The trigger causes an call to SecondaryDatable.updateSecondary(...) to the secondary DB.
    updateSecondary calls createSecondaryKey in my SecondaryKeyCreator, which calls entityToObject() in my tuple-binding, which calls TupleInput.readString(), etc to match my custom data. Since what is being read goes for more than the byte array of size 50, I get the exception.
    I didn't notice before because my custom tuple binding used to read fewer that 50 bytes.
    I think the problem is that my tuple binding is being invoked at all at this point -- opening a sequence -- since there is no data on which it can act.

    Hi,
    It looks like you're making a common mistake with sequences which is to store the sequence itself in a database that is also used for application data. The sequence should normally be stored in separate database to prevent configuration conflicts and actual data conflicts between the sequence record and the application records.
    I suggest that you create another database whose only purpose is to hold the sequence record. This database will contain only a single record -- the sequence. If you have more than one sequence, storing all sequences in the same database makes sense and is safe.
    The database used for storing sequences should not normally have any associated secondary databases and should not be configured for duplicates.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with binding  sequences to attributes

    Hello everyone.
    [you may directly jump to the question at the bottom of this post and if you don't understand what the heck I'm asking, feel free to read the whole post ;)]
    I wanted to crate a table node where several attributes are for rows only.
    Because i want it to be a CustomNode, the table should be created dynamically (one should at least be able to define different amounts of rows and columns at the initialization).
    My problem is a combination of "creating dynamically" and binding attributes.
    To create an arbitrary amount of rows i use a "while(i < x) CustomNode{}" loop.
    To store the value of an attribute for a row i use sequences. So during the loop i do the following:
    someValue: bind sequenceValue[i]
    After quite some frustration i finally discovered that all the attributes will be bound to sequenceValue[last value of i].
    I don't find the right words right now, so here's some code to demonstrate the problem:
    package javafxtestbench;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.scene.CustomNode;
    import javafx.scene.Node;
    import javafx.scene.Group;
    import javafx.scene.input.KeyEvent;
    var t1 = [true, true, false];
    Stage {
        title: "Application title"
        width: 250
        height: 500
        scene: Scene {
            content: [
                Text {
                    font : Font {
                        size : 16
                    x: 10
                    y: 30
                    content: "Application content"
                createFubar(),
    function createFubar(): Group{
        var grp : Group = Group{
            content:[         
                //this works
                /*b1{ blob: bind t1[0]}
                b1{ blob: bind t1[1]}
                b1{ blob: bind t1[2]}*/
                //this doesnt
                createSomeBs(),
            onKeyPressed: function( e: KeyEvent ):Void {
                println("=== KeyPressed ===");
                if (t1[2] == true) t1[2] = false
                else t1[2] = true;
                println("new sequence value: {t1}");
        grp.requestFocus();
        return grp;
    function createSomeBs(): Node[]{
        var i = 0;
        var grp : Node[];
        while(i < 3){
            insert b1{
                blob: bind t1[i]
            }into grp;
            i++;
        println("Sequence @ startup: {t1}");
        return grp;
    class b1 extends CustomNode{
        public var blob = true on replace{
                    println("attribute value b1.blob: {blob}");
        override function create():Node{
            Group{
    }As you can see i created a CustomNode (b1) and use two different methods to add it to the scene.
    First method: i add b1 thee times to the scene and set the attribute
    or
    2nd method: i use a loop (its index to bind the corresponding sequence entries to the attributes)
    finally i added a key listener, which changes the value of the last sequence value if an arbitrary key has been hit.
    output for using the "this works" block (1st method) after pressing some keys:
    === KeyPressed ===
    attribute value b1.blob: true
    new sequence value: truetruetrue  //contains {true, true, true}
    === KeyPressed ===
    attribute value b1.blob: false
    new sequence value: truetruefalse  //contains {true, true, false}and here for the "this doesnt" (2nd method) part:
    === KeyPressed ===
    attribute value b1.blob: false
    attribute value b1.blob: false
    attribute value b1.blob: false
    new sequence value: truetruetrueSo even though all elements in the sequence say "true", the attribute values of all CustomNodes will keep saying "false".
    Here it's due to the fact that "i" is in the end greater than the sequence (cause by the increment at the end of the loop).
    In the end all attributes will be bound to the same entry. So messing around with the index, so it doesn't get beyond the sequence size, won't help.
    So to finally bring this post to an end ;P, here's my question:
    How do you create an arbitrary amount of Nodes containing attributes which are bound to a list entries?
    Edited by: Mr._Moe on 08.09.2009 20:17

    HI
      May be  you can fetch the data from the table with  looping the table size  and catching the
    index of the elements .  To be more clear .
      1 . get the size of the table .
    int leadSelection=  wdcontext.node<TableName>.getLeadSelection();
        for (int i=0 ;i<n;i++)
          if(wdcontext.node<tablename>.isMultiselected(leadSelection))
            String name = wdcontext.node<tablename>.getelementatindex(leadSelection).getname();
             similarly fetch the size of the other elements from the table .
        and set to other RFC as
            ZClass  abc = new ZClass();
             abc.setName(name);
    wdcontext.node<NameName>.bind(abc);
    and othere thing is when  you use Abstract class you can insert only one element at a time .
    or may be you may want to set the values direclty to the RFC
           AbstractList  lst = new  ZClass.ZClassList();
           ZClass cls = new ZClass();
            clas.setName(name)
      lst.add(class);
    wdcontext.currentRFcNameElement.modelObject.setName(lst);
    and
    execute the RFC .
    murali

  • Bind variable with Oracle sequence

    can we insert oracle sequence with the bind varaible
    some thing like
    seq       number(5);
    begin
    select myseq.nextval
            into seq        from dual;
    dbms_sql.parse( l_cursor,insert into mytable (c1,c2,c3) values (seq,:1,:2),dbms_sql.native );
    dbms_sql.bind_variable( l_cursor, :1,58);
    dbms_sql.bind_variable( l_cursor, :2,9);
    l_status := dbms_sql.execute( l_cursor );
    end;
    Thanks!

    What are you trying there..
    Why dynamic SQL?
    Where is the exception block?
    you have to use 'using ' to work with these kind of dynamic variables. Something like this (ugly code below)
    CREATE SEQUENCE myseq;
    create table mytable (c1 number,c2 number, c3 number;
    DECLARE
       seq   NUMBER (5);
       A number;
       b NUMBER;
    BEGIN
       SELECT myseq.NEXTVAL INTO seq FROM DUAL;
       a := 1;
       b := 58;
       EXECUTE IMMEDIATE 'insert into mytable (c1,c2,c3) values (:seq,:1,:2)'
          USING seq, a, b;
       a := 1;
       b := 100;
       EXECUTE IMMEDIATE 'insert into mytable (c1,c2,c3) values (:seq,:1,:2)'
          USING seq, a, b;
       COMMIT;
    END;  --- Check you need to have proper exception block.
    Cheers,
    Manik.

  • Binding to an Entire Sequence, How?

    I would like to know if ANY member of a sequence updates.
    For example:
    public class Subject {
        var students: Student[];
    }Then I wanted to do an "all student" calculation, this if any are added or removed work do the calculation again).
    public class AverageStudentScore {
        var subject: Subject;
        var student: bind getAverageStudentScore(subject.students);
        function getAverageStudentScore(s: Students[]):Number {
            .....do calculation here and return.
    }The examples I have found online only show a sequence bound to a sequence and a var bound to an individual (known)

    Hey dgreive.
    Actually, my problem is a little more complex than I had anticipated. I will change the example so that it's a little easier to explain...
    Each 'Person' exists in a sequence of 'people' and has a bound on replace listener hoping to discover friends amounst the 'people' as they are inserted.
    public class SocialScene {
        public var people: Person[];
        init {
            insert Person{name:"Fred", socialScene: this, friends: ["Jane","Pete"]} into people
            insert Person{name:"Jane", socialScene: this, friends: ["Fred"]} into people       
            insert Person{name:"Pete", socialScene: this, friends: ["Fred"]} into people               
    public class Person {
        public var name: String;
        public var friends: String[];
        public var socialScene: SocialScene;
        var people: Person[] = bind socialScene.people on replace {
            //do whatever you do with friends as they appear
    }The real problem is that as a person is a bound listener on the people sequence. When the binding is fired (initially by a new person insert) for some reason the 'replace' bind firing then causes another 'replace' bind firing on sequence, and another bind on replace is fired. This results in more or less and infinite loop and I get a lovely stack overflow. Can a member of a sequence be a bound listener on the sequence it exists within? I guess I don't understand the rules here.

  • Mixing sun-database-binding with Oracle sequences

    Hello,
    I wish to insert rows inside the database, for instance rows representing persons, and rows representing their addresses. Primary keys for both person and address are Oracle sequence based.
    My question is, if I insert a person, then one of her address, how can I retrieve the person ID for the address row to reference it.
    The insert statement for the person is (for the moment) as follow
    insert into Person (PERSON_ID, FIRST_NAME, LAST_NAME) values (PERSON_SEQ.nextval, ?, ?)The problem with this approach is that I never know the person ID, and am unable to make any references to it in the address row.
    I tried to add an operation in the NetBeans generated person table WSDL. This operation would execute this statement:
    select PERSON_SEQ.nextval from dualBut, for the moment, it's a failure.
    Could you provide me with some hints?

    Hi,
    First I would advise you to register and post on the [email protected] alias - you can find the details of how to do this on the OpenESB site..... you'll reach a larger audience this way.
    Second, you need a Stored Procedure in Oracle to do this, then use this from the DB BC, here's one I created which does something similar, i.e. returns a value I'm interested in after an "Update" statement....
    CREATE OR REPLACE PROCEDURE "NEXTAPPNUMFINDER" (nextAppNum OUT NUMBER)
    IS
    BEGIN
    UPDATE ACTIVE_APPLICATION_NUMBER
    SET APPLICATION_NUMBER_NEXT = APPLICATION_NUMBER_NEXT + 1
    RETURNING APPLICATION_NUMBER_NEXT
    INTO nextAppNum;
    END;
    Hope this helps
    Mark

Maybe you are looking for

  • Client copy/Syatem Copy

    Hi, What is the difference between client copy and system copy. and when client copy is don eall the Logical system names are replcec with the new logical system name in SPRO-G/L Account setings.How to prevent the same. Thanks, Venky

  • Areca Arc-1210 SATA ll vs Arc-1212 SAS/SATA ll

    Hi I was thinking to get a Arc-1210 card to make an internal raid 3 with my 4 samsung F3 1TBSATA ll. During my research about where to buy the card, i found the Arc-1212 with better bus speed and support SAS/SATA ll peripheral devices for just  few b

  • Cannot start J2EE server

    Hi all, Having problems with my dev sandbox and i'm not sure how to fix it. Netweaver 2004s, OS: 2003 SR2, DBMS: Oracles 10g After changing the SAPSR3DB password in secure store via configtool, i can no longer start the J2EE server instance and i can

  • XDB is invalid post registering schema

    Hi all, We have an Windows 2008R2 Oracle 11g 11.2.0.3 database. I am trying to register xml schema but we now have a problem. Please advice how to resolve this: Regards, Nick Warning: XDB now invalid, invalid objects found: object_name               

  • Issue with Windows Live Domains

    Hello, I'm trying to register PNTinternational.com with my Windows Live account so setup outlook.com email accounts.  I get the following error: This domain name can't be used because it contains a protected word or inappropriate language. Please con