Not able to resolve jPOS latest version 2.0.8? - jpos

I was trying to resolve jPOS:2.0.8 version but it is failing because not able to resolve dependency for com.sleepycat.je:je:7.0.6.
<dependency>
<groupId>com.sleepycat</groupId>
<artifactId>je</artifactId>
<version>7.0.6</version>
<scope>compile</scope>
</dependency>
I have check the maven repository and com.sleepycat.je lower version is available there.
http://repo.maven.apache.org/maven2/com/sleepycat/je/
http://repo.maven.apache.org/maven2/org/jpos/jpos/2.0.8/jpos-2.0.8.pom
Edit
Even i have added maven { url 'download.oracle.com/maven'; } in build.gradle but still not resolving the dependency.
Edit :
I am getting below error
What went wrong: Could not resolve all dependencies for configuration ':compileClasspath'.
Could not resolve com.sleepycat:je:7.0.6. Required by:
org.jpos:jpos:2.0.8
Could not resolve com.sleepycat:je:7.0.6.
Could not get resource 'http://repo.maven.apache.org/maven2/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Could not GET 'http://repo.maven.apache.org/maven2/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Connect to repo.maven.apache.org:80 [repo.maven.apache.org/151.101.20.215] failed: Connection timed out:
connect
Could not resolve com.sleepycat:je:7.0.6.
Could not get resource 'http://jpos.org/maven/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Could not GET 'http://jpos.org/maven/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Connect to jpos.org:80 [jpos.org/52.7.83.125] failed: Connection timed out: connect
Could not resolve com.sleepycat:je:7.0.6.
Could not get resource 'http://download.oracle.com/maven/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Could not GET 'http://download.oracle.com/maven/com/sleepycat/je/7.0.6/je-7.0.6.pom'.
Connect to download.oracle.com:80 [download.oracle.com/23.50.225.25, download.oracle.com/23.50.225.9]
failed: Connection timed out: connect
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

sleepycat version 7.0.6 is not in the main maven repo, you need to add oracle maven repo to your pom:
<repositories>
<repository>
<id>oracleReleases</id>
<name>Oracle Released Java Packages</name>
<url>http://download.oracle.com/maven</url>
<layout>default</layout>
</repository>
</repositories>
This goes outside the dependencies tag, directly under de project tag.

Add this code in pom.xml
<repositories>
<repository>
<id>oracle</id>
<name>Oracle repo</name>
<url>http://download.oracle.com/maven</url>
</repository>
</repositories>

Or You could ignore sleepy cat dependency
<dependency>
<groupId>org.jpos</groupId>
<artifactId>jpos</artifactId>
<version>2.1.0</version>
<exclusions>
<exclusion>
<groupId>com.sleepycat</groupId>
<artifactId>je</artifactId>
</exclusion>
</exclusions>
</dependency>

Just use jpos 1.9.2. Thats the last stable release eitherway

Related

Not able to download TibjmsConnectionFactory dependency

From where can I get TibjmsConnectionFactory dependency? I want to use TibjmsConnectionFactory in my Springboot application to publish and receive message in tibco EMS
You could try this:
First, add this to your pom.xml
<repositories>
<repository>
<id>tibjms</id>
<url>http://repository.openmindonline.it/</url>
</repository>
</repositories>
and then dependency
<dependency>
<groupId>tibco-ems</groupId>
<artifactId>tibjms</artifactId>
<version>4.1</version>
</dependency>
There is a newer version from this repository but it looks like it cannot be accessed publicly.
It's available in maven repository. https://mvnrepository.com/artifact/com.tibco/tibjms
latest available version on March 2021 is 8.38.3
<!-- https://mvnrepository.com/artifact/com.tibco/tibjms -->
<dependency>
<groupId>com.tibco</groupId>
<artifactId>tibjms</artifactId>
<version>8.38.3</version>
</dependency>
if 8.38.3 is not working try 6.3.0 (it was problem with repo not sure if fixed already)
Please note that you also can get your current TibcoEMS version jars from EMS server C:\tibco\ems\8.2\lib
and then upload them to your local repo.
tibjms.jar is the jar contains TibjmsConnectionFactory class
mvn install:install-file -Dfile=tibjms.jar -DgroupId=com.tibco.ems -DartifactId=tibjms -Dversion=8.2 -Dpackaging=jar -DgeneratePom=true
<dependency>
<groupId>com.tibco</groupId>
<artifactId>tibjms</artifactId>
<version>8.38.3</version>
</dependency>
This is the latest version.

Spring Jersey - java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map

UPDATE: So I just want to point out that before I submitted this question, I attempted the solution that I've seen on similar stackoverflow questions such as this one. It was still giving me runtime errors, so I decided to write this question. mvn dependency:tree is what I was looking for so thanks #dunni. With mvn dependency:tree, I was able to find the actual name of the jersey dependency that was breaking my application and updated the exclusion by changing it from:
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
To:
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
</exclusions>
This works now.
For the longest time, I've been working on this Spring Jersey REST application using 1 internal company repository. Now, I found out that a library I need to use only exists in a 2nd internal company repository. I updated my .m2 -> settings.xml configuration to add the reference to the new repo like so:
<settings>
<mirrors>
<mirror>
<id>internal-repository1</id>
<name>name</name>
<url>http://repo1.company.com/repositories/</url>
<mirrorOf>*, !repo2</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>profile</id>
<repositories>
<repository>
<id>repo1</id>
<name>repo1</name>
<url>http://repo1.company.com/repositories/</url>
</repository>
<repository>
<id>repo2</id>
<name>repo2</name>
<url>http://repo2.company.com/respositories/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>profile</activeProfile>
</activeProfiles>
</settings>
This works. I can see in the System.out that it attempts to download the repo2 exclusive dependency from repo1.company.com/repositories/. It fails, then it attempts to download it from repo2.company.com/repositories and it succeeds. The build continues, and eventually tomcat gets started up on localhost:8080 and everything is fine.
The problem is, whenever I try to access any of my Jersey REST endpoints I've set up, I get the runtime error mentioned in the question title:
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[my.package.name]
- Allocate exception for servlet my.package.name.JerseyConfig
java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
I know for a fact that the issue lies somewhere in this new dependency I'm trying to use. When I comment out the dependency in my pom.xml, and re run the application, everything works fine. All REST endpoints are functional. Uncomment the dependency, re-run the application, and try to access my REST endpoints, and I get the above error.
How do I go about finding out why this dependency is breaking my Jersey application at runtime?
By Seeing the error I can guess that there are some conflicts in jar files Please check if you have a both a JAX-RS 1 and JAX-RS 2 jar on the classpath. Jersey 2 uses JAX-RS 2 (javax.ws.rs-api-2.0.1.jar), but if you have the jsr311-api.jar also, which is JAX-RS 1, there is a javax.ws.rs.core.Application in each jar. But the jsr311-api Application doesn't have the method getProperties().
I got the same Exception, altough it was on different dependencies:
I got to change my sql driver version:
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.2.jre8</version>
</dependency>
Before, I was using version 6.1.0.jre8. Here I got the clue.

Maven can't resolve the dependency it just found

Maven must be losing its mind.
I added a dependency using Netbeans Add Dependency dialog. I searched for jax-rs-ri. It updated the index from central and showed several versions of jax-rs-ri. I selected 1.9.1 and it added this to the pom.xml:
<dependency>
<groupId>com.sun.jersey.ri</groupId>
<artifactId>jax-rs-ri</artifactId>
<version>1.9.1</version>
</dependency>
Looks right, but when I build I get the following error:
Failed to execute goal on project reply-to.test-web:
Could not resolve dependencies for project jms:reply-to.test-web:war:1.0-SNAPSHOT:
Could not find artifact com.sun.jersey.ri:jax-rs-ri:jar:1.10-b03 in
central (http://repo1.maven.org/maven2) -> [Help 1]
I've also tried changing the repository the following with the same results:
<repositories>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2</url>
<layout>default</layout>
</repository>
</repositories>
This was working earlier today. Did something just get broken with Maven?
In these cases it's worth to check the local repository (usually c:\Users\<username>\.m2\repository\com\sun\jersey\ri\jax-rs-ri or /home/<username>/.m2/repository/com/sun/jersey/jax-rs-ri) and Central:
http://search.maven.org/#artifactdetails|com.sun.jersey.ri|jax-rs-ri|1.9.1|pom
(The important part now is the "Available Downloads" table.)
So, there isn't any jar file just a zip (and the POM). You should use <type>zip</type> in your dependency like this:
<dependency>
<groupId>com.sun.jersey.ri</groupId>
<artifactId>jax-rs-ri</artifactId>
<version>1.9.1</version>
<type>zip</type>
</dependency>
Since it's a zip maybe you want to unpack it. This answer could help: Unzip dependency in maven
Please note that 1.9.1 is not the latest jax-rs-ri version and your Maven uses 1.10-b03. If you want to force it to use 1.9.1 you have to use <version>[1.9.1]</version> inside the dependency tag.

Access Spring Web Flow snapshot version using Maven

I need to try the current snapshot version 2.3.1 of Spring Web Flow in my project, hoping it will fix this bug for me. I have read the documentation on how to access nightly builds and added the following to my pom.xml:
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<version>2.3.1.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-faces</artifactId>
<version>2.3.1.BUILD-SNAPSHOT</version>
</dependency>
And the repository needed:
<repository>
<id>org.springsource.maven.snapshot</id>
<name>SpringSource Maven Central-compatible Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
But when I try a mvn clean install maven fails to resolve the dependencies:
*[ERROR] ... The following artifacts could not be resolved: org.springframework.webflow:spring-webflow:jar:2.3.1.BUILD-SNAPSHOT, org.springframework.webflow:spring-faces:jar:2.3.1.BUILD-SNAPSHOT ...
Am I missing something obvious? Am I using the wrong snapshot version? Is there a way to list the contents of the snapshot repository? Any hints are appreciated...
P.S.: I cross-posted this question on the SpringSource community forum and will of course post the answer here if I get it there.
I could not find the version of the snap shot you have in the dependency, Here are all the web flow snap shot down loads that I can see from spring source site http://static.springsource.org/downloads/nightly/snapshot-download.php?project=SWF
If you change the version tag in you'r pom.xml that will resolve the issue.
<version>2.3.0.BUILD-SNAPSHOT</version>

Maven cannot download Glassfish embedded package

I have a problem with maven. I wanted to add dependency to embedded Glassfish. I added an entry to pom.xml, containing a fragment copied from internet:
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
</dependency>
However, mvn package prints an error.
Access denied to: http://repository.jboss.org/maven2/org/glassfish/extras/glassfish-embedded-all/3.1/glassfish-embedded-all-3.1.pom -> [Help 1]
What is wrong?
Did you pointed to the right repository at you pom.xml file?
Insert this at the end of it, just before the last </project> tag:
<repositories>
<repository>
<id>glassfish-releases</id>
<url>http://download.java.net/maven/glassfish</url>
</repository>
</repositories>
Connecting to http://repository.jboss.org/maven2 per HTTP throws an 403 Forbidden error, as it is outdated.
This SO question has:
http://maven.glassfish.org/content/groups/glassfish
as the new URL.

Resources