I had been used log4j2 with the same configuration on my other projects but in this project, Intellij could not find resource directory.
I created resource directory and marked it as Resource Root.
Here is an image that shows my project structures.
But I got below error.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
I had tried to rebuild project and restart IDE, with no success.
I'll be appreciated if somebody helps me.
Related
I just installed the checkstyle plugin from disk in IntelliJ by navigating to the jar which is just in the directory that it was downloaded to. When I restart IntelliJ to have the plugin take effect I get the following error:
2:50 PM Unexpected Exception Caught
The scan failed due to an exception: Could not determine plugin directory
org.infernus.idea.checkstyle.exception.CheckStylePluginException: Could not determine plugin directory
at org.infernus.idea.checkstyle.CheckstyleClassLoader.getBasePath(CheckstyleClassLoader.java:173)
at org.infernus.idea.checkstyle.CheckstyleClassLoader.buildClassLoader(CheckstyleClassLoader.java:94)
at org.infernus.idea.checkstyle.CheckstyleClassLoader.<init>(CheckstyleClassLoader.java:69)
at org.infernus.idea.checkstyle.CheckstyleProjectService$1.call(CheckstyleProjectService.java:69)
at org.infernus.idea.checkstyle.CheckstyleProjectService$1.call(CheckstyleProjectService.java:64)
at org.infernus.idea.checkstyle.CheckstyleProjectService.checkstyleClassLoader(CheckstyleProjectService.java:117)
at org.infernus.idea.checkstyle.CheckstyleProjectService.getCheckstyleInstance(CheckstyleProjectService.
I am on IntelliJ 2018.1 and the most recent version of the checkstyle plugin. Is it claiming it is unable to find the directory where the checkstyle plugin jar is even though I just installed it by pointing it to that directory? Do I need to move the jar to some kind of plugins directory? I'm following the guides I found online and they do not mention having to do anything besides what I have already done.
Nevermind. I was pointing to a particular jar file instead of the zip file for the whole plugin. Installing from disk and pointing to the zip file instead fixed the issue
This worked for me:
Uninstall the plugin and restart Intellij
Reinstall the plugin pointing to the zip file as originally downloaded from https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
Restart Intellij
My project is IntelliJ was all fine and suddenly I started getting the following error
Loading project definition from C:\Users\Manu\Documents\manu\codingjedi\code_related\code\frontend\web\project
java.io.FileNotFoundException: C:\Users\Manu\Documents\manu\codingjedi\code_related\code\frontend\web\project\target\config-classes\$999b06365add2ae5fadc.cache (The system cannot find the file specified)
I am unable to compile my code due to this. What is the issue?
worked after removing (by renaming) the project/target directory and rebuilt the project. It created a new target directory in project and things are working again
Whenever you have caching issues in IntelliJ, you can try to use the Invalidate Caches / Restart action in the File menu. Please read the displayed messages carefully ("WARNING: Local History will be also cleared.").
Another thing you could try: Rebuild Project in the Build menu.
I have successfully created an IntelliJ IDEA Groovy + Vaadin project that works great until I try to reference another jar that I wrote. I've added the jar to lib/ and web/WEB-INF/lib/ and included both in my Modules/Dependencies:
I even promoted the lib/ instance to be a "global library" so I could add it to my Artifacts like so:
IntelliJ builds fine and launches Tomcat, but when I try to view my app in a browser, I receive HTTP Status 500 with the error:
The server encountered an internal error that prevented it from fulfilling this request
...and my Tomcat logs state:
javax.servlet.ServletException: Failed to load application class: com.qview.client.QueueViewApplication
Is there any way that I can gain insight into why QueueViewApplication failed to load? Any ideas on a fix?
The issue dealt with how I was building my custom jar.
In IntelliJ IDEA, under Project Structure » Artifacts » [+] » Jar » From modules with dependencies... I was selecting extract to the target jar
This bundles QueueUpdater.jar's dependency jars into one massive QueueUpdater.jar for convenient import.
But, when I changed my selection to copy to the output directory and link via manifest, I was able to add the individual jars to web/WEB-INF/lib/ and run the Vaadin application without error.
I finally have my application in IntelliJ and deploying to JBoss. I'd like to get hot deploy working but it looks like I need to understand how IntelliJ and JBoss interact.
When I build my project in IntelliJ and then start JBoss, the ear file does not appear in the deploy directory so I assume that there is some magic that IntelliJ does so that JBoss reads from a different folder. What is happening during this step?
Thanks :)
I know this is an old and apparently answered question, but unfortunately the links provided in the accepted answer didn't give me the simple details I was looking for. For anyone also trying to understand how IntelliJ IDEA deploys your exploded war to JBoss without copying files to the deployments folder, here's what I've found while deploying locally from IDEA 14 (EAP) to JBoss 7.1.1.Final:
After you've created an "exploded war" artifact for your project (or it has automatically been created for you), IDEA will build your provided sources and place the output in the directory set in the artifact options (you can change this setting to place the output inside the deployments folder inside your jboss installation).
IDEA will update your JBoss configuration file (/standalone/configuration/standalone.xml) and add a "deployment" node inside the deployments section. This entry simply defines a name, a runtime name and the exploded war root folder for your project, which will point to the output directory of your artifact set in IDEA.
When JBoss is started (either manually or from your run/debug configuration in IDEA), it will automatically deploy your artifact. Be warned that if your files are in the output directory of your project and you clean it, JBoss will still try to find the directory, thus encountering errors in your next attempt to start it: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to mount deployment content, Failed to process phase STRUCTURE of deployment and java.io.FileNotFoundException to name a few.
Please refer to the documentation.
Basically, you need an exploded Artifact configuration with the directory name ending with .ear.
Build | Make performs hot deployment as well as Update action (which is configurable and can update only resources, resources and classes, optionally redeploy or restart the server).
Instead of copying your application to JBoss, IDEA runs it with appropriate parameters so that it uses Artifact directory instead. Configuration is very flexible and you can just change the artifact directory location to reside under JBoss directory.
I have a MVC project where I have a Class Library setup as my Test project. However, when using NUnit to run my tests, it is complaining about not finding the Nhibernate.config (which is in my Web project bin.
The exact error:
<solutionName>.UnitTests.CatelogEditing.Can_View_All_Products_On_Admin_Product_List:
System.TypeInitializationException : The type initializer for '<solutionName>.Domain.Infrastructure.BootStrapper' threw an exception.
----> NHibernate.Cfg.HibernateConfigException : An exception occurred during configuration of persistence layer.
----> System.IO.FileNotFoundException : Could not find file '<myrootpath>.UnitTests\bin\Debug\nhibernate.config'.
Any help is greatly appreciated.
Have you set the following properties of the config file:
Build Action: Content
Copy to Output Directory: Copy Always
To ensure that it is copied to the bin directory?
You need to add config file into your tests project because it doesn't know about your web project and doesn't see NH config file.