I'm on Arch linux x64 machine , I installed intellij idea but whenever I open a project a startupabortedexception occurs with the JavaDoc browser plugin.
I looked into my idea.log and figured out that it can't find javax.servlet.Servlet, I disabled the plugin in order to open a java project and indeed when I type import javax; it says it can't find javax.
I have java-openjfx installed and still intellij can't find it, what to do in this case ? .
Environment information
jdk:openjdk 1.8.0_60 64 bit.
intellij version: 14.1.5 community edition.
Goal
My goal is to get the JavaDoc browser plugin to work not to program in javax.servlet, I don't intend to do any web development with java right now.
If you don't have Maven project, you can just add the jar to the project. The one you are missing can be downloaded from:
http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.1.0
(just click "Download (JAR)" button)
The class javax.servlet.Servlet is not part of the standard JDK, it is part of the JEE, so you have to add servlet-api.jar to your classpath.
If your project is a Maven project you add the dependency like this:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
And you probably want to add
<scope>provided</scope>
as this dependency is most likely present in your application server.
Related
I have lombok plugin installed on Mac IntelliJ, but for some reason my intelliJ not finding log.info or other logger methods,
i verified the below settings, looks good.
Lombok annotations do not compile under Intellij idea
i reinstalled my lombok, and cleared cache and reset it, though no luck. I have re-installed IntelliJ.
I've cleared few setting under "~/Library/Preferences" too. Not working any suggestion?
I primarily use Lombok for auto generating the getters,setters, toString etc. Even though you have downloaded it as a plugin, have you imported it in your pom.xml if you are using Maven project?
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
my intelliJ creates main.iml and test.iml after import. After removing those files, works fine. Thanks for your inputs.
I need to setup https://github.com/adminfaces but i can't make it work at all. I get errors in wildfly deployment.
I setup intellij project, i select framework support for JSF, and Primefaces which are prerequisites. But than docs say:
Add admin theme to your classpath:
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC9</version>
</dependency>
How do i do this if i don't use maven? Can i set it up, via some jar file. Also i don't get it, if i download release from github, what is install.sh?
But even if i added it through maven via Intellij browser it still doesn't work. Can't deploy to Wildfly.
Maven library can be added to non Maven project through Intellij IDEA.
Project structure->Libraries->Add library->From Maven
AdminFaces jars are published to maven central, you can download it there, see here.
Just add admin-template and admin-theme to your classpath.
Also it depends on OmniFaces (2.x) and PrimeFaces (5.1.1 or greater) and also JavaEE apis such as servlet, EJB, CDI, JSF and JPA.
If you are running it outside a JavaEE container such as Tomcat take a look at Admin Starter Tomcat dependencies, you should be able to download them from maven central as well.
I have created Spring Boot web app and its working fine. Now I am writing selenium automation for my web app. I have written some test case. But when I am executing the test cases by using mvn test its giving following exception.
java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials
Can someone tell me why this is error?
You might missing the jar
make sure you have httpclient 4.5.2 or higher in your class path.
refresh eclipse
Close Eclipse.
clean .m2/repository folder
Open Eclipse and Alt+F5 on project;
check option Force Update of Snapshots
Use
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.+</version>
</dependency>
and check
I am new to IntelliJ and I have been working on a few small projects to familiarize myself with IDE and how to develop Java web projects with it.
I recently picked up Professional Java for Web Applications to practise my web development skills and I wanted to try it because it focuses on IntelliJ rather than Eclipse.
My main issues are from not knowing my way around the IDE at all. I have come across a problem that I have been unable to figure out how to do correctly.
How do you add Java EE Servlet API library on your compile classpath ?
Where is the compile classpath located in IntelliJ ?
Any help is appreciated!
This depends on how you are managing dependencies in your project.
If you are using Maven simply add it as a dependency in your pom.xml. When IDEA sees a maven based project it will over for you to Import Changes and/or Enable Auto Import. A common JavaEE 7 maven dependency would look like this in your pom.xml:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
If you are only using an IDEA project to manage things (vs. maven, gradle etc.) then you can go into the project structure dialog, click on modules and select the module containing your web tier code. Then click on the dependencies tab. Then click on plus button (+) and add a JAR, then navigate to the JAR containing the servelet APIs that is bundled with your application server and select that.
There are another half dozen ways to set this up and exactly which one you choose depends on a lot of factors like how you want to manage provided dependencies in your project etc. Either of these methods should get you on your way though.
As the Book of Vaadin explains I added the maven repository;
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
But the resolving becomes unsuccessful for 2.0.0 so I used 1.0.0 which was successful.
I got the TRIAL license key from vaadin but I cannot find a way to install it. My IDE is intellij Idea and im using windows 8. When i deploy the tutorial in the book of vaadin without the license i get the following error.
HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: com/vaadin/addon/charts/model/Series
Any help regarding this is greatly appreciated.
I worked out the issue by starting the vaading project using Maven in intellij idea. I didnt go for the Vaadin application but went for a new project using vaadin maven repo.
It downloaded the needed resources through the repo. And I ran the package maven goal to get my widget set compiled.
as to the licensing problem I had, It was solved by placing the licence key in a file named .vaadin.chartsdeveloper.license inside my home
that is in windows, : C:\Users\username
Now all is working fine.