JavaFx and fxml in a OSGI runtime

hello,
I'm working to run javafx in the Apache felix osgi runtime,
using Bundle-NativeCode and lots of Import/Export-Package I make an javafx bundle, that work properly to run javaFx interfaces write in plain java...
but, when I try to load an fxml file I'm getting this issue:
javafx.fxml.LoadException: BorderPane is not a valid type.
     at javafx.fxml.FXMLLoader.createElement(Unknown Source)
     at javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
     at javafx.fxml.FXMLLoader.load(Unknown Source)the exception give me no more information... anyone knows more about this exception to help understand this error?
ps.: the same fxml file run fine outside the osgi runtime.
best regards.
Edited by: user13059812 on 19/03/2012 06:53
Edited by: user13059812 on 19/03/2012 06:54

Sounds like a classloader issue. Make sure that the FXMLLoader is using the same classloader as the OSGi runtime. Unfortunately, JavaFX 2.0 doesn't allow you to specify a custom class loader, so you'll need to use JavaFX 2.1 for this. See FXMLLoader#setClassLoader().
G

Similar Messages

  • How do Mac and Linux find the JFX runtime?

    I've been searching the documentation without success for the answer to what ought to be a simple question -- how do I point Mac or Linux at the 2.2 runtime? It's no problem if I'm running in an IDE (NetBeans, e(fx)clipse), where I can tell the IDE where I unpacked the SDK. But what if I want to run a jar file, such as produced by the ant tasks?
    You'd think this would work (on Linux, where I unpacked the SDK into /opt):
    java -cp /opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar:. -jar MyProgram.jar But it doesn't -- I get a popup saying "This application requires a newer version of the Java runtime. Please download and install the latest Java runtime from java.com. Then restart the application" (I'm running with 1.7.0_05-b05 from Oracle).
    The only thing at all close I find in the Linux installation instructions is it says to unpack the samples as a subdirectory of the SDK, wherever I happened to put it, and then I should be able to run the examples with a simple "java -jar filename.jar". But even that's not quite true -- it only works if I first cd to the samples directory. But it's a start, so I tried...
    cd /opt/javafx-sdk2.2.0-beta/rt
    java -jar ~/dist/MyProgram.jarThat succeeds in finding the runtime, but my program doesn't work, because it doesn't find my dependent libraries. So I tweaked the command a little bit:
    cd /opt/javafx-sdk2.2.0-beta/rt
    java -cp ~/dist/MyProgram.jar -jar ~/dist/MyProgram.jarThat actually works. But it can't possibly be the right answer -- you shouldn't have to run a javafx program with the runtime directory as your working directory.
    And even that doesn't work on Mac. There, Java knows how to find the runtime that's installed with JDK 7 update 5 for Mac. But if I want to test a program with the 2.2 runtime, what do I do? Setting -classpath on the command line still uses the 2.1 runtime. And if I try the trick of connecting to javafx-sdk2.2.0-beta/rt first, it doesn't work at all -- it doesn't find my libraries, and it throws up a "java quit unexpectedly" window after getting a segfault.
    So what's a developer to do? Am I supposed to use the native packaging procedure instead?

    JavaFX 2.2 is first version where Linux/Mac are supported as runtime (and not just SDK).
    However, you need to install JavaFX Runtime that is part of JRE 7u6 (you can get beta from jdk7.java.net or wait for FCS version of it).
    Installing JRE is the only way to get JavaFX runtime installed on Mac and Linux (and eventually on Windows too).
    rt folder in the SDK is "private" copy of the runtime. It is not supposed to be used to run arbitrary JavaFX applications by default.
    You can still force to use it as
    java -Djavafx.runtime.path=/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar -jar MyProgram.jar
    or
    java -cp ~/dist/MyProgram.jar:/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar com.javafx.main.Main
    Note that if you use "-jar" then "-cp" is ignored by java launcher. This is not JavaFX specific behavior.
    JavaFX specific part is that properly packaged JavaFX main jar file will include copy of launcher class (com.javafx.main.Main)
    and this is what will be run when you double click on jar or use "java -jar". Launcher will try to locate JavaFX runtime to use,
    it knows how to find runtime in the SDK if it is sample located in the SDK itself and it also knows how to find installed version of runtime.
    If JavaFX is not found then it will show you message you observed.

  • I attempted to perform the itunes update on two different PCs and itunes will no longer open and I received a message to reinstall itunes. The reinstall did not work and I now receive a Runtime error message (R6034) re: library loading incorrectly. Help?

    I attempted to perform the itunes update on two different PCs. Itunes will no longer open and prompted me to reinstall itunes.  The reinstall did not work after several attempts and I received an error: "Runtime error R6034. An application has made an attempt to load the C Runtime library incorrectly. Please contact the application's support team for more information."  Has anyone else had this issue? How can I resolve it?

    I've been having the same exact problem this morning, and from the looks of it a lot of other people are posting about this issue, so I don't know if it's maybe something wrong with the download but I'm just relieved that it seems to be that instead of a corruption issue with my windows installation.  I'm just wondering how long this will take to be resolved.

  • I just did an itunes update on my windows vista 64 and have been getting a runtime error eversense.  Unstalled everything apple per microsoft forum discussions and solved the problem.  When is apple going to update this problem for itunes?

    I just recently did an itunes update on my Windows Vista 64 and have been getting a runtime C++ R0634 error ever since. Per microsoft forum discussions, I have removed everything apple on my computer to get this runtime error to stop.  When I tried to remove and reinstall itunes, I get an error message during installation and to try again. Has just become a cycle.  Apple, are you working on this? 

    I have exactly the same problem.  Got update notice from Apple for iTunes and getting the C++ runtime error R0634 ever since.  I have no clue how to fix it....meantime, I can't even pull up Outlook to check email.  HELP!!
    ksware

  • I am trying to load the new itunes and I keep getting a runtime error R6034

    I am trying to load the new itunes and I keep getting a runtime error R6034

    The new Itunes software update is flawed! I had the same issue. You need to uninstall Apple components, then reinstall. Go to this link for instructions. Takes about 20 mins but works!
    http://support.apple.com/kb/HT1923

  • Remove default icon and default title from the runtime window

    I am developing a application in developer 6i, can somebody tell me how to remove the MDI ICOn and the default title(Forms Runtime)

    Hi,
    To remove the default title(Forms Runtime) from your form use:
    set_window_property(Forms_mdi_window,title,'Your Form Name').
    This changes the title of the MDI window from "Oracle Forms Runtime" to "Your Form Name". But We remove the RunTimeIcon also.
    Icon is Display at the Left Corner(Start).
    any other solution.
    Muhammad farooq

  • Future of JavaFx and commitment from Sun

    Hi All,
    I wanted to get some insight into the level of investment an organization could make into adopting JavaFX as the preferred UI technology for their products/applications. Is Sun committed to promoting JavaFX and making it production quality and implementing with time all the missing UI components? What is th efuture of JavaFx after the Sun-Oracle merger?
    thanks
    Sanjeev

    Hi Sanjeev
    in my opinion:
    JavaFX is a promising technology but it is currently too green to consider use in a serious application. To my knowledge, only one company has so far released a serious product written in JavaFX (Indaba), but I've never used it and they themselves describe it as "alpha". I believe Indaba went with JavaFx because they were reliant on Java APIs (they were originally going to use Flash)
    The JavaFX team seem to be working hard on improving the technology, particularly around performance, however it is still quite buggy, and this will hamper efforts to produce a serious application. Also, as you mention, there are gaps in the components available for use in applications. There is also work going on for tooling.
    There are very little public facts available on the future of JavaFX (aside from sporadic marketing pushes). Oracle made a public commitment to JavaFX at JavaOne, but I don't know whether you can bet a corporate strategy on that alone. We know that future releases are coming, albeit at a slow pace.
    It would be great if Sun/Oracle could come up with something more detailed, as I think that (alongside a stable platform) would do a lot to increase the confidence of developers.
    My guess is that it will end up as a stable technology, though I've no idea how long this will take. To that end, I would closely monitor the progress of the technology but maybe not adopt it as the preferred technology just yet.

  • Using javafx and awt together in MAC

    I have read blogs about not using SWT and AWT libraries together in MAC systems. So, are their any constraints for JAVAFX and AWT as well ?
    Please refer to this link.
    I am having a similar case of writing an image to disk and I am using javafx, the line doesn't seem to work on my mac.
    Message was edited by: abhinay_agarwal

    The link you posted on SWT/AWT integration is irrelevant to JavaFX/AWT integration.
    To learn abount JavaFX/Swing integration, see the Oracle tutorial trail:
    JavaFX for Swing Developers: About This Tutorial | JavaFX 2 Tutorials and Documentation
    As Swing is based on AWT, the tutorial trail is equally applicable whether you are integrating JavaFX with only AWT or with the full Swing toolkit.
    In my opinion, there is little reason to integrate JavaFX with just the AWT toolkit as there is little of value that AWT would provide that JavaFX does not already provide.
    JavaFX integrates fine with ImageIO to write files to disk, Oracle provide a tutorial for that (see the "Creating a Snapshot" section):
    Using the Image Ops API | JavaFX 2 Tutorials and Documentation
    //Take snapshot of the scene
    WritableImage writableImage = scene.snapshot(null);
    // Write snapshot to file system as a .png image
    File outFile = new File("imageops-snapshot.png");
    try {
      ImageIO.write(
        SwingFXUtils.fromFXImage(writableImage, null),
        "png",
        outFile
    } catch (IOException ex) {
      System.out.println(ex.getMessage());

  • I have windows vista and I'm receiving a runtime error message R6034 after trying to install latest update of itunes.  How do I resolve this issue?

    I have windows vista and I'm receiving a runtime error message R6034 after trying to install latest update of itunes.  How do I resolve this issue?

    The best discussion of resolving the issues is found in the user tip: https://discussions.apple.com/docs/DOC-6562

  • I am trying to upload new version iTunes into Windows 7 and getting error message that runtime is loading incorrectly. Cannot connect to online support. Any ideas please?

    I am trying to upload new version iTunes into Windows 7 and getting error message that runtime is loading incorrectly. Cannot connect to online support. Any ideas please?

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • I downloaded latest update of iTunes (windows 7, 64bit) and have now the problem runtime error R6025 pure virtual function call (Microsoft Visual C   runtime library) - Who would have a solution to that problem? Thanks *********

    I downloaded latest update of iTunes (windows 7, 64bit) and have now the problem runtime error R6025 pure virtual function call (Microsoft Visual C   runtime library) - Who would have a solution to that problem?
    Thanks from Switzerland
    <Edited by Host>

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it, which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    (I've asked the hosts to remove your email address)
    tt2

  • Do you plan on supporting 64-bit Mac desktop applications and ANEs with the captive runtime?

    I was wondering if Adobe plans to support 64-bit Mac desktop applications and ANEs with the AIR runtime using captive setup?

    On 01/11/2011 16:39, Simon Flood wrote:
    > So I have an iMac (4,1) running Snow Leopard.
    >
    > I tried installing the 32-bit Mac agent and it complained
    >
    > Package intended for 32 bit architecture
    > Exiting with error code 237.
    >
    > so I installed the 64-bit agent - it was happy.
    >
    > I then logged out and back in to activate the agent but it isn't happy -
    > I get a ZENworks Adaptive Agent dialog popup with the error "Cannot load
    > 64-bit SWT libraries on 32-bit JVM".
    >
    > $ java -version
    > java version "1.6.0_26"
    > Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
    > Java HotSpot(TM) Client VM (build 20.1-b02-384, mixed mode)
    > $ uname -a
    > Darwin <host>.<domain> 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7
    > 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
    >
    > System Software Overview in System Profiler has No recorded against
    > 64-bit Kernel and Extensions.
    >
    > So yes Java is 32-bit but so is Mac OS X.
    >
    > Q1) How can I uninstall the (64-bit) Mac agent?
    >
    > Q2) Should I be installing the 32- or 64-bit Mac agent?
    >
    > I'm thinking I should be installing the 32-bit Mac agent so
    >
    > Q3) How can I install the 32-bit Mac agent?
    For anyone following this thread I've now logged bug #728888.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

  • JavaFx and JSF

    Hello,
    Is it all right to use JavaFX with JSF. Any problems can be experienced getting JavaFx and JSF work together.
    Regards

    My problem is before the client-server communication starts. I have to pass some information to the standalone JavaFX application from a web application. These information is needed to load specific data from the backend. On the startup of the application I could use the jnlp properties, but if the user does another selection in the web application and the JavaFX application is already open, I have to provide the selection to the JavaFX app. This inter process communication could be completely on the client side I think. So I have seen that ActiveMQ provides a javascript api to send JMS messages. Probably this could be a solution if it is possible to set up the JMS queue on client without application server. I do not know if this is possible by now.

  • JavaFX and heavyweight awt components

    Can somebody point me to documentation on what's the deal with javaFX and heavyweight components?
    I have been wrapping an awt.Canvas into a SwingComponent. This basically seems to work. It does not obey layout rules, but I think I can work around that. However, soon as the mouse goes over the node, the canvas starts to move around (while the SwingComponent stays in place). I have - to my best knowledge - not set up mouse interaction in any way.
    Using
    visible:false
    on the node, housing the SwingComponent with the Canvas is the only thing I found to make the canvas stay in place (it does not hide it..). But that looks like a hack, likely to fail sooner or later. So, I'd like to learn more about what's the contracts here. I don't care for much more than desktop profile in the moment.
    thanks
    nils

    I got this problem too
    For the moment, i just put a rectangle on top of the awt component , and set the blockMouse "True".
    But when i try to translate the component location, i couldnot find a proper solution, the component just dont move at all.

  • JavaFX and wWebGL

    Ok, I finally got webgl into my javafx app. Kind of. I used the Selenium cobrowser to push data into both a chrome and Firefox session. It works well! Check it out here: http://tinyurl.com/afy745y
    Take care,
    Pat

    Iam Alfonso Franco a freelancer java please tell me in details what do you want on JavaFx and Spring CRUD Iam going to compile something with this tell me to e-mail [email protected] Thanks ...

Maybe you are looking for

  • Help! My site doesn't exist anymore and the cache won't clear!

    Hi there, I'm a designer and used iWeb to create a portfolio for myself while I was job searching earlier in the year. I hosted it through MobileMe, and coincidentally and luckily managed to get a new job about a week before those hosting services we

  • Outgoing Email Address Groups (Very Urgent)

    HI Experts, I am facing prblem with inbound Distribution in ERMS and agent Inbox. I have created Outgoing address groups and assigned to Email Profile. (Outging Email address and Incoming Email address  eg: [email protected]) [email protected] is def

  • Linksys E2500 Rounter and DHCP Addressing

    Recently Bought a new Linksys E2500 Router to replace my D-Link router and move to Wireless N Speeds.  Was having problems with the D-Link and the Client Machines getting a 192.168.203.x DHCP Address (never did figure this out).  No idea where this a

  • Insert statement with Date, time into Oracle

    Hi, I've got the following statement that I'm trying to insert into Oracle. Actually had to change up the format to dd-mm-yy to get it to insert the date correctly, not sure why, but I've got it "supposedly" formatted to also insert the hours, min.,

  • Freeze 10.8 solution for console NSImage dissolveToPoint:fromRect:fraction:

    hi, my MACBOOK PRO FREEZE every with this error in my console!! 20/06/13 10:38:23,134 WebProcess[4173]: *** WARNING: -[NSImage compositeToPoint:fromRect:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:ope