Using log4j with JavaFX and Netbeans 6.8

Hello,
I'm trying to use log4j within a JavaFX project using NetBeans 6.8.
I've donwloaded the .zip file from the Apache website and added the log4j-1.2.16.jar to the project's libraries.
Then I added the imports:
import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;But using the Logger class does not work:
def log:Logger = Logger.getLogger("MyApp.class");NetBeans says 'cannot find symbol'
When I'm doing the same things within a Java project, everything works fine.
What am I doing wrong?
thanks
Edited by: Lichti on Apr 17, 2010 12:08 PM

To answer my own question ... there's a known bug in NB 6.8 with including JARs.

Similar Messages

  • Using log4j with portal server

    Hi,
    I am trying to use log4j with Portal server 6.1 using log taglibs from jakarta.
    Here is what i've done:
    1. copy taglibs-log.jar in /etc/opt/SUNWps/desktop/classes
    2. copy taglibs-log.tld in /etc/opt/SUNWps/desktop/default/tld
    3. put log statements in JSPs
    for example:
    <log:debug>This is body content.</log:debug>
    <log:debug message="This is attribute content." />
    4. /etc/opt/SUNWps/desktop/classes/log4j.properties contains
    =========================================
    # Sample properties to initialise log4j
    log4j.rootCategory=debug, stdout, R
    #log4j.rootCategory=debug, stdout
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=logtags.log
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=2
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    ===============================================
    However no log file is created on my system. I am very new to this and would appreciate if anyone could tell me what more needs to be done to get log records in a file.
    Thanks for all your help.
    Kind regards,
    Apoorv

    Hi,
    I am trying to use log4j with Portal server 6.1 using
    log taglibs from jakarta.
    Here is what i've done:
    1. copy taglibs-log.jar in
    /etc/opt/SUNWps/desktop/classes
    2. copy taglibs-log.tld in
    /etc/opt/SUNWps/desktop/default/tld
    3. put log statements in JSPs
    for example:
    <log:debug>This is body content.</log:debug>
    <log:debug message="This is attribute content." />
    4. /etc/opt/SUNWps/desktop/classes/log4j.properties
    contains
    =========================================
    # Sample properties to initialise log4j
    log4j.rootCategory=debug, stdout, R
    #log4j.rootCategory=debug, stdout
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternL
    ayout
    # Pattern to output the caller's file name and line
    number.
    log4j.appender.stdout.layout.ConversionPattern=%5p
    [%t] (%F:%L) - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=logtags.log
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=2
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c -
    %m%n
    ===============================================
    However no log file is created on my system. I am
    very new to this and would appreciate if anyone could
    tell me what more needs to be done to get log records
    in a file.
    Thanks for all your help.
    Kind regards,
    Apoorv

  • Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Hi .
    Apple no longer supports Safari for Windows if that's what you are asking >  Apple apparently kills Windows PC support in Safari 6.0
    Microsoft has not written IE for Safari for many years.

  • Using url with username and password in URL class

    Hi,
    I'm writting an applet in which I use getAppletContext().showDocument with an URL.
    The problem is that I'm using URLs with username and password (http://user:[email protected]/page) and it isn't working because the browser is getting the URL http://user/page.
    Is this a bug in the URL class? Or in the showDocument method?
    Is there any way to make this work?
    Thanks for any help,
    Pedro Prospero Luis ([email protected])

    I'm not sure whether this is supported behaviour. I've had this syntax fail to work in the Netscape address bar so I can't recommend it as an approach for authentication.
    If you want to authenticate the user before redirecting to the page, though, you could try creating a connection to another page on the same server and sending the authorization information then. Your browser may then be successfully authenticated.
    See http://www.javaworld.com/javatips/jw-javatip47.html for information on this.
    You might not need to read back the page from the server, just connect to it. Might work.

  • Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Is that Ubuntu 11.04?
    Ubuntu 11.04 displays window menus in the control bar at the top of the screen<br />
    Click on Bookmarks/Show All Bookmarks then move your mouse to the left upper corner toward Firefox Web Browser.<br />
    You'll get pop up menu (Organize, Views and Import and Backup).<br />

  • After itunes finishes restoring my ipod touch 8gb, itunes still says itunes has detected an ipod touch recovery mode. You must restore it before using it with itunes. and i dont knwo what to do

    after itunes finishes restoring my ipod touch 8gb, itunes still says itunes has detected an ipod touch recovery mode. You must restore it before using it with itunes. and i dont know what to do

    Are you sure it is 1043? I've never seen that error before. But you can try disabling your security software, connecting the phone to a USB port directly on the computer (not a hub), and trying to restore again.

  • JavaFX and NetBeans Integration Request

    How about it team? Please integrate SB into the next release of NetBeans (7.4.1).
    Yes, I have seen the pages at: Using JavaFX Scene Builder with Java IDEs: Using Scene Builder with NetBeans IDE | JavaFX 2 Tutorials and Documentation
    OK so I am able to call SB from inside the NetBeans 7.4 IDE.  This is not integration. Its a shortcut. I mean, why do we have two separate tools? NetBeans IDE and SceneBuilder. We don't pop open SQLDeveloper when we work on queries, so why pop open SB?
    Integration would be that the capabilities of the SceneBuilder would be available IN the IDE such as they are for Swing or for databases.    Integration means you would have the palette available with the JavaFx components.  It would be the current version of SB. ( When SB2 comes out, it would have all the functionality of SB2 )
      From reading the scant information out there, SB2 is in development, why not integrate it into the IDE and make it one spot to do your development?  Take JavaFx mainstream and integrate it into the IDE for real.

    The Scene Builder team is working to create a product that integrates well with many IDEs, and NetBeans is one of them. As you might have heard from the last JavaOne, we are working on an API, called Scene Builder Kit, which will allow the integration of Scene Builder panels and functionality directly into the GUI of an IDE.
    Based on this, we hope to collaborate with the NetBeans team -- and with teams from other IDEs -- to provide as tight an integration as we can, but ultimately this is a partnership which requires work from both the IDEs and SB teams.
    As crucial as we see a tight IDE integration for our users' productivity, we feel that a SB standalone tool is also needed for those of our users who do not wish to use an IDE because, e.g., they focus solely on the layout and styling of a GUI.
    Thanks for your feedback, please keep it coming, this helps us.

  • Problem in Using Log4J with Weblogic 9.2

    I am using Weblogic 9.2 and Log4j.
    By using Admin console I set the Severity Level to WARNING and inside my java code is given below:
    Logger logger = Log4jLoggingHelper.getLog4jServerLogger();
    if (logger.isEnabledFor(Priority.DEBUG)){
    logger.debug("DEBUG - Test Debug message");
    logger.info("DEBUG - Test Info Message");
    logger.warn("DEBUG - Test Warning Message");
    logger.error("DEBUG - Test Error Message");
    logger.fatal("DEBUG - Test Fatal Message");          
    Somehow the logger.isEnabledFor(Priority.DEBUG) returning 'TRUE' and the follwoing message is displayed.
    <Nov 29, 2006 2:44:04 PM EST> <Warning> org.apache.log4j.Category> <000000> <DEBUG - Test Warning Message>
    <Nov 29, 2006 2:44:04 PM EST> <Error> <org.apache.log4j.Category> <000000> <DEBUG - Test Error Message>
    <Nov 29, 2006 2:44:04 PM EST> <Info> <org.apache.log4j.Category> <000000> <DEBUG - Test Fatal Message>
    <b><i>NOTE - The logger.debug() and logger.info() methods are not invoked because of the severity level to 'WARNING' in the console.</i></b>
    <b>I would like to know why the Somehow the logger.isEnabledFor(Priority.DEBUG) is having a value of 'TRUE'.</b>
    I expected only the Somehow the logger.isEnabledFor(Priority.ERROR) will have the value of 'TRUE'.

    Did you get an answer to your question? I have the same problem with WebLogic 10.0.

  • Can I use log4j with a java stored procedure

    I have code that resides on the middle tier and on the database. Our company is using log4j for debugging purposes. In order to get my code to work on the database, I have had to remove all the log4j stuff. Has anyone tried to get code that has log4j messages to run on the database? I am not concerned with actual debugging, I just don't want to have to strip this code out if I can avoid it.

    Hi Laura,
    As far as I know, you have two choices:
    1. Load the log4j classes into the database (using the "loadjava" tool).
    2. Enable remote invocation of log4j classes via RMI (or similar).
    Hope this helps.
    Good Luck,
    Avi.

  • Using Log4j with Listener

    We are using Log4j and all of our logging files are properly created by a
    listener that starts once our application is deployed. All logging works
    fine when we are running in single server mode but when we deploy the EAR to
    a cluster, the listener starts and we see the log files created and there is
    an initial line written into one of the created log files by the listener.
    When we access our application on the cluster non of the logging messages
    are written out to the files. I am thinking that maybe the listener is
    dieing but I am not sure. We have a log4j config file that is included in
    our WEB-INF directory.
    Is there a way to see what listeners are running?
    Has anyone used log4j in a clustered environment?
    Thanks
    Michelle

    We have managed to get a little further. When the managed servers are
              started up by the admin server, and application is deployed, the log files
              are created by the listener BUT when we access the application nothing is
              written to the logs. We have not located any exceptions, the logs just
              don't seem to get written to. Now, if redeploy the application it properly
              logs to the log files. Any ideas??? Again, our log4j config file is in
              the WEB-INF directory in the EAR and the web.xml has an entry for
              log4j-init-file pointing to the WEB-INF log4j file. We have deployed our
              application to production and I just don't like the fact that if the servers
              must be rebooted that our application must be redeployed. If this step is
              missed then we won't be logging and of course troubleshooting goes out the
              window. Any help greatly appreciated
              I will have to double check if we have a try catch block. If not I will do
              this pronto.
              <Srinagesh Susarla> wrote in message news:[email protected]..
              > log4j should work the same both on single server as well as clustered env.
              > Can you try adding some debug to your listener to ensure that its getting
              > initialized correctly. Also can you surround it with a try catch block to
              > ensure that its getting loaded correctly.
              > Another question: Is this a ServletContextListener or an
              > ApplifecycleListener?
              > If there are any exceptions please post them here.
              >
              > -- Nagesh

  • I can't seem to see sync my mac and iphone using iCloud with numbers and pages how can i correct this?

    Hi
    I've used Numbers and Pages for IOS for sometime now and when i use safari to look at my icloud account i can see all my files. Recently i bought Numbers for Mac and now whenever i create a spreadsheet on my mac i can't see it on my iphone but i can if i login to icloud. In fact i can only see about 16 files on my iphone when there is over 40 files.
    Although i don't yet have pages for mac i now have a similar problem with Pages, whenever i edit a file or even create a file on IOS it doesn't appear in icloud.
    I did think it was something to do with me not selecting backup to icloud so i then spent £14 to upgrade my storage to 15GB and that hasn't helped.
    I've checked all the settings and can't see anythng that will cause the problem.
    My iphone is running IOS 6 and my Mac is running Mountain Lion 10.8.2
    Does anyone know how to correct this mess?
    Many thanks in advance.
    Mick.

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • Using webaccess with ipad and android tabs

    Because of different browser agent, the gw 2012 webclient has not the
    same behavior as the standard webclient using firefox or chrome on pc.
    I want to access the documents folder. How to do it on this mobile devices?
    with regards and thx
    Go
    Gotthard Anger
    Anwenderbetreuung Netzwerkadministration
    Landeskirchenamt der EKM
    [email protected]
    Mails an diese Adresse werden nur nach vorheriger Ansage gelesen!
    Mails for this address will only be read if you trigger me before.

    Project status at this time:
    I edited webacc.cfg and commented out the lines for ipad and android
    tabs, e.g.
    #templates.useragent.1.id=*Linux*Android*GT-P*
    #templates.useragent.1.interface=mobile
    Now these devices bring up the whole web application.
    now I only have to fix this odd behaviour of the webaccess client
    loading documents
    Am 20.09.2012 09:50, schrieb Gotthard Anger:
    > Am 20.09.2012 09:47, schrieb Gotthard Anger:
    >> Because of different browser agent, the gw 2012 webclient has not the
    >> same behavior as the standard webclient using firefox or chrome on pc.
    >>
    >> I want to access the documents folder. How to do it on this mobile
    >> devices?
    > Edit:
    > no native access to groupwise server, datasync only via active sync
    >>
    >> with regards and thx
    >>
    >> Go
    >>
    >>
    >>
    >
    >
    Gotthard Anger
    Anwenderbetreuung Netzwerkadministration
    Landeskirchenamt der EKM
    [email protected]
    Mails an diese Adresse werden nur nach vorheriger Ansage gelesen!
    Mails for this address will only be read if you trigger me before.

  • Populating a Combobox using Remoting with AMF and PHP

    Hello all
    I am using Zend framework and Flex 3.4 to create a webapp. I am stuck at how to populate a combobox dynamically using the service I created in PHP.
    In some of examples I saw that result of database query was being converted into XML and then sent to Flex. This seems a little too time-consuming if I have to do it every time. I saw some examples in Adobe Docs about Remoting with AMF and PHP. That seems like a better approach although how it would be applicable here is beyond me right now.
    Can somebody guide me in correct direction?
    Thanks and Regards
    Shivik

    Try this: http://code.google.com/p/as3flexdb/ is very easy to use and it
    will help.
    All you need to populate a combo is:
    <mx:ComboBox dataProvider="{query.Records} /

  • Bettering your English, useful sites with tips and tricks

    Since a lot of us, including me, are non-native English speakers we do make mistakes. Sometimes they lead to funny threads and/or amusing discussions like this one: Re: how to post a questions to forum
    In this particular one I linked to the site:
    [DailyWritingTips|http://www.dailywritingtips.com/category/misused-words/]
    Another of my 'favorite' typo's has to do with the word definitely. To get that right surf to:
    [d-e-f-i-n-i-t-e-l-y|http://www.d-e-f-i-n-i-t-e-l-y.com/]
    Here's my question to you all:
    Please contribute by adding sites to this thread so we all learn if we should use [Then or Than?|http://www.dailywritingtips.com/then-or-than/] and understand more about common mistakes made here on the forums and in our other (business) communications. Of course you may accompany them by examples of texts horribly gone wrong by simple typo's but let's not compete with the funny threads thread.
    Thanks in advance!
    Jurjen

    >
    Jurjen Heeck wrote:
    > Since a lot of us, including me, are non-native English speakers we do make mistakes.
    > Another of my 'favorite' typo's has to do with the word definitely. To get that right surf to:
    > [d-e-f-i-n-i-t-e-l-y|http://www.d-e-f-i-n-i-t-e-l-y.com/]
    >
    I think native speakers get that one wrong just as frequently as non-native speakers, if not more often. I hate seeing "definately".
    But it's funny when people type "definatly" and MS Office automatically replaces this with "defiantly" ^^. I often get e-mails from colleagues saying things like "We should defiantly do this" ... yes, we should definitely put all our defiance into this .
    >
    Harish T K wrote:
    > Also using "could of" as in "You could of done this some other way." It probably means "You could have done it some other way.
    >
    > This is not necessarily always by non-native speakers.
    Actually this particular mistake is made almost exclusively by native speakers (or quasi-native speakers, like people from Hong Kong or India who start learning English at 3 or so). I wondered for a long time how they could possibly confuse "have" and "of", until someone explained that they are not replacing "would have", "could have" etc. with "would of", "could of", but "would've", "could've". Additionally native speakers pronounce "of" approximately as "ev" (the o in "of" is reduced to a schwa if the "of" is not in a position where it is emphasized) ... which is exactly the same or very similar to the way the 've part of "would've", "could've" is pronounced. So for a native speaker this is almost as innocent a mistake as writing "you're" for "your" or "there" for "their".
    I hate this error very much. For non-native speakers something like "would of" is extremely hard to parse, because when reading this and pronouncing the words in our heads we do not reduce the "of" to "ev", we read it kind of like "off", and cannot associate this with 've or have.
    >
    Matt wrote:
    > Never say "a lot", say "a great deal". Or "quite a few".
    There is nothing wrong with "a lot" (when properly separated by a space). This is perfectly correct English.
    >
    Matt wrote:
    > If a group or collection is countable then use "fewer" rather than "less". 
    This statement is not correct. One can use "less" for both countable and uncountable nouns. The usage with uncountable nouns even predates the one with countable nouns (9th vs. 14th century). But there are guides that recommend against using "less" with countable nouns and some even claim this to be incorrect.
    What I hate very much is when people use "less" when they should use "little". Only non-native speakers do this, of course. But quite often and even in official documents . I find this really cringeworthy. "There is too less time to do this or that" for example. The opposite of much is little, not less! Little cannot only mean small.
    A funny mistake, also in an official document: "The information in this document is objective to change." instead of "... subject to change". I think the author must be too object-oriented .

  • How to use JMS with tomcat and Axis

    Hello
    I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
    I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
    JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    But I have attached all .jar from F:\Sun\MessageQueue\lib
    In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
    Thank you in advanced,

    The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
    java.naming.provider.url=file\\\:////var/jndi
    java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories.

Maybe you are looking for

  • Aperture 3 Loupe-Super slow, is there a way to speed up.

    I am not impressed with the new loupe. Same basic loupe, but now images are taking forever to res up and see detail. I want to see detail quick, and do a basic edit for sharpness. It takes so long for images to come with detail, it is painful. I have

  • Elements 3 no longer works on iMac w/ OS 10.6.8 (Snow Leopard)

    As someone who only uses PhotoShop to make minor adjustments to digital pix, I have never felt the need to upgrade from Elements 3.  As of yesterday it worked perfectly.  Today when I try to Open a photo that command (and others) are grayed out on th

  • Time Capsule keeps going and going and going

    Hello all; Wondering if anyone can give me a readers digest version of how TC is supposed to work. My backups area so random it is a bit confusing. Some days they last for a minute (backing up kb of kb) and today it has been backing up for an hour (b

  • Stock Transport Order Billing

    Hi guys, while doing Stock Transport Order Billing (JEX), user should be prohibited from the creation of multiple billing. After VF01 & once the generation of Excise Invoice.....user should not be allowed billing from the same invoice. What should be

  • Photoshop Elements 11 and CS6

    I have Photoshop Elements 11 and am wanting to upgrade to CS6.  Can I just upgrade or do I have to buy the whole CS6?