J2ee.jar causes problems with commons-logging.jar

Hi All -
(JDK 1.5.0_03, commons-logging 1.0.4, latest j2ee.jar, Eclipse 3.1.0 RC3 )
I am developing some components that are to be used within j2ee containers and in standalone mode as well. When I run the software under Tomcat, it works correctly (Tomcat is not using the j2ee.jar that comes with Sun's App server obviously), but when I develop with the j2ee.jar file that comes with Sun's App server, I can't use commons-logging. For example, the code supplied below (a class with only this line in the main method, not using any j2ee features) will fail JUST by having j2ee.jar in my path, but if I take it out of the path, it works fine. I am also on the commons-logging mail list and no one there has been able to solve this issue for me. Again, if I deploy my application to Tomcat, I don't have this problem.
The isolated line that is giving me the issue (and will give the issue even in a non j2ee application that just has this one line) is this:
log= LogFactory.getLog(CommonsLoggingTest.class);
When I run this without j2ee.jar in the path, it works fine. When I run it with j2ee.jar in the path, I get this:
Exception in thread "main" org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
     at com.redhawk.testing.CommonsLoggingTest.doTest(CommonsLoggingTest.java:27)
     at com.redhawk.testing.CommonsLoggingTest.main(CommonsLoggingTest.java:45)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
     ... 5 more
Caused by: java.lang.NullPointerException
     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
     ... 6 more
Anyone have any ideas? Its really annoying to have to take this jar file out of my path every time I want to run a test. I could just start developing against other implementations of the j2ee classes I need (for example, Tomcat's jar files do not give this error) but for various reasons that is also undesirable.
Thanks!
Jason

This problem does not arise with commons-logging 1.0.3.
Any idea what is different in 1.0.4 that would introduce problems when Sun's j2ee.jar is in the path?

Similar Messages

  • Replace commons-logging.jar with another version

    Hi all,
    I'm using CR4E version 2 Update 4(v. 12.2.205) and I would use instead of
    commons-logging.jar (v. 1.1.1) provided, the version used in my application
    (v. 1.0.4). Is possible without errors?
    I specify that I not use the provided log4j.jar in CR4E v.2.
    Thanks a lot

    The versions that we provide with our product is the version that we expect to be using when using our product.  Any other version may or may not work and there would be no way to fix an issue specific to using a different version than what we provide.

  • Cluster and commons-logging jar LogConfigurationException

    Hi,
    My configuration:
    -OAS 10.1.3.1 on 2 machines with oracle cluster configuration (discovery).
    My app:
    -ear which includes simple ejb3 module with commons-logging-1.1.jar lib (Jakarta commons logging)
    -clustering and replication is configured (in orion-application.xml):
    <cluster allow-colocation="false">
         <replication-policy trigger="onSetAttribute" scope="allAttributes" />
         <flow-control-policy enabled="false" />
         <protocol>
              <peer>
                   <opmn-discovery />
              </peer>
         </protocol>
    </cluster>
    When I'm trying to deploy my application I always get an error during deployment:
    [19-Jun-2007 16:46:44] Initializing ClassLoader(s)
    [01-Jan-1970 01:00:00] Error deserializing return-value: org.apache.commons.logging.LogConfigurationException; nested exception is: java.lang.ClassNotFoundException: org.apache.commons.logging.LogConfigurationException
    It doesn't matter if I try to deploy it on one or both machines. The exception is always the same on each machine.
    When I get rid of clustering/replication configuration (from orion-application.xml or during deployment) application is deployed without any problem.
    Also when I remove commons-logging-1.1.jar application is deployed.
    I know that there is already apache.commons.logging 1.0.4 in OAS shared libraries by it's not selected in "Configure Class Loading" by default.
    I also tried use the same version (1.0.4) in my app - didn't help.
    I can also deploy without any problem war file or ear file with web module, which has commons-logging-1.1.jar. But not ejb!
    Any advice?
    Thanks
    darek

    Hey Darek -- I just gave it a quick try -- the ListQueries query works as expected.
    This is how I executed it and the results it returned.
    d:\java\oc4j-10131-prod\j2ee\home>java -Doc4j.start.query=ListQueries+Exit -jar oc4j.jar
    07/06/25 00:51:41 Shutting down OC4J...
    AuditLoader - Performs various diagnostics on the contents of the speci
    fied loader(s).
    Callers - List all classes that call the specified method(s).
    ClassLoadMetrics - Report metrics from specified loader(s) or all if none specified.
    ClassPath - List the code-sources in use.
    Dependencies - List the dependencies of the specified class.
    Depends - List all classes that depend on the specified class(s).
    DuplicateClasses - List duplicate classes, both loaded and in code-sources.
    DuplicateCodeSources - List code-sources that have more than 1 subscriber, or the same name.
    Exit - Exits the process (does shutdown if system is running).
    FindResource - List the code-sources containing the specified resource.
    GetResource - Call getResource() or getResources() on a specified loader and report the results.
    HttpSessions - View summary of active HttpSessions for deployed applications.
    LeakedLoaders - Control detection of class loader leaks and inspect results.
    ListQueries - List built-in subclasses of the "oracle.classloader.query.Query" class.
    LoadClass - Call loadClass() or Class.forName() using a specified loader and report the results.
    LoadedClasses - List the names of all loaded classes (if available).
    LoaderTree - List the class loader tree.
    Packages - List the package names contained within the specified code-source(s).
    SharedLibraries - List shared-libraries and the loaders that have imported them.
    SystemProperties - List or set System properties.
    ThreadPools - List application server related thread for the current VM.
    Threads - List thread info for the current VM.
    UnusedCodeSources - List any code-sources from which no classes or resources have been loaded.
    Uptime - Report how long the system has been running.
    VMStat - List statistic info for the current VM.
    Specify the query name for a full description, or use the '-l' option to see ful
    l descriptions for all.

  • Problem with creation of jar with external libraries

    hi guys, I've no problem with creation of jar,i use this command:
    jar -mcf MANIFEST.MF NameFile.jar *.class
    my file manifest is this:
    Manifest-Version: 1.0
    Created-By: Me
    Main-Class: NameFile
    Now,I've to make a jar file,but i have to use some external libraries in jar format.
    I've read on sun tutorial and i've added to manifest this line:
    Class-Path: dt.jar formshelp.jar formsrt.jar jh.jar looks-1.3.1.jar substance.jar TableLayout.jar
    But the jar file doesn't work, neither with a double click nor with console...
    Someone can help me?Thanks!:)

    Darkweb wrote:
    sorry but,the external libraries that i use are in .jar,what i've to do to include these libraries in my jar?One of 3 things
    1) Take them out of the jar, and put them in a folder, preferably a folder in the same folder as the jar
    2) Write a custom classloader to load classes from nested jars
    3) Extract the contents of all the dependency jars, and jar them all up with your own code
    The first is almost always the most preferable, the second one is doable but brittle and resistent to updating dependencies ( you have to release everything for any changes you need, even if it's not a change in your own code ) and the third one is tedious and suffers from the same robustness problems of the second, not to mention that a lot of software licences prohibit you from actually doing it. Do the first one, it's by far the most common and easiest to maintain. I really wouldn't advise the third option, ever, though. Any activity that reduces the modularity of your application is ill-advised

  • Strange problem with my build JAR

    Hiii everybody... I'm having a strange problem with my build (JAR file)... when I work with the Eclipse and I click in the table that returns the clients stored in my PostGre database it works fine, but when I build my application and it generates my JAR file and I open it and click in the same table to return the objects that I have.. it does not appears anymore.. just show when I work with eclipse... and the database is the same for both.
    I already checked the database path in my properties file... and the application recognize the database because I can login and there isn't any runtime exception...
    In that application I work with Hibernate and Spring... for me it is very strange because the application works fine when I run by eclipse... but does not return the database data when I click on my Jar file to open the application..
    Someone can help me with that?
    I dont know if the problem is in the Spring, Hibernate, Libraries...
    thanks in advance...

    So what's the error then? Are there any error messages? Have you checked the console? Or are you just clicking on the jar and you wouldn't even see the errors if there are any?
    What do the logs say?
    You're not giving a lot to work on here.

  • Commons-logging jar file useage

    How to create a commons-logging.properties file and what are all paramter should me there in the propeties file. Basically i was using log4j.jar for logging the message. Now i want to use the commons-logging.jar for logging messsge. for that i have to create properties files with the specific paramter.
    help me....
    thanks in advacne

    Here is home page of commons logging project:
    http://jakarta.apache.org/commons/logging/
    And short user guide available there:
    http://jakarta.apache.org/commons/logging/guide.html

  • Commons-logging.jar

    How to use commons-logging.jar files ?
    i want to get the .java files from this

    How to use commons-logging.jar files ?
    i want to get the .java files from this1. Go here.
    2. Follow links to download source.

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • Upgrading to 10.5 causes problem with Entourage

    I have a problem which I believe to be a Mac OS problem even though it affects Entourage v.X. After upgrading the OS from 10.4 Tiger to 10.5.8 on a PowerPC Mac, Entourage crashes when opening mail that contains complex html. This only happens with the main user account and never happened before the upgrade. Email that only contains text and URL links opens OK. Logging out and back in to a new User, I am able to open and view the same emails that caused problems with the main user. 

    Generally when an application crashes in one account but it does in another account that indicates that something in the account where the application crashes is corrupt.
    You have two choices then. You can either find out where the corruption is located and repair it or if that is too bit of job you can switch accounts.
    Allan

  • I just updated my latest java but the update is causing problems with some externale devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device

    i just updated my latest java but the update is causing problems with some external devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device.
    Is this possible and how do i do that?
    Anyone who responds thanks for that!
    Juko
    I am running
    Hardware Overview:
      Model Name:          Mac Pro
      Model Identifier:          MacPro1,1
      Processor Name:          Dual-Core Intel Xeon
      Processor Speed:          2,66 GHz
      Number of Processors:          2
      Total Number of Cores:          4
      L2 Cache (per Processor):          4 MB
      Memory:          6 GB
      Bus Speed:          1,33 GHz
      Boot ROM Version:          MP11.005D.B00
      SMC Version (system):          1.7f10
      Serial Number (system):          CK7XXXXXXGP
      Hardware UUID:          00000000-0000-1000-8000-0017F20F82F0
    System Software Overview:
      System Version:          Mac OS X 10.7.5 (11G63)
      Kernel Version:          Darwin 11.4.2
      Boot Volume:          Macintosh HD(2)
      Boot Mode:          Normal
      Computer Name:          Mac Pro van Juko de Vries
      User Name:          Juko de Vries (jukodevries)
      Secure Virtual Memory:          Enabled
      64-bit Kernel and Extensions:          No
      Time since boot:          11 days 20:39
    Message was edited by Host

    Java 6 you can't as Apple maintains it, and Java 7 you could if you uninstall it and Oracle provides the earlier version which they likely won't his last update fixed 37 remote exploits.
    Java broken some software here and there, all you'll have to do is wait for a update from the other parties.

  • If I install the update to Adobe Reader 10, will that cause problems with Acrobat Pro 9?

    Firefox (version 15.0.1) is telling me I need to install an update to Adobe Acrobat 9.4 in order to view pdf files in my browser. I use Acrobat Pro 9. The update is actually Adobe Reader 10, and I am wondering if I install this, will it cause problems with my version of Acrobat Pro?
    Because I am not sure if this is so, I have temporarily disabled the plug-in and now pdf files download automatically rather than display in my browser. I would prefer they open in my browser but do not want to upgrade to Acrobat X.
    My OS is Windows Vista. I did not include the "troubleshooting information" file because I'm not sure what specific info is being requested.
    Thanks for any help.

    Hi WMdotcom
    did you try to view pdf with your acrobat pro 9 ?
    see
    [https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file Change what Firefox does when you click on or download a file]
    [https://support.mozilla.org/en-US/kb/set-how-firefox-handles-different-file-types
    Set how Firefox handles different types of files]
    thank you

  • Reduce folders in Windows 7 for pictures without causeing problems with PSE11

    I want to simplify  my Windows 7 folders and reduce the number of the folders. Can you please advise me on the best way to do this so as not to cause problems with PSE11 finding the pictures? Thank you.

    19441965 wrote:
    I want to simplify  my Windows 7 folders and reduce the number of the folders. Can you please advise me on the best way to do this so as not to cause problems with PSE11 finding the pictures? Thank you.
    The only way to move files or folders/subfolders without causing problems, that is not creating 'missing files' is to do this from within the Organizer, not the OS (Win/Mac).
    You can create folders and move pictures from the Organizer.
    Note that if you are moving the files of several subfolders into a single one, you run the risk of wanting to move files with the same filename into the same folder ; your OS won't allow that. So the Organizer will rename pictures if needed.
    If you want to do such a big reorganizing task, absolutely do a full backup before. There is no advantage  for such a reorganizing from an Organizer point of view, but if you need it for some reason, it has to be done from within the organizer.

  • I need to download dell drivers to a jumpdrive connected to my iMac.  Will this cause problems with my Mac?

    I need to download dell drivers to a jumpdrive connected to my iMac.  Will this cause problems with my Mac?

    Thanks.  These drivers are for the audio, etc. for a dell laptop I purchased used.  ( Needed something cheap for a training video that would only run on Windows.  Tried Emedia player but picture was too fuzzy.)  Dell support said I should contact Apple support for instructions on how to get the drivers onto the jumpdrive.  Any tips on doing that?

  • My host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    my host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    There are several possible causes for this problem.
    1. Two (or more) computers on the local network have the same Bonjour name, such as "X's-MacBook-Pro.local".
    2. You have two simultaneous connections to the same local network: probably Ethernet and Wi-Fi. If applicable, disconnect the Ethernet cable or turn off Wi-Fi.
    3. A Mac wakes from sleep due to network traffic. This is due to a bug in OS X that may only affect some models.
    4. A device that gets its network address from the router wakes from sleep, and the address it was using before has been assigned to another device.
    5. A third-party wireless router has incompatible settings or firmware. In that case, refer to the manufacturer or ISP for support. Restarting the router may help, temporarily.
    6. See also this support article.
    Rename the computer in the Sharing preference pane.

  • Have to re install elements 11 & premiere elements 11. cause problem with upgrade windows 8.0 to 8.1

    have to re install elements 11 & premiere elements 11. cause: problem with upgrade windows 8.0 to 8.1.    Lost all software and data.
    how to re install elements11. (downloads purchased in your store 2013-05)
    [email protected]

    have to re install elements 11 & premiere elements 11. cause: problem with upgrade windows 8.0 to 8.1.    Lost all software and data.
    how to re install elements11. (downloads purchased in your store 2013-05)
    [email protected]

Maybe you are looking for

  • Thunderbolt audio interface with Logic Pro?

    Are we to get a new thunderbolt interface with Logic Pro? Avid released their stuff today!

  • ARD asks for computer passwords at every launch

    Every time I launch ARD on my admin machine, it asks for the computer passwords in my list of computers.   I have 120 computers, and the pw is different for each one!!  This is getting annoying, to say the least. Is there a plist or some other file t

  • SAP ERP 2005 installation in Cluster mode on Solaris Platform using LDoms

    Hello Gurus, We want to install SAP ERP 2005 (ECC 6.0 SR3) on Solaris 10, (Solaris cluster 3.2). Please let me know the procedure. What would be the basic steps or difference while performing installation. Also if anybody can give the mount point det

  • Problems with Mac Mini and Premiere Pro CC 2014

    I am new to video editing with a background in graphic design and typically do short corporate videos. I am currently using a Mac Mini (late 2012 model), running Mavericks 10.9.5. And I keep having a problem with Premiere Pro CC 2014 freezing in the

  • How to get Logic Pro to relocate plug in folders?

    I have downloaded a plug in months ago. (a folder that contains: component file vst bank file (.fxb) a folder with all the samples/instrument files for importing individually instead of using the premade vst bank above Months ago, I created a project