• narendra.metacu
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I am getting this error and cant get solution after heavy solution in email2case

Attempting to start service com.sforce.mail.EmailService with configuration file D:\\EmailAgent\\email2case.txt


[main] ERROR com.sforce.mail.GenericClient  - Failed to connect to SFDC service

com.sforce.ws.ConnectionException: Failed to send request to https://www.salesforce.com/services/Soap/u/8.0

    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:79)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:734)
    at com.sforce.mail.GenericClient.login(GenericClient.java:267)
    at com.sforce.mail.GenericClient.getConnection(GenericClient.java:179)
    at com.sforce.mail.GenericClient.<init>(GenericClient.java:135)
    at com.sforce.mail.ImapClient.<init>(ImapClient.java:40)
    at com.sforce.mail.ImapSSLClient.<init>(ImapSSLClient.java:31)
    at com.sforce.mail.EmailService.loadService(EmailService.java:156)
    at com.sforce.SalesforceAgent.main(SalesforceAgent.java:138)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:99)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:72)

email2case.txt :
<configFile>
    <server1>
        <url>smtp.xyz.com</url>
        <protocol>IMAPS</protocol>
        <userName>abc@xyz.com</userName>
        <password>********</password>
    <port>465</port>
        <interval>10</interval>
        <inbox>Inbox</inbox>
        <readbox>Read</readbox>
        <errorbox>Errors</errorbox>
    </server1>
</configFile>


<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/8.0</url>
        <userName>abc@xyz.com</userName>
        <password>*****************************</password>
        <loginRefresh>1</loginRefresh>
        <timeout>15</timeout>
    </sfdcLogin>
    <notify>
        <notifyEmail>abc@xyz.com</notifyEmail>
        <from>abc@xyz.com</from>
        <host>https://mail.google.com</host>
        <port>993</port>
        <user>narendra.metacube@gmail.com</user>
        <password>********</password>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>D:\\EmailAgent\\</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>D:\\EmailAgent\\</largeAttachmentURLPrefix>
<largeAttachmentSize>5</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>D:\\EmailAgent\\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>

I have one date of birth field in my custom object now i wanna show that in VisualForce Pages as table as DOB and Age!!
how can i change DOB in Age please gimme proper functions
thanks
I am getting this error and cant get solution after heavy solution in email2case

Attempting to start service com.sforce.mail.EmailService with configuration file D:\\EmailAgent\\email2case.txt


[main] ERROR com.sforce.mail.GenericClient  - Failed to connect to SFDC service

com.sforce.ws.ConnectionException: Failed to send request to https://www.salesforce.com/services/Soap/u/8.0

    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:79)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:734)
    at com.sforce.mail.GenericClient.login(GenericClient.java:267)
    at com.sforce.mail.GenericClient.getConnection(GenericClient.java:179)
    at com.sforce.mail.GenericClient.<init>(GenericClient.java:135)
    at com.sforce.mail.ImapClient.<init>(ImapClient.java:40)
    at com.sforce.mail.ImapSSLClient.<init>(ImapSSLClient.java:31)
    at com.sforce.mail.EmailService.loadService(EmailService.java:156)
    at com.sforce.SalesforceAgent.main(SalesforceAgent.java:138)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:99)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:72)

email2case.txt :
<configFile>
    <server1>
        <url>smtp.xyz.com</url>
        <protocol>IMAPS</protocol>
        <userName>abc@xyz.com</userName>
        <password>********</password>
    <port>465</port>
        <interval>10</interval>
        <inbox>Inbox</inbox>
        <readbox>Read</readbox>
        <errorbox>Errors</errorbox>
    </server1>
</configFile>


<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/8.0</url>
        <userName>abc@xyz.com</userName>
        <password>*****************************</password>
        <loginRefresh>1</loginRefresh>
        <timeout>15</timeout>
    </sfdcLogin>
    <notify>
        <notifyEmail>abc@xyz.com</notifyEmail>
        <from>abc@xyz.com</from>
        <host>https://mail.google.com</host>
        <port>993</port>
        <user>narendra.metacube@gmail.com</user>
        <password>********</password>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>D:\\EmailAgent\\</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>D:\\EmailAgent\\</largeAttachmentURLPrefix>
<largeAttachmentSize>5</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>D:\\EmailAgent\\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>

Dear SalesForce Community,

as I just set up Email to Case as a Windows 2003 Server system service for the company I am working for, I would like to tell you how I did it. The instructions in this Discussion Boards are not as clear and rather misleading.

I assume Email to Case is already working by simply running the batch file.

1. Get the Windows Server 2003 Resource Kit Tools from:
    http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
2. Install them and type in the following on the command line:
    C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" YourServiceName "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
    (This assumes you installed the tools to "C:\Program Files\Windows Resource Kits\Tools\". If you specified another path, use this one instead.
    Also you should replace "YourServiceName" by something like "SalesForceEmailAgent" as I named it.)
3. Open up the registry editor by running "regedit.exe"
4. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName\
5. Create a new key below "YourServiceName" and name it "Parameters" (just like "Security" is a key below "YourServiceName")
6. Create a new String Value (REG_SZ) called "Application" and set the value to "C:\EmailAgent\email2case.bat" (or where ever your email2case.bat can be found)
7. Edit your email2case.bat and change it to:
   
    echo Email To Case Agent v1.07
    java -jar -Xmx256M C:\EmailAgent\Email2Case.jar C:\EmailAgent\sfdcConfig.txt C:\EmailAgent\log4j.properties

    (update the path to where you put your files)

8. Go to Control Panel -> Administrative Tools -> Services (or run "services.msc") and search for your entry ("YourServiceName")
9. Hit properties and make sure that its "Startup Type" is set to "Automatic"
10. Go to the "Log On" tab and make sure "Log on as:" is set to "Local System Account"
11. If you would start the service right now, it would run, but not write a log file. In order to get logging working, you need to edit your log4j.properties
    (can be found in the EmailAgent folder) and change the following two values:

    log4j.appender.LOGFILE.File=C:/EmailAgent/EmailAgent.log

    log4j.appender.PERFFILE.File=C:/EmailAgent/wsc.log

    (or where ever your folder is located)

12. Just start the service and everything should work fine!

I hope this could solve the mystery of Windows Server 2003 services for the most of you. Feel free to comment on my solution.


Message Edited by fmr on 07-21-2008 08:27 AM
  • July 18, 2008
  • Like
  • 0
I am facing a problem while running the java -jar email2case.jar ... can anyone help me with this.
My email2Case file is ...

<configFile>
   <server1>
       <url>https://exchange.xyz.com</url>
       <protocol>imap</protocol>
       <userName>sunil.nandipati@xyz.com</userName>
       <password>****</password>
       <interval>10</interval>
       <inbox>Inbox</inbox>
       <readbox>Read</readbox>
       <errorbox>Errors</errorbox>
   </server1>
</configFile>

and .. my config file is

<configFile>
   <sfdcLogin>
       <url>https://www.salesforce.com/services/Soap/u/6.0</url>
       <userName>nandipatisunil@gmail.com</userName>
       <password>****</password>
       <loginRefresh>30</loginRefresh>
       <timeout>600</timeout>
   </sfdcLogin>
   <notify>
       <notifyEmail>sunil.nandipati@xyz.com</notifyEmail>
       <from>sunil.nandipati@xyz.com</from>
       <host>https://exchange.xyz.com</host>
   <port>25</port>
       <user>sunil.nandipati@xyz.com</user>
       <password>****</password>
       <service>com.sforce.mail.SMTPNotification</service>
   </notify>
   <attachments>
       <largeAttachmentDirectory>C:\\EmailAgent\\</largeAttachmentDirectory>
       <largeAttachmentURLPrefix>C:\\EmailAgent\\</largeAttachmentURLPrefix>
       <largeAttachmentSize>5</largeAttachmentSize>
   </attachments>
   <services>
       <com.sforce.mail.EmailService>C:\\EmailAgent\\email2case.txt</com.sforce.mail.EmailService>
   </services>
</configFile>

And the error message is ....

2007-06-07 21:35:06,043 [main] INFO  ===========================================
=================================
2007-06-07 21:35:06,043 [main] INFO  Attempting to start service com.sforce.mail
.EmailService with configuration file C:\\EmailAgent\\email2case.txt
2007-06-07 21:35:08,346 [main] ERROR Failed to connect to SFDC service
com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting elem
ent 'urn:partner.soap.sforce.com:accessibilityMode' but found 'urn:partner.soap.
sforce.com:currencySymbol'
       at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:272)
       at com.sforce.ws.bind.TypeMapper.verifyElement(TypeMapper.java:294)
       at com.sforce.soap.partner.wsc80.GetUserInfoResult.loadFields(GetUserInf
oResult.java:355)
       at com.sforce.soap.partner.wsc80.GetUserInfoResult.load(GetUserInfoResul
t.java:347)
       at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:437)
       at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:362)
       at com.sforce.soap.partner.wsc80.LoginResult.loadFields(LoginResult.java
:236)
       at com.sforce.soap.partner.wsc80.LoginResult.load(LoginResult.java:203)
       at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:437)
       at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:362)
       at com.sforce.soap.partner.wsc80.LoginResponse_element.loadFields(LoginR
esponse_element.java:68)
       at com.sforce.soap.partner.wsc80.LoginResponse_element.load(LoginRespons
e_element.java:59)
       at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:437)
       at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:362)
       at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:119)
       at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:93
)
       at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:76)
       at com.sforce.soap.partner.wsc80.PartnerConnection.login(PartnerConnecti
on.java:499)
       at com.sforce.mail.GenericClient.login(GenericClient.java:264)
       at com.sforce.mail.GenericClient.getConnection(GenericClient.java:178)
       at com.sforce.mail.GenericClient.<init>(GenericClient.java:134)
       at com.sforce.mail.ImapClient.<init>(ImapClient.java:40)
       at com.sforce.mail.EmailService.loadService(EmailService.java:153)
       at com.sforce.SalesforceAgent.main(SalesforceAgent.java:139)
2007-06-07 21:35:08,376 [main] INFO  Will try 2 more time(s).


Appreciate any kind of help.

Rgds,
Sunil Nandipati.