I am trying to download kettle jars from the following repository in Maven:
<repository>
<id>pentaho-rep</id>
<url>http://maven-repository.com/artifact/pentaho-kettle/</url>
</repository>
but get following file format error during maven build:
.m2\repository\pentaho\kettle\kettle-core\5.3.0.0-200\kettle-core-5.3.0.0-200.jar; error in opening zip file
I tried deleting .m2, also tried other kettle versions, etc. but same problem. It is not clear to me if the repository is corrupted, or some other issue. Any suggestions or alternate repo location I can use (that contains kettle 5.2 version and above)? There is not much useful help available on Pentaho site or forum on this. Thanks.
I don't believe we publish our JARs to maven-repository.com. Try our official repository: http://nexus.pentaho.org/content/groups/omni
I have used the below repo. for getting the files.
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
It may not be the official pentaho repository. But it worked for me. You may check this ref. blog.
Hope it might help you too :)
Thanks, the following worked for me:
<repositories>
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
</repositories>
<properties>
<pentaho.kettle.version>5.3.0.0-200</pentaho.kettle.version>
</properties>
<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
</dependencies>
Related
I am using Spring boot version 2.2.0.M4. When I am adding dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
while starting server it fails to start with below mentioned error
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.client.discovery.health.DiscoveryCompositeHealthIndicator.<init>(DiscoveryCompositeHealthIndicator.java:42)
The correct way of working with Spring Cloud projects versioning is using the dependencyManagement plugin and release trains versions rather than passing versions of separate artifacts manually.
You can get a correct pom generated automatically (with all the correct versions) at start.spring.io.
On the date that question was posted, a version of Spring Cloud supporting Spring Boot 2.2.x has not been released yet. The latest Spring Cloud release version available is Greenwich.SR2, that supports Spring Boot 2.1.6.RELEASE.
UPDATE: Spring Cloud Hoxton.M1 that supports Spring Boot 2.2.0.M4 was released on 3rd July 2019. You can now use it and also generate correct build files with this version from start.spring.io.
For the following dependency:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
The Following spring cloud version worked for me.
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
I'm trying to include Spring Security to my web project, i'm following this tutorial http://docs.spring.io/spring-security/site/docs/current/guides/html5//helloworld.html
I've done everything in the tutorial with the given maven project and works fine. But when i'm trying to include it to my project a compilation error appear. Specifically when i extends from AbstractSecurityWebApplicationInitializer appear the given error
Multiple markers at this line
The type javax.servlet.ServletContext cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.ServletException cannot be resolved. It is indirectly referenced from required .class files
The POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>spring.primefaces</groupId>
<artifactId>primefaces.testwebapp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SpringPrimefacesWebApp</name>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- JSF 2.2 core and implementation -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.11</version>
</dependency>
<!-- Prime Faces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
</dependency>
<!-- Spring security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.1.6.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Thanks for the help!
Using mvn clean install -U
Just add the javax.servlet API to the compile time dependencies. You don't need to include it in the build, it's already provided by the target servlet container.
Your current pom suggests that you're deploying to a barebones servlet container (Tomcat, Jetty, etc) instead of a full fledged Java EE application server (WildFly, TomEE, GlassFish, Liberty, etc), otherwise you'd have run into classloading-related trouble by providing JSF along with the webapp instead of using the container-provided one.
In that case, adding the below dependency should do for a Servlet 3.1 container like Tomcat 8:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
Or if you're actually targeting an older Servlet 3.0 container like Tomcat 7, change the <version> to 3.0.1 (note: there's no 3.0 due to a mistake on their side).
If you happen to actually deploy to a Java EE 7 application server like WildFly 8, use the below dependency instead. It covers the entire Java EE API, including javax.servlet (and javax.faces, so you'd then remove those individual JSF API/impl dependencies):
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
Also here, if you're targeting an older Java EE 6 application server like JBoss AS 7, change the <version> to 6.0.
See also:
How to properly configure Jakarta EE libraries in Maven pom.xml for Tomcat?
This worked for me: if above supplied solution doesnt work
Project > Properties > Java Build Path > Libraries > Add library from library tab > Choose server runtime > Next > choose Apache Tomcat v 7.0> Finish > Ok
another way if you working on eclipse ide please open the project folder select Properties and click maven shows the view 'Active Maven Profiles(comma separated)'please input "dev"..after refresh problem solved
try setting the updated parent, like this:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
<relativePath></relativePath>
</parent>
this solved for me.
What helped for me was deleting the repository in directory .m2
and after deleting run maven: package
I tried to google this, looking for code examples but I had no luck.
Anyone knows a place where I can find a tutorial or just examples on how to use Imagej in Java to open and process images?
I was able to get ImageJ in a Jar
What I'd like to do is make a simple image difference processor
Thanks for your help and time
There are two major versions of ImageJ you can program against: the original ImageJ 1.x, and the still-in-beta ImageJ2.
Either way, I strongly suggest structuring your code as a Maven project. By doing this, you avoid manually managing JAR files, and can develop your project in any Maven-enabled IDE (Eclipse, NetBeans, IDEA, etc.) or from the command line.
The ImageJ artifacts (for either v1 or v2) are not yet available on Maven Central, but will be soon. Until then, you'll need to add a <repository> reference to maven.imagej.net. Here is a sample snippet for your pom.xml:
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>1.15</version>
</parent>
...
<dependencies>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>${imagej1.version}</version>
</dependency>
</dependencies>
...
<!-- NB: for project parent -->
<repositories>
<repository>
<id>imagej.releases</id>
<url>http://maven.imagej.net/content/repositories/releases</url>
</repository>
</repositories>
Or if you want to depend on ImageJ2:
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij-app</artifactId>
<version>${imagej.version}</version>
</dependency>
For documentation of ImageJ1, ImageJ2 and related projects including many of their dependencies, see the javadoc at:
http://javadoc.imagej.net/
For tutorials on how to use ImageJ2, see:
https://github.com/imagej/imagej-tutorials
And for more information on programming against ImageJ1, see:
http://imagej.net/developer/
I have a maven project with some provided dependencies and I am trying to run the application with webby but it give me a java.lang.ClassNotFoundException exception.
In this link it says: "Webby allows to initialize a launch configuration from the configuration of the jetty-maven-plugin".
My question is it is possible to also pass the dependencies defined in the jetty-maven-plugin? If not how can webby resolve the provided dependencies?
Want I did was to create a profile in the pom project:
<profile>
<id>webby</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
</dependencies>
</profile>
And then right click on the project -> properties -> Maven and added webby to the Active Maven Profiles
I don't know why it is not working.
I am trying to accept multipart-formdata in my servlet but request.getPart("") is not showing. I am using glassfish 3.1.2 server. Tha framework used is vaadin for developing application. Can any one help me to fix this problem?
Assuming that your concrete problem is indeed that your IDE didn't show the getPart() method on autocomplete, then that can only mean that the project is not configured as a Servlet 3.0 compatible project. That method was namely introduced in Servlet 3.0.
You didn't tell anything about which IDE exactly you're using and your question history doesn't give any clues as well, so let's assume that it's Eclipse which is rather widely used. In that case, you need to configure it at 2 places, provided that you've correctly associated the Dynamic Web Project with a Servlet 3.0 compatible container as Targeted Runtimes in project's properties (otherwise HttpServletRequest and consorts wouldn't have compiled at all):
In the Project Facets section of project's properties, the Dynamic Web Module version must be set to 3.0.
If your IDE has generated a /WEB-INF/web.xml file, then you need to make sure that its <web-app> root declaration also matches Servlet 3.0, otherwise it would still fail during runtime.
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
I had the same problem. Here's what eventually turned out to be the problem for me. I had a dependency on:
<dependency>
<groupId>com.googlecode.jsontoken</groupId>
<artifactId>jsontoken</artifactId>
<version>1.1</version>
</dependency>
And it turned out jsontoken has a dependency on servlet-api 2.5. So what fixed the problem was simply this:
<dependency>
<groupId>com.googlecode.jsontoken</groupId>
<artifactId>jsontoken</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
This worked for me
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
To those that stumble on this later, if the resolution suggested by BalusC does not resolve the problem for you please check your build path for provided libraries whose runtime does not match the runtime of your server.
For example if your maven pom.xml contains entries that provide java EE libraries like so...
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>5.0-1</version>
<scope>provided</scope>
</dependency>
... they can interfere with what your IDE perceives as the runtime environment, which will be used to provide code completion suggestions.
The easiest way to track the problem is to figure out where the HttpServletRequest class is sourced from.
maven.. pom.xml.. modify this dependency
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
servlet api 2.5 is not work
I had the same problem, I want to share it with you in case anyone else bumps in the same problem:
In my case I had a j2ee.jar which was automatically downloaded and its version was probably old. It was located under Libraries --> j2ee Runtime Library (stackoverflow doesn't let me add an image so in eclipse - in Project Explorer - expand the project --> Java Resources --> libraries --> J2ee Runtime Library --> j2ee.jar)
I went to the file system where this file was located (you have the location next to the file in eclipse) and replaced it with a newer jar. You can take the jar from here.
Then clean and rebuild the project.
One possible reason, as pointed out in Bjørn's answer, is a conflicting artifact servlet-api (Servlet 2.5 spec).
In my case it was this dependency
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.30.10</version>
To find out which dependency compiles the conflicting library just build and print the dependency tree with:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:tree -Dverbose=true
Part of the output:
Finally exclude the artifact from the dependency
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.30.10</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Hi friends I too faced simillar problem and I will tell you what I did.
I'm using eclipse juno and Tomcat 7 server. Make sure you use latest servlet API jar. Tomcat 7 will only support dynamic module version 2.5 not more than that. So use higher Tomcat version or lower dynamic module version then it will work.
One more thing: open your servlet api jar and see whether it contains "Part" you can easily check it.