Comments (22)
You seem to have an old version of com.sun.mail:imap
on your classpath - try using a more recent version (e.g. 1.5.6).
from spring-integration-samples.
This also happens when you are using javax.mail
standalone with spring-boot-starter-mail
. com.sun.mail:imap
uses javax.mail
(v.1.5.6) internally. When you are using javax.mail
version other than 1.5.6
, you have 2 version of the IMAPFolder
(one from com.sun.mail
and other from javax.mail
) in your dependency tree. Maven will resolve this conflict by choosing IMAPFolder
from javax.mail
which does not contain theidle()
method. This causes the java.lang.NoSuchMethodError
exception.
Solution
You can update the version of javax.mail
to 1.5.6
to make it compliant with com.sun.mail:imap
from spring-integration-samples.
Hi Rohan,
Yes, we are using javax.mail standalone. https://mvnrepository.com/artifact/javax.mail/mail/1.4.7
Should I replace it with https://mvnrepository.com/artifact/com.sun.mail/javax.mail/1.5.6 ?
Thanks,
Pankaj
from spring-integration-samples.
No, replacement. You should declare like:
compile "javax.mail:javax.mail-api:1.5.6"
compile "com.sun.mail:javax.mail:1.5.6"
compile "com.sun.mail:imap:1.5.6"
from spring-integration-samples.
@pankajkh I had the same issue, so updating the version of javax.mail
to 1.5.6
my pom.xml
fixed this
from spring-integration-samples.
@artembilan : Can you please provide more detail ? How it will fix the issue.
@rohangulati : there is no version 1.5.6 to upgrade for jar (javax.mail:mail). I need to replace with other jar (com.sun.mail:javax.mail).
from spring-integration-samples.
@pankajkh You should use https://mvnrepository.com/artifact/javax.mail/javax.mail-api/1.5.6
from spring-integration-samples.
One more time:
javax.mail:javax.mail-api:1.5.6
not
javax.mail:javax.mail:1.5.6
The impl is in the com.sun.mail:javax.mail:1.5.6
.
from spring-integration-samples.
Thanks a lot, got it now.
from spring-integration-samples.
Hi all
iam getting same error
javax.mail:javax.mail-api:1.5.6
here no like idle() in this api
{
javax.mail:javax.mail:1.5.6
here idle() method there
}
uisng this api
from spring-integration-samples.
can you give clarity which api i have to use to remove this error
Exception in thread "Thread-2" java.lang.NoSuchMethodError: com.sun.mail.imap.IMAPFolder.idle()V
at com.uralian.cgiats.EmailAccess$IdleThread.run(EmailAccess.java:267)
from spring-integration-samples.
You must still have an incompatible imap jar on the class path somehow. Run the jvm with -verbose
to see which jar IMAPFolder
is being loaded from.
from spring-integration-samples.
IMAPFolder class is only there in javax.mail:javax.mail:1.5.6
not in javax.mail:javax.mail-api:1.5.6
in run time it's not picking the idle() method it's there in IMAPFolder in javax.mail:javax.mail:1.5.6
where can i add to pick this jar
from spring-integration-samples.
As I said -verbose
is your friend.
Or, perhaps you are running in an app server that has an old javamail.
from spring-integration-samples.
i am running this application as standalone by using this jar https://mvnrepository.com/artifact/javax.mail/javax.mail/1.6.0 this not web app
from spring-integration-samples.
What version of Spring Integration? 5.1.1 uses javamail 1.6.2 and works fine.
Show your complete POM.
from spring-integration-samples.
this is spring version
<spring.version>4.3.8.RELEASE</spring.version>
from spring-integration-samples.
I asked for spring-integration version.
from spring-integration-samples.
means i did't get you
from spring-integration-samples.
This is becoming tedious; as I said
Show your complete POM.
from spring-integration-samples.
we are not using spring integaration
from spring-integration-samples.
So why are you asking this question in a Spring Integration GitHub issue?
from spring-integration-samples.
Related Issues (20)
- JSON or Pipe(|) based DSL for dynamic flow generation in Spring Integration HOT 1
- why @ConditionalOnBean annotation does't work well on the bean which annotated @@MessagingGateway ? HOT 1
- What is required to make DynamicTcpClientApplication also return data with the send interface? HOT 2
- Investigate Failing Test in tcp-client-server-multiplex
- SFTP delegation example HOT 8
- Only accepts one instance of multipart file not an array of multipart file HOT 7
- Add examples for using SI with Project Reactor HOT 4
- Project Structure - Reorganize in favor of JavaDSL and Reactive support HOT 12
- How to import and compile the project locally HOT 1
- Can add the sample code of mqttv5 in spring.integration.samples.basic.mqttv5? HOT 1
- How do I create multiple MQTTClients and generate messages using Spring-Integration-MQTT? HOT 1
- Why getClientInstance is used for inbound and getAsyncClientInstance is used for outbound to get synchronous and asynchronous clients. HOT 5
- Trying to find code examples on Spring Integration scatter gather HOT 3
- How to set up apply-sequence=true through xml configuration HOT 1
- Server-side logging seems to be broken HOT 2
- IMAP with OAuth 2 authentication HOT 8
- Payload Enricher with request-payload-expression="payload.username" HOT 10
- LoanBrokerSharkDetectorDemo.java:48: error: cannot find symbol HOT 1
- sftp - outbound transfer test doesn't work for embedded server HOT 6
- Sample projects to not compile with maven due to lack of <java.version/> property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-integration-samples.