I am currently working on a project where we have the log4j-over-slf4j.jar file. In all of the environment, this jar was working. But all of a sudden I have a WebSphere application server. Our product works on tomcat server and all of the sudden our application was not able to create any logs whereas it was creating in another environment. If I try to remove that jar from the project then I am able to generate logs.  But I am not able to identify why should i do it only specific to this particular environment.  Or what should  i do  in order to identify  the class loader information at server runtime to identify which class is loaded or which method is loaded?  My jdk version is: "1.7.0_71"  My application contains these libraries:  antlr-2.7.7.jar aopalliance-1.0.jar asm-1.5.3.jar asm-attrs-1.5.3.jar axiom-api-1.2.12.jar axiom-impl-1.2.12.jar axis2-1.6.2.jar axis2-kernel-1.6.1.jar axis2-transport-http-1.6.1.jar axis2-transport-local-1.6.1.jar c3p0-0.9.2.1.jar cglib-2.1_3.jar com.ibm.jbatch-tck-spi-1.0.jar commons-codec-1.6.jar commons-collections-3.1.jar commons-fileupload-1.2.jar commons-httpclient-3.1.jar commons-logging-1.1.3.jar dom4j-1.6.1.jar ehcache-1.2.3.jar geronimo-activation_1.1_spec-1.0.2.jar geronimo-javamail_1.4_spec-1.6.jar geronimo-jta_1.1_spec-1.1.jar geronimo-stax-api_1.0_spec-1.0.1.jar geronimo-ws-metadata_2.0_spec-1.1.2.jar hibernate-3.2.4.ga.jar hibernate-annotations-3.3.0.ga.jar hibernate-commons-annotations-3.1.0.GA.jar hibernate-core-3.3.0.CR2.jar hibernate-ehcache-3.3.0.CR2.jar hibernate-entitymanager-3.3.1.ga.jar hibernate-jpa-2.0-api-1.0.0.Final.jar hibernate-validator-3.1.0.CR2.jar httpcore-4.0.jar javaetmoi-spring4-vfs2-support-1.4.0.jar javassist-3.18.1-GA.jar javassist-3.3.GA.jar javax.batch-api-1.0.jar javax.servlet-api-3.0.1.jar jaxen-1.1.1.jar jboss-common-core-2.0.4.GA.jar jboss-logging-3.3.0.Final.jar jettison-1.2.jar jsr311-api-1.0.jar jta-1.1.jar log4j-1.2.17.jar log4j-api-2.0.jar logkit-1.0.1.jar mchange-commons-java-0.2.3.4.jar neethi-3.0.1.jar oracle-ojdbc6-11.2.0.3.0.jar persistence-api-1.0.jar poi-3.9.jar slf4j-api-1.7.11.jar slf4j-simple-1.6.4.jar spring-aop-3.2.13.RELEASE.jar spring-batch-core-3.0.1.RELEASE.jar spring-batch-infrastructure-3.0.1.RELEASE.jar spring-beans-3.2.13.RELEASE.jar spring-context-3.2.13.RELEASE.jar spring-core-3.2.13.RELEASE.jar spring-expression-3.2.13.RELEASE.jar spring-jdbc-3.2.13.RELEASE.jar spring-orm-3.2.13.RELEASE.jar spring-retry-1.0.3.RELEASE.jar spring-tx-3.2.13.RELEASE.jar spring-web-4.0.3.RELEASE.jar stax-api-1.0.1.jar woden-api-1.0M9.jar woden-impl-commons-1.0M9.jar woden-impl-dom-1.0M9.jar wsdl4j-1.6.2.jar wstx-asl-3.2.9.jar xmlbeans-2.5.0.jar xmlpull-1.1.3.1.jar XmlSchema-1.4.7.jar xpp3_min-1.1.4c.jar xstream-1.4.7.jar   My tomcat lib directory contains:  annotations-api.jar catalina-ant.jar catalina-ha.jar catalina.jar catalina-storeconfig.jar catalina-tribes.jar ecj-4.5.jar el-api.jar jasper-el.jar jasper.jar jsp-api.jar ojdbc6-11.2.0.3.jar servlet-api.jar sqljdbc4-11.1.0.7.0.jar tomcat-api.jar tomcat-coyote.jar tomcat-dbcp.jar tomcat-i18n-es.jar tomcat-i18n-fr.jar tomcat-i18n-ja.jar tomcat-jdbc.jar tomcat-jni.jar tomcat-juli.jar tomcat-util.jar tomcat-util-scan.jar tomcat-websocket.jar websocket-api.jar
2097
I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?
75730
What would be the easiest way to view classes, methods, properties, etc. inside a jar file? I'm looking for something equivalent to the very useful  Lutz Roeder .NET Reflector  - for Java
107771
I want to simplify my execution of a Groovy script that makes calls to an Oracle database. How do I add the ojdbc jar to the default classpath so that I can run:  groovy RunScript.groovy   instead of:  groovy -cp ojdbc5.jar RunScript.groovy
785
I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?
89058
I am trying to set up a Jenkins job which uses the migration tool to move code from a source control system to an org.  To test the job I created a new custom object  named aaaTest__c.  I changed my package.xml to the following:  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Package xmlns="http://soap.sforce.com/2006/04/metadata"&gt;     &lt;types&gt;         &lt;members&gt;aaaTest__c&lt;/members&gt;         &lt;name&gt;CustomObject&lt;/name&gt;     &lt;/types&gt;     &lt;version&gt;31.0&lt;/version&gt; &lt;/Package&gt;   When my Jenkins job runs I see 1160 components that failed to deploy.  These include objects, workflows, triggers, classes and more.  The object errors appear to be for the custom fields on that object.  The errors all look like this:  workflows/Account.workflow (Account.Test_Task) -- Error: Not in package.xml   I don't understand why the migration tool is trying to deploy all of these components when I'm telling it just deploy one.  Any help will be greatly appreciated.
121546
In my understanding of Servlet, the Servlet will be instantiated by the Container, its init() method will be called once, and the servlet will live like a singleton until the JVM shuts down.  I do not expect my servlet to be serialized, since it will be constructed new when the app server recovers or is starts up normally. The servlet should hold no session-specific members, so it does not make sense for it to be written to disk and re-instantiated. Is there a practical use for this?  My concerns are, that I put some non-serializable fields within there and then my app will mysteriously fail in a production environment where a different sort of session replication will take place.
74927
I'm getting this error:  javax.servlet.ServletException: bean not found within scope   on a page with this at the top.  &lt;jsp:useBean id="bean" type="com.example.Bean" scope="request" /&gt;   The class exists in the classpath, it worked this morning, and I don't get what not found within scope means.  How is this caused and how can I solve it?
64914
How do I take a jar file that I have and add it to the dependency system in maven 2?  I will be the maintainer of this dependency and my code needs this jar in the class path so that it will compile.
95371
I've set up an Ubuntu 14.04 Server (from an Ubuntu 12.04 Server) but today I wanted to look in the auth.log but this file is not used. It seems that ´syslog´ was deleted.  How does Ubuntu 14.04 log? I need this for a server.  Thank you.
18475
I am trying to build an executable jar program which depends on external jar downloaded. In my project, I included them in the build path and can be run and debug within eclipse.  When I tried to export it to a jar, I can run the program but I can't when I try to press a button which includes function calls and classes from the external jar. I have edited the environment variables (Windows XP) CLASSPATH to include paths of all the external jar, but it doesn't work.  A point to note is that I got compile warnings while exporting my executable jar, but it doesn't show up any description about the warnings.  Would someone kindly provide a thorough guide on how to include an external jar program using eclipse?
2987
When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code:  C++:  #ifdef _BuildDateTime_    char* SomeClass::getBuildDateTime() {       return _BuildDateTime_;    } #else    char* SomeClass::getBuildDateTime() {       return "Undefined";    } #endif   Then on the compile I had a '-D_BuildDateTime_=Date' in the build script.  Is there any way to achieve this or similar in Java without needing to remember to edit any files manually or distributing any seperate files.  One suggestion I got from a co-worker was to get the ant file to create a file on the classpath and to package that into the JAR and have it read by the method.   Something like (assuming the file created was called 'DateTime.dat'):  // I know Exceptions and proper open/closing  // of the file are not done. This is just  // to explain the point! String getBuildDateTime() {     return new BufferedReader(getClass()             .getResourceAsStream("DateTime.dat")).readLine(); }   To my mind that's a hack and could be circumvented/broken by someone having a similarly named file outside the JAR, but on the classpath.  Anyway, my question is whether there is any way to inject a constant into a class at compile time  EDIT  The reason I consider using an externally generated file in the JAR a hack is because this is) a library and will be embedded in client apps. These client apps may define their own classloaders meaning I can't rely on the standard JVM class loading rules.  My personal preference would be to go with using the date from the JAR file as suggested by serg10.
47611
I want to use a Java file SaveProp which is written in a package user. The class file has been placed in WEBINF/classes. Below are the two lines which cause the issue.  jsp:useBean id="user" class="user.SaveProp" scope="session"  jsp:setProperty name="user" property="*"   It throws:  The value for the useBean class attribute user.SaveProp is invalid   I'm using Tomcat 6.0.
43836
Working with selenium + maven project in eclipse. I am facing below warnings:  log4j:WARN No appenders could be found for logger(org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please initialize the log4j system properly.  I have tried  Adding log4j.properties Corrected jdk version updated pom.xml file with accurate dependancy Ensure that those files are physically available and link in build with correct + valid path cleaned project in eclipse updated all maven dependancies  Anyone has experience and face, please guide/suggest how those can be fixed?
3251
I was recently told (  ):     You cannot delete a class in production directly. You will need delete   the class from your sandbox and then deploy the deletions to your   production org.   When you deploy from sandbox to production, the   missing classes will come up in red and you can choose to deploy these   deletions to Production.   However, I'd like some clarification because finding information on how to do this is like pulling teeth, unfortunately.  Am I supposed to:   Delete the Trigger in Sandbox Make a deployment package in Sandbox Add the Trigger which is going to be listed in RED now Deploy (and that deletes it from Production)?   I am not seeing deleted Triggers in Red in Sandbox.  Are they NOT listed under "Triggers" for deployment, but elsewhere?   Frustrated = true.   Does this ONLY apply to Classes??  UPDATE:  I just tried again, with a CLASS, and it still doesn't show up at all as a Deployable package (red or not) after I delete it in the Sandbox.  UPDATE 2:  I was just able to delete a class, that I know was written via IDE from a third party, in both Sandbox and Production.  So now I'm wondering if it has to do with where it was originally deployed from (if from IDE, IDE can delete it - it from Sandbox, you have to jump through hoops).  :-(
71820
How do I run a .jar executable java file from outside NetBeans IDE? (Windows Vista).  My project has a .jar file created by Netbeans.  We'd like to run it.  Either: how do we run the file or how do we create a 'proper' executable file in NetBeans 6.1?
97421
Should log classes open/close a log file stream on each write to the log file or should it keep the log file stream open throughout the application's lifetime until all logging is complete?    I'm asking in context of a desktop application.  I have seen people do it both ways and was wondering which approach yields the best all-around results for a logger.
30969
I want to create an ini file to store some settings for my application. Is it a good idea to find where the jar file is located and create an ini file there? If yes, then how can I find the location of the jar file?   But if you know a better solution for something like this, I would like to hear some of them.  EDIT: I'm using mac and I want to run the same application in windows. I could write something in the System.getProperty("user.home") directory, but I want to keep the system clean, if the user decides to remove the app. There is no a better way to store the settings file, for example in the same directory with the application?