Javamail deadlock
Please help me.
I have searched everywhere in this forum but I got no answer to my problem so I have decided to make a new post.
I have been getting this error for a 8days now. I am trying to send an email using Javamail API but Transport.send() and(or) Transport.sendMessage() leads to a deadlock. This is a web application. when the client submits a feedback we would like to send him an email confirmation. But then that page keep running forever. I have tried all but nothing works for me. The weird is that when I turn off tomcat the message is delivered.
Here is the code
public class MailUtil
public static void sendMail(String to, String from,
String subject, String body, boolean bodyIsHTML)
throws MessagingException
// 1 - get a mail session
//Properties props = new Properties();
Properties props = System.getProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", smtpserver)
props.put("mail.smtp.port", 2525);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.connectiontimeout","20000");
props.put("mail.smtp.timeout","40000");
props.put("mail.smtp.quitwait", "false");
// create some properties and get the default Session
Session session = Session.getInstance(props, new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(authemail, authpassword);
session.setDebug(true);
// 2 - create a message
Message message = new MimeMessage(session);
java.util.Date today=new java.util.Date();
message.setSentDate(today);
message.setSubject(subject);
if (bodyIsHTML)
message.setContent(body, "text/html");
else
message.setText(body);
// 3 - address the message
message.setFrom(new InternetAddress(from));
message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
// 4 - send the message
Transport.send(message);
this how I called it: MailUtil.sendMail(to, from, subject, body, isBodyHTML);
props.put("mail.smtp.connectiontimeout","20000");
props.put("mail.smtp.timeout","40000");
props.put("mail.smtp.quitwait", "false");
was just to see if the problem will be solved but no way
Please help me
Crossposted in the JavaMail forum : [http://forums.sun.com/thread.jspa?threadID=5399984&tstart=0]
Similar Messages
-
Javamail deadlock : Please help
Please help me.
I have searched everywhere in this forum but I got no answer to my problem so I have decided to make a new post.
I have been getting this error for a 8days now. I am trying to send an email using Javamail API but Transport.send() and(or) Transport.sendMessage() leads to a deadlock. This is a web application. when the client submits a feedback we would like to send him an email confirmation. But then that page keep running forever. I have tried all but nothing works for me. The weird is that when I turn off tomcat the message is delivered.
Here is the code
public class MailUtil
public static void sendMail(String to, String from,
String subject, String body, boolean bodyIsHTML)
throws MessagingException
// 1 - get a mail session
//Properties props = new Properties();
Properties props = System.getProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", smtpserver)
props.put("mail.smtp.port", 2525);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.connectiontimeout","20000");
props.put("mail.smtp.timeout","40000");
props.put("mail.smtp.quitwait", "false");
// create some properties and get the default Session
Session session = Session.getInstance(props, new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(authemail, authpassword);
session.setDebug(true);
// 2 - create a message
Message message = new MimeMessage(session);
java.util.Date today=new java.util.Date();
message.setSentDate(today);
message.setSubject(subject);
if (bodyIsHTML)
message.setContent(body, "text/html");
else
message.setText(body);
// 3 - address the message
message.setFrom(new InternetAddress(from));
message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
// 4 - send the message
Transport.send(message);
this how I called it: MailUtil.sendMail(to, from, subject, body, isBodyHTML);
props.put("mail.smtp.connectiontimeout","20000");
props.put("mail.smtp.timeout","40000");
props.put("mail.smtp.quitwait", "false");
was just to see if the problem will be solved but no way
Please help meI think that you've posted this to the wrong forum. I suggest you try the JavaMail forum: http://forum.java.sun.com/forum.jsp?forum=43
-
Is there any problem to use multiple threads to send email with JavaMail
Dear all,
I am using JavaMail 1.3.2 to send emails with SMTP, it works very well for a long time.
But one day, I found that the email service hanged and I could never send email again until I restart the tomcat. I found that the reason was a deadlock had been created, the required resource for sending email had not been released.
I guess the error is due to multiple threads are sending email at the same time. I made a test to create seperate thread for sending each email. After few days, I found this deadlock happened again. So, my question is: Can I use JavaMail with multiple threads? If not, I may need to sychronized all the thread that using JavaMail. I would like to make sure this is the reason for causing the deadlock problem.
Here is part of my code for using JavaMail:
transport = session.getTransport("smtp");
transport.connect(email_host, smtp_user, smtp_pass);
message.saveChanges();
transport.sendMessage(message,message.getAllRecipients());
which is very standard call, and it worked well for a long time.
Here is part for my thread dump on tomcat:
(Thread-339)
- waiting to lock <0x5447c180> (a sun.nio.cs.StandardCharsets)
(Thread-342)
- locked <0x5447c180> (a sun.nio.cs.StandardCharsets)
It seems that these happened after call the method transport.sendMessage() or message.updateChanges()
, and the underlying implementation may require the JRE StandardCharsets object. But the object had been locked and never be released. So, the sendMessage() or updateChanges() can't be completed.
Please give me some helps if you have any idea about it.
Thanks very much!
SiriusNote that the Nightly build gets updated daily (and sometimes more than once in case of a respin) and it is always possible that something goes wrong and it doesn't work properly, so be prepared for issues if you decide to stay with the Nightly build and make sure to have the current release with its own profile installed as well in case of problems.
See also:
* http://kb.mozillazine.org/Testing_pre-release_versions
*http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
*http://kb.mozillazine.org/Shortcut_to_a_specific_profile
*http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox -
Error-Code: ora-4020 Deadlock error, while updating a record
Hello!
Is it possible to get a deadlock error when two or more users try to update the same record simultaneously? And what would be the best solution to circumvent this?
Thanks
Your help is appreciated.<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ( vidya):
Hello Vidhya,
Issue either Commit or Rollback without much delay once the statement(s) is/are executed.
vmkrish
[email protected]
Is it possible to get a deadlock error when two or more users try to update the same record simultaneously? And what would be the best solution to circumvent this?
Thanks
Your help is appreciated.<HR></BLOCKQUOTE>
null -
ORA-00060: Deadlock detected
I getting error as "ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/.................". Following are my observations on the occurence of this error.
The deadlock is encountered first time when trying to login to applications. I have R12 vision instance on linux.
Following the content of the alert_VIS.log file
Mon Jun 15 04:41:41 2009
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as /d01/oracle/VIS/db/tech_st/10.2.0/dbs/arch
Autotune of undo retention is turned on.
IMODE=BR
ILAT =44
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
System parameters with non-default values:
tracefiles_public = TRUE
processes = 200
sessions = 400
timed_statistics = TRUE
shared_pool_size = 419430400
shared_pool_reserved_size= 41943040
nls_language = american
nls_territory = america
nls_sort = binary
nls_date_format = DD-MON-RR
nls_numeric_characters = .,
nls_comp = binary
nls_length_semantics = BYTE
sga_target = 1073741824
control_files = /d01/oracle/VIS/db/apps_st/data/cntrl01.dbf, /d01/oracle/VIS/db/apps_st/data/cntrl02.dbf, /d01/oracle/VIS/db/apps_st/data/cntrl03.dbf
db_block_checksum = TRUE
db_block_size = 8192
compatible = 10.2.0
log_buffer = 14251008
log_checkpoint_interval = 100000
log_checkpoint_timeout = 1200
db_files = 512
log_checkpoints_to_alert = TRUE
dml_locks = 10000
undo_management = AUTO
undo_tablespace = APPS_UNDOTS1
db_block_checking = FALSE
O7_DICTIONARY_ACCESSIBILITY= FALSE
session_cached_cursors = 500
utl_file_dir = /usr/tmp, /usr/tmp, /d01/oracle/VIS/db/tech_st/10.2.0/appsutil/outbound/VIS_oracleebsr12, /usr/tmp
plsql_native_library_dir = /d01/oracle/VIS/db/tech_st/10.2.0/plsql/nativelib
plsql_native_library_subdir_count= 149
plsql_code_type = native
plsql_optimize_level = 2
job_queue_processes = 2
systemtrig_enabled = TRUE
cursor_sharing = EXACT
parallel_min_servers = 0
parallel_max_servers = 8
background_dump_dest = /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump
user_dump_dest = /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump
max_dump_file_size = 20480
core_dump_dest = /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/cdump
db_name = VIS
open_cursors = 600
ifile = /d01/oracle/VIS/db/tech_st/10.2.0/dbs/VIS_oracleebsr12_ifile.ora
sortelimination_cost_ratio= 5
btree_bitmap_plans = FALSE
fastfull_scan_enabled = FALSE
sqlexecprogression_cost= 2147483647
likewith_bind_as_equality= TRUE
pga_aggregate_target = 1073741824
workarea_size_policy = AUTO
optimizer_secure_view_merging= FALSE
aq_tm_processes = 1
olap_page_pool_size = 4194304
Mon Jun 15 04:42:05 2009
WARNING:Oracle instance running on a system with low open file descriptor
limit. Tune your system to increase this limit to avoid
severe performance degradation.
PSP0 started with pid=3, OS id=6824
PMON started with pid=2, OS id=6822
MMAN started with pid=4, OS id=6826
DBW0 started with pid=5, OS id=6828
CKPT started with pid=7, OS id=6832
SMON started with pid=8, OS id=6834
RECO started with pid=9, OS id=6836
CJQ0 started with pid=10, OS id=6838
LGWR started with pid=6, OS id=6830
MMON started with pid=11, OS id=6840
MMNL started with pid=12, OS id=6842
Mon Jun 15 04:42:19 2009
ALTER DATABASE MOUNT
Mon Jun 15 04:42:25 2009
Setting recovery target incarnation to 2
Mon Jun 15 04:42:27 2009
Successful mount of redo thread 1, with mount id 243370348
Mon Jun 15 04:42:27 2009
Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
Mon Jun 15 04:42:28 2009
ALTER DATABASE OPEN
Mon Jun 15 04:42:48 2009
Thread 1 opened at log sequence 16
Current log# 3 seq# 16 mem# 0: /d01/oracle/VIS/db/apps_st/data/log3.dbf
Successful open of redo thread 1
Mon Jun 15 04:42:48 2009
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Mon Jun 15 04:42:48 2009
SMON: enabling cache recovery
Mon Jun 15 04:42:48 2009
Incremental checkpoint up to RBA [0x10.a779.0], current log tail at RBA [0x10.a779.0]
Mon Jun 15 04:43:01 2009
Successfully onlined Undo Tablespace 18.
Mon Jun 15 04:43:01 2009
SMON: enabling tx recovery
Mon Jun 15 04:43:04 2009
Database Characterset is UTF8
Mon Jun 15 04:43:18 2009
replication_dependency_tracking turned off (no async multimaster replication found)
Mon Jun 15 04:43:44 2009
Starting background process QMNC
QMNC started with pid=14, OS id=6884
Mon Jun 15 04:46:48 2009
Completed: ALTER DATABASE OPEN
Mon Jun 15 05:03:23 2009
Incremental checkpoint up to RBA [0x10.b1bd.0], current log tail at RBA [0x10.b1f3.0]
Mon Jun 15 05:23:33 2009
Incremental checkpoint up to RBA [0x10.b5b3.0], current log tail at RBA [0x10.b5c2.0]
Mon Jun 15 05:45:12 2009
Incremental checkpoint up to RBA [0x10.b7b0.0], current log tail at RBA [0x10.fbce.0]
This is upto the point where all DB and application services has been started.
Once trying to login to applications following content got appended to the log file
Mon Jun 15 05:53:39 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:53:51 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:02 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:12 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:22 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:28 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:35 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:54:42 2009
ORA-00060: Deadlock detected. More info in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/udump/vis_ora_8149.trc.
Mon Jun 15 05:59:06 2009
Process J000 died, see its trace file
Mon Jun 15 05:59:11 2009
kkjcre1p: unable to spawn jobq slave process
Mon Jun 15 05:59:11 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6838.trc:
Mon Jun 15 05:59:23 2009
Process J000 died, see its trace file
Mon Jun 15 05:59:24 2009
kkjcre1p: unable to spawn jobq slave process
Mon Jun 15 05:59:24 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6838.trc:
Mon Jun 15 05:59:50 2009
Process J000 died, see its trace file
Mon Jun 15 05:59:50 2009
kkjcre1p: unable to spawn jobq slave process
Mon Jun 15 05:59:50 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6838.trc:
I did the TKPROF on .trc files but the tkprof file does not show any details as such except similar to :- (don't know if I am missing anything while issuing TKPROF as $ tkprof filename.trc
filename.txt explain=apps/apps)
TKPROF: Release 10.2.0.3.0 - Production on Mon Jun 15 06:07:14 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6838.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
0 statements EXPLAINed in this session.
Trace file: /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6838.trc
Trace file compatibility: 10.01.00
Sort options: default
1 session in tracefile.
0 user SQL statements in trace file.
0 internal SQL statements in trace file.
0 SQL statements in trace file.
0 unique SQL statements in trace file.
22 lines in trace file.
0 elapsed seconds in trace file.
Yesterday, I did login to applications after multiple attempts and tried submitting a concurrent request of a standard report (after resolving the data block corrupt issue) and got the same ORA-00060 Error.
I have a fresh VISION R12 (12.0.4) installed without any customizations. My installation looks to be quite unstable, takes 2-3 attempts for successful login to apps.
Can you please give any clues on this and how to overcome the problem?
Thanks,
AmitI have run cmclean.sql as per :- Re: R12 Vision install - Unable to submit concurrent request
This is the only change made. No new patches etc. Before running cmclean.sql I believe the instance was working fine.
Now everytime I start the application services, its causing ORA=00060: Deadlock error. There are no issues with just DB services up and running.
And after apps services up, when trying to Login to apps it just hangs, get error as follows:
Tue Jun 23 02:04:55 2009
Process J001 died, see its trace file
Tue Jun 23 02:04:55 2009
kkjcre1p: unable to spawn jobq slave process
Tue Jun 23 02:04:55 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6747.trc:
Tue Jun 23 02:05:04 2009
Process q002 died, see its trace file
Tue Jun 23 02:05:04 2009
ksvcreate: Process(q002) creation failed
Tue Jun 23 02:05:55 2009
Process J000 died, see its trace file
Tue Jun 23 02:05:55 2009
kkjcre1p: unable to spawn jobq slave process
Tue Jun 23 02:05:55 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6747.trc:
Tue Jun 23 02:06:11 2009
Process J000 died, see its trace file
Tue Jun 23 02:06:11 2009
kkjcre1p: unable to spawn jobq slave process
Tue Jun 23 02:06:11 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6747.trc:
Tue Jun 23 02:08:51 2009
Process J000 died, see its trace file
Tue Jun 23 02:08:52 2009
kkjcre1p: unable to spawn jobq slave process
Tue Jun 23 02:08:52 2009
Errors in file /d01/oracle/VIS/db/tech_st/10.2.0/admin/VIS_oracleebsr12/bdump/vis_cjq0_6747.trc:
The OS also hangs (Linux) and I have to exit abnormally everytime which is frustrating.
I am not sure the reason for the same. I have gone through the metalink notes pointed which says to install the health check engine.
Do you have any clues based on above information as to what might be causing this problem.
I have 4 GB RAM installed on my Windows and 2 GB has been allocated to Linux on VMware.
Please let me know if I need to upgrade the memory.
Any pointers would be really helpful.
Thanks,
Amit -
Hi All,
<br/>
<br/>We are now facing some problems on our smartform printing programs, sometimes some of the smartform programs look getting stuck, from SM50, the processing time is endless, and from the detailed tracing log, there are repeated messages like below for every ONE MINUTE:
<br/>I WARNING: MtxLock 0x70000000636197c rrol0046 owner=33 deadlock ?
<br/>
<br/>I've searched the forum and also did google and SAP notes but can not get useful information match with my error, so could anyone please help to analyse what exact cause of this problem? Any suggestions is highly appreciated.
<br/>
<br/>The smartform program itself is simple and correct, just has one header and several items and uses normal SSF_FUNCTION_MODULE_NAME and CALL FNAME to do the print work, in most of time it works correct, but sometimes it just has problem and then the deadlock error occurred. I guess maybe it's because user tried to print too fast than the capability of the printer and then user canceled the job, then in some situations, the upcoming printing jobs get blocked and then get stuck, but it's just a guess, i've no proof to identify it.
<br/>
<br/>Here I attached the full trace log, hope someone could give me a idea, thank you very much!
<br/>
<br/>----
<br/>trc file: "dev_w38", trc level: 1, release: "701"
<br/>----
<br/>M Thu Dec 9 14:03:55 2010
<br/>M db_connect o.k.
<br/>M ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip
<br/>I MtxInit: 38 0 0
<br/>M SHM_PRES_BUF (addr: 0x700001050000000, size: 44000000)
<br/>M SHM_ROLL_AREA (addr: 0x700001060000000, size: 536870912)
<br/>M SHM_PAGING_AREA (addr: 0x700001080000000, size: 536870912)
<br/>M SHM_ROLL_ADM (addr: 0x700000006221000, size: 5506336)
<br/>M SHM_PAGING_ADM (addr: 0x7000010a0000000, size: 1311776)
<br/>M ThCreateNoBuffer allocated 544152 bytes for 1000 entries at 0x7000010b0002000
<br/>M ThCreateNoBuffer index size: 3000 elems
<br/>M ThCreateVBAdm allocated 11776 bytes (50 server) at 0x7000010d0000000
<br/>X EmInit: MmSetImplementation( 2 ).
<br/>X MM global diagnostic options set: 0
<br/>X EM/TOTAL_SIZE_MB = 262144
<br/>X mm.dump: set maximum dump mem to 96 MB
<br/>M Deactivate statistics hyper index locking
<br/>I *** INFO Shm 44 in Pool 40 18928 KB estimated 14500 KB real ( -4427 KB -24 %)
<br/>I *** INFO Shm 45 in Pool 40 12928 KB estimated 8500 KB real ( -4427 KB -35 %)
<br/>B dbntab: NTAB buffers attached
<br/>B dbntab: Buffer FTAB(hash header) (addr: 0x7000010b0088088, size: 584)
<br/>B dbntab: Buffer FTAB(anchor array) (addr: 0x7000010b00882d0, size: 1280008)
<br/>B dbntab: Buffer FTAB(item array) (addr: 0x7000010b01c0ad8, size: 5120000)
<br/>B dbntab: Buffer FTAB(data area) (addr: 0x7000010b06a2ad8, size: 122880000)
<br/>B dbntab: Buffer IREC(hash header) (addr: 0x7000010b7bd4088, size: 584)
<br/>B dbntab: Buffer IREC(anchor array) (addr: 0x7000010b7bd42d0, size: 1280008)
<br/>B dbntab: Buffer IREC(item array) (addr: 0x7000010b7d0cad8, size: 1280000)
<br/>B dbntab: Buffer IREC(data area) (addr: 0x7000010b7e452d8, size: 12288000)
<br/>B dbntab: Buffer STAB(hash header) (addr: 0x7000010b89ff088, size: 584)
<br/>B dbntab: Buffer STAB(anchor array) (addr: 0x7000010b89ff2d0, size: 1280008)
<br/>B dbntab: Buffer STAB(item array) (addr: 0x7000010b8b37ad8, size: 1280000)
<br/>B dbntab: Buffer STAB(data area) (addr: 0x7000010b8c702d8, size: 6144000)
<br/>B dbntab: Buffer TTAB(hash header) (addr: 0x7000010b924e088, size: 6720)
<br/>B dbntab: Buffer TTAB(anchor array) (addr: 0x7000010b924fac8, size: 1280008)
<br/>B dbntab: Buffer TTAB(item array) (addr: 0x7000010b93882d0, size: 3200000)
<br/>B dbntab: Buffer TTAB(data area) (addr: 0x7000010b96956d0, size: 23360000)
<br/>B db_con_shm_ini: WP_ID = 38, WP_CNT = 59, CON_ID = -1
<br/>B dbstat: TABSTAT buffer attached (addr: 0x7000010f002d2d0)
<br/>B dbtbxbuf: Buffer TABL (addr: 0x700001100000100, size: 180000000, end: 0x70000110aba9600)
<br/>B dbtbxbuf: Buffer TABLP (addr: 0x700000006763100, size: 20480000, end: 0x700000007aeb100)
<br/>B dbexpbuf: Buffer EIBUF (addr: 0x700000007aec108, size: 67108864, end: 0x70000000baec108)
<br/>B dbexpbuf: Buffer ESM (addr: 0x700001110000108, size: 4194304, end: 0x700001110400108)
<br/>B dbexpbuf: Buffer CUA (addr: 0x7000010bace2108, size: 18432000, end: 0x7000010bbe76108)
<br/>B dbexpbuf: Buffer OTR (addr: 0x700001120000108, size: 4194304, end: 0x700001120400108)
<br/>B dbcalbuf: Buffer CALE (addr: 0x70000000baee000, size: 500000, end: 0x70000000bb68120)
<br/>M CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
<br/>S *** init spool environment
<br/>S TSPEVJOB updates inside critical section: event_update_nocsec = 0
<br/>S initialize debug system
<br/>T Stack direction is downwards.
<br/>T debug control: prepare exclude for printer trace
<br/>T new memory block 0x114388060
<br/>S spool kernel/ddic check: Ok
<br/>S using table TSP02FX for frontend printing
<br/>S 1 spool work process(es) found
<br/>S frontend print via spool service enabled
<br/>S printer list size is 150
<br/>S printer type list size is 50
<br/>S queue size (profile) = 300
<br/>S hostspool list size = 3000
<br/>S option list size is 30
<br/>I *** INFO Shm 49 in Pool 40 2898 KB estimated 1632 KB real ( -1266 KB -44 %)
<br/>S found processing queue enabled
<br/>S found spool memory service RSPO-RCLOCKS at 0x7000010bbe77070
<br/>S doing lock recovery
<br/>S setting server cache root
<br/>S found spool memory service RSPO-SERVERCACHE at 0x7000010bbe78160
<br/>S using messages for server info
<br/>S size of spec char cache entry: 297032 bytes (timeout 100 sec)
<br/>S size of open spool request entry: 2512 bytes
<br/>S immediate print option for implicitely closed spool requests is disabled
<br/>A **GENER Trace switched on ***
<br/>A
<br/>A -PXA--
<br/>A PXA INITIALIZATION
<br/>A PXA: Locked PXA-Semaphore.
<br/>A System page size: 4kb, total admin_size: 237304kb, dir_size: 58960kb.
<br/>A Attached to PXA (address 0x700001130000000, size 3000000K, 4 fragments of 690676K )
<br/>A
<br/>A Thu Dec 9 14:03:59 2010
<br/>A abap/pxa = shared unprotect gen_remote
<br/>A PXA INITIALIZATION FINISHED
<br/>A -PXA--
<br/>A
<br/>A ABAP ShmAdm attached (addr=0x700000f4046c000 leng=20955136 end=0x700000f41868000)
<br/>A >> Shm MMADM area (addr=0x700000f40915418 leng=247168 end=0x700000f40951998)
<br/>A >> Shm MMDAT area (addr=0x700000f40952000 leng=15818752 end=0x700000f41868000)
<br/>A RFC rfc/signon_error_log = -1
<br/>A RFC rfc/dump_connection_info = 0
<br/>A RFC rfc/dump_client_info = 0
<br/>A RFC rfc/cp_convert/ignore_error = 1
<br/>A RFC rfc/cp_convert/conversion_char = 23
<br/>A RFC rfc/wan_compress/threshold = 251
<br/>A RFC rfc/recorder_pcs not set, use defaule value: 2
<br/>A RFC rfc/delta_trc_level not set, use default value: 0
<br/>A RFC rfc/no_uuid_check not set, use default value: 0
<br/>A RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
<br/>A RFC Method> initialize RemObjDriver for ABAP Objects
<br/>M ThrCreateShObjects allocated 122630 bytes at 0x70000000c124000
<br/>N SsfSapSecin: putenv(SECUDIR=/usr/sap/PRD/DVEBMGS00/sec): ok
<br/>N
<br/>N =================================================
<br/>N === SSF INITIALIZATION:
<br/>N ===...SSF Security Toolkit name SAPSECULIB .
<br/>N ===...SSF library is /usr/sap/PRD/DVEBMGS00/exe/libsapcrypto.o .
<br/>N ===...SSF default hash algorithm is SHA1 .
<br/>N ===...SSF default symmetric encryption algorithm is DES-CBC .
<br/>N ===...SECUDIR="/usr/sap/PRD/DVEBMGS00/sec"
<br/>N ===...loading of Security Toolkit successfully completed.
<br/>N === SAPCRYPTOLIB 5.5.5C pl29 (Jan 30 2010) MT-safe
<br/>N =================================================
<br/>N MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
<br/>N MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
<br/>M JrfcVmcRegisterNativesDriver o.k.
<br/>W =================================================
<br/>W === ipl_Init() called
<br/>B dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
<br/>B max_blocking_factor = 5, max_in_blocking_factor = 5,
<br/>B min_blocking_factor = 5, min_in_blocking_factor = 5,
<br/>B prefer_union_all = 0, prefer_join = 0,
<br/>B prefer_fix_blocking = 0, prefer_in_itab_opt = 1,
<br/>B convert AVG = 0, alias table FUPD = 0,
<br/>B escape_as_literal = 1, opt GE LE to BETWEEN = 0,
<br/>B select * =0x0f, character encoding = STD / <none>:-,
<br/>B use_hints = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
<br/>B rule_fae->0, concat_fae->0, concat_fae_or->0
<br/>W ITS Plugin: Path dw_gui
<br/>W ITS Plugin: Description ITS Plugin - ITS rendering DLL
<br/>W ITS Plugin: sizeof(SAP_UC) 2
<br/>W ITS Plugin: Release: 701, [7010.0.97.20020600]
<br/>W ITS Plugin: Int.version, [33]
<br/>W ITS Plugin: Feature set: [22]
<br/>W ===... Calling itsp_Init in external dll ===>
<br/>W PpioRecoverLocks, table: 0x700000f418f2778
<br/>W PpioRecoverLocks, number of file locks 256
<br/>W PpioRecoverLocks: file lock set to: (nil)
<br/>W PpioRecoverLocks: directory lock set to: (nil)
<br/>W PpioRecoverLocks: global lock set to: (nil)
<br/>W PpioRecoverLocks() done
<br/>W PprcRecoverLocks, table: 0x700000f418f27e8
<br/>W PprcRecoverLocks: directory lock set to: (nil)
<br/>W PprcRecoverLocks() done
<br/>W === ipl_Init() returns 0, ITSPE_OK: OK
<br/>W =================================================
<br/>N VSI: WP init in ABAP VM completed with rc=0
<br/>E Profile-Parameter: enque/deque_wait_answer = FALSE
<br/>E Profile-Parameter: enque/sync_dequeall = 0
<br/>E EnqId_SuppressIpc: local EnqId initialization o.k.
<br/>E EnqCcInitialize: local enqueue client init o.k.
<br/>M ThCheckPrevUser: previous user was T78/M0, clean counter 0
<br/>M ThCheckPrevUser: clean previous user T78/U26013/M0/I2/V-1
<br/>M
<br/>M Modeinfo for User T78/M0
<br/>M
<br/>M tm state = 4
<br/>M uid = 26013
<br/>M term type = 0x4
<br/>M display = 0x8
<br/>M cpic_no = 0
<br/>M cpic_idx = -1
<br/>M usr = >8000199 <
<br/>M terminal = >ceegsap20 <
<br/>M client = >800<
<br/>M conversation_ID = > <
<br/>M appc_tm_conv_idx = -1
<br/>M its_plugin = NO
<br/>M allowCreateMode = YES
<br/>M wp_ca block = -1
<br/>M appc_ca block = -1
<br/>M blockSoftCanel = NO
<br/>M session_id = >4CFF77CE4A6A0068E10080000A04C87E<
<br/>M ext_session_id = >4CFF77CE4A6A0068E10080000A04C87E<
<br/>M imode = 2
<br/>M mode state = 0x1a
<br/>M mode clean_state = 2
<br/>M task_type = ZTTADIA
<br/>M lastThFc = THFCTERM
<br/>M lastAction = TH_IACT_NO_ACTION
<br/>M th_errno = 0
<br/>M rollout_reason = 1
<br/>M last_rollout_level = 7
<br/>M async_receives = 0
<br/>M cpic_receive = 0
<br/>M em handle = 67
<br/>M roll state = 3
<br/>M abap state = 3
<br/>M em state = 2
<br/>M eg state = 1
<br/>M spa state = 3
<br/>M enq state = 0
<br/>M softcancel = 1
<br/>M cancelInitiator = DISPATCHER
<br/>M clean_state = DP_SOFTCANCEL
<br/>M next hook = T-1/U-1/M255
<br/>M master hook = T-1/U-1/M255
<br/>M slave hook = T-1/U-1/M255
<br/>M debug_tid = 255
<br/>M debug_mode = 0
<br/>M mode type = 0x1
<br/>M debug = 0
<br/>M msg_count = 6
<br/>M tcode = >ZPP015 <
<br/>M last_wp = 38
<br/>M client conversation_ID = > <
<br/>M server conversation_ID = > <
<br/>M lock = 0
<br/>M max enq infos = 0
<br/>M act enq infos = 0
<br/>M em_hyper_hdl = 0x700000f41d918e8
<br/>M plugin_info = NULL
<br/>M act_plugin_hdl = -1
<br/>M act_plugin_no = 0
<br/>M max_plugin_no = 0
<br/>M
<br/>M ThCheckPrevUser: reset spa state for user T78/U26013/M0
<br/>M ThSetDoSafeCleanup: th_do_safe_cleanup = FALSE (wanted FALSE)
<br/>M LOCK WP ca_blk 44
<br/>M ThAtWpBlk: set zttatiln to zero
<br/>M ThAtWpBlk: set zttatoln to zero
<br/>M DpVmcGetVmByTmAdm: no VM found for T78/M0/I2
<br/>M LOCK APPC ca_blk 640
<br/>M set task type ZTTADIA
<br/>M ThCleanPrevUser: clean U26013 T78 M0 I2 no VM clean state DP_SOFTCANCEL clean counter 1
<br/>M ThCleanPrevUser: saved MODE_REC = 10
<br/>M PfStatDisconnect: disconnect statistics
<br/>M ThCleanPrevUser: found soft cancel flag
<br/>M ThSoftCancel: set clean state of T78/M0 to DP_DEFAULT_CLEANING
<br/>M ThSoftCancel session in state TM_DISCONNECTED, delete mode
<br/>M ThIAMDel: delete tid/mode 78/0 (th_errno 47, release 1)
<br/>M ThIDeleteMode (78, 0, 3, ><, 0, 255, TRUE)
<br/>M ThIDeleteMode: no modes found ..
<br/>M no sub modes
<br/>M ThCheckMemoryState (0, 0, 1)
<br/>M ThRollIn: roll in T78/U26013/M0/I2 (level=7, abap_level=1, attach_em=1)
<br/>M ThCheckEmState: check ATTACH for em hdl 67
<br/>M ThCheckEmState: call EmContextAttach (em_hdl=67)
<br/>I Thu Dec 9 14:05:00 2010
<br/>I WARNING: MtxLock 0x70000000636197c rrol0046 owner=33 deadlock ?
<br/>I Thu Dec 9 14:06:00 2010
<br/>I WARNING: MtxLock 0x70000000636197c rrol0046 owner=33 deadlock ?
<br/>I Thu Dec 9 14:07:00 2010
<br/>I WARNING: MtxLock 0x70000000636197c rrol0046 owner=33 deadlock ?
<br/>I Thu Dec 9 14:08:00 2010
<br/>I WARNING: MtxLock 0x70000000636197c rrol0046 owner=33 deadlock ?Hi Sitarama,
<br/>
<br/>Thanks very much for your fast reply. Yes, the smartforms are custom-built. Besides the deadlock error, there still has some errors in SP01 says "Could not pass request to host spool system". But it previews wonderfully in SP01. The detailed SP01 error log is like below:
Print request processing log
Errors occurred processing this print request
Error during print request output. l_rc = 99
There may be no printout
Most important attributes of spool request
Request number 2828
Request name SMART LOCA 8000199
Client 800
Owner 8000199
Request attributes
Time created 2010120906014800
Remaining life +00007235800
Dispo 1 (Go/Hold) G
Dispo 2 (Keep/Delete) D
Dispo 3 (Indirect/Direct) D
Default output device LOCA
Default no. copies 1
Format ZTEST
Main print request characteristics
Spool request number 2828
Print request number 1
Print request attributes
Time created 2010120906020500
Output device LOCA
Format ZTEST
What do you mean parallel processing on table level? The smartforms extract data from different SAP tables and then transfer to smartform interface, then they can added in form pages. Do you think this results parallel processing towards tables?
<br/>
Thank you and hope to hear more from you.
Best Regards,
Jeff -
Web Application and Custom JavaMail Providers
We have a web application that uses custom JavaMail Providers on Weblogic 7.0.
The structure of the WAR file is as follows:
|-WEB-INF
|-lib
|-activation.jar
|-mail.jar (as provided by Sun for JavaMail 1.2)
|-custommail.jar (custom JavaMail providers)
|-... (other jars for web application).
Now the JavaMail Session object cannot find the custom providers as it appears the Web Container is loading the JavaMail classes (Session) from the WebLogic.jar instead of mail.jar from the web application's lib directory.
How can I configure the web application to load classes from the mail.jar in the applications lib directory?.
This configuration works on Tomcat 4.0.4.
VikashThis is standard behavior in WebLogic - the child classloader (the
classloader for the web applicaiton) will always
delegate to the parent classloader (the system classloader), and so it will
alwyas find the ones included in weblogic.jar
first.
You can get around this in two ways:
a) Put the classes in weblogic's classpath (Before weblogic.jar)
b) You can set the "Prefer Web-Inf Classes" attribute of a web application
(see Admin console).
In this case the web application classloader will not delegate, but
always look locally first.
Just be careful in this scenario not to pass an object created by the
web applicatino classloader to say
an EJB. ie. don't pass a mail session object, as then you'll get a
classcastexception.
Regards,
Jon -
Problem Sending mails in a loop using JavaMail API
Hello All,
I am sending emails in a loop(one after the other) using JavaMail API,but the problem is, if the first two,three email addresses in the loop are Valid it sends the Email Properly, but if the Fourth or so is Invalid Address it throws an Exception....
"javax.mail.SendFailedException: Sending failed;"
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 450 <[email protected]>:Recipient address rejected: Domain not found......
So if i want to send hundereds of emails and if one of the Emails inbetween is Invalid the process Stops at that point and i could not send the other emails in the Loop......
How Could i Trap the exception thrown and handle it in such a way, so that the loops continues ..
Is there something with the SMTP Server....?
The code which i am using is as follows....
<Code>...
try {
InitialContext ic = new InitialContext();
Session session = (Session) ic.lookup(JNDINames.MAIL_SESSION);
if (Debug.debuggingOn)
session.setDebug(true);
// construct the message
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(eMess.getEmailSender()));
String to = "";
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(to, false));
msg.setRecipients(Message.RecipientType.BCC,
InternetAddress.parse(eMess.getEmailReceiver(), false));
msg.setSubject(eMess.getSubject());
msg.setContent(eMess.getHtmlContents(),"text/plain");
msg.saveChanges();
Transport.send(msg);
} catch (Exception e) {
Debug.print("createAndSendMail exception : " + e);
throw new MailerAppException("Failure while sending mail");
</Code>....
Please give me any suggestions regarding it....and guide me accordingly..
Thanks a million in advance...
Regards
SamHow about something like the code attached here. Be aware it is lifted and edited out of an app we have here so it may require changing to get it to work. If it don't work - don't come asking for help as this is only a rough example of one way of doing it. RTFM - that's how we worked it out!
SH
try {
Transport.send(msg);
// If we get to here then the mail went OK so update all the records in the email as sent
System.out.println("Email sent OK");
catch (MessagingException mex) {
System.out.println("Message error");
Exception ex = mex;
do {
if (ex instanceof SendFailedException) {
if (ex.getMessage().startsWith("Sending failed")) {
// Ignore this message as we want to know the real reason for failure
// If we get an Invalid Address error or a Message partially delivered message process the message
if (ex.getMessage().startsWith("Message partially delivered")
|| ex.getMessage().startsWith("Invalid Addresses")) {
// This message is of interest as we need to process the actual individual addresses
System.out.println(ex.getMessage().substring(0, ex.getMessage().indexOf(";")));
// Now get the addresses from the SendFailedException
SendFailedException sfex = (SendFailedException) ex;
Address[] invalid = sfex.getInvalidAddresses();
if (invalid != null) {
System.out.println("Invalid Addresse(s) found -");
if (invalid.length > 0) {
for (int x = 0; x < invalid.length; x++) {
System.out.println(invalid[x].toString().trim());
Address[] validUnsent = sfex.getValidUnsentAddresses();
if (validUnsent != null) {
System.out.println("Valid Unsent Addresses found -");
if (validUnsent.length > 0) {
for (int x = 0; x < validUnsent.length; x++) {
System.out.println(validUnsent[x].toString().trim());
Address[] validSent = sfex.getValidSentAddresses();
if (validSent != null) {
System.out.println("Valid Sent Addresses found -");
if (validSent.length > 0) {
for (int x = 0; x < validSent.length; x++) {
System.out.println(validSent[x].toString().trim());
if (ex instanceof MessagingException)
ex = ((MessagingException) ex).getNextException();
else {
// This is a general catch all and we should assume that no messages went and should stop
System.out.println(ex.toString());
throw ex;
} while (ex != null); -
Problem sending email using javamail in servlet
I try this code and make some changes of my own http://forums.sun.com/thread.jspa?threadID=695781.
When i run the program the confirmtaion shows that the mail has been sent, but when i check in my inbox there's no the message. I'm using gmail and need to authenticate the username and password. I guess the error caused in the servlet.
Here's the code for my servlet :
import java.io.*;
import java.util.Properties;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.mail.internet.*;
import javax.mail.*;
public class ServletEx extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
System.out.println("____emailservlet.doPost");
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
System.out.println("______________________________");
out.println();
String to = request.getParameter("to");
System.out.println("____________________________to" + to);
String subject = request.getParameter("subject");
String msg = request.getParameter("msg");
// construct an instance of EmailSender
System.out.println("servlet_to" + to);
send(username, to, subject, msg);
//send("[email protected]", to, subject, msg);
out.println("mail sent....");
String username = "[email protected]";
String password = "my_password";
String smtp = "smtp.gmail.com";
String port = "587";
public void send(String username, String to, String subject, String msg) {
Properties props = new Properties();
props.put("mail.smtp.user", username);
props.put("mail.smtp.host", smtp);
props.put("mail.smtp.port", port);
props.put("mail.smtp.starttls.enable","true"); // just in case, but not currently necessary, oddly enough
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", port);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
try
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
//session.setDebug(true);
MimeMessage message = new MimeMessage(session);
message.setText(msg);
message.setSubject(subject);
message.setFrom(new InternetAddress(username));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
Transport.send(message);
catch (Exception mex)
mex.printStackTrace();
public class SMTPAuthenticator extends javax.mail.Authenticator {
public PasswordAuthentication getPasswordAuthentication(String username, String password)
return new PasswordAuthentication(username, password);
}Actually it's been a long time for me to develope this program, especially with the authenticate smtp. Any help would be very appreciated :)Accordingly to your stackTrace, I think that you miss some utility jar from Geronimo app. server.
As you are using Application server that is J2EE compliant, so there is an own JavaMail implementation embeded and used by the Server. To fix this problem you have to find and add to your calsspath a jar-file that contains Base64EncoderStream.class -
Problem with relaying in JavaMail
Hi all,
I am having what seems to be a common problem with people attempting to send emails using JavaMail. I always get the following error....
class javax.mail.SendFailedException: 550 relaying mail to compuserve.com is not allowed.
I have done some research and I understand that most ISP's will not allow relaying through their servers for spamming reasons. Some people seem to have asked this question before but never been able to get an answer. What can be done to overcome this problem??? I need to send automated emails to people buying stuff from our website. I want to do this by reading the info from a database and sending them a personalised email based on the info in the database.
Please help,
Bow_wow.You are running all your mail through Exchange on the server? Whose server is this, yours? If it is yours, then you should be able to configure it to accept relaying from the machine where you are trying to send the e-mails from. If it is somebody else's, then talk to them about accepting relaying from your IP address.
-
Problem with Javamail in Red Hat
Good afternoon.
I have a problem with javamail in Red Hat.
When i send a email in windows with my application, works well. But in Red Hat no works.
Gives the following error:
Java.lang.ClassCastException .... gnu.mail.handler.TextPlain
Does anyone know that happens?You have much to learn. This is the wrong forum for most of it.
You should be able to use the package manager in Linux to
uninstall the Gnu version. Then read this:
[http://java.sun.com/products/javamail/FAQ.html#install|http://java.sun.com/products/javamail/FAQ.html#install] -
Sending an Email using JavaMail from the Net Work of my company not workin
Hi,
If any body would reply to this issue as soon as possible..
I have developed a simple java mail program which sends an email to gmail (smtp.gmail.com) and works fine at home , So when i sent the same
from my office(at company) it did not work and exception was reported saying ...... could not connect to host .smtp.gmail.com... port .. .
I think it's a network problem.
So If any body has a suggestion ?
If so can any body give a simple code for this issue.
Regards,No, I don't mean the msgshow.java demo program. I mean the [JavaMail FAQ|http://java.sun.com/products/javamail/FAQ.html].
In particular, the section about debugging connection problems and the section
about connecting to Gmail.
Find it yet? -
How to deal with deadlock on wwv_flow_data table when http server times out
There are some threads about a deadlock on the wwv_flow_data table. None of them contain a real explanation for this behaviour. In my case I will try to explain what I think is happening. Maybe it helps somebody who is hitting the same matter.
In my case with APEX 3.2.1 I am navigating from one page to another. Doing this APEX will lock the table wwv_flow_data. As soon as the other page is shown the lock will be released. But now this other page contains a bad performing query (standaard report region). After 5 minutes the http server (modplsql) will time out and present the message "No response from the application server" on the screen. In the meanwhile the query is still running on the database server and the lock stays on the wwv_flow_data table.
Normal user behaviour will be that the user will use the back button to return to the previous page and tries it again to navigate to the other page or
the user will try to refresh the page with the bad performing query.
And voila now you will have a deadlock on the wwv_flow_data table since a second session is trying to do the same thing while the first hasn't finished yet.
How to deal with it?
First of all. Have a good look at the bad performing query. Maybe you can improve it that it will succeed before the http server will timeout.
In my case the 11gr1 optimizer couldn't handle a subquery factoring clause in the best way. After changing it back to a classical inline query the problem was solved.
Secondly you could increase the timeout parameter of the http server. Although this not the best way.
Maybe it would better if APEX in a next version would release the lock on the table wwv_flow_date earlier or do a rollback just before the moment that the http server is timing out.
regards,
Mathieu MeeuwissenHello Shmoove,
I saw your reply here and you probably understand the problems the HTTP 100 response may cause.
I am trying to send image that was taken by getSnapshot. The problem is that the server respond with this HTTP 100 message.
I suspect that the reason that my server doesn't recognize the file that I'm sending from J2me is that the "server to client" response to the 100 message comes after the second message of (see what the TCPIP viewer shows down here):
POST /up01/up02.aspx HTTP/1.1
Content-Type: multipart/form-data; boundary=xxxxyyyyzzz
Connection: Keep-Alive
Content-length: 6294
User-Agent: UNTRUSTED/1.0
Host: szekely.dnsalias.com:80
Transfer-Encoding: chunked
400: Client to Server (126 bytes)
78
--xxxxyyyyzzz
Content-Disposition: form-data; name="pic"; filename="david.jpg"
Content-Type: application/octet-stream
400: Connected to Server
400: Server to Client (112 bytes)
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Wed, 23 Mar 2005 00:47:02 GMT
X-Powered-By: ASP.NET
Any help will be appreciated,
David -
How to download a .pdf file from a JavaMail application?
hi to all,
iam unable to download a .pdf file from a mailserver using
my javamail application.i have downloaded all kind of files except .pdf.
my code snipnet:
public static void dumpPart(Part p) throws Exception {
// if (p instanceof Message) dumpEnvelope((Message)p);
System.out.println("CONTENT-TYPE: " + p.getContentType());
Object o = p.getContent();
if (o instanceof String) {
System.out.println("This is a String");
System.out.println((String)o);
} else if (o instanceof Multipart) {
System.out.println("This is a Multipart");
Multipart mp = (Multipart)o;
int count = mp.getCount();
System.out.println("****************************************");
System.out.println("count" + count);
System.out.println("****************************************");
for (int i = 0; i < count; i++){
System.out.println("CONTENT-TYPE: " + p.getContentType());
dumpPart(mp.getBodyPart(i));
} else if (o instanceof InputStream) {
System.out.println("This is just an input stream");
InputStream is = (InputStream)o;
String filename=System.currentTimeMillis()+".exe ";
FileOutputStream fos=new FileOutputStream(filename);
int c;
while ((c = is.read()) != -1)
//System.out.write(c);
fos.write((char)c);
}//dumpPart
what's wrong with this code?
Nagaraju.Gfos.write((char)c);Converting the byte to a char is unnecessary and probably harmful. Just do this: fos.write(c);
-
JavaMail application hanged with no error throwed at Transport.send
JavaMail application hanged with no error throwed at Transport.send,even though I set the timeout property
import java.util.Date;
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.MimeUtility;
public class tt {
static Properties props=null;
static boolean needAuth=true;
static MailAuthenticator authenticator = null;
static String host="host";
static String account="account";
static String password="pwd";
static String sender="sender";
* @param args
* @throws Exception
public static void main(String[] args) throws Exception{
if (props == null) {
props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.timeout ", "1000");
props.put("mail.smtp.connectiontimeout ", "1000");
// props.put("mail.debug", "true");
props.put("mail.smtp.auth", String.valueOf(needAuth));
authenticator = new MailAuthenticator(account, password);
MailData mailData = new MailData();
mailData.setSubject("altireport mail configuration");
mailData.setContent("mail server has been configured successfully.");
mailData.setRecipients(new String[]{"[email protected]"});
final Session session = Session.getInstance(props, authenticator);
final MimeMessage msg = new MimeMessage(session);
InternetAddress from = new InternetAddress(sender);
msg.setFrom(from);
// msg.setSender(from);
final InternetAddress[] addressTo = new InternetAddress[mailData.getRecipients().length];
for (int i = 0; i < mailData.getRecipients().length; i++) {
addressTo[i] = new InternetAddress(mailData.getRecipients());
msg.addRecipients(Message.RecipientType.TO, addressTo);
//msg.setSubject(mailData.getSubject());
msg.setSubject(MimeUtility.encodeText(mailData.getSubject(), "UTF-8", "B"));
MimeBodyPart bodyPart1 = new MimeBodyPart();
bodyPart1.setContent(mailData.getContent(), "text/plain; charset=UTF-8");
MimeMultipart multipart = new MimeMultipart();
multipart.addBodyPart(bodyPart1);
msg.setContent(multipart);
msg.setSentDate(new Date());
// msg.saveChanges();
for(int i=0;i<10;i++){
new Thread(new Runnable(){
public void run() {
try {
System.out.println("send...");
Transport.send(msg);
} catch (Exception e) {
e.printStackTrace(System.out);
System.out.println("end!");
}).start();
class MailData {
private String[] recipients = null;
private String subject = null;
private String content = null;
private String attachment = null;
private String attachmentName = null;
* @return the attachment
public String getAttachment() {
return attachment;
* @param attachment the attachment to set
public void setAttachment(String attachment) {
this.attachment = attachment;
* @return the content
public String getContent() {
return content;
* @param content the content to set
public void setContent(String content) {
this.content = content;
* @return the recipients
public String[] getRecipients() {
return recipients;
* @param recipients the recipients to set
public void setRecipients(String[] recipients) {
this.recipients = recipients;
* @return the subject
public String getSubject() {
return subject;
* @param subject the subject to set
public void setSubject(String subject) {
this.subject = subject;
* @return the attachmentName
public String getAttachmentName()
return attachmentName;
* @param attachmentName the attachmentName to set
public void setAttachmentName(String attachmentName)
this.attachmentName = attachmentName;
class MailAuthenticator extends Authenticator {
private PasswordAuthentication authentication;
public MailAuthenticator(String account, String password) {
authentication = new PasswordAuthentication(account, password);
protected PasswordAuthentication getPasswordAuthentication() {
return authentication;
I have tried use session to get a SMTPTransport instance to use sendMessage ,but still have the same problem.No exception ,No error.
This problem doesn't appear always. It appears sometimes.
I hope get help for someone who has the solution for this problem.
Thanks in advanced.Ok, I think I see the problem:
props.put("mail.smtp.timeout ", "1000");
props.put("mail.smtp.connectiontimeout ", "1000");
Why do you have spaces at the end of the property names?
Those spaces are not being ignored, which means you've
set the wrong properties.
Maybe you are looking for
-
Can you lock a pdf to print in Actual Size?
I'm having an issues when others go to print out a document and don't make sure the document is set to print in actual size and we lose the scaling on the document. Is there a way to lock the print settings on a pdf so they are always correct?
-
Creating inbound delivery without reference to PO - from inbound idoc
Hi guys, I have a scenario wherein I need to create inbound delivery from inbound Idoc from external system without reference of PO. There is no PO created in SAP and this inbound delivery will be used just to receive material (purely for logistic pu
-
Audio Freezes 5 seconds in I-Tunes 7.0.1.8 windows
When playing audio from I-Tunes, my CPU maxes, and the audio mutes, (continues to 'play, just not out to the audio device). If I pause, Unpause, it will replay, BUT this is not always possible as CPU cycles get pegged. Can usually reproduce during 'm
-
Is it possible to propose another default file name in ALV Excel Export?
Hello All, I have a problem while exporting to Excel from the WD ALV. The whole process works fine, the problem occurs when the user wants to open (without saving) multiple exported Excel documents at the same time. In this case he gets an error mess
-
When i try to compile truecrypt... i get : Command: sh build.sh Checking build requirements... Building kernel module... *** Warning: "dm_get_device" [/root/Desktop/truecrypt-4.1-source-code/Linux/Kernel/truecrypt.ko] undefined! *** Warning: "dm_tabl