How to configure ODI for server and client correct?
Hi forum,
this is my first post and i hope you guys can help me out ...
i
am new to ODI and WLS and in my case ODI need to run on a server where a couple of clients can connect to, work on the same project with their own workspaces and accounts.
The database will be located on the same server.
As far as i understood, i need to install the the ODI Java EE type (not the standalone type) with a WLS ?!
iI already nstalled
JDK 6u41 (x64),
ODI 11g (11.1.1.6, generic),
Oracle DB 11g R2 enterprise and
WebLogic 11g (10.3.6, generic)
on the Server and now i am trying to connect to the ODI repositories from a client with an ODI standalone installation.
I am now trying to insert a Data Source into the physical agemt (not even sure if i need to do this in my case).
Following these instructions (http://docs.oracle.com/cd/E17904_01/integrate.1111/e12643/setup_topology.htm#CHDHJBAD) i get an ODI-26029 error.
Below are some configuration information of the software i installed.
h3. ODI
Installation:
Installationtype: full
Oracle home directory: Oracle_ODI1
Agent name: odi_agent
Agent port: 1987
Repositories/connection:
Master repository user = odim
Work repository user = odiw
Work repository name = WORKREP1
JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
*odim and odiw have been created manually with grant options on connect and resource
Physical agent (with no datasource defined):
Name = OracleDIAgent
Host = localhost
Webapplicationcontext = oraclediagent
Port = 8001
Protocol = http
Physical data server:
Name = oracle_db_11gr2
User = odiw
JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
Physical schema:
Schema (schema) = ODIW
Schema (work schema) = ODIW
Context = aMIS_dev
Logical schema = oracle_db_11gr2
Logiacal schema
Context = aMIS_dev
Physical schema = oracle_db_11gr2.ODIW
Context:
Name = aMIS_dev
Logical agent = OracleDIAgent
Physical agent = OracleDIAgent
Logical schema = oracle_db_11gr2
Physical schema = oracle_db_11gr2.ODIW
Logical schema:
Name = oracle_db_11gr2
Context = aMIS_dev
Physical schema = oracle_db_11gr2.ODIW
Logical agent
Name = OracleDIAgent
Context = aMIS_dev
Physical Agent = OracleDIAgent
h3. Oracle DB 11g R2
Installation
Global database name = orcl.otera.local
SID = orcl
h3. WebLogic 11g:
+1. generate new basic WebLogic Server domain+
Domainname = ODI-DOMAIN
Admin name = weblogic
Admin server name = AdminServer
Listening port = 7001
Managed server name = odi_server1
Managed server port = 8001
+2. extend an existing WebLogic domain+
Choose extension source: ODI - Agent, ODI - Agent Libraries, Oracle JRF
Window: Configure JDBC compontent schema:
Driver = Oracle's Driver (Thin) for Instance connection; Versions: 9.0.1 and higher
Schema owner = odim
DBMS/Service = orcl
Hostname = localhost
Port = 1521
Client name = LocalODIMachine
Listening address of the accountmanager = localhost
Listening port of the accountmanager = 5556
Really hope you guys can help me quick.
Thanks in advance
Hi DecaXD,
thank you for quick response :)
on the client site i tried to establish the connection to the work repository with the following connection information:
Login information*:
Oracle Data Integrator Connection
Login name = odi_server
User = SUPERVISOR
Database connection (Master Repository):
User = odim
URL = jdbc:oracle:thin:@<server ip>:1521:orcl
A work repository could be found, but the connection failed! (?!)
" ODI-26130: Connection to the repository failed.
oracle.odi.core.config.NotWorkRepositorySchemaException: ODI-10147: Repository type mismatches.
Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Invalid SQL-Query for validating the connection (+translated from german into english+) "
my ODI configuration on the server site (loged in as: odiw):
topology tab*:
Physical architecture:
Technology:
Definition:
Dataserver name = oracle_db_11gr2
User = odiw
JDBC-URL = jdbc:oracle:thin:@10.168.178.131:1521:orcl
Datasource:
Agent = OracleDIAgent
JNDI-Name = [DataSourceName]
Agents:
Definition:
Name = OracleDIAgent
Host = <IP of the server>
Port = 8001
Webapplicationcontext = oraclediagent
Datasources:
Dataserver = oracle_db_11gr2
JNDI-Name = [DataSourceName]
Logical architecture:
Technology:
Defintion:
Name = oracle_db_11gr2
Context = aMIS_dev
Physical schema = oracle_db_11gr2.ODIW
Agent:
Name = OracleDIAgent
Context = aMIS_dev
Physical agent = OracleDIAgent
when i test the connection of the data server (topology>physical architecture>technology>oracle>oracle_db_11gr2) with the OracleDIAgent i receive the
" ODI-26039: Connection failed.
oracle.odi.runtime.agent.invocation.InvocationException: javax.naming.NameNotFoundException: Unable to resolve '[DataSourceName]'. Resolved ''; remaining name '[DataSourceName]' "
since testing the connection on the server site failed in first place, i couldn't test the connection on the client site.
Similar Messages
-
How to start oracle database server and client in windows 8
Hi at all
I'm a new entry in this forum and I'm a beginner with database oracle.
I used always SQL Server as database and it was easy to use after installation.
With SQL Server configuration management program I could to launch the SQL Server (SQLEXPRESS) service and the database server start up!!
With SQL Server management studio I could to launch the client application, then was establishing a connection to the server and all was working fine!
Now, how to work with oracle database?
I installed oracle server and client version 11g R2 on windows 8, but how can I start the server database? .. and how can I start the client application for querying?
regards in advance.
P.S.: Sorry for my english.SomeoneElse
thanks for the response.
I setting the service to start manually because otherwise windows is slow to startup.
In particular I have precisely this oracle service on my operating system after installation.
- ) OracleVssWriterSYSDBA
- ) OracleDBConsolesysdba
- ) OracleJobSchedulerSYSDBA
- ) OracleMTSRecoveryService
- ) OracleOraDb11g_home1ClrAgent
- ) OracleOraDb11g_home1TNSListener
- ) OracleServiceSYSDBA
What are the services that start the server and I have to launch?
What is the client program in menu --> start -- > all program --> Oracle - OraClient 11g home..... that I have to use for querying database?
thanks. -
Hey someone tell me how 2 configure tax for a US client??
hi all
i am about to go for a client interview for a US client n they expect me t be knowledgable on tax procedure.plz some one tell me how to configure tax for a US cliet n wat r the important things in tax i should be knowing as a sd consultant.plz tell me steps too.it ll be very helpful for practice
thnx n regards
anilI'm sorry it's taken me so long to respond to your suggestions. I
haven't had the opportunity to access the computers in question for
the last few days. Although your suggestions didn't work, I would
like to assure you that I really appreciate the time & effort you
took to try & help me & hope you will make another attempt. Being
uncertain as to the proper syntax involved & how important a small
difference might make, I tried the five variations of your
suggestions below. None of them seemed to have any effect on the
two systems. One system belongs to a relative & is a fairly new
laptop running Windows 7. The other is an older desptop running XP.
Do you try or test the suggestions you make?
@namespace is:
#urlbar[level].autocomplete-textbox-container {background-color:
#FFB !important;}
@namespace url:
#urlbar[level].autocomplete-textbox-container {background-color:
#FFB !important;}
@namespace url
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#urlbar[level].autocomplete-textbox-container {background-color:
#FFB !important;}
/* *@namespace url/*
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#urlbar[level].autocomplete-textbox-container {background-color:
#FFB !important;}
<pre><nowiki>@namespace url
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/*only needed once*/
#urlbar[level].textbox-input-box {background-color:
#FFB !important;}
</nowiki></pre> -
Certificates for Server and Client to install . Pls advice
I am doing File --XI --- File scenario with FTPS.
Currently consider only File -- XI part now.
We go point by point: for this link:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc
Blog says:
1. In the visual admin of XI make Server Public and Private keys.
2. In the visual admin of XI make Client Public and Private keys.
Suppose File Sender System is Server and XI is Client
Questions:
a. Do I need make Server Public and Private keys In the visual admin of XI ?
b. Do I need make Client Public and Private keys In the visual admin of XI ?
Generic Rule -- system1 sends its public key to system2 and similarly system2 sends its public key to system1.
c. For Export keys and Import keys as given in blog
-- I am not able to get this part given from Page 38 - 41 of this blog.
Pls advice me
Regards
Edited by: Henry A on Mar 3, 2008 1:07 PM
Edited by: Henry A on Mar 3, 2008 1:08 PM
Edited by: Henry A on Mar 3, 2008 1:54 PMHi DecaXD,
thank you for quick response :)
on the client site i tried to establish the connection to the work repository with the following connection information:
Login information*:
Oracle Data Integrator Connection
Login name = odi_server
User = SUPERVISOR
Database connection (Master Repository):
User = odim
URL = jdbc:oracle:thin:@<server ip>:1521:orcl
A work repository could be found, but the connection failed! (?!)
" ODI-26130: Connection to the repository failed.
oracle.odi.core.config.NotWorkRepositorySchemaException: ODI-10147: Repository type mismatches.
Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Invalid SQL-Query for validating the connection (+translated from german into english+) "
my ODI configuration on the server site (loged in as: odiw):
topology tab*:
Physical architecture:
Technology:
Definition:
Dataserver name = oracle_db_11gr2
User = odiw
JDBC-URL = jdbc:oracle:thin:@10.168.178.131:1521:orcl
Datasource:
Agent = OracleDIAgent
JNDI-Name = [DataSourceName]
Agents:
Definition:
Name = OracleDIAgent
Host = <IP of the server>
Port = 8001
Webapplicationcontext = oraclediagent
Datasources:
Dataserver = oracle_db_11gr2
JNDI-Name = [DataSourceName]
Logical architecture:
Technology:
Defintion:
Name = oracle_db_11gr2
Context = aMIS_dev
Physical schema = oracle_db_11gr2.ODIW
Agent:
Name = OracleDIAgent
Context = aMIS_dev
Physical agent = OracleDIAgent
when i test the connection of the data server (topology>physical architecture>technology>oracle>oracle_db_11gr2) with the OracleDIAgent i receive the
" ODI-26039: Connection failed.
oracle.odi.runtime.agent.invocation.InvocationException: javax.naming.NameNotFoundException: Unable to resolve '[DataSourceName]'. Resolved ''; remaining name '[DataSourceName]' "
since testing the connection on the server site failed in first place, i couldn't test the connection on the client site. -
Custom protocol handler for Server and Client
Hi there,
I have been reading about "A New Era for Java Protocol Handlers" from http://java.sun.com/developer/onlineTraining/protocolhandlers/ . I would like to redesign my existing codes to suit this architecture.
The article mentioned about write client side application. I am wondering whether it will be possible to use the same architecture for server side as well ?
If it is possible, it will be the very kind of you all to guide me to the right direction. Thank you in advance.Thanks for your input. Yeah, the article has been there for quite sometimes. That's why I am a bit sceptical about using it. The strange thing is that there has not been any updates about this topic since then (searched in google and not many web pages are mentioning this thing). I am wondering whether it is a good choice to change the code or not.
-
Hi,
I need guide to install OGG on a separate box which will help me to migrate Sybase to SQL server.
Viral Davehi - just an fyi
we have SQL Server 2012 and from my reads and understanding OGG supports SQL Server up to 2008. not to say it wouldn't work on higher versions if installed. in the link above check out the SQL Server installation chapter. before purchasing the license I would contact Oracle.
maybe someone here has installed it on a higher version and got it to work. we are currently working on setting up OGG to work on Oracle to Oracle servers. -
1 App-v package for server and clients?
Hi,
Please verify if this setup is correct.
The idea is to deploy an App-v 5.0 package to servers as well as pc's.
Deploy of an app-v package with 2 deployment types:
1.for a Windows 2008 R2 without any dependency = prereq Windows 2008 R2 (no dependency to App-v 5 since it is installed in build of server)
2.for a Windows 7 X64 with dependency App-v 5.0 hotfix 5 (which has a dependency to App-v 5)
... and 2 deployments:
1.to a terminal server farm (which has App-v 5.0 RDS deployed already), mandatory
2.to Windows 7 pc's (not to users for now), also mandatory
This to avoid having two sepeare App-v applications for the same source.
Please advise or correct.
J
Jan HoedtLooks fine, I have stopped using the App-v client as a dependency, I set it as a requirement instead as it makes it easier to manage the App-v client as there are no dependecies to take care of.
Regards,
jörgen
-- My System Center blog ccmexec.com -- Twitter
@ccmexec -
The best combination of oracle tools and linux for server and client pcs
Hi experts
I want to know that which is the best certified/tested/best "Linux" operating system / flavor for oracle 10g ids for client and programmers
for client: access through browser and/or as client/server
for programmers: development
ThanksAll certified Linux distributions you can find here:
http://www.oracle.com/technology/support/metalink/index.html -
How to configure SMTP for iCloud?
I have never used the Mail program on my macs. I started using Eudora in 1995 and when Mail came along some years later, i didn't take to it, it didn't have the functionality i needed and enjoyed. Fast forward to a couple days ago, my Snow Leopard MacBook is wearing out and i got a new MacBook Pro running Mountain Lion. When i was setting up the new computer, i thought iCloud would be configured automatically. It wasn't because i have a couple of different Apple IDs but i think that is straightened out now and i'm signed in using the me.com email address and have my calendars and contacts syncing with iphone and my other computer. Mail is working, but only for my me.com email address which i rarely use. I mainly use a gmail address.
I don't want to use Mail and i don't want mail to be downloaded to it. That happened on my other computur, so that i had tens of thousands of messages in a program i never open and don't use. So i somehow turned it off so it no longer gets the mail from my other accounts. i don't want to receive email in Mail. But because i can't use Eudora in Mountain Lion, i need a new email client. Today, i downloaded and installed Mail Mate, i want to try it out. When I tried to use Mail mate to send an email i got a message saying "No SMTP server configured for iCloud." i googled how to configure SMTP for iCloud and what i found said it configures automatically. So i don't know what to do. I went to ICloud in system preferences and i don't see anything i can do there.
Is there anything i can get it to do to configure automatically? All my software is up to date, if that makes a difference.i was persistently googling search terms for this problem and came across a link that gave information to the effect that for non Apple email clients, SMTP has to be configured manually, and the settings were provided. I entered them into Mail Mate and now it works. So thankfully, this problem is solved.
-
Configure SAP for server-side trust
Hi all,
I am installing BusinessObejcts XI integration for SAP Solution. I need configure SAP for server-side trust. I have read BussinessObjects XI Integration for SAP Solution Installation Guide. In chapter 6, It introduce how to configure SAP Server-Side trust. But I don't understand how to configure SAP for server-side trust, specially configure SAP Cryptographic. Would you please to give me more detailed explanation?
Please advise,
DuypmHi Duypm,
the SAP server side configuration is part of the Installation Guide Chapter 6. It starts on Page 94.
If you unclear about this and what SNC configuration means for the SAP server make sure you talk to the administrator for the SAP system. You need administrative rights for the SAP system and the system will have to be restarted as outlined in the installation guide
Ingo -
I have a working RDS RemoteApp site and looking to test out the feature in Windows 7 Control Panel\All Control Panel Items\RemoteApp and Desktop Connections
I came across this link: Create a Client Configuration File for RemoteApp and Desktop Connection and I believe this is what I need to do first, but these instructions are for
Server 2008, and I'm running 2012.
Any suggestions or tips on how I can begin testing this with Server 2012?Hi,
You can manually enter the path to the 2012 feed and it will connect and download the RemoteApps and Desktop connections.
If you need a sample .wcx file I have posted one here a couple of times. If you want I will look for it and post a link.
-TP
I tried adding my URL's below, these are sample links that work for me right now for when I log into the web page, but neither of these work. And I'm not sure what I would need to do with or how to create a .wcx file.
When I type in my URL of: https://connect.mydomain.org/RDWeb, I get redirected to:
https://connect.mydomain.org/RDWeb/Pages/en-US/login.aspx?ReturnUrl=/RDWeb/Pages/en-US/Default.aspx -
how to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server
Hi ,
Have you got any additional public IP Address from your service provider , If yes on router you can have static route for those additional IP Address pointing to your ASA outside interface .
Accordingly you can configure NAT
HTH
Sandy . -
WSUS server and client configuration issues
I just inherited WSUS from my predecessor (it was turned off because of a full disk) so I’m still learning how to use it. Turning it back on I changed where updates should come from, they were stored locally and now I’m pulling them down off of the Microsoft
Update location. What I’m seeing is that I have a bunch of computers that WSUS “sees” but are showing “Failed or Needed” status. Unless I visit each machine and manually do the updates this status does not change. Additionally I have some client computers
(Windows 7) that are not showing up as managed by WSUS. If I reading this right I’m running version Update Services 6.2.9200.16384 on Management Console 3.0 Version 6.2 (build 9200) on Windows Server 2012.
How can I force WSUS to automatically update the “Failed and Needed” devices?
How can I get those clients that are not being managed by WSUS to be managed?
Some of the things that I have done so far on the server and clients are:
Create a GPO (see attached for WSUS)
wuauclt
/detectnow
wuauclt /reportnow
wuauclt.exe /detectnow
gpupdate /force after
modifying the GPO
I even ran the SolarWinds WSUS diagnostic (as a non-administrator) and got this as the output:
# Solarwinds® Diagnostic Tool for the WSUS Agent # 1/23/2015
Machine state
User rights: User does not have administrative rights (Administrator rights are not available)
Update service status: Running
Background Intelligent Transfer service status:
Running
OS Version: Windows 8.1 Pro
Windows update agent version: 7.9.9600.17489 (WU Agent is OK)
Windows Update Agent configuration settings
Automatic Update: Enabled
Options: Automatically download and notify of installation
Use WSUS Server: Not found (There is no such key)
Windows Update Server: Not found (There is no such key)
Windows Update Status Server: Not found (There is no such key)
WSUS URLs are identical: Values are empty
WSUS Server Connectivity -- Connectivity check is impossible
So, my questions are:
What tool do I use to configure the client machine?
How do I get WSUS to update my clients?
Thanks
SamSteven,
I'm pretty sure that this is not the right forum to discuss this in but just so we can close this case.
On my computer I ran the command gpupdate /force I
then rebooted my computer to make sure that the group policy would be updated. The first screen shot is from my domain controller and the second is from my computer. As you can see the Domain Controller has the correct settings but the local machine doesn't.
Other parts of the DC GPO settings have worked so I'm somewhat comfortable that it is being propagated properly. -
How can a VI be both server and client?
Hi,
I'm new in LabView and I'm trying to build a server and client VI using TCP/IP that runs in two computers. in my program I need both server and client VIs to communicate with each other which means I need both VIs to be server and client. I've tried using a case structure but it doesnt work. The only thing I achieved is a normal server/client system where the server sends a request and the client responses.But i need the client to send requests too.i have attached my VIs to this post.I would appriciate it if someone could help with this problem.
Thanks in advanced.
Rambaldi.
Solved!
Go to Solution.
Attachments:
Server-Client.zip 41 KBDo you really need a client and server on each PC? If you simply need that two to talk to each other they can once the client connects to the server. In most cases you only need one server.
What Steve said about the not using the same port only applies to two servers on the same machine. A client must use the port the server is listening to and if the client and the server are on the same machine then they will both use the same port. However, only ONE of them is accepting waiting for connections on that port.
In the code you posted you actually swapped the names. What you call the client is actually the server code and vise versa. In networking a server is an application that listens to an assigned port, accepts connections on that port and provides whatever services it has implemented. A client is an application that establishs a connection to a server. Once a connection is established the two applications can communicate in both directions. The applications themselves will define how the conversation should progress and whether it is a one way conversation or a two way conversation. You don't specify what you are trying to accomplish but I suspect you only need a single server.
In TCP, every connection is defined by the source and destination IP addresses and the source and destination ports. The server uses a known port (FTP is port 21, HTTP is 80, telnet is 23, or some custom port in the user space beyonds the reserved ports) to listen for connections. The client will use the well known port of teh server and generally picks a random port for its port number. The LabVIEW VIs do this automatically. This is how a server and a client on the same computer can use the same port number. Two servers however cannot. The server application can spawn a child task allowing it to service multiple connections at one time though. Each connection will be unique though since the client's port number, address or both will change for each connection.
OK, end of networking 101.
Can you describe in a bit more detail what exactly you want to accomplish. Given that I could probably provide you with more information for your application.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
How to configure the smtp server..
i had an error when running the java mail program..
this is my program
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.io.*;
import java.util.Properties;
public class MailClient
public void sendMail(String mailServer, String from, String to,
String subject, String messageBody,
String[] attachments) throws
MessagingException, AddressException
// Setup mail server
Properties props = System.getProperties();
props.put("mail.smtp.host", mailServer);
// Get a mail session
Session session = Session.getDefaultInstance(props, null);
// Define a new mail message
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject(subject);
// Create a message part to represent the body text
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(messageBody);
//use a MimeMultipart as we need to handle the file attachments
Multipart multipart = new MimeMultipart();
//add the message body to the mime message
multipart.addBodyPart(messageBodyPart);
// add any file attachments to the message
// addAtachments(attachments, multipart);
// Put all message parts in the message
message.setContent(multipart);
// Send the message
Transport.send(message);
protected void addAtachments(String[] attachments, Multipart multipart)
throws MessagingException, AddressException
for(int i = 0; i<= attachments.length -1; i++)
String filename = attachments;
MimeBodyPart attachmentBodyPart = new MimeBodyPart();
//use a JAF FileDataSource as it does MIME type detection
DataSource source = new FileDataSource(filename);
attachmentBodyPart.setDataHandler(new DataHandler(source));
//assume that the filename you want to send is the same as the
//actual file name - could alter this to remove the file path
attachmentBodyPart.setFileName(filename);
//add the attachment
multipart.addBodyPart(attachmentBodyPart);
public static void main(String[] args)
try
MailClient client = new MailClient();
String server="smtp.canvasindia.com";
String from="[email protected]";
String to = "[email protected]";
String subject="Test";
String message="Testing";
String[] filenames ={"c:/A.java"};
client.sendMail(server,from,to,subject,message,filenames);
catch(Exception e)
e.printStackTrace(System.out);
the error is .................
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected from p
ool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at MailClient.sendMail(MailClient.java:47)
at MailClient.main(MailClient.java:84)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected fro
m pool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 5 more
how to configure the smtp server in my machine..
please guide me...This uses gmail account, and gmail smtp
* MailSender.java
* Created on 14 November 2006, 17:07
* This class is used to send mails to other users
package jmailer;
* @author Abubakar Gurnah
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class MailSender{
private String d_email,d_password;
* This example is for gmail, you can use any smtp server
* @param d_email --> your gmail account e.g. [email protected]
* @param d_password --> your gmail password
* @param d_host --> smtp.gmail.com
* @param d_port --> 465
* @param m_to --> [email protected]
* @param m_subject --> Subject of the message
* @param m_text --> The main message body
public String send(String d_email,String d_password,String d_host,String d_port,
String m_from,String m_to,String m_subject,String m_text ) {
this.d_email=d_email;
this.d_password=d_password;
Properties props = new Properties();
props.put("mail.smtp.user", d_email);
props.put("mail.smtp.host", d_host);
props.put("mail.smtp.port", d_port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", d_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 msg = new MimeMessage(session);
msg.setText(m_text);
msg.setSubject(m_subject);
msg.setFrom(new InternetAddress(m_from));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
Transport.send(msg);
return "Successful";
} catch (Exception mex) {
mex.printStackTrace();
return "Fail";
//public static void main(String[] args) {
// MailSender blah = new MailSender();
private class SMTPAuthenticator extends javax.mail.Authenticator {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(d_email, d_password);
}
Maybe you are looking for
-
Why can't I access my most recently imported event from Facebook?
I imported a bunch of photos and video to iphoto...no problem, created a new event, I can easily access it from iphoto of course. BUT...when I try to access the event from Facebook or from gmail to send as an attachment the event doesn't seem to exis
-
Prefix 's10' cannot be mapped to namespace name reserved for "xml" or "xmlns"
I have been given a third party set of schemas which I have copied into my BizTalk Schemas project (I copied the top level folder containing the schemas into a folder I created in the BizTalk Schemas project). The set of schemas are stored in a serie
-
How to get locations in Module?
How to get locations in Module? We are using OWB repository 10.2.0.1.0 and OWB client 10.2.0.1.31. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux. As we create target schema, it created location with host/port option. It is not al
-
Trying SAML sender-vouches, standalone Java client call to service bus.
I've built a standalone Java client using Jax-ws. It produces a wsse header containing both a SAMLAttribute and an optional SAMLAuthentication statement. I've tried to configure a proxy service on the servicebus (10gR3) using ws-policy (weblogic vers
-
MDM with Lion Server is too Slow
Managing 500 iPads with an iMac Mini Server is a very time Consulting Job, because MDM is too Slow. The reason seems to be postgres database. Any Suggestionen?