[Tomcat, HTTPD, Servlets & JSP] - TSL javaMail by sending message problem
by este1212
Hi,
I kann sending emails über javamail in a j2se application with a main methode, just wenn I writte the same code in my ejb class, and I try to send the same email, that was already successful by a j2se application, hier then I have the failure.
I writte for you my javamail debug Infomationen by J2SE Application and bei J2EE application. By j2se was that sending successful, by j2ee application is a problem by TSL I think, I maked appropriate changes by mail-service.xml.
Hier Debug for j2se application:
-------------------------------------------------------------------------
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsys
tems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "mail.cs.tu-berlin.de", port 25, isSSL false
220 mailhost.cs.tu-berlin.de ESMTP Postfix
DEBUG SMTP: connected to host "mail.cs.tu-berlin.de", port: 25
EHLO meknes
250-mailhost.cs.tu-berlin.de
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
//Hier is korrekt, by jboss hier I have a problem!!!!!
STARTTLS
220 2.0.0 Ready to start TLS
EHLO meknes
250-mailhost.cs.tu-berlin.de
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate
AUTH LOGIN
334 VX34rt56bgh6
cjFkkbpopoutz=
334 UGFzc3dvcmQ6
Y2hlcmllMTI=
235 2.0.0 Authentication successful
DEBUG SMTP: use8bit false
MAIL FROM:<radouane(a)cs.tu-berlin.de>
250 2.1.0 Ok
RCPT TO:<estel1212(a)yahoo.fr>
250 2.1.5 Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: estel1212(a)yahoo.fr
DATA
354 End data with .
From: radouane(a)cs.tu-berlin.de
To: estel1212(a)yahoo.fr
Message-ID: <9971081.01168741860633.JavaMail.radouane@meknes>
Subject: attachment
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_25199001.1168741860423"
------=_Part_0_25199001.1168741860423
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Attachment Mail
------=_Part_0_25199001.1168741860423
Content-Type: application/octet-stream; name=filename
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=filename
-----------------------------------------------------------------------------
Now by J2ee application---I use jboss:
2007-01-14 03:27:28,769 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
2007-01-14 03:27:28,769 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
2007-01-14 03:27:28,769 INFO [STDOUT] DEBUG SMTP: trying to connect to host "mail.cs.tu-berlin.de", port 25
2007-01-14 03:27:28,909 INFO [STDOUT] 220 mailhost.cs.tu-berlin.de ESMTP Postfix
2007-01-14 03:27:28,909 INFO [STDOUT] DEBUG SMTP: connected to host "mail.cs.tu-berlin.de", port: 25
2007-01-14 03:27:28,909 INFO [STDOUT] EHLO meknes
2007-01-14 03:27:28,979 INFO [STDOUT] 250-mailhost.cs.tu-berlin.de
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 8BITMIME
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "SIZE", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "VRFY", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "ETRN", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "STARTTLS", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
2007-01-14 03:27:28,979 INFO [STDOUT] DEBUG SMTP: use8bit false
2007-01-14 03:27:28,979 INFO [STDOUT] MAIL FROM:<radouane(a)cs.tu-berlin.de>
2007-01-14 03:27:29,049 INFO [STDOUT] 250 2.1.0 Ok
2007-01-14 03:27:29,049 INFO [STDOUT] RCPT TO:<radouane(a)cs.tu-berlin.de>
2007-01-14 03:27:29,159 INFO [STDOUT] 554 5.7.1 <radouane(a)cs.tu-berlin.de>: Recipient address rejected: Access denied
2007-01-14 03:27:29,159 INFO [STDOUT] DEBUG SMTP: Invalid Addresses
2007-01-14 03:27:29,159 INFO [STDOUT] DEBUG SMTP: radouane(a)cs.tu-berlin.de
2007-01-14 03:27:29,159 INFO [STDOUT] DEBUG SMTP: Sending failed because of invalid destination addresses
2007-01-14 03:27:29,159 INFO [STDOUT] RSET
2007-01-14 03:27:29,229 INFO [STDOUT] 250 2.0.0 Ok
2007-01-14 03:27:29,229 INFO [STDOUT] QUIT
2007-01-14 03:27:29,229 INFO [STDOUT] Error Sending:
2007-01-14 03:27:29,229 INFO [STDOUT] Sending failed;
nested exception is:
class javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 554 5.7.1 <radouane(a)cs.tu-berlin.de>: Recipient address rejected: Access denied
2007-01-14 03:27:29,229 INFO [STDOUT] java.lang.NullPointerException
can someone tell me, where is my problem by j2ee application, it's a ejb class -using jboss-.
Thanks ,
Radouane
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001465#4001465
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001465
19 years, 3 months
[JBossWS] - EJB3 and JBossWS (JAXWS), is WSgen even needed for bottom to
by dwin
Hey guys
I relatively new to web services
I am deploying a stateless session bean (EJB 3.0) on JBoss 4.0.5 with JBossWS 1.2 (JAXWS). Bottom to top development.
I use the @WebService and @webmethod annotation on my EJB with no real config files (other than the application.xml). I deploy the EJB in a jar which is inside an EAR.
I've read some JAXWS (from Sun) and it seems that they use wsgen to generate the WSDL and request/response classes. However, I could deploy the EJB on Jboss with JBossWS 1.2 without doing the wsgen. The WSDL appears without me even generating it and the web service seems to work fine.
Basically, to deploy a webservice in the new JAXWS...all I really needed was to mark an EJB with @webservice annotation. No WSDL generation. No need for the response, request classes. I am not sure what goes on internally (run time generation of the handlers and WSDL).
>From reading the developer forums, there is work for wsimport but no mention of wsgen.
Basically, to do a bottom to top with EJB3.0 and the @webservice annotation...there is no need for wsgen? However, sun's tutorial for jaxws requires an invocation of wsgen to generate the wsdl and handler classes ( found here: http://www.netbeans.org/kb/50/jaxws20.html)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001460#4001460
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001460
19 years, 3 months
[Beginners Corner] - Re: Please help with EJB3 ClassCastException.
by kingcu
Here is the exception:
22:33:03,944 ERROR [[action]] Servlet.service() for servlet action threw exception
| java.lang.ClassCastException
| at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
| at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
| at com.kfi.was.actions.SponsorAction.list(SponsorAction.java:51)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:266)
| at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:167)
| at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
| at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
| at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ClassCastException: $Proxy79
| at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
| ... 33 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001454#4001454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001454
19 years, 3 months
[JCA/JBoss] - shouldn't local-tx-datasource have auto-commit = false?
by jhudson
Hello,
I am using the configuration below (local-tx-datasource) because I would like to use transactions. Based on the documentation found here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
I would assume that the connections would have auto-commit set to false (as an exception will occur if I try to call setAutoCommit on the java.sql.Connection I retrieve from the datasource).
I receive the following error
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
Why is autocommit=true? I don't understand... How can I change that?
I am using jboss-4.0.5 (default)
<local-tx-datasource>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<jndi-name>jdbc/MyAdBox</jndi-name>
<connection-url>
jdbc:mysql://localhost/mydb?autoReconnectForPools=true&dumpQueriesOnException=true&useServerPrepStmts=false
</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>****</user-name>
****
<idle-timeout-minutes>10</idle-timeout-minutes>
<min-pool-size>0</min-pool-size>
<max-pool-size>100</max-pool-size>
<exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
<!-- valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name -->
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
Thank you very much for any help you might be able to offer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001451#4001451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001451
19 years, 3 months