Following is our progress-
Installed openfire server on Amazon Ubuntu instance.
Developing Android client app using smack 4.1.3 lib.
We have developed Registration and Login module till now.
Issue we are facing-
Now that we are trying to develop chat module following package is failing to import- "org.jivesoftware.smack.chat".
However documentation mentions that such package exist. He expanded jar file to find that no such package exist.
Please help!
Please follow this, the question in the link is quite self explanatory.
I had the same problem. Adding the smack-im maven dependency to my pom.xml fixed the problem.
http://mvnrepository.com/artifact/org.igniterealtime.smack/smack-im/4.1.7
Edit: Here is the dependency I used for version 4.1.7:
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-im</artifactId>
<version>4.1.7</version>
</dependency>
Related
We are developing Spring Boot application that is using MongoDB as storage.
And we want to add to our project the DB migration tool: mongock.
in pom.xml I added a new dependency:
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongock-spring</artifactId>
<version>3.3.2</version>
</dependency>
And IntelliJ Idea advised me to add the following lines to module-info.java:
requires mongock.spring;
requires mongock.core;
After that I am not able anymore to build the project, I am getting the following error:
Module 'com.acme.project-name' reads package 'com.github.cloudyrock.mongock' from both 'mongock.spring' and 'mongock.core'
I do not know a lot about Java 9 Modularity, that why I am stuck with resolving this issue, please advice.
If it's worth solving this issue one could upgrade to the latest release of the artifact.
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongock-spring</artifactId>
<version>4.0.1.alpha</version>
</dependency>
You can understand what the issue means over this and this Q&A.
If you were to analyze the issue, you could straightforward notice that with the version 3.3.2, there are two artifacts that are brought in as a dependency under external libraries - mongock-spring and mongock-core. Further, if you look at the JARs, you would see their package structure is the same( i.e. both have classes within com.github.cloudyrock.mongock) and that is the reason for conflict that you see while they both are introduced in the modulepath.
Edit: Extended discussions to be moved over to #mongock/issues/212.
I am migration Java Web Application from jboss 6.0 to wildfly 11. I am getting
"java.lang.ClassCastException: __redirected.__XMLInputFactory cannot
be cast to org.codehaus.stax2.XMLInputFactory2" while running the code
on wildfly 11.0.0.Final. Junit tests are working without error.
Looks like there is some dependency issue in wildfly but unable to find any solution. Appreciate any help to resolve this issue..
I have included following woodstox dependencies in pom.
woodstox-core-asl 4.4.1
stax2-api 3.1.4
Thanks
Sanjay
This is caused by duplicate classes in the classpath.
Wildfly ships stax2-api as part of the woodstocks module, see modules/system/layers/base/org/codehaus/woodstox/main/ in the wildfly dist folder.
If you also have it in your application's lib folder, this will cause issues.
The solution is to either set the dependency to <scope>provided</scope> (or build) in pom.xml, or if you really need a special version, exclude wildfly's module via jboss-deployment-structure.xml.
See https://docs.jboss.org/author/display/WFLY10/Class+Loading+in+WildFly for more information on classloading in Wildfly.
Attempting to migrate from aem6.0SP3 to 6.2 throws an error while compiling our project:
missing requirement [ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))
Unresolved requirements: [[ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))]
We do not see the library referenced in our pom.xml even when we do dependency:tree, any suggestion?
Update: missing twitter4j v.3.0.5 but mvn repo does not have it
Make sure you are using the latest ACE Commons package for 6.2. You can download the relevant version from:
https://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/uber-jar/
Note that there is a new version of Uber-Jar for 6.2 SP1 so make sure you are using the correct version.
Twitterfj is not a part of Adobe public repo but if you really want it, you can download it from here:
https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.twitter4j/releases/tag/com.adobe.acs.bundles.twitter4j-1.0.0
More information is available at:
http://adobe-consulting-services.github.io/acs-aem-commons/features/twitter.html
I am trying to upgrade from dozer 5.2.2 to 5.3.2, I am getting the following error
java.lang.NoClassDefFoundError: Could not initialize class org.dozer.DozerBeanMapper
It is there in the classpath and build.xml files, I just changed all references in my workspace from 5.2.2 to 5.3.2, I did similar thing while upgrading from 5.1 to 5.2.2, and it worked.
Any help is appreciated.
Thanks.
I had the same problem, and actually, the only way I found is to use an older version of Dozer as you seem to do. We tried a bigger update (4.2 -> 5.3.2) than you.
I precise that I only change the dependency in my pom.xml to make it work on my application server (WASCE), to resume:
Working:
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.2.2</version>
</dependency>
Not working:
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.3.2</version>
</dependency>
Even if we access to DozerBeanMapperSingletonWrapper :
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.dozer.DozerBeanMapper
at org.dozer.DozerBeanMapperSingletonWrapper.getInstance(DozerBeanMapperSingletonWrapper.java:43)
The DozerBeanMapper constructor called is DozerBeanMapper(List mappingFiles), it could have been a bug inside. But the call to the simple constructor DozerBeanMapper() has the same result in our own classes.
Maybe a dependency is missing between the two versions...
Note that there is no problem on Eclipse with 5.3.2 version, so it can also be a class loader problem...
Hope this will highlight the source of the problem.
5.3.2 is using org.slf4j.Logger:
http://grepcode.com/file/repo1.maven.org/maven2/net.sf.dozer/dozer/5.3.2/org/dozer/DozerBeanMapper.java/
You are probably missing this library, which was not used in 5.2.2, where commons-logging were used: http://grepcode.com/file/repo1.maven.org/maven2/net.sf.dozer/dozer/5.2.2/org/dozer/DozerBeanMapper.java/
My dozer & dozer-spring version is 5.5.1.
Had the following error: "NoClassDefFoundError: org.dozer.stats.GlobalStatistics (initialization failure)". I was using commons-lang version 2.6 only in my dependencies.
Solved the problem by adding commons-lang3 dependency also. It is clear that there is a tight dependency in dozer on the version 3 of commons-lang library.
Our standard module file is: Myproject.gwt.xml
We have added an extra modulefile for fast compilation called:
MyprojectWork.gwt.xml
When deploying to GAE, it compiles both Myproject.gwt.xml and
MyprojectWork.gwt.xml.
How to exclude MyprojectWork.gwt.xml from the compile, when deploying
to GAE ?
Config:
GWT SDK 1.7.0
Google Plugin for Eclipse 3.5
GAE SDK 1.2.2
If you use Maven than this may solve your problem: stackoverflow #1745315