Change the Mail-Session's type in glassfish to type javax.mail.Session
hi all guys!
com.sun.enterprise.deployment.MailConfiguration is the default type of Mail_Session in the glassfish, but I want the javax.mail.Session to construct a MimeMessage!
How can I do?
All comments will be appriciate!
It sounds like you are attempting to lookup the resource using the non-portable server dependent resource name (and you are getting a non-portable server dependent result in return).
If instead, you use the portable JNDI name of the mail resource, the expected javax.mail.Session object will be returned, e.g.
Session mailSession = (Session) ic= new InitialContext().lookup("java:comp/env/mail/mobileMailSession");
Also make sure that the resource has been assigned the JNDI name you decide on ("mail/mobileMailSession" in the example above).
See also https://glassfish.dev.java.net/issues/show_bug.cgi?id=4500 and http://forum.java.sun.com/thread.jspa?threadID=5277688&tstart=75 for more information and context.
Similar Messages
-
I can not therefore change the default program. How can I get this to highlight?
Hi Swansong,
It is also possible to [[Set how Firefox handles different types of files]] -
Cannot change the default program to open a specific file type.
Whenever I attempt to change the default program to open a file, it automatically reverts to whatever was selected previously.
I work with a lot of .ai files and my default Illustrator version is set to Creative Cloud. CC crashes constatnly on my machine, however CS6 runs smooth as silk. I'd like to be able to double click an .ai file and have it open in CS6, not CC. When I right click > Get Info > Open with and change it, it reverts as soon as I click "Change all..."
This isn't a huge deal... only takes a few seconds out of my day but it isn't something I should have to worry about.
Any suggestions?
Thanks in advance.I just successfully changed on my .docx to open into Pages. I went the same route that you mentioned... Right click---> Get Info---> Open With and changed it to Pages. When I clicked Change All, a dialog came up asking me if I am sure that I want to change all of my .docx to open in Pages. I click accept and tested it. Now my .docx open in Pages.
So my question is, is your issue just applying to .ai files? Or is affecting other files, such as .docx? If it's just affecting .ai files, then there maybe an underlying reason for that. And it may not be able to be changed.
Just a thought.
KOT -
How can be changed the design of a Porlet of "Custom Search" type?
I´m making a Portal and I don´t know how to change the design of the Portlet "Custom Search"
Hi
Have you looked at the following documents on Portal Center (http://portalcenter.oracle.com/documentation)
OracleAS Portal Users Guide - Chapter 7 describes how to use the custom search porlet
OracleAS Portal Configuration Guide - Chapter 8 describes how to setup options that effect all Search portlets -
How do I Change the plot waveform colour on a Dynamic Data type Graph?
I have multiple different plots on different graphs, and I want to set the colours of the different waveforms.
In order to display the waveforms on different graphs, I switched to Dynamic data type and then split the wire
according to how many channels I have.
I can set the graph background colour with a property node, and create cursors of different colours no problem
using the array of references that I have created, so there is nothing wrong with my array of references or the property node.
As soon as I try and wire a colour box into the Plot>Plot Colour control, I get error 1055 out of the property node.
I was wondering if it was an error between the keyboard and the chair, but now I am thinking it is someting more sinister.
The Error box pops up and can't be dismissed remaining the focus until I run TASKKILL on LabVIEW and terminate it.
Any ideas on how to achieve my goal would be appreciated.
(LabVIEW 8.6)
Solved!
Go to Solution.Hi Sheela,
It's 1 plot per graph, up to 4 graphs displayed on different tabs.
Here are some screenshots
Attachments:
graph_display.JPG 135 KB
set_Plot_colour.JPG 79 KB -
How to change the list box to F4 Help for Billing type in VF01
Hi All,
In VF01 for Billing type i am getting List box. Now I have to add one more field to that list box.
like F1 invoice
F2 Invoice returns.
or
Is there any possiblity of making it as F4 Help instead of List Box.
Please throw some lite on this issue.
Regards,
Rohit.Hi ,
The list box is getting the value from the table TVFK .
You can get the table name from the VALUE TABLE of FKART which is the domain
for the field Billing Type .
You need to Update the table TVFk programatically. Like - -
TABLES : tvfk.
tvfk-FKART = 'F1'. " Billing type
tvfk-KOPGR =
tvfk-VTEXT = 'Invoice '. " Billing type description
UPDATE TVKF FROM TVKF. " Update the table
Similarly you have to update the table by the F2 and and description.
tvfk-FKART = 'F2'.
tvfk-KOPGR =
tvfk-VTEXT = 'Invoice returns'.
UPDATE TVKF FROM TVKF.
Regards
Pinaki -
How do you change the program ALL files of a type open with?
Hello. I run Parallels Desktop for Mac on this system. Since I upgraded to v3, OS X wants to open my Mac Word/Excel/Etc... files using the MS Office installed in windows XP from PD. I don't always have PD running, and do not want it to start up to use the programs on it. I know, not a Mac problem... But, my question is this:
Is there a way to change the program that ALL files of a certain type (ex: pdf, doc, txt, etc...) will start? I have tried the OPT+RT CLICK which says to ALWAYS open this file with xxx.... but that only flags that single file. I want every file that I ever open anywhere on my system/network to use the program I specify. This is simple to do in Win XP, and I'm guessing there's a way to do it in OS X.
Help/information appreciated.
Thank you,
Scott
MacPro Quad Xeon 3.0GHz Mac OS X (10.4.9) 16 GB RAM - 1TB Internal RAID1Well, with the program Onyx, I've found that LaunchServices database is the culprit. To fix this I just pick a type of file I want to change. Right click the file, choose get info, and change the program it opens with, then click the change all button. Done!
Cool.
Scott -
How do I change the font size and color in my e-mail?
I'm using the regular MAIL application on my Macbook (OSX 10.5.5) and I'm wondering how to change the font size and color of my incoming and outgoing mail.
Any suggestions?
thanks!I'm using the regular MAIL application on my Macbook (OSX 10.5.5) and I'm wondering how to change the font size and color of my incoming and outgoing mail.
For outgoing email you the Fonts and Colors buttons found in the New Message pane (note that settings you make in Mail > Preferences do not affect outgoing messages). -
How do I change the IP address of my PC connected to a EA3500 router ?
I have a PC with Windows 7 connected wirelessly to a EA3500 router. How do I change the IP address on my PC ?
What type of ip address were you talking about? Is it the private ip address that the computer gets from a DHCP server/router or the public ip address that the computer gets from your ISP? If you were talking about the private ip address (e.g. 192.168.1.1) then you can easily assign a static ip address to your computer itself. If you were talking about the public ip address then you don’t need to worry of changing the ip address it’s because the ip address will change from time to time.
-
Changing the Default Currency in Analytics App's don't change curr symbol
Hi All,
We are using BI APPS 7.9.4 with OBIEE 10.1.3.3.2
We want to change the default currency for reporting from $ to £ in BI Dashboard reports.
I have edited the currencies.xml file on $INSTALLDIR/OracleBI/web/config
changed the sybmol to £ from $
<Currency tag="int:wrhs" type="international" placeholder="true" symbol="£" format="$#" digits="2" displayMessage="kmsgCurrencySiebelWarehouse">
<negative tag="minus" format="-$#" />
</Currency>
<Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
<negative tag="minus" format="-$#" />
</Currency>
and restarted BI Server, Presentation Server, Java Host and all the OPMN services but the reporting currencies in the dashboard reports are still displayed in $. The report currency symbol is showing $ by default irrespective of the default currency set in the currencies.xml
Ex: $13459
Anyone know what this issue could be, please let me know if am missing anything.
I appreciate your help.
Rgds, Bhaskar Kolluru
Edited by: bkolluru on 30-Sep-2008 03:14Did you try changing the format setting as well?
format="£#" -
Costing error while change the mrp data
Hi dears,
This is Rem process. when i try to change the material master MRP data ex. ( mrp type M1 to M0)
system not allow to change and show the error as
Product cost collector 000000750122 is still active (assigned to PrCtr 50601-025)
pls give some hints to clear
Any program is there to change the MRP data for the material master in production server directly
thanksDear ,
Did you try MASS or MM70 Transction ?
If you do not want to go for Deletion flag of PCC , you need to settle the REM qty .You need to do product cost for semi finished product and finsihed product in KKF6N and after that you have to do mark and release in CK24N .For standard cat Estimate create std Cost estimation(CK11n) and std cost Estimation Mark & release(CK24) .
1.Backflush (confirmation) the Planned order - MFBF. Results planned order will Reduced and GR,GI, activity cost will be posted. U need not convert the planned order to production order, Confirmation for planned order only.
2.To see Backflushed documents MF12
3.Then Goto KKF6n to see the Manufaturing cost.
4.Over head calculation - (Co42)
5. Variance calculation (KKS6)
6.Settlement(KK87)
Try and revert back
Regards
JH -
Changing the Decimal places in the currency
Hi all
we are using the currecy SAR. Decimal places was set to 4, now that they want to revert back to 2 decimal places. i understand that by doing so they would be inconsistencies in the data allready recorded. how to avoid that?
is there any programmes / reports that would fix such inconsistencies?
any OSS notes?
thanks and regards
gkkHI,
You should NOT change the decimal places in a productive system.
If you would do, the correction of the posted documents afterwards would be a remote consulting issue. Which you have to pay for SAP.
You see, all posting you have done until now, would get displayed in a wrong way, and the new posting wouldn't compare to the others.
Please check the note 137626 describes this.
If you really need to change the decimals, you should create a new currency type, for example your current is SAR, and now you should create a SA2. Then you should enter new rations and exchange rates for it, and work with the new one.
Also if you want to set the decimals to two digits from four, youshould not enter an entry in the OY04(TCURX).
In this table you can only enter a value, that discriminate from 2 decimals. If there is no entry in the table, it means the currency has two decimals.
Please assign points if it useful.
Regards
Ravinagh Boni -
I've successfully migrated everything from my iMac (OS10.4) to my new iBook (OS10.5) but now the new iBook won't let me change the time. I open Date & Time. Type in my location and hit return but the time won't budge.
Do you have an intel iMac? If so do you use the PC side with Bootcamp, Parallels or such? If so, you may see problems with the clock setting there interfering with the Mac clock. Let us know and the fix for that problem can be addressed.
-
Javax.mail.mailexception while am trying to send the mail
Hi.
Am trying to send a mail from ADF Application am using SMTP Server to send the mail
I have added javamail.jar in my libraries
This is the code am using to send
public String send() {
// Add event code here...
String to;
to = new String();
String host = "localhost";
String from = "[email protected]";
Properties properties = System.getProperties();
properties.setProperty("mail.smtp.host", host);
Session session = Session.getDefaultInstance(properties);
try{
MimeMessage message = new MimeMessage (session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,new InternetAddress("to"));
message.setSubject(subj);
message.setText(body);
Transport.send(message);
System.out.println ("Sent Message Successfully");
catch(MessagingException max){
max.printStackTrace();
return null;
}Am getting the exception as below
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at view.SendMail.send(SendMail.java:78)
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:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
Could any one pls help me?
regards,
Prasad K T.This question is better asked in a java forum or JavaMail forum {forum:id=975}
Timo -
Javax.mail.MessagingException: Could not connect to SMTP host:
here is a part of my code
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Mail {
/** Creates a new instance of PostMail */
public Mail() {
public void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException
boolean debug = false;
//Set the host smtp address
Properties props = new Properties();
props.put("mail.smtp.host", "smtp."_____".com");
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++)
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Optional : You can also set your custom headers in the Email if you Want
msg.addHeader("MyHeaderName", "myHeaderValue");
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport.send(msg);
Here is the exception i rec'vd
javax.mail.MessagingException: Could not connect to SMTP host: smtp.google.com, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at Mail.postMail(Mail.java:45)
at ArchMain.<init>(ArchMain.java:30)
at ArchMain$6.run(ArchMain.java:360)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
... 17 morepackage MailDao;
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.text.*;
import java.text.DateFormat.* ;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.activation.*;
import javax.mail.search.*;
import java.util.Vector.*;
import java.sql.*;
public class SendMail {
String SMTP_HOST_NAME = "smtp.techpepstechnology.com";//smtp.genuinepagesonline.com"; //techpepstechnology.com";
String SMTP_AUTH_USER = "[email protected]"; //[email protected]"; //techpeps";
String SMTP_AUTH_PWD = "demo"; //techpeps2007";
public void postMail( String recipients[ ], String subject,
String message , String from,String msgType) throws MessagingException {
boolean debug = false;
Properties props = System.getProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
session.setDebug(debug);
// create a message
MimeMessage msg = new MimeMessage(session);
// MimeMessage mimemessage = new MimeMessage(simplemailuser.getSession());
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++) {
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setSubject(subject);
if(msgType.equalsIgnoreCase("")) {
//mimemessage.setText(s4);
msg.setContent(message, "text/plain");
else {
MimeBodyPart textBodyPart = new MimeBodyPart();
textBodyPart.setText(message);
MimeBodyPart fileBodyPart = new MimeBodyPart();
FileDataSource fds = new FileDataSource(msgType);
fileBodyPart.setDataHandler(new DataHandler(fds));
fileBodyPart.setFileName(fds.getName());
//step:5 create the multipart/container to hold the part
Multipart container = new MimeMultipart();
container.addBodyPart(textBodyPart);
container.addBodyPart(fileBodyPart);
//step:6 add the multipart to the actual message
msg.setContent(container);
try{
Transport transport=session.getTransport("smtp");
transport.connect();
transport.send(msg);
transport.close();
}catch(Exception e) {
e.printStackTrace();
private class SMTPAuthenticator extends javax.mail.Authenticator {
public PasswordAuthentication getPasswordAuthentication() {
String username = SMTP_AUTH_USER;
String password = SMTP_AUTH_PWD;
return new PasswordAuthentication(username, password);
public static void main(String arg[]) {
SendMail sm = new SendMail();
String[] s ={"[email protected]"};
try{
sm.postMail(s,"hello","This is testing of mail","[email protected]","");
catch(Exception e)
e.printStackTrace();
//sm.sendMsg("demo", "demo");
System.out.println("Mail Sent");
i also got the follwing error this code work fine in jcreator but i used this in netbeans it throws a exception
plz.....help
javax.mail.MessagingException: Could not connect to SMTP host: smtp.techpepstechnology.com, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:867)
Mail Sent
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:156)
at javax.mail.Service.connect(Service.java:256)
at javax.mail.Service.connect(Service.java:135)
at javax.mail.Service.connect(Service.java:87)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:93)
at MailDao.SendMail.postMail(SendMail.java:86)
at MailDao.SendMail.main(SendMail.java:110)
Maybe you are looking for
-
RH8 causing other apps to crash?
Hello - I have a colleague (working in another office, so I can't really see this problem first hand) who is trying to install RH8 on a Win7/32 machine (new install, not an upgrade). A member of her IT dept is performing the install. After the instal
-
How get rid of iTunes credit to change countries
I have only 1.07 Dollars left in my iTunes account and I want to change countries, but it won't let me because of the 1.07 Dollars. Can anyone tell me what I should do?
-
I cannot install adobe reader on window XP
-
Hi I use JDev 11.1 with ADF BC, and i use <af:query>, the problem is all field are appear by default at search block, i need to hide some attribute from search block and when i click in advance i can to add that field already hidden. Regards
-
this is a second hand ipod nano . I think it is the 4th or 5th generation. It worked fine until I tried to sync two new songs and got the error code unknown error (-50) does anyone have any knowledge of this?