java.io.FileNotFoundException: other\pappm101.ini (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
I have the folder and the file, even then I'm getting the same exception again and again.
I am compiling this file by netbeans.
The application's working directory is not what you think it is. However you're running the application, check that its working directory is set to the directory above your other directory.
What about the driver and the aprent folder name? the name: other\pappm101.ini is a relative path and not absolute. Tt looks like your application doesnt search where you think it does!
Related
I am getting this error while running the Student Management System project in netbeans Ide project in made in java,jsp,html.Please help me
Your project's build has a dependency on the Java ARchive (.jar file) com.mysql.jdbc_5.1.5
There are two possibilities that I see here, without further details on what you have done so far:
1) You already downloaded the jar, but when you specified the path where your build process is gonna look for that file you had an error in your path ... make sure you have a jar file in C:\Users\Harsh Jain\Downloads\com.mysql.jdbc_5.1.5.jar or C:\Users\Harsh Jain\Downloads\com.mysql.jdbc_5.1.5.jar\com.mysql.jdbc_5.1.5.jar (I'm thinking you might have copied the name of the jar file twice in your path).
2) If you have not manually downloaded that file, then you should do so. You can find that version at http://www.java2s.com/Code/Jar/c/Downloadcommysqljdbc515jar.htm (or elsewhere). Once downloaded, make sure to copy/unzip the actual JAR file to your C:\Users\Harsh Jain\Downloads folder.
Once you have ensured the file is actually on your system AND in the right path, run the build again.
I am trying to move my location on disk of a Bolt.cm install. Config.yml doesnt have any details of location.
When I rename the directory I receive app config issues as well as this :
Fatal error: Uncaught exception 'Bolt\Exception\LowLevelDatabaseException
Thrown from within Bolt. Seems like I need to update a config file but I don't see one with the path do web root or path to database stored.
Does such a file exist?
You need to flush the cache.
This can be done from the command line by:
php app/nut cache:clear
Or inside app/cache/ you will find the file config_cache.php that can be safely deleted.
data-config.xml
I add some setting infomation to solrconfig.xml,but show some error here:
how to set requestHandler???pls tell me how to set.thanks.
I don't know why shows this error.
"point:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
RequestHandler init failure"
Check to see if your RequestHandler class files are packaged properly in .jar file and they are located in the lib directory of your core or at the standard library location.
Make sure it's path is resolvable by the servlet container.
Check for other exceptions piled while initializing your RequestHandler.
Check for the log files inside the WebServer, for apche tomcat it is there in 'apache-tomcat-7.0.37\logs'.
Make sure you are not missing any dependencies to be included.
Paste your whole exception list for better glance of your problem.
I tried to execute a wab page with the help of JSP & mysql as a database. After execution of first web pages it never shows the credential which is eneterd in the login page. In tomcat logs it gives the error of "java.lang.classNotFoundException:com.mysql.jdbc.driver"
Download a mysqlconnector into the below path: "D:\mohit\mysql-connector-java-5.1.23"
I have entered a CLASS PATH in system Environmental variables as D:\mohit\mysql-connector-java-5.1.23\mysql-connector-java-5.1.23-bin.jar
Local system java is installed at C:\Program Files\Java\jre1.6.0_17
Please let me know how can I overcome from this problem?
you need to have a JAR file somewhere containing com.mysql.jdbc.Driver class (so called JDBC driver). This JAR needs to be visible in Tomcat. So, I would suggest to place mysql-jdbc.jar at physical location to /WEB-INF/lib directory of your project.
Many times ClassNotFoundException occurs if jar is not at physical location. Do not play with Classpath if you are not sure. It is always suggested to put external "Jars" under /WEB-INF/lib directory and restart Tomcat, It takes care the rest.
Put the mysql-connector jar inside tomcat/lib/ext folder and restart tomcat.
I guess you are running the application on server from eclipse itself, the jar is not getting pushed to server. Try placing the jar file in WEB-INF/lib folder
I am trying to adopt Log4j2 to my project. Since my Java Application is packeted in a JAR file. I don't want "log4j2.xml" configuration packaged inside of JAR file. I am trying to learn how configuration file works from "http://logging.apache.org/log4j/2.x/manual/configuration.html"
But seems there is no clear instruction regarding altering the configuration file path of the Log4j2.
After googling about this topic I found something like "Referencing log4j config file within executable JAR" Referencing log4j config file within executable JAR, But this solution is not available any more according to "http://logging.apache.org/log4j/2.x/manual/migration.html" (if I understand it correctly).
So I am wondering if someone have any idea about this issue.
Thanks
You can set the system property to specify the configuration path.
set the
"-Dlog4j.configurationFile="D:\learning\blog\20130115\config\LogConfig.xml"
in VM arguments. replace
"D:\learning\blog\20130115\config\LogConfig.xml"
to your configuration path.
Put the log4j2.xml file in resource directory in your project so that the log4j will locate files under class path automatically.
Loading log4j2.xml file from the customized location-
You can use the System property/ VM arguments- Dlog4j.configurationFile=file:/path/to/file/log4j2.xml
This will work for any web application.
For some legacy applications, you can create a class for loading log4j2.xml/ log4j2.properties from the custom location on the machine like- D:/property/log4j2.xml
Using any of these approach,during application startup, the log4j2.xml file from the src/resources folder will be overridden by the custom location log4j.xml file.
Try using -Dlogging.config=Path_to_your_file