Questions tagged [java]

Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

Filter by
Sorted by
Tagged with
0
votes
1answer
481 views

More detailed error reporting for SSJS failing?

We have a script which runs in an automation which retrieves registration data from our events management platform. The automation recently stopped working, and the problem was with the javascript ...
3
votes
1answer
266 views

Force IDE 2 BETA not working due to java.lang.NullPointerExceptions

I'm using the old eclipse-based Force IDE for some of my task, mostly deployments. I've seen that there is a new BETA Version of Force IDE 2 based on Salesforce DX here: https://developer.salesforce....
0
votes
3answers
2k views

SOAP API Connection through proxy with authentication [407 - Proxy Authentication required]

I am following the documentation to connect to SOAP API through a proxy. String proxyUsername = ""; String proxyPassword = ""; String username = ""; String password = ""; String endpoint = "https://...
1
vote
0answers
239 views

How to set up listener to salesforce outbound message in java using maven?

I am trying to set up salesforce outbound messaging listener in java. This is the link I followed to set up, and it works fine - https://developer.salesforce.com/page/...
1
vote
0answers
461 views

handling invalid session id

been running a java spring webservice application that runs on on a schedule, but for some reason the enterprise connection occasionally errors out. 2017-07-13 07:03:01 | ERROR | [http-nio-8090-exec-...
1
vote
1answer
349 views

salesforce : Error ID: 1366385420-22703 (1478489697)-> Internal server error 500

I am trying to getting access token from salesforce using below java(Version JDK 7u45) snippet but I am getting this message: Internal server error (Error code : 500) and the Sales force Error ID ...
1
vote
1answer
163 views

Not able to generate jar file through terminal for apex SOAP web service

I am trying to generate jar file for apex SOAP web service through terminal with command - java -classpath force-wsc-40.1.1.jar;ST-4.0.1.jar;antlr-runtime-3.4_2.jar;tools.jar com.sforce.ws....
3
votes
1answer
221 views

How do I set up salesforce endpoint for multiple objects in the same java project?

I am trying to set up a outbound message trigger on three objects. The trigger is to send a soap message to an end point (running on public IP). I got this to work for one object. The issue is when I ...
0
votes
1answer
70 views

How to capture Data Loader error when called from Shell script via SSIS package?

Salesforce Gurus: Thank you in advance for any insights you may have. For years now I have been extracting data from a custom Salesforce object named Branches__c using the following method... ...
1
vote
2answers
3k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
1
vote
2answers
835 views

Create picklist field with picklist values

I am using Metadata WSDL along with Partner WSDl to work on metadata API to create fields. I am able to create fields of type text, checkbox, etc, but I need to create a picklist field and add ...
2
votes
3answers
1k views

Using DataLoader (Command line) on Mac

Is it possible that Data Loader command line can work in os x? After all it is "just java." I'm sure some of the JDBC stuff might not work but is it possible that simple CSV extracts could work? I'm ...
0
votes
1answer
418 views

java and apex output different crypto generateDigest SHA-512 method in apex and java logic not same

Hi i write below apex code for encryption SHA-512 public class TestSimple { Public TestSimple(){ } public void decrytMethod(){ String key = 'This is string'; Blob ...
1
vote
1answer
382 views

Update a parent record and create a child record within same transaction using SOAP API

My question is similar to this question, just that I am looking for SOAP JAVA client API based solution. Suppose, I have a Parent object Account and it's child object Contact. I have a web ...
2
votes
1answer
7k views

Create an Apex class that calls a REST endpoint and write a test class - Trailhead

Create an Apex class that calls a REST endpoint and write a test class. To pass this challenge, create an Apex class that calls a REST endpoint to return the name of an animal, write unit tests that ...
0
votes
1answer
523 views

Cannot login into Salesforce with Java using Proxy Server

I wrote Java code to login to Salesforce and ran this code on a firewalled server. For this, I have to specify the proxy url and proxy port before connecting to Salesforce due to the firewall. However,...
1
vote
1answer
2k views

java.lang.RuntimeException: Could not generate DH keypair [closed]

Our team is working on a web application written in java that is sending data to salesforce. We are getting the following error: java.lang.RuntimeException: Could not generate DH keypair at sun....
0
votes
2answers
240 views

Compilation Error with Android Studio

Morning all, Overview: Bit of a noob in the whole Android app dev area, but had some free time and thought I would give it a shot myself. Facing issue with error "Error:(35, 54) error: incompatible ...
1
vote
1answer
791 views

SOAP Login Error: com.sforce.ws.ConnectionException: unable to find end tag at

I have a Java rest api i built using version 37 of partner wsdl and version 37 of metadata wsdl. Today i generated new jars using version 39. However, my api throws an error if i use https://Login....
2
votes
1answer
651 views

Java Desktop App To Login Salesforce

Could someone please guide us how can we implement the auth flow for our app to be able to login to any Salesforce org and not be tied up to a specific org ? I am interested to implement same ...
4
votes
1answer
474 views

How to setup Tooling Api in Java Application?

I am developing a Java application that should be able to connect to any Salesforce org and use the Tooling Api. Salesforce provides a WSDL but as I understand it is org specific, correct ? Could ...
0
votes
1answer
65 views

issue renaming a csv after processing it [closed]

public List<BatchInfo> bulkUpsertAccountShare(obj gsr) throws UnsupportedEncodingException, IOException, AsyncApiException { log.info("BulkUpsertAccountShare!:"); SForceConnector sfc = ...
1
vote
0answers
95 views

FuelSDK - Java - How to get the Subscriber List

In the Java FuelSDK, how can I get a list of the email address mapped to the subscriber id now being passed for conversion? If I can't do this in FuelSDK, how can I do it with another API? Can I get ...
0
votes
2answers
4k views

Error 500 java rest client , but works on postman

I am using the same code mentioned in https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/code_sample_auth_oauth.htm It works fine in Chrome extension POSTMAN. I am ...
0
votes
0answers
334 views

com.sforce.ws.ConnectionException with JDK 1.6.0_45

I am using Salesforce API version 39 to generate partner jar using wsc-22.jar My project is deployed on JDK1.6.0_45, so i also wanted make my salesforce code compatible to JDK 1.6. I run some sample ...
0
votes
1answer
193 views

Not able to generate Partner.jar

I want to integrate java with salesforce for that I'm trying to generate partner.jar, I'm following this link Introduction to the Force.com Web Services Connector I'm using Partner WSDL API. I'm ...
2
votes
0answers
1k views

How to create an Archive/Zip file with APEX

I want to create an archive/zip file with APEX, my requirement is to extract all the documents related to an account and archive it as a zip file. Files could be images, text word or CVS etc. I ...
1
vote
1answer
186 views

How to manage PartnerConnection instance?

I use the Java force-partner-api & force-wsc in the most current version to connect to Salesforce. I use the PartnerConnection instance I get from Connector.newConnection(config); ? Can I use it ...
2
votes
2answers
3k views

Apex callout - POST Method

I am making a REST callout in Apex. I have to use the POST method and send the credential to login to end system in POST's body. I have tested the endpoint using POST method by using a JAVA program ...
1
vote
0answers
1k views

Why do I get "ClientInputError - exceptionMessage='Server error returned in unknown format' while using Bulk Query

I am using Bulk Query, reading one batch at a time, and writing to the standard output. When the records size is small like 100000 records, the job works fine, but when I try to extract records like ...
0
votes
1answer
54 views

Encryption decryption Throws Error some time and some time works

Encription Decription Throws Error Some time. Comman pattern that fails is Encripted Text text to decript is when i am passing in encripted text into URL and if URL contains % or + it throws Error. ...
1
vote
1answer
424 views

EMP-Connector not logging in

There's a sample called EMP-Connector which is used to show the streaming API working. I pulled it from github (forcedotcom/EMP-Connector) and compile it. But it fails to get past the login for me. It ...
1
vote
0answers
257 views

autoclose popup window on a custom button after clicking “Save” [closed]

I have implemented a custom Javascript button called "Send Email" under Activity history. When a user clicks this button a new popup window should open that enables the user to send an e-mail. The JS ...
1
vote
0answers
77 views

convert ANT script to Java

I have been digging for almost a week into the forums and S/F Developer pages for good "basic" Java code to retrieve a package from one ORG and Deploy to another ORG. I have had success building the ...
0
votes
2answers
1k views

Bulk Query with PK Chunking enabled sometimes does not return all the batches

The requirement is to use Bulk Query API with PK Chunking enabled, and to create CVS files for each batch with the chunk-size For example, in the Account Object if I have 80,000 records, and have the "...
0
votes
1answer
2k views

org.xml.sax.SAXException: Invalid element in com.sforce.soap.partner.fault.UnexpectedErrorFault - upgradeURL

I am using salesforce SOAP API version 8. This is Login code which i am using for login for Salesforce Soap API. public String login(String userid, String passwd) { SoapBindingStub binding; ...
0
votes
1answer
2k views

Salesforce REST API using Java

I am trying to make Connect Salesforce with Java using Rest Api. But I am getting authentication Error and status = 400 I followed the all the steps mentioned here : http://resources.docs.salesforce....
0
votes
1answer
84 views

Specify record type for Opportunity Custom button- Mass edit

I'm not familiar with Javascript at all, but trying to create a button which allows users to mass-edit some key fields of their opportunities. I have the below by copying the code of the preset button ...
0
votes
1answer
356 views

FuelSdk java osgi seistub cannot be cast to org.apache.cxf.frontend.clientproxy

I am trying to use the fuelsdk in an osgi environment. I am getting this error - java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend....
1
vote
2answers
31 views

Unexpected Java Error in Visualforce component with Apex Class as attribute

All, I've created a Visualforce component which takes an instance of an Apex wrapper class as an attribute. However, when I attempt to insert the component into a VF page, I get the following error ...
0
votes
1answer
727 views

HTTP 400 Bad Request trying to create a bulk API job using RestTemplate

Am trying to use spring RestTemplate to create a bulk API job. Below is the code HttpHeaders headers= new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("sforce-enable-...
0
votes
1answer
479 views

convert java crypto code to apex

i need to convert the java code to apex code. i tried my best using Crypto class but the result are totally different from the one i get using java code. Below are the two java classes which i need to ...
0
votes
2answers
71 views

How to convert “2016-11-08T13:04:16.5260175Z” this into apex datetime like “11/8/2016 1:04 PM”

I need to convert "2016-11-08T13:04:16.5260175Z" this one into DateTime format like "11/8/2016 1:04 PM". Please help me.
0
votes
1answer
300 views

How do I get my test SalesForce instance to work with our Java hosting environment?

We are trying to get our J2EE hosting environment (Jboss 7.1.3.AS) working with our test SalesForce instance. We are running Java 6 v 111 java version "1.6.0_111" Java(TM) SE Runtime Environment (...
2
votes
1answer
76 views

SOQL retrieve limited?

I'm doing an integration using Partner WSDL. When I try to retrieve more than 15 Leads, it's return NullPointerException and I have 43 Leads. When I try to retieve all my Contacts, it's just return ...
0
votes
1answer
135 views

Fuel SDK java: NullPointerException in login

I am using fuel-java-1.0.1. Using the following code for login: ETConfiguration configuration = new ETConfiguration(); configuration.set("clientId", "my-client-id"); configuration.set("clientSecret", ...
2
votes
1answer
211 views

Salesforce streaming API issue in version 37

I am using the salesforce java streaming API code that is provided in the salesforce documentation. Code is working fine. But when I use the CometDReplyExtension for getting the events based on ...
3
votes
1answer
468 views

Multipart Post to Attachment

I am trying to send a binary file in Java to Salesforce '/sobject/Attachment' endpoint. Below is the code I am trying to use, but I keep receiving a 400 error. Any idea as to what the solution is? ...
3
votes
2answers
814 views

Streaming API: Replay Events/ Durable PushTopic from java client

Useful new feature, GA Summer'16. I like it. While I can successfully consume streaming api via java client, no problems, I am unable to take advantage of this new replay option with my java client. ...
0
votes
1answer
432 views

Trigger Emails - Not able to modify the FromAddress using TriggeredSendDefinition

I am trying to trigger send an email using TriggeredSendDefinition. Every time I am receiving an email from the DEFAULT account (Business unit email id). I tried to give from address in ...