Re: Problems using JavaMail within hosted mode in Eclipse
Sorry, but I haven't used Maven and can't help you with that. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problems using JavaMail within hosted mode in Eclipse
Hello i faced with problem: javax.mail.NoSuchProviderException: smtp at javax.mail.Session.getService(Session.java:798) under running application in hosted mode. Can you give advise to me on fix this issue? but I cant understand how to add special jar to bootstrap with gwt-maven-plugin. I am trying this: org.codehaus.mojo *gwt*-*maven*-*plugin* 2.4.0 compile com.db.dbtracer.paymentstp.webapp.PaymentsManagementApplication PaymentsManagementApplication.html true 1 true ${project.build.directory}/${project.build.finalName}/WEB-INF/classes -cp ${project.build.directory}/${project.build.finalName}/WEB-INF/lib/mail-1.4.4.jar -Dapp.config=${project.build.outputDirectory}/etc/localhost.properties -Dnc.log4j.configuration=file:/${project.build.outputDirectory}/etc/log4j.xml -Dlog4j.debug But it’s not make sense to me. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problems using JavaMail within hosted mode in Eclipse
Hi, I was having the same problem and found solution. 1. Go to Run configurations. 2. Classpath 3. Add mail.jar from your WEB-INF\lib to the Bootstrap entries 4. Make it first. Thats it. If that doesn't help, also try to add activation.jar. -Ari Luoma torstai, 21. kesäkuuta 2012 13.39.39 UTC+3 Ryan McFall kirjoitti: > > In trying to configure an SMTPAppender for use with log4j so that error > reports on the server can be emailed out, I ran into difficulties getting > JavaMail to work correctly. I found many posts indicating that the problem > is either: > >1. multiple copies of the JavaMail classes in the classpath >2. issues with classloaders, related to the servlet container > > To isolate the problem, I created a sample webapp using the GWT Eclipse > plugin, and modified the auto-generated server-side greet method to log an > error message, with an appropriately configured log4j.properties file. The > only two jar files in the WEB-INF/lib folder are the log4j-1.2.17.jar, > mail.jar and gwt-servlet.jar files. The AppEngine is not being used; I've > seen the docs that mention that the AppEngine jar file contains > implementations of the javax.mail classes, and that both the AppEngine jar > and mail.jar should not be present in the classpath. > > Using this configuration, when the log4j implementation tries to log an > error message, the following debug info and stack trace is produced: > > DEBUG: getProvider() returning > javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun > Microsystems, Inc] > > java.lang.NoSuchMethodException: : > com.sun.mail.smtp.SMTPTransport.(javax.mail.Session, > javax.mail.URLName) > > along with an error message indicating that the SMTP provider can't be > found: > > javax.mail.NoSuchProviderException: smtp > > However, I found that if I compile and deploy a much more complicated > application with basically the same configuration to a Tomcat server, it > works as expected. This makes me suspect that the embedded server somehow > contains mail.jar in its runtime classpath (I can't reference the classes > in javax.mail in my project unless I include mail.jar in the classpath, so > I'm positive they don't exist anywhere else in my project). But, if I > remove mail.jar from the WEB-INF lib directory and try to do a > Class.forName on, say, javax.mail.Address, it can't be found. > > Anyone have any ideas why this works when I deploy it, but not when > running within Eclipse? > > Thanks, > Ryan > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/SzzV05q8cckJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problems using JavaMail within hosted mode in Eclipse
Hi, I am running to the same issue. Have you found solution for this? -Ari -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/O9etU2hkeNMJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Problems using JavaMail within hosted mode in Eclipse
In trying to configure an SMTPAppender for use with log4j so that error reports on the server can be emailed out, I ran into difficulties getting JavaMail to work correctly. I found many posts indicating that the problem is either: 1. multiple copies of the JavaMail classes in the classpath 2. issues with classloaders, related to the servlet container To isolate the problem, I created a sample webapp using the GWT Eclipse plugin, and modified the auto-generated server-side greet method to log an error message, with an appropriately configured log4j.properties file. The only two jar files in the WEB-INF/lib folder are the log4j-1.2.17.jar, mail.jar and gwt-servlet.jar files. The AppEngine is not being used; I've seen the docs that mention that the AppEngine jar file contains implementations of the javax.mail classes, and that both the AppEngine jar and mail.jar should not be present in the classpath. Using this configuration, when the log4j implementation tries to log an error message, the following debug info and stack trace is produced: DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] java.lang.NoSuchMethodException: : com.sun.mail.smtp.SMTPTransport.(javax.mail.Session, javax.mail.URLName) along with an error message indicating that the SMTP provider can't be found: javax.mail.NoSuchProviderException: smtp However, I found that if I compile and deploy a much more complicated application with basically the same configuration to a Tomcat server, it works as expected. This makes me suspect that the embedded server somehow contains mail.jar in its runtime classpath (I can't reference the classes in javax.mail in my project unless I include mail.jar in the classpath, so I'm positive they don't exist anywhere else in my project). But, if I remove mail.jar from the WEB-INF lib directory and try to do a Class.forName on, say, javax.mail.Address, it can't be found. Anyone have any ideas why this works when I deploy it, but not when running within Eclipse? Thanks, Ryan -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tCjp7_JZ5WAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.