XDK DOM 3 implementation doesn't work (i.e ElementEditVAL)

Hi,
I want to use XDK DOM 3 implementation to be able to validate my modification against the schema and then save it to file, for that I found that I have to use ElementEditVAL class and canSetXXX methods, but unfortunately none of them is working and always they return UNKNOWN (7) code or null value.
following are my XML test file and XSD file and at the end the code that I wrote, so I need your help to see why it doesn't work, maybe it is the XSD bug and I don't know about it!
Thank you in advance for your help
XML file:
?xml version = '1.0' encoding = 'UTF-8'?>
<config xmlns:xlink="http://www.w3.org/TR/2000/REC-XLINK-20010627" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mytest.xsd">
<item name="locked"/>
</config>
XSD file:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
     <xs:complexType name="itemType" mixed="true">
          <xs:attribute name="name" use="required">
               <xs:simpleType>
                    <xs:restriction base="xs:string">
                         <xs:enumeration value="unlocked"/>
                         <xs:enumeration value="locked"/>
                         <xs:enumeration value="shutdown"/>
                    </xs:restriction>
               </xs:simpleType>
          </xs:attribute>
     </xs:complexType>
     <xs:element name="config">
          <xs:annotation>
               <xs:documentation>Comment describing your root element</xs:documentation>
          </xs:annotation>
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="item" type="itemType"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
</xs:schema>
Source code:
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import oracle.xml.parser.v2.DOMParser;
import oracle.xml.parser.v2.XMLDocument;
import oracle.xml.parser.v2.XMLElement;
import oracle.xml.parser.v2.XMLNodeList;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.validation.ElementEditVAL;
import java.io.File;
public class forum{
     static XMLDocument document;
     static final String schemaSource = "C:/cmt/ServerSolarisTest/config/mytest.xsd";     
     static final String JAXP_SCHEMA_SOURCE ="http://java.sun.com/xml/jaxp/properties/schemaSource";     
     static final String JAXP_SCHEMA_LANGUAGE ="http://java.sun.com/xml/jaxp/properties/schemaLanguage";
     static final String W3C_XML_SCHEMA ="http://www.w3.org/2001/XMLSchema";
     public static void main(String[] args) {
          if(args.length !=1){
               System.err.println("Please enter the file name");
               System.exit(1);
          }//if
          System.out.println("Start parsing.....");
          try{
//               Create URL String from incoming file
     String url = "file:" + new File(args[0]).getAbsolutePath();               
     String schemaurl = "file:" + new File("C:/cmt/ServerSolarisTest/config/mytest.xsd").getAbsolutePath();
               DOMParser parser = new DOMParser();
// Set parser options
parser.setErrorStream(System.err);
parser.setValidationMode(DOMParser.SCHEMA_VALIDATION);
parser.showWarnings(true);
parser.setXMLSchema(schemaurl);
//               Parser the incoming file (URL)               
parser.parse(url);
               document = parser.getDocument();
               XMLElement root = (XMLElement)(document.getDocumentElement());
               XMLElement Current;
               NamedNodeMap attribs;
               XMLNodeList nlist = (XMLNodeList)document.getElementsByTagName("*");
               String nodeName;
               for(int i = 0; i<nlist.getLength(); i++)
                    attribs = nlist.item(i).getAttributes();
                    Current = (XMLElement)nlist.item(i);
                    ElementEditVAL elval = (ElementEditVAL)Current;
                    //See if Element is item
                    if(Current.getNodeName().equals("item"))
                         for(int j = 0; j<attribs.getLength(); j++)
                              nodeName = attribs.item(j).getNodeName();
                              if(nodeName.equalsIgnoreCase("name"))
                                   if(elval.canSetAttribute(nodeName, "unlockedsdf") == ElementEditVAL.VAL_TRUE)
                                        System.out.println("Valid attribute value");
                                        Current.setAttribute(nodeName, "unlockedsdf");
                                   else
                                        System.out.println("Invalid attribute value");
                                   if(elval.canSetAttribute(nodeName, "locked") == ElementEditVAL.VAL_TRUE)
                                        System.out.println("Valid attribute value");
                                        Current.setAttribute(nodeName, "unlockedsdf");
                                   else
                                        System.out.println("Invalid attribute value");
               //write
               TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(new File(args[0]));
transformer.transform(source, result);                              
          }catch(Exception e){
               e.printStackTrace();
     }//main     
}//DomEcho2

Using DOM 3.0 Validation Techniques with XDK 10g
http://www.devx.com/Java/Article/31221

Similar Messages

  • XDK 10.1.0 doesn't work with 8.1.6

    Hi everyone. I've got 8.1.7 and 8.1.6 Oracle servers, so I decide to import XDK ver. 10 "into" them. XDK 10 + 8.1.7 works perfectly, but with 8.1.6 at compiling my own classes (using SAX tech.) it causes an error: class oracle.internal.odbc... could not be resolved. I think because of "different" java inside 8.1.6 and 8.1.7. Can I fix it? i.e. adding something in 8.1.6 (upgrade to 8.1.7 is impossible)
    Thanxx

    do you use the Oracle 8.1.6 specific jdbc drivers?
    xsu12.jar -- contains all the java classes which make up the XSU. The xsu12 requires JDK1.2.x and JDBC2.x --> use classes12.zip with 8.1.7. +
    xsu111.jar -- contains the same classes as xsu12.jar except that xsu111 requires JDK1.1.x and JDBC1.x. --> use classes111.zip with 8.1.6

  • J3D Direct X Implementation doesn't work.

    I downloaded the OpenGL version of Java3D, and I've gotten it to run succesfuly. The only problem is that it's very slow, because OpenGL doesn't support my S3 Virge based video card. So, I decided to use the DirectX version to see if I found any improvements. When I try to run the same programs it just tells me that a hardware device could not be found. Do I need to get some newer DirectX drivers or something? Any help will be greatly appreciated.
    -Jason Thomas

    Allright, I'll see if I can ask J3D about this then. Thanks for your help. And I'd also like to appologize for my Utah Hick usage of the word 'gotten'. It just slips it's way out there every now and again.
    Thanks,
    Jason Thomas.

  • Implemented BAdI "EFG_SPOOL_OUTPUT", but doesn't work

    Hi Community
    I have imlemented BAdI "EFG_SPOOL_OUTPUT", activated and set switches. But it still doesn't work.
    I expect, that at least one of the methods (OUTPUT_DONE or OUTPUT_STATUS) is used, every time something is printed - but it's not.
    Do you have an idea why?
    Or is it the wrong BAdI for what I'm looking for?
    Regards Michael

    Hi Community
    I have imlemented BAdI "EFG_SPOOL_OUTPUT", activated and set switches. But it still doesn't work.
    I expect, that at least one of the methods (OUTPUT_DONE or OUTPUT_STATUS) is used, every time something is printed - but it's not.
    Do you have an idea why?
    Or is it the wrong BAdI for what I'm looking for?
    Regards Michael

  • SetIgnoringElementContentWhitespace() doesn't work

    The setIgnoringElementContentWhitespace() method of the DocumentBuilderFactory class doesn't work. I get white space nodes no matter whether I set true or false in it.
    I'm using java_xml_pack-summer-02 with JDK 1.4. Is this a bug in this release?
    How can I get my DOM to ignore white space?

    This functionnality is defined in DOM API. That doesn't mean it's implemented in your parser ... Perhaps that's the cause of your problem.

  • [SOLVED]Xorg 1.8 doesn't work

    Hello, I've just upgraded to linux-firmware and the newest X.org, which doesn't work.
    Xorg.0.log tells me:
    [ 934.318]
    X.Org X Server 1.8.1
    Release Date: 2010-05-11
    [ 934.322] X Protocol Version 11, Revision 0
    [ 934.323] Build Operating System: Linux 2.6.33-ARCH x86_64
    [ 934.325] Current Operating System: Linux staerseus 2.6.34-ARCH #1 SMP PREEMPT Sat Jun 19 00:07:49 CEST 2010 x86_64
    [ 934.326] Kernel command line: root=/dev/disk/by-uuid/727c4683-ee4c-4b32-8a59-370264cb7d9f ro i915.modeset=1 init=/sbin/bootchartd
    [ 934.327] Build Date: 26 May 2010 07:50:07PM
    [ 934.329]
    [ 934.330] Current version of pixman: 0.18.2
    [ 934.331] Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    [ 934.334] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [ 934.338] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jun 21 10:15:38 2010
    [ 934.340] (==) Using config file: "/etc/X11/xorg.conf"
    [ 934.341] (==) Using config directory: "/etc/X11/xorg.conf.d"
    [ 934.343] (==) No Layout section. Using the first Screen section.
    [ 934.343] (==) No screen section available. Using defaults.
    [ 934.343] (**) |-->Screen "Default Screen Section" (0)
    [ 934.343] (**) | |-->Monitor "<default monitor>"
    [ 934.343] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
    [ 934.343] (==) Automatically adding devices
    [ 934.343] (==) Automatically enabling devices
    [ 934.343] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
    [ 934.343] Entry deleted from font path.
    [ 934.343] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/Type1/,
    /usr/share/fonts/100dpi/,
    /usr/share/fonts/75dpi/
    [ 934.343] (==) ModulePath set to "/usr/lib/xorg/modules"
    [ 934.343] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
    [ 934.343] (II) Loader magic: 0x7ce880
    [ 934.343] (II) Module ABI versions:
    [ 934.343] X.Org ANSI C Emulation: 0.4
    [ 934.343] X.Org Video Driver: 7.0
    [ 934.343] X.Org XInput driver : 9.0
    [ 934.343] X.Org Server Extension : 3.0
    [ 934.352] (--) PCI:*(0:0:2:0) 8086:2a42:1734:113f Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller rev 7, Mem @ 0xf2400000/4194304, 0xd0000000/268435456, I/O @ 0x00001800/8
    [ 934.352] (--) PCI: (0:0:2:1) 8086:2a43:1734:113f Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller rev 7, Mem @ 0xf2100000/1048576
    [ 934.352] (II) Open ACPI successful (/var/run/acpid.socket)
    [ 934.352] (II) LoadModule: "extmod"
    [ 934.352] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
    [ 934.352] (II) Module extmod: vendor="X.Org Foundation"
    [ 934.352] compiled for 1.8.1, module version = 1.0.0
    [ 934.352] Module class: X.Org Server Extension
    [ 934.352] ABI class: X.Org Server Extension, version 3.0
    [ 934.352] (II) Loading extension MIT-SCREEN-SAVER
    [ 934.352] (II) Loading extension XFree86-VidModeExtension
    [ 934.352] (II) Loading extension XFree86-DGA
    [ 934.352] (II) Loading extension DPMS
    [ 934.352] (II) Loading extension XVideo
    [ 934.352] (II) Loading extension XVideo-MotionCompensation
    [ 934.352] (II) Loading extension X-Resource
    [ 934.352] (II) LoadModule: "dbe"
    [ 934.352] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
    [ 934.352] (II) Module dbe: vendor="X.Org Foundation"
    [ 934.353] compiled for 1.8.1, module version = 1.0.0
    [ 934.353] Module class: X.Org Server Extension
    [ 934.353] ABI class: X.Org Server Extension, version 3.0
    [ 934.353] (II) Loading extension DOUBLE-BUFFER
    [ 934.353] (II) LoadModule: "glx"
    [ 934.353] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
    [ 934.353] (II) Module glx: vendor="X.Org Foundation"
    [ 934.353] compiled for 1.8.1, module version = 1.0.0
    [ 934.353] ABI class: X.Org Server Extension, version 3.0
    [ 934.353] (==) AIGLX enabled
    [ 934.353] (II) Loading extension GLX
    [ 934.353] (II) LoadModule: "record"
    [ 934.353] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
    [ 934.353] (II) Module record: vendor="X.Org Foundation"
    [ 934.353] compiled for 1.8.1, module version = 1.13.0
    [ 934.353] Module class: X.Org Server Extension
    [ 934.353] ABI class: X.Org Server Extension, version 3.0
    [ 934.353] (II) Loading extension RECORD
    [ 934.353] (II) LoadModule: "dri"
    [ 934.353] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
    [ 934.353] (II) Module dri: vendor="X.Org Foundation"
    [ 934.353] compiled for 1.8.1, module version = 1.0.0
    [ 934.353] ABI class: X.Org Server Extension, version 3.0
    [ 934.353] (II) Loading extension XFree86-DRI
    [ 934.354] (II) LoadModule: "dri2"
    [ 934.354] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
    [ 934.354] (II) Module dri2: vendor="X.Org Foundation"
    [ 934.354] compiled for 1.8.1, module version = 1.2.0
    [ 934.354] ABI class: X.Org Server Extension, version 3.0
    [ 934.354] (II) Loading extension DRI2
    [ 934.354] (==) Matched intel as autoconfigured driver 0
    [ 934.354] (==) Matched vesa as autoconfigured driver 1
    [ 934.354] (==) Matched fbdev as autoconfigured driver 2
    [ 934.354] (==) Assigned the driver to the xf86ConfigLayout
    [ 934.354] (II) LoadModule: "intel"
    [ 934.354] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
    [ 934.354] (II) Module intel: vendor="X.Org Foundation"
    [ 934.354] compiled for 1.7.6, module version = 2.11.0
    [ 934.354] Module class: X.Org Video Driver
    [ 934.354] ABI class: X.Org Video Driver, version 6.0
    [ 934.354] (EE) module ABI major version (6) doesn't match the server's version (7)
    [ 934.356] (II) UnloadModule: "intel"
    [ 934.356] (II) Unloading /usr/lib/xorg/modules/drivers/intel_drv.so
    [ 934.356] (EE) Failed to load module "intel" (module requirement mismatch, 0)
    [ 934.357] (II) LoadModule: "vesa"
    [ 934.357] (WW) Warning, couldn't open module vesa
    [ 934.357] (II) UnloadModule: "vesa"
    [ 934.357] (EE) Failed to load module "vesa" (module does not exist, 0)
    [ 934.359] (II) LoadModule: "fbdev"
    [ 934.359] (WW) Warning, couldn't open module fbdev
    [ 934.359] (II) UnloadModule: "fbdev"
    [ 934.359] (EE) Failed to load module "fbdev" (module does not exist, 0)
    [ 934.360] (EE) No drivers available.
    [ 934.362]
    Fatal server error:
    [ 934.364] no screens found
    [ 934.365]
    Please consult the The X.Org Foundation support
    at http://wiki.x.org
    for help.
    [ 934.370] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [ 934.372]
    What does the problem with modules mean? Archlinux was warning me, that "in future releases /etc/modprobe.d/framebuffer_blacklist.conf.save will be ignored, but it is the same file as /etc/modprobe.d/framebuffer_blacklist.conf.
    I don't understand, why it cannot find any screens (I use a laptop screen)
    I tried to start with and without xorg.conf, which is:
    Section "Device"
    Identifier "Intel X4500MHD"
    Driver "intel"
    VendorName "Intel Corporation"
    BoardName "Mobile 4 Series Chipset Integrated Graphics Controller"
    BusID "PCI:0:2:0"
    Option "DRI" "true"
    Option "AccelMethod" "uxa"
    Option "MigrationHeuristic" "greedy"
    EndSection
    The graphic driver I use is xf86-video-intel-newest from archstuff, but it is the same version as xf86-video-intel.
    I am not sure if I provided all needed info, but I hope so. Thank you for your help.SOLVED
    Last edited by Staerseus (2010-06-21 09:18:03)

    Use the arch version.   It is actually built against the xorg version that you are using...  here is the relevant section of your log:
    [ 934.354] (EE) module ABI major version (6) doesn't match the server's version (7)

  • Com.sap.portal.appintegrator.sap doesn't work

    Hi all,
    I needed to change the file 'WinGuiRenderLayer.properties'
    I found the par under 3 locations:
    d:\usr\sap\SPD\jc00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap
    d:\usr\sap\SPD\jc00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\deployment\pcd
    d:\usr\sap\SPD\jc00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\deployment\temp
    I changed the file in those locations (I removed the bak extension and restarted the server).
    Also, I made sure that the pars/directory contains the jar files.
    After I restarted the server the application integrator iviews doesn't work (Web Dynpro, Transaction...).
    Before I did the changes, I backed up the original pars/directory.
    Copying the original pars didn't help.
    How can I solve this?
    Portal is EP6.16
    Attched exception details:
    Date : 10/25/2007
    Time : 13:56:51:765
    Message : [PortalNode.fireEventOnNode.toEventListener] event=onNodeReadyEvent, target=com.company.Orders, operation failed
    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : com.sap.portal.appintegrator.sap.WebDynpro
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
         at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
         at com.sapportals.portal.navigation.workAreaiView.doOnNodeReady(workAreaiView.java:238)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.navigation.workAreaiView.handleEvent(workAreaiView.java:356)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.pb.PageBuilder.createAndAddEmbeddediView(PageBuilder.java:178)
         at com.sapportals.portal.pb.PageBuilder.createiView(PageBuilder.java:391)
         at com.sapportals.portal.pb.PageBuilder.createAndAddiViews(PageBuilder.java:234)
         at com.sapportals.portal.pb.PageBuilder.doOnNodeReady(PageBuilder.java:576)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.pb.PageBuilder.handleEvent(PageBuilder.java:725)
         at com.sapportals.portal.prt.component.CachablePortalComponent.handleEvent(CachablePortalComponent.java:685)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent of Portal Component com.sap.portal.appintegrator.sap.WebDynpro because: Linkage error while loading implementation class
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:234)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
         at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
         at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
         ... 41 more
    Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/appintegrator/AbstractIntegratorComponent
    Loader Info -
    ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@72f155]
    Parent loader name: [sap.com/com.sap.portal.appintegrator.sap]
    References:
       not registered!
    Resources:
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\classes
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\lib\com.sap.portal.appintegrator.sap_core.jar
    The error occurred while trying to load "com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent".
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:389)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
         ... 45 more
    Severity : Warning
    Category : /System/Server
    Location : com.sap.portal.portal
    Application : sap.com/irj
    Thread : SAPEngine_Application_Thread[impl:3]_27
    Datasource : 6397450:D:\usr\sap\SPD\JC00\j2ee\cluster\server0\log\defaultTrace.trc
    Message ID : 000E7F3049DE005C0000002100001C4000043D4FEE02FB46
    Source Name : com.sap.portal.portal
    Argument Objs : com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : com.sap.portal.appintegrator.sap.WebDynpro
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
         at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
         at com.sapportals.portal.navigation.workAreaiView.doOnNodeReady(workAreaiView.java:238)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.navigation.workAreaiView.handleEvent(workAreaiView.java:356)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.pb.PageBuilder.createAndAddEmbeddediView(PageBuilder.java:178)
         at com.sapportals.portal.pb.PageBuilder.createiView(PageBuilder.java:391)
         at com.sapportals.portal.pb.PageBuilder.createAndAddiViews(PageBuilder.java:234)
         at com.sapportals.portal.pb.PageBuilder.doOnNodeReady(PageBuilder.java:576)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.pb.PageBuilder.handleEvent(PageBuilder.java:725)
         at com.sapportals.portal.prt.component.CachablePortalComponent.handleEvent(CachablePortalComponent.java:685)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent of Portal Component com.sap.portal.appintegrator.sap.WebDynpro because: Linkage error while loading implementation class
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:234)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
         at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
         at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
         ... 41 more
    Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/appintegrator/AbstractIntegratorComponent
    Loader Info -
    ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@72f155]
    Parent loader name: [sap.com/com.sap.portal.appintegrator.sap]
    References:
       not registered!
    Resources:
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\classes
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\lib\com.sap.portal.appintegrator.sap_core.jar
    The error occurred while trying to load "com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent".
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:389)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
         ... 45 more
    Arguments : com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : com.sap.portal.appintegrator.sap.WebDynpro
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
         at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
         at com.sapportals.portal.navigation.workAreaiView.doOnNodeReady(workAreaiView.java:238)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.navigation.workAreaiView.handleEvent(workAreaiView.java:356)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.pb.PageBuilder.createAndAddEmbeddediView(PageBuilder.java:178)
         at com.sapportals.portal.pb.PageBuilder.createiView(PageBuilder.java:391)
         at com.sapportals.portal.pb.PageBuilder.createAndAddiViews(PageBuilder.java:234)
         at com.sapportals.portal.pb.PageBuilder.doOnNodeReady(PageBuilder.java:576)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.pb.PageBuilder.handleEvent(PageBuilder.java:725)
         at com.sapportals.portal.prt.component.CachablePortalComponent.handleEvent(CachablePortalComponent.java:685)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent of Portal Component com.sap.portal.appintegrator.sap.WebDynpro because: Linkage error while loading implementation class
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:234)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
         at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
         at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
         ... 41 more
    Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/appintegrator/AbstractIntegratorComponent
    Loader Info -
    ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@72f155]
    Parent loader name: [sap.com/com.sap.portal.appintegrator.sap]
    References:
       not registered!
    Resources:
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\classes
       D:\usr\sap\SPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\private\lib\com.sap.portal.appintegrator.sap_core.jar
    The error occurred while trying to load "com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent".
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:389)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
         ... 45 more
    Dsr Component : <Server Name>
    Dsr Transaction : 5a4c6ec082f111dccf17000e7f3049de
    Dsr User : <User>
    Indent : 0
    Level : 0
    Message Code :
    Message Type : 1
    Relatives : /System/Server
    Resource Bundlename :
    Session : 44
    Source : com.sap.portal.portal
    ThreadObject : SAPEngine_Application_Thread[impl:3]_27
    Transaction :
    User : <User>
    Thanks,
    Omri

    Solved it.
    This is what I did:
    1) Took par from my production environment (same SP level)
    2) Clear the par (by using 'Archive Remover')
    3) Clear the pcd cache
    4) Upload the par (redploy)\
    5) Restart the portal
    Thanks,
    Omri

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • How do you close a dragged applet, as Stage.close() doesn't work?

    I'm trying to implement a close button in a draggable applet, but Stage.close() doesn't work, and there's an odd little "X" icon which is causing me problems...
    My starting point and example is the simple draggable applet from the API documentation. It's the code listed under "User-Specified Close Example":
    http://java.sun.com/javafx/1.2/docs/api/javafx.stage/javafx.stage.AppletStageExtension.html
    import javafx.scene.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.paint.*;
    import javafx.scene.shape.*;
    import javafx.scene.text.*;
    import javafx.stage.*;
    var textContent = "Click the box to return to the browser";
    var outside: Boolean = false;
    var s: Stage = Stage {
        title: "AppDeploy Demo"
        width : 300 height : 200
        style: StageStyle.TRANSPARENT
        opacity: 0.5
        scene : Scene {
                content: [
                    Text { content: bind textContent 
                           x: 25 y:35 fill: Color.BLACK
                           font: Font{size: 24}
                    Rectangle { x: 100 y: 100 width: 100 height: 100 fill: Color.RED
                                onMouseClicked: function(e: MouseEvent): Void {
                                    s.close();
        extensions: [
            AppletStageExtension {
                shouldDragStart: function(e: MouseEvent): Boolean {
                    return e.shiftDown and e.primaryButtonDown;
                useDefaultClose: false
    }However, the Stage.close() function in the user code doesn't seem to close the applet once it's dragged. It seems this can only be achieved by a mysterious little "X" in a box top right, acting as a close button.
    Here's a demonstration of the problem once you've compiled that code:
    1. Open browser with applet (I'm using IE8 on Windows XP)
    2. Shift-drag the applet out of the browser. Notice the little X in a box appears when you drop the applet on the desktop.
    3. Click the red rectangle to invoke the Stage.close() function in the user code.
    4. Applet disappears from screen and does not reappear in the browser.
    5. But minimising all the icons on the desktop shows the little X in a box is still there sitting on your desktop (actually I find the X has gone, but the box is still there). This suggests the applet is still running.
    6. Close the browser. The little X's box is still on the desktop.
    7. After a short pause a Java dialog box appears: "Desktop integration warning. The application would like to create shortcuts. Do you want to continue? OK/Skip" The applet wasn't closed, it is still running!
    8. Click Skip. Dialog box disappears. But the little X's box is still on the desktop. Is the applet still running?
    9. Try to recompile app again into a deployable Jar (I'm using Eclipse for this).
    10. The compiler stops with "ERROR: Jar file C:\[...].jar could not be deleted. The Jar is probably locked by running application, Web browser, emulator or antivirus. Please check that all windows related to the application have been closed." Yes, the applet Jar is still being used.
    11. Minimise all the windows. The little X's box is still on the desktop.
    12. Click the little X's box.
    13. After a few seconds the box disappears. Does this mean the applet is no longer in use...?
    14. Recompile the app again into a deployable Jar. It works!
    By the way, you get the same experience with another Sun sample: the DraggableMP3Player at
    http://javafx.com/samples/DraggableMP3Player/index.html
    That, too, thinks it's implementing it's own close button, and again the same problem occurs.
    So it seems Stage.close() doesn't properly close the applet, and only the the little X in a box will do this.
    I'd like to be able to really close the applet from my own code. How can I do this?
    Many thanks
    Nik
    Edited by: nik.silver on Aug 6, 2009 12:48 PM

    After double tap home button, swipe up on the app card that appears above the icon.

  • I cannot sync Ical on my iMac with my professional calendar (outlook web access). and I don't understand why it doesn't work since I have already made it with my iPhone. Help

    Hello,
    I bought an iMac few days ago. I would like to sync ical on my iMac with my professional calendar I use in my company (from outlook web access).
    I was easy to manage it on my iPhone (I just add a new "exchange" mail account and ask for a calendar sync only) and it worked very quickly.
    But I cannot do it with the iMac, and I don't undersatnd why?
    the domain is is used for my iPhone is the following :
    owa.companyname.com
    I tried all the solutions I found in this forum but it doesn't work.
    Many thanks in advancefor your help.
    Matt

    Does it have to be an applet?
    If you want the same behaviour as in the code with traffic lights, change
    class MortgageApplet extends JApplet implements ActionListener {
    to
    class MortgageApplet extends JFrame implements ActionListener {
    and change
    public void init() {
    to
    public MortgageApplet() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Wi-Fi Sync with Windows 7 PC doesn't work

    I have both an iPhone 5s and iPad-3. I use iTunes (latest version) in a Windows 7 PC. No problems to sync with the USB cable, but Wi-Fi sync is totally unreliable.  I have spend lots of time reading all the information available online. Wi-Fi sync is configured right.  It is not a problem with either Antivirus software or the Firewall (I have tried disabling both).  I re-installed iTunes following the Apple support note on the subject.  On one time after I reinstalled, Wi-Fi worked, but only for the first sync.  When I turn on Wi-Fi in the iPad and iPhone, the iDevice always appear in iTunes but for a short while and it then dissapears. It is clear that they have some problem during the communication but neither iTunes nor the iDevice report any kind of error I could use to try to fix the problem.
    It is really frustrating, and I work in IT ... From what I have seen online, I am not alone with this problem. I have several iphone/iPad apps that do Wi-Fi syncs with applications in the Desktop, and they work every time.  I don't undertand why Apple can not implement a reliable Wi-Fi sync with iTunes.  I don't think it is to sell more Apple computers/laptops since there are many with those that have the same kind of problem. Could it be to sell more USB cables ?.

    mzhu2626 wrote:
    i have a windows 7 x64 with the latest version of chrome as it's default browser. i also have IE running with flash too. however, while flash works on IE, it doesn't work on chrome. i understand that to allow flash to work on chrome, you can access the global settings on the website, but i have this program running on my computer that needs flash to work and whenever i try to open it, this pops up:
    i can't click the allow, remember or close buttons. i can access global settings, but considering how this is just a program and not a website i don't think how helpful that'd be. can someone please help me?!
    See the "Known Issues" article re: Google Chrome to see if you recognize any of them: http://support.google.com/chrome/bin/static.py?hl=en&page=known_issues.cs
    There's a link to their Help forums near the foot of the page.

  • Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

    Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.
    e.g.
    In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.
    /content/myproject/-/
    So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.
    But the problem is there in following scenario.
    I have an anchor tag as follows.
    <a href="#" id="test"> click here </a>
    And I am assigning the href to anchor through JQUERY.
    <script>
    $("#test").attr("href","/content/myproject/en.html");
    </script>
    Ideally this should have been mapped to "/en.html".
    But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".
    How to resolve this.
    Thanks,
    Sai

    In a servlet you have access to the resourceResolver so if you know which attributes contain links then it's relatively easy to apply resourceResolver.map to those links.
    Your challenge is clearly how do you know which attributes are links and which aren't. Its is the same challenge that makes parsing the response and rewriting it on the way out difficult - the JSON doesn't have any semantic meaning so how do identify which attributes require rewriting. There really is no good answer ot that question in my experience - all the options have down sides.
    Create some convention - all attributes matching this pattern X get mapped before being converted to JSON (could be attributes whose name ends in link, or it could a convention applied to the value of the attribute - if the attribute is a string that starts with /content apply the resource resolver mapping. In this case you have train your developers to follow this convention which is the down side.
    Create some configurable list of attribute names that require mapping. This is brittle, requires training and is easy to break.
    Implement a client side version of the resource resolver mapping. It wouldn't be as full proof as server side mapping (because that takes into account but you could make it work for simple logic like stripping of /content/site/en. If ou are just trying to solve the simple version of this issue - stripping off the top of the repository path this might be your best option.
    Not worry about it and set up Apache 301 redirects that catch any long URLs and redirect them to short URLs (so configure apache to look for any URL matching /content/site/en and strip off /content/site/en and do a 301 redirect to the shortened URL. You end up with a lot of extra HTTP request because of all the 301s but it would work (I wouldn't recommend this option - but it is possible).

  • [SOLVED] - xset at startup doesn't work

    I use the following command to set my screensaver options
    xset dpms 30 60 300
    After reading the Arch wiki, I found out that this can be made permanent by adding this to the xorg.conf or putting it in ~/.xprofile
    Contents of xorg.conf
    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig: version 1.0 (buildmeister@builder75) Tue Dec 8 21:04:28 PST 2009
    Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
    Option "StandbyTime" "2"
    Option "SuspendTime" "3"
    Option "OffTime" "5"
    EndSection
    Section "Files"
    EndSection
    Section "InputDevice"
    # generated from default
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons" "no"
    Option "ZAxisMapping" "4 5"
    EndSection
    Section "InputDevice"
    # generated from default
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "Monitor"
    Identifier "Dell Inspiron 1520 WXGA+ LCD"
    VendorName "Dell"
    ModelName "Unknown"
    HorizSync 28.0 - 33.0
    VertRefresh 43.0 - 72.0
    Option "DPMS" "true"
    EndSection
    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection
    Section "InputDevice"
    Identifier "Touchpad"
    Driver "synaptics"
    Option "Device" "/dev/input/mouse0"
    Option "Protocol" "auto-dev"
    Option "LeftEdge" "1700"
    Option "RightEdge" "5300"
    Option "TopEdge" "1700"
    Option "BottomEdge" "4200"
    Option "FingerLow" "25"
    Option "FingerHigh" "30"
    Option "MaxTapTime" "180"
    Option "MaxTapMove" "220"
    Option "VertScrollDelta" "100"
    Option "MinSpeed" "0.06"
    Option "MaxSpeed" "0.12"
    Option "AccelFactor" "0.0010"
    Option "SHMConfig" "on"
    Option "CircularScrolling" "1"
    Option "CircScrollTrigger" "0"
    EndSection
    Section "ServerFlags"
    Option "DontZap" "false"
    Option "BlankTime" "0.1"
    Option "StandbyTime" "0.5"
    Option "SuspendTime" "1"
    Option "OffTime" "5"
    EndSection
    Contents of ~/.xprofile
    xset dpms 30 60 300
    I even added this to crontab
    0 * * * * ~/Wallpapers/change-background-folder.py
    0 * * * * /usr/bin/xset s 30
    0 * * * * /usr/bin/xset dpms 60 120 300
    @reboot ID=screensaver AFTER=2m /usr/bin/xset s 30
    @reboot ID=monitor AFTER=2m /usr/bin/xset dpms 60 120 300
    @reboot ID=vu AFTER=1m vuze
    Still after doing all this, when I give xset q after a reboot, I get
    [theta@boolean-pc ~]$ xset q
    Keyboard Control:
    auto repeat: on key click percent: 0 LED mask: 00000000
    XKB indicators:
    00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
    03: Compose: off 04: Kana: off 05: Sleep: off
    06: Suspend: off 07: Mute: off 08: Misc: off
    09: Mail: off 10: Charging: off 11: Shift Lock: off
    12: Group 2: off 13: Mouse Keys: off
    auto repeat delay: 500 repeat rate: 30
    auto repeating keys: 00ffffffdffffbbf
    fadfffefffedffff
    9fffffffffffffff
    fff7ffffffffffff
    bell percent: 50 bell pitch: 400 bell duration: 100
    Pointer Control:
    acceleration: 3/1 threshold: 4
    Screen Saver:
    prefer blanking: yes allow exposures: yes
    timeout: 600 cycle: 600
    Colors:
    default colormap: 0x20 BlackPixel: 0 WhitePixel: 16777215
    Font Path:
    /usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins
    DPMS (Energy Star):
    Standby: 0 Suspend: 0 Off: 0
    DPMS is Enabled
    Monitor is On
    Font cache:
    Server does not have the FontCache Extension
    The parameters are still all 0.
    Please suggest a solution.
    Apoorv
    Last edited by theta (2011-08-02 15:56:06)

    jasonwryan wrote:
    If you have set up your .xinitrc the way karol suggests and it still doesn't work, you could delay it kicking in until X has finished loading
    (sleep 15s && xset dpms 30 60 300) &
    exec yourwm
    That may get around the problem bernarcher describes...
    Thank you! This works very well for me.
    It's the only way I can get it to work.
    For the records, so the smart people can find the problem, here is my xorg.conf:
    Section "ServerLayout"
    Identifier "ServerLayout0"
    Screen 0 "BenQ" 0 0
    #Option "BlankTime" "0"
    Option "StandbyTime" "10"
    Option "SuspendTime" "20"
    Option "OffTime" "30"
    EndSection
    Section "Screen"
    Identifier "BenQ"
    Device "Intel4000"
    Monitor "HDMI2"
    DefaultDepth 24
    SubSection "Display"
    #Depth "24"
    EndSubSection
    EndSection
    Section "Monitor"
    Identifier "HDMI2"
    Option "DPMS" "true"
    EndSection
    Section "Device"
    Identifier "Intel4000"
    Driver "intel"
    BusID "PCI:0:2:0"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    EndSection
    # Read and parsed by systemd-localed. It's probably wise not to edit this manually too freely.
    Section "InputClass"
    Identifier "system-keyboard"
    MatchIsKeyboard "on"
    Option "XkbLayout" "se"
    EndSection
    # Catch-all evdev loader for udev-based systems
    # We don't simply match on any device since that also adds accelerometers
    # and other devices that we don't really want to use. The list below
    # matches everything but joysticks.
    Section "InputClass"
    Identifier "evdev pointer catchall"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    EndSection
    Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    EndSection
    Section "InputClass"
    Identifier "evdev touchpad catchall"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    EndSection
    Section "InputClass"
    Identifier "evdev tablet catchall"
    MatchIsTablet "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    EndSection
    Section "InputClass"
    Identifier "evdev touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    EndSection
    Xorg seems to not care about my settings in xorg.conf and sets DPMS values to "0":
    $ xset -q
    Keyboard Control:
    auto repeat: on key click percent: 0 LED mask: 00000002
    XKB indicators:
    00: Caps Lock: off 01: Num Lock: on 02: Scroll Lock: off
    03: Compose: off 04: Kana: off 05: Sleep: off
    06: Suspend: off 07: Mute: off 08: Misc: off
    09: Mail: off 10: Charging: off 11: Shift Lock: off
    12: Group 2: off 13: Mouse Keys: off
    auto repeat delay: 500 repeat rate: 33
    auto repeating keys: 00ffffffdffffbbf
    fadfffefffedffff
    9fffffffffffffff
    fff7ffffffffffff
    bell percent: 50 bell pitch: 400 bell duration: 100
    Pointer Control:
    acceleration: 2/1 threshold: 4
    Screen Saver:
    prefer blanking: yes allow exposures: yes
    timeout: 0 cycle: 0
    Colors:
    default colormap: 0x22 BlackPixel: 0x0 WhitePixel: 0xffffff
    Font Path:
    /usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,built-ins
    DPMS (Energy Star):
    Standby: 0 Suspend: 0 Off: 0
    DPMS is Enabled
    Monitor is On
    And the xorg log:
    [ 17738.153]
    X.Org X Server 1.15.1
    Release Date: 2014-04-13
    [ 17738.194] X Protocol Version 11, Revision 0
    [ 17738.208] Build Operating System: Linux 3.14.0-4-ARCH x86_64
    [ 17738.223] Current Operating System: Linux arch6 3.14.1-1-ARCH #1 SMP PREEMPT Mon Apr 14 20:40:47 CEST 2014 x86_64
    [ 17738.223] Kernel command line: console=tty0 xen-pciback.hide=(01:00.0)(01:00.1)(03:00.0)(02:00.0)(00:14.0)(00:1d.0) root=/dev/VG/Aroot rw
    [ 17738.254] Build Date: 14 April 2014 08:39:09AM
    [ 17738.269]
    [ 17738.285] Current version of pixman: 0.32.4
    [ 17738.314] Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    [ 17738.314] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [ 17738.375] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 29 22:10:19 2014
    [ 17738.390] (==) Using config file: "/etc/X11/xorg.conf"
    [ 17738.406] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    [ 17738.406] (==) ServerLayout "ServerLayout0"
    [ 17738.406] (**) |-->Screen "BenQ" (0)
    [ 17738.406] (**) | |-->Monitor "HDMI2"
    [ 17738.406] (**) | |-->Device "Intel4000"
    [ 17738.406] (**) Option "StandbyTime" "10"
    [ 17738.406] (**) Option "SuspendTime" "20"
    [ 17738.406] (**) Option "OffTime" "30"
    [ 17738.406] (==) Automatically adding devices
    [ 17738.406] (==) Automatically enabling devices
    [ 17738.406] (==) Automatically adding GPU devices
    [ 17738.406] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
    [ 17738.406] Entry deleted from font path.
    [ 17738.406] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
    [ 17738.406] Entry deleted from font path.
    [ 17738.406] (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
    [ 17738.406] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
    [ 17738.406] Entry deleted from font path.
    [ 17738.406] (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
    [ 17738.406] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/Type1/
    [ 17738.406] (==) ModulePath set to "/usr/lib/xorg/modules"
    [ 17738.406] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
    [ 17738.406] (II) Loader magic: 0x804c80
    [ 17738.406] (II) Module ABI versions:
    [ 17738.406] X.Org ANSI C Emulation: 0.4
    [ 17738.406] X.Org Video Driver: 15.0
    [ 17738.406] X.Org XInput driver : 20.0
    [ 17738.406] X.Org Server Extension : 8.0
    [ 17738.406] (II) xfree86: Adding drm device (/dev/dri/card0)
    [ 17738.408] (--) PCI:*(0:0:2:0) 8086:0162:1458:d000 rev 9, Mem @ 0xf4400000/4194304, 0xc0000000/268435456, I/O @ 0x0000f000/64
    [ 17738.408] (--) PCI: (0:1:0:0) 1002:67b1:1002:0b00 rev 0, Mem @ 0xd0000000/268435456, 0xe0000000/8388608, 0xf4b00000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
    [ 17738.408] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
    [ 17738.424] Initializing built-in extension Generic Event Extension
    [ 17738.439] Initializing built-in extension SHAPE
    [ 17738.454] Initializing built-in extension MIT-SHM
    [ 17738.468] Initializing built-in extension XInputExtension
    [ 17738.482] Initializing built-in extension XTEST
    [ 17738.495] Initializing built-in extension BIG-REQUESTS
    [ 17738.509] Initializing built-in extension SYNC
    [ 17738.523] Initializing built-in extension XKEYBOARD
    [ 17738.536] Initializing built-in extension XC-MISC
    [ 17738.548] Initializing built-in extension SECURITY
    [ 17738.561] Initializing built-in extension XINERAMA
    [ 17738.573] Initializing built-in extension XFIXES
    [ 17738.585] Initializing built-in extension RENDER
    [ 17738.597] Initializing built-in extension RANDR
    [ 17738.608] Initializing built-in extension COMPOSITE
    [ 17738.620] Initializing built-in extension DAMAGE
    [ 17738.631] Initializing built-in extension MIT-SCREEN-SAVER
    [ 17738.643] Initializing built-in extension DOUBLE-BUFFER
    [ 17738.654] Initializing built-in extension RECORD
    [ 17738.665] Initializing built-in extension DPMS
    [ 17738.677] Initializing built-in extension Present
    [ 17738.688] Initializing built-in extension DRI3
    [ 17738.700] Initializing built-in extension X-Resource
    [ 17738.711] Initializing built-in extension XVideo
    [ 17738.722] Initializing built-in extension XVideo-MotionCompensation
    [ 17738.734] Initializing built-in extension XFree86-VidModeExtension
    [ 17738.746] Initializing built-in extension XFree86-DGA
    [ 17738.757] Initializing built-in extension XFree86-DRI
    [ 17738.769] Initializing built-in extension DRI2
    [ 17738.769] (II) "glx" will be loaded by default.
    [ 17738.769] (II) LoadModule: "dri2"
    [ 17738.769] (II) Module "dri2" already built-in
    [ 17738.769] (II) LoadModule: "glamoregl"
    [ 17738.769] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
    [ 17738.770] (II) Module glamoregl: vendor="X.Org Foundation"
    [ 17738.770] compiled for 1.15.0, module version = 0.6.0
    [ 17738.770] ABI class: X.Org ANSI C Emulation, version 0.4
    [ 17738.770] (II) LoadModule: "glx"
    [ 17738.770] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
    [ 17738.770] (II) Module glx: vendor="X.Org Foundation"
    [ 17738.770] compiled for 1.15.1, module version = 1.0.0
    [ 17738.771] ABI class: X.Org Server Extension, version 8.0
    [ 17738.771] (==) AIGLX enabled
    [ 17738.782] Loading extension GLX
    [ 17738.782] (II) LoadModule: "intel"
    [ 17738.782] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
    [ 17738.782] (II) Module intel: vendor="X.Org Foundation"
    [ 17738.783] compiled for 1.15.0, module version = 2.99.911
    [ 17738.783] Module class: X.Org Video Driver
    [ 17738.783] ABI class: X.Org Video Driver, version 15.0
    [ 17738.783] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
    [ 17738.783] (II) intel: Driver for Intel(R) HD Graphics: 2000-5000
    [ 17738.783] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100
    [ 17738.783] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200
    [ 17738.783] (++) using VT number 1
    [ 17738.783] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4000
    [ 17738.783] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx
    [ 17738.783] (**) intel(0): Depth 24, (--) framebuffer bpp 32
    [ 17738.783] (==) intel(0): RGB weight 888
    [ 17738.783] (==) intel(0): Default visual is TrueColor
    [ 17738.783] (**) intel(0): Option "AccelMethod" "sna"
    [ 17738.783] (**) intel(0): Option "TearFree" "true"
    [ 17738.783] (**) intel(0): Framebuffer tiled
    [ 17738.784] (**) intel(0): Pixmaps tiled
    [ 17738.784] (**) intel(0): "Tear free" enabled
    [ 17738.784] (**) intel(0): Forcing per-crtc-pixmaps? no
    [ 17738.784] (II) intel(0): Output VGA1 using monitor section HDMI2
    [ 17738.784] (II) intel(0): Output HDMI1 has no monitor section
    [ 17738.784] (II) intel(0): Output DP1 has no monitor section
    [ 17738.784] (II) intel(0): Output HDMI2 using monitor section HDMI2
    [ 17738.784] (II) intel(0): Output DP2 has no monitor section
    [ 17738.784] (II) intel(0): Output VIRTUAL1 has no monitor section
    [ 17738.784] (--) intel(0): Output HDMI2 using initial mode 1920x1080 on pipe 0
    [ 17738.784] (==) intel(0): DPI set to (96, 96)
    [ 17738.784] (II) Loading sub module "dri2"
    [ 17738.784] (II) LoadModule: "dri2"
    [ 17738.784] (II) Module "dri2" already built-in
    [ 17738.784] (==) Depth 24 pixmap format is 32 bpp
    [ 17738.784] (II) intel(0): SNA initialized with Ivybridge (gen7, gt2) backend
    [ 17738.784] (==) intel(0): Backing store enabled
    [ 17738.784] (==) intel(0): Silken mouse enabled
    [ 17738.784] (II) intel(0): HW Cursor enabled
    [ 17738.784] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
    [ 17738.784] (**) intel(0): DPMS enabled
    [ 17738.784] (II) intel(0): [DRI2] Setup complete
    [ 17738.784] (II) intel(0): [DRI2] DRI driver: i965
    [ 17738.784] (II) intel(0): [DRI2] VDPAU driver: i965
    [ 17738.784] (II) intel(0): direct rendering: DRI2 Enabled
    [ 17738.784] (==) intel(0): hotplug detection: "enabled"
    [ 17738.784] (--) RandR disabled
    [ 17738.789] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
    [ 17738.789] (II) AIGLX: enabled GLX_ARB_create_context
    [ 17738.789] (II) AIGLX: enabled GLX_ARB_create_context_profile
    [ 17738.789] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
    [ 17738.789] (II) AIGLX: enabled GLX_INTEL_swap_event
    [ 17738.789] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
    [ 17738.789] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
    [ 17738.789] (II) AIGLX: enabled GLX_ARB_fbconfig_float
    [ 17738.789] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
    [ 17738.789] (II) AIGLX: enabled GLX_ARB_create_context_robustness
    [ 17738.789] (II) AIGLX: Loaded and initialized i965
    [ 17738.789] (II) GLX: Initialized DRI2 GL provider for screen 0
    [ 17738.791] (II) intel(0): switch to mode [email protected] on HDMI2 using pipe 0, position (0, 0), rotation normal, reflection none
    [ 17738.801] (II) intel(0): Setting screen physical size to 508 x 285
    [ 17738.839] (II) config/udev: Adding input device Power Button (/dev/input/event1)
    [ 17738.839] (**) Power Button: Applying InputClass "system-keyboard"
    [ 17738.839] (**) Power Button: Applying InputClass "evdev keyboard catchall"
    [ 17738.839] (II) LoadModule: "evdev"
    [ 17738.839] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
    [ 17738.840] (II) Module evdev: vendor="X.Org Foundation"
    [ 17738.840] compiled for 1.15.0, module version = 2.8.2
    [ 17738.840] Module class: X.Org XInput Driver
    [ 17738.840] ABI class: X.Org XInput driver, version 20.0
    [ 17738.840] (II) Using input driver 'evdev' for 'Power Button'
    [ 17738.840] (**) Power Button: always reports core events
    [ 17738.840] (**) evdev: Power Button: Device: "/dev/input/event1"
    [ 17738.840] (--) evdev: Power Button: Vendor 0 Product 0x1
    [ 17738.840] (--) evdev: Power Button: Found keys
    [ 17738.840] (II) evdev: Power Button: Configuring as keyboard
    [ 17738.840] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"
    [ 17738.840] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
    [ 17738.840] (**) Option "xkb_rules" "evdev"
    [ 17738.840] (**) Option "xkb_model" "pc104"
    [ 17738.840] (**) Option "xkb_layout" "se"
    [ 17738.870] (II) config/udev: Adding input device Video Bus (/dev/input/event2)
    [ 17738.870] (**) Video Bus: Applying InputClass "system-keyboard"
    [ 17738.870] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
    [ 17738.870] (II) Using input driver 'evdev' for 'Video Bus'
    [ 17738.870] (**) Video Bus: always reports core events
    [ 17738.870] (**) evdev: Video Bus: Device: "/dev/input/event2"
    [ 17738.871] (--) evdev: Video Bus: Vendor 0 Product 0x6
    [ 17738.871] (--) evdev: Video Bus: Found keys
    [ 17738.871] (II) evdev: Video Bus: Configuring as keyboard
    [ 17738.871] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input2/event2"
    [ 17738.871] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
    [ 17738.871] (**) Option "xkb_rules" "evdev"
    [ 17738.871] (**) Option "xkb_model" "pc104"
    [ 17738.871] (**) Option "xkb_layout" "se"
    [ 17738.871] (II) config/udev: Adding input device Power Button (/dev/input/event0)
    [ 17738.871] (**) Power Button: Applying InputClass "system-keyboard"
    [ 17738.871] (**) Power Button: Applying InputClass "evdev keyboard catchall"
    [ 17738.871] (II) Using input driver 'evdev' for 'Power Button'
    [ 17738.871] (**) Power Button: always reports core events
    [ 17738.871] (**) evdev: Power Button: Device: "/dev/input/event0"
    [ 17738.871] (--) evdev: Power Button: Vendor 0 Product 0x1
    [ 17738.871] (--) evdev: Power Button: Found keys
    [ 17738.871] (II) evdev: Power Button: Configuring as keyboard
    [ 17738.871] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0/event0"
    [ 17738.871] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
    [ 17738.871] (**) Option "xkb_rules" "evdev"
    [ 17738.871] (**) Option "xkb_model" "pc104"
    [ 17738.871] (**) Option "xkb_layout" "se"
    [ 17738.871] (II) config/udev: Adding drm device (/dev/dri/card0)
    [ 17738.872] (II) config/udev: Adding input device Microsoft Wired Keyboard 600 (/dev/input/event3)
    [ 17738.872] (**) Microsoft Wired Keyboard 600: Applying InputClass "system-keyboard"
    [ 17738.872] (**) Microsoft Wired Keyboard 600: Applying InputClass "evdev keyboard catchall"
    [ 17738.872] (II) Using input driver 'evdev' for 'Microsoft Wired Keyboard 600'
    [ 17738.872] (**) Microsoft Wired Keyboard 600: always reports core events
    [ 17738.872] (**) evdev: Microsoft Wired Keyboard 600: Device: "/dev/input/event3"
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Vendor 0x45e Product 0x750
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found keys
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Configuring as keyboard
    [ 17738.872] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/0003:045E:0750.0001/input/input5/event3"
    [ 17738.872] (II) XINPUT: Adding extended input device "Microsoft Wired Keyboard 600" (type: KEYBOARD, id 9)
    [ 17738.872] (**) Option "xkb_rules" "evdev"
    [ 17738.872] (**) Option "xkb_model" "pc104"
    [ 17738.872] (**) Option "xkb_layout" "se"
    [ 17738.872] (II) config/udev: Adding input device Microsoft Wired Keyboard 600 (/dev/input/event4)
    [ 17738.872] (**) Microsoft Wired Keyboard 600: Applying InputClass "system-keyboard"
    [ 17738.872] (**) Microsoft Wired Keyboard 600: Applying InputClass "evdev keyboard catchall"
    [ 17738.872] (II) Using input driver 'evdev' for 'Microsoft Wired Keyboard 600'
    [ 17738.872] (**) Microsoft Wired Keyboard 600: always reports core events
    [ 17738.872] (**) evdev: Microsoft Wired Keyboard 600: Device: "/dev/input/event4"
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Using mtdev for this device
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Vendor 0x45e Product 0x750
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found 1 mouse buttons
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found scroll wheel(s)
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found relative axes
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found absolute axes
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found absolute multitouch axes
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found x and y absolute axes
    [ 17738.872] (--) evdev: Microsoft Wired Keyboard 600: Found keys
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Forcing relative x/y axes to exist.
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Configuring as mouse
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Configuring as keyboard
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: Adding scrollwheel support
    [ 17738.872] (**) evdev: Microsoft Wired Keyboard 600: YAxisMapping: buttons 4 and 5
    [ 17738.872] (**) evdev: Microsoft Wired Keyboard 600: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [ 17738.872] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.1/0003:045E:0750.0002/input/input6/event4"
    [ 17738.872] (II) XINPUT: Adding extended input device "Microsoft Wired Keyboard 600" (type: KEYBOARD, id 10)
    [ 17738.872] (**) Option "xkb_rules" "evdev"
    [ 17738.872] (**) Option "xkb_model" "pc104"
    [ 17738.872] (**) Option "xkb_layout" "se"
    [ 17738.872] (II) evdev: Microsoft Wired Keyboard 600: initialized for relative axes.
    [ 17738.873] (WW) evdev: Microsoft Wired Keyboard 600: ignoring absolute axes.
    [ 17738.873] (**) Microsoft Wired Keyboard 600: (accel) keeping acceleration scheme 1
    [ 17738.873] (**) Microsoft Wired Keyboard 600: (accel) acceleration profile 0
    [ 17738.873] (**) Microsoft Wired Keyboard 600: (accel) acceleration factor: 2.000
    [ 17738.873] (**) Microsoft Wired Keyboard 600: (accel) acceleration threshold: 4
    [ 17738.873] (II) config/udev: Adding input device Microsoft Wired Keyboard 600 (/dev/input/js0)
    [ 17738.873] (**) Microsoft Wired Keyboard 600: Applying InputClass "system-keyboard"
    [ 17738.873] (II) No input driver specified, ignoring this device.
    [ 17738.873] (II) This device may have been added with another device file.
    [ 17738.873] (II) config/udev: Adding input device A..... G3 (/dev/input/event5)
    [ 17738.873] (**) A..... G3: Applying InputClass "evdev pointer catchall"
    [ 17738.873] (II) Using input driver 'evdev' for 'A..... G3'
    [ 17738.873] (**) A..... G3: always reports core events
    [ 17738.873] (**) evdev: A..... G3: Device: "/dev/input/event5"
    [ 17738.873] (--) evdev: A..... G3: Vendor 0xe0ff Product 0x2
    [ 17738.873] (--) evdev: A..... G3: Found 12 mouse buttons
    [ 17738.873] (--) evdev: A..... G3: Found scroll wheel(s)
    [ 17738.873] (--) evdev: A..... G3: Found relative axes
    [ 17738.873] (--) evdev: A..... G3: Found x and y relative axes
    [ 17738.873] (II) evdev: A..... G3: Configuring as mouse
    [ 17738.873] (II) evdev: A..... G3: Adding scrollwheel support
    [ 17738.873] (**) evdev: A..... G3: YAxisMapping: buttons 4 and 5
    [ 17738.873] (**) evdev: A..... G3: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [ 17738.873] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/0003:E0FF:0002.0003/input/input7/event5"
    [ 17738.873] (II) XINPUT: Adding extended input device "A..... G3" (type: MOUSE, id 11)
    [ 17738.873] (II) evdev: A..... G3: initialized for relative axes.
    [ 17738.873] (**) A..... G3: (accel) keeping acceleration scheme 1
    [ 17738.873] (**) A..... G3: (accel) acceleration profile 0
    [ 17738.873] (**) A..... G3: (accel) acceleration factor: 2.000
    [ 17738.873] (**) A..... G3: (accel) acceleration threshold: 4
    [ 17738.874] (II) config/udev: Adding input device A..... G3 (/dev/input/mouse0)
    [ 17738.874] (II) No input driver specified, ignoring this device.
    [ 17738.874] (II) This device may have been added with another device file.
    [ 17738.874] (II) config/udev: Adding input device A..... G3 (/dev/input/event6)
    [ 17738.874] (**) A..... G3: Applying InputClass "system-keyboard"
    [ 17738.874] (**) A..... G3: Applying InputClass "evdev keyboard catchall"
    [ 17738.874] (II) Using input driver 'evdev' for 'A..... G3'
    [ 17738.874] (**) A..... G3: always reports core events
    [ 17738.874] (**) evdev: A..... G3: Device: "/dev/input/event6"
    [ 17738.874] (--) evdev: A..... G3: Vendor 0xe0ff Product 0x2
    [ 17738.874] (--) evdev: A..... G3: Found 1 mouse buttons
    [ 17738.874] (--) evdev: A..... G3: Found scroll wheel(s)
    [ 17738.874] (--) evdev: A..... G3: Found relative axes
    [ 17738.874] (II) evdev: A..... G3: Forcing relative x/y axes to exist.
    [ 17738.874] (--) evdev: A..... G3: Found absolute axes
    [ 17738.874] (II) evdev: A..... G3: Forcing absolute x/y axes to exist.
    [ 17738.874] (--) evdev: A..... G3: Found keys
    [ 17738.874] (II) evdev: A..... G3: Configuring as mouse
    [ 17738.874] (II) evdev: A..... G3: Configuring as keyboard
    [ 17738.874] (II) evdev: A..... G3: Adding scrollwheel support
    [ 17738.874] (**) evdev: A..... G3: YAxisMapping: buttons 4 and 5
    [ 17738.874] (**) evdev: A..... G3: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [ 17738.874] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/0003:E0FF:0002.0004/input/input8/event6"
    [ 17738.874] (II) XINPUT: Adding extended input device "A..... G3" (type: KEYBOARD, id 12)
    [ 17738.874] (**) Option "xkb_rules" "evdev"
    [ 17738.874] (**) Option "xkb_model" "pc104"
    [ 17738.874] (**) Option "xkb_layout" "se"
    [ 17738.874] (II) evdev: A..... G3: initialized for relative axes.
    [ 17738.874] (WW) evdev: A..... G3: ignoring absolute axes.
    [ 17738.874] (**) A..... G3: (accel) keeping acceleration scheme 1
    [ 17738.874] (**) A..... G3: (accel) acceleration profile 0
    [ 17738.874] (**) A..... G3: (accel) acceleration factor: 2.000
    [ 17738.874] (**) A..... G3: (accel) acceleration threshold: 4
    [ 17738.874] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event13)
    [ 17738.874] (II) No input driver specified, ignoring this device.
    [ 17738.874] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event12)
    [ 17738.875] (II) No input driver specified, ignoring this device.
    [ 17738.875] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH Line Out Front (/dev/input/event11)
    [ 17738.875] (II) No input driver specified, ignoring this device.
    [ 17738.875] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH Line Out Surround (/dev/input/event10)
    [ 17738.875] (II) No input driver specified, ignoring this device.
    [ 17738.875] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH Line Out CLFE (/dev/input/event9)
    [ 17738.875] (II) No input driver specified, ignoring this device.
    [ 17738.875] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event8)
    [ 17738.875] (II) No input driver specified, ignoring this device.
    [ 17738.875] (II) This device may have been added with another device file.
    [ 17738.875] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event7)
    [ 17738.876] (II) No input driver specified, ignoring this device.
    [ 17738.876] (II) This device may have been added with another device file.
    [ 17738.876] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event14)
    [ 17738.876] (II) No input driver specified, ignoring this device.
    [ 17738.876] (II) This device may have been added with another device file.
    [ 17738.876] (II) config/udev: Adding input device PC Speaker (/dev/input/event15)
    [ 17738.876] (II) No input driver specified, ignoring this device.
    [ 17738.876] (II) This device may have been added with another device file.
    [ 17739.315] (II) intel(0): EDID vendor "BNQ", prod id 32517
    [ 17739.315] (II) intel(0): Using EDID range info for horizontal sync
    [ 17739.315] (II) intel(0): Using EDID range info for vertical refresh
    [ 17739.315] (II) intel(0): Printing DDC gathered Modelines:
    [ 17739.315] (II) intel(0): Modeline "1920x1080"x0.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
    [ 17739.315] (II) intel(0): Modeline "1920x1080i"x0.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e)
    [ 17739.315] (II) intel(0): Modeline "1280x720"x0.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e)
    [ 17739.315] (II) intel(0): Modeline "720x480"x0.0 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e)
    [ 17739.315] (II) intel(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
    [ 17739.315] (II) intel(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
    [ 17739.315] (II) intel(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
    [ 17739.315] (II) intel(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
    [ 17739.315] (II) intel(0): Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
    [ 17739.315] (II) intel(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
    [ 17739.315] (II) intel(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
    [ 17739.315] (II) intel(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
    [ 17739.316] (II) intel(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1152x864"x0.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz e)
    [ 17739.316] (II) intel(0): Modeline "640x480"x100.0 43.16 640 680 744 848 480 481 484 509 -hsync +vsync (50.9 kHz e)
    [ 17739.316] (II) intel(0): Modeline "640x480"x120.0 52.41 640 680 744 848 480 481 484 515 -hsync +vsync (61.8 kHz e)
    [ 17739.316] (II) intel(0): Modeline "800x600"x100.0 68.18 800 848 936 1072 600 601 604 636 -hsync +vsync (63.6 kHz e)
    [ 17739.316] (II) intel(0): Modeline "800x600"x0.0 73.25 800 848 880 960 600 603 607 636 +hsync -vsync (76.3 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1024x768"x100.0 113.31 1024 1096 1208 1392 768 769 772 814 -hsync +vsync (81.4 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1024x768"x0.0 115.50 1024 1072 1104 1184 768 771 775 813 +hsync -vsync (97.6 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1440x900"x0.0 182.75 1440 1488 1520 1600 900 903 909 953 +hsync -vsync (114.2 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1920x1080"x60.0 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -hsync +vsync (67.1 kHz e)
    [ 17739.316] (II) intel(0): Modeline "720x576"x0.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1440x480i"x0.0 27.00 1440 1478 1602 1716 480 488 494 525 interlace -hsync -vsync (15.7 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1280x720"x0.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1920x1080i"x0.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1440x576i"x0.0 27.00 1440 1464 1590 1728 576 580 586 625 interlace -hsync -vsync (15.6 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1440x240"x0.0 27.00 1440 1478 1602 1716 240 244 247 262 -hsync -vsync (15.7 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1440x288"x0.0 27.00 1440 1464 1590 1728 288 290 293 312 -hsync -vsync (15.6 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1920x1080"x0.0 74.25 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync (27.0 kHz e)
    [ 17739.316] (II) intel(0): Modeline "1920x1080"x0.0 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (28.1 kHz e)
    It would be nice to find out why the settings was being set to "0".
    Last edited by Sne (2014-04-29 20:40:50)

  • Atan in jdk1.1.8 doesn't work. help

    I am creating a program which simulate the effect of gravity on a object (for a game). For this I am working with jdk1.1.8. (not by choice). But for some reason the movement of the object just turns around. I believed that de method Math.atan2 was wrong so i have rewritten it and it worked better. But the method atan most likely doesn't work either because it is not perfect yet. Does anyone know or have an implementation of de atan method in java that works so i can use it? Because I don't know how the method works.
    maybe i am wrong here but it is basicly the only solution to my problem. if give the code of the bullet class with it. maybe anyone sees the problem there:
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class Bullet extends Thread
         public static boolean running = false;
         private double x, y;
         private double width=10, height=10;
         private double weight=10;
         private double travelAngle = toRadians(45);
         private double speed=5;
         private Attraction hello;
         private Planet[] planets;
         private int planetCount=0;
         Bullet(Attraction hello, int x, int y, int angle, Planet[] planets)
              this.hello = hello;
              this.x = x;
              this.y = y;
              this.travelAngle = toRadians(angle);
              this.planets = planets;
              this.planetCount = planets.length;
              running = true;
         public void run()
              double px=0, py=0, g=0;//comes from the planet
              //variable for the calculation
              Planet p = null;
              double dx=0, dy=0, dx2=0, dy2=0, fdx=0, fdy=0, totalfdx=0, totalfdy=0;
              double forceAngle=0;
              double d=0, gd=0, force=0;
              double oldx = 0;
              double oldy = 0;
              int drawSteps = 0; //for smooth drawing
              double dxSteps=0, dySteps=0;
              double oldspeed = speed;
              while(running)
                   oldspeed = speed;
                   totalfdx=0;
                   totalfdy=0;
                   oldx = x;
                   oldy = y;
                   dx = Math.cos(travelAngle)*speed;//the normal translation for x without the gravity effect
                   dy = Math.sin(travelAngle)*speed;//the normal translation for y without the gravity effect
                   x+=dx;//new x from the normal translation
                   y+=dy;//new y from the normal translation
                   for(int i = 0; i<planetCount; i++)
                        p = planets;
                        px = p.getX();//x coordinate of the planet
                        py = p.getY();//y coordinate of the planet
                        g = p.getGravity();//gravity of the planet
                        dx2 = px - x; //the x-difference between the bullet and the planet
                        dy2 = py - y; //the y-difference between the bullet and the planet
                        //System.out.println(dx2 + " "+ dy2);
                        d = Math.sqrt(dx2*dx2+dy2*dy2); //the direct distance between the bullet and the planet
                        //System.out.println("distance " + d);
                        gd = g/d; //the effect of the gravity at the distance of the bullet
                        //System.out.println("gravitydistance" + gd);
                        force = gd*weight; //the forcepull on the object from the planet
                        forceAngle = atan2(dy2,dx2);//the angle of the force with the y-axis
                        //System.out.println("force " + force + " distance " + d);
                        fdx = force * Math.sin(forceAngle);//the force pull distance for x
                        fdy = force * Math.cos(forceAngle);//the force pull distance for y
                        //System.out.println(fdx + " " + fdy);
                        totalfdx += fdx;
                        totalfdy += fdy;
                   x = x+totalfdx;//new x
                   y = y+totalfdy;//new y
                   //System.out.println("Angle" + toDegrees(travelAngle));
                   travelAngle = atan2( (x-oldx), (y-oldy) );
                   speed = Math.sqrt((x-oldx)*(x-oldx) + (y-oldy)*(y-oldy));
                   if(oldx>x)
                        System.out.println("Turning point");
                   System.out.println(oldspeed + " " + speed);
                   //System.out.println("x=> " + x + " y=> " + y);
                   drawSteps = (int)(speed+1);
                   dxSteps = (x-oldx)/drawSteps;
                   dySteps = (y-oldy)/drawSteps;
                   x = oldx + dxSteps;
                   y = oldy + dySteps;
                   hello.repaint((int)x,(int)y, (int)width, (int)height);
                   for(int i = 0; i<drawSteps; i++)
                        x+=dxSteps;
                        y+=dySteps;
                        hello.repaint((int)(x-dxSteps), (int)(y-dySteps), (int)(width+width), (int)(height+height));
                        try
                             sleep(30);
                        catch(Exception e){}
                   hello.repaint((int)x,(int)y, (int)width, (int)height);
                   //hello.repaint();
                   try
                        sleep(100);
                   catch(Exception e){}
                   System.out.flush();
                   for(int i = 0; i<planetCount; i++)
                        p = planets[i];
                        if(p.contains(x,y))
                             System.out.println("Boom");
                             running = false;
              System.out.println("Bullet Stopped");
         public void draw(Graphics g)
         g.setColor(Color.cyan);
              g.fillRect((int)Math.round(x-width/2), (int)Math.round(y-height/2), (int)width, (int)height);
         public void move(boolean left, boolean right)
              if(left)
                   x--;
                   hello.repaint(x, y-2, width+5, height+5);
              if(right)
                   x++;
                   hello.repaint(x+1, y-2, width+5, height+5);
         public double toRadians(double angle)
              return (angle/180*Math.PI);
         private double toDegrees(double angle)
              return (angle/Math.PI*180);
         private double atan2(double a, double b)
              if(a>0)
                   if(b<0)
                        return (Math.atan(b/a)+(2*Math.PI));
                   return Math.atan(b/a);
              else if(a<0)
                   return (Math.atan(b/a)+Math.PI);
              else if(a==0 && b>0)
                   return ((Math.PI)/2);
              else if(a==0 && b<0)
                   return ((3*Math.PI)/2);
              else
                   return 0;

    I have allready tested my code to the max en I have redone the calculations about 4 times, because I couldn't believe the fault was in the method atan or atan2 from sun. But since my calculations should work in theorie (worked it out with a math teacher) it's the only options I could think of.
    [qoute]
    I haven't looked up in the API docs how atan2 is supposed to work, but I noticed these two lines in your code:
    forceAngle = atan2(dy2,dx2);//the angle of the force with the y-axis
    travelAngle = atan2( (x-oldx), (y-oldy) );
    In one place you use Y and X as the parameters and in the other case you use X and Y. They can't both be right.
    [qoute]
    In this case it is. because the forceangle is opposite the x-axis and thus the two must be reversed. (travelangle is opposite the y-axis).
    I have also tried to reverse them (for both) but the effect got worse :)
    Thanks anyway.

  • Dynamic adding of components (doesn't work when programmatically)

    Hi, I don't understand, why this doesn't work. I'll explain it on this example:
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class NewFXMain extends Application {
        Group root;
        public static void main(String[] args) {
            Application.launch(NewFXMain.class, args);
        @Override
        public void start(Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
            Button btn = new Button();
            btn.setLayoutX(100);
            btn.setLayoutY(80);
            btn.setText("Add button now");
            btn.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                    addButton();
            root.getChildren().add(btn);  
            primaryStage.setScene(scene);
            primaryStage.setVisible(true);
            System.err.println("Number of buttons before: "+root.getChildren().size());
            ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
            executor.schedule(new MyTask(), 5, TimeUnit.SECONDS);
        private void addButton() {
            System.err.println("Button adding");
            root.getChildren().add(new Button("YEAH"));
            System.err.println("Number of buttons after: "+root.getChildren().size());
        class MyTask implements Runnable {
            public void run() {
                addButton();
    }There are two ways how a new button can be added. Either by clicking on existing button or programmatically by the program itself after 5 seconds.
    If you add it by button, there is no problem. The error print is:
    Number of buttons before: 1
    Button adding
    Number of buttons after: 2
    But if you just wait, then the error print is:
    Number of buttons before: 1
    Button adding
    and no button is added. In fact, the error printing after the adding isn't performed either.
    I'd like to ask if there is some solution for this because I'd love to do some changes by schedulers. Thx
    Edited by: 876949 on 14.8.2011 9:09
    Edited by: 876949 on 14.8.2011 9:11

    No, these are not error messages, they are just for purpose of example. Here it doesn't matter whether err or out... (yes, 'out' would be better ;)
    But thanx, it's working. By the way, I am creating scheduler for task lists. They are supposed to be printed dynamically in specific time (or periodically). For example: at 5 o'clock I need to print 5 items of some list and every 3 hours I need to print 3 items of another list etc. - so it's quite dynamic with regard to component adding (No, I don't want to use some sort of ListView, I want interactive printing: one item on screen at a moment). I'll try to work your solution into my code.
    Edit: So either it's not possible to use this for the purpose of my app or it will be really cumbersome. Maybe it would be easier to draw some rectangles with mouse listeners...
    Edit: So I finally got around it. In the end, I won't use dynamic adding as intended. It's working and that's important.
    Edited by: 876949 on 14.8.2011 12:48
    Edited by: 876949 on 15.8.2011 5:21

Maybe you are looking for