We are having a BAPI that uploads the specified document to SAP.
The BAPI accept three parameters:
ID, FILE_LOC and FOLDER_NAME.
And I'm setting the values as follows in the JCo code:
JCO.ParameterList paramList = function.getImportParameterList();
paramList.setValue("101XS1", "EXTERNAL_ID");
paramList.setValue("tmp", "FOLDER_NAME");
paramList.setValue("D:/upload/foo.txt", "FILE_LOCATION");
But when I'm trying to execute the BAPI, am getting the following exception:
com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Exception condition "NOT_SUPPORTED_BY_GUI" raised.
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1242)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3816)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3261)
The same BAPI is working fine if I execute through thick client(SAP Logon). But through JCo, its giving this error.
This error in itself does not tell you more than "the ABAP program (function module) raised an exception named NOT_SUPPORTED_BY_GUI". What this really means is probably that the function module tried to access some GUI-related function - which is illegal for BAPIs, so either this is a custom-made RFC function module or you have found a programming error in the SAP standard coding and should open a SAPnet support ticket.
You can't use GUI services in non-gui operations, as RFC or background JOBs. In general avoid use of class cl_gui_frontend_services and functions GUI_*. Alternatively use OPEN_DATASET FOR INPUT/OUTPUT isntruction in your RFC enabled function.
Regards
Related
In a hybrid DES-ABM model I've been building in Anylogic 8, I'm struggling with sending messages. In main, there are several clinics, and within these clinics the process modeling library is used to model within clinic processes. Once the patient-agent reaches a 'seize' block, a doctor-agent is seized.
Now, what I am trying to do is, once that doctor-agent is seized, a message needs to be sent from that 'seize' block to the doctor-agent that lives in the clinic.
I've consulted the Anylogic Help manual, and I have inserted these code snippets at the 'seize' block, in the 'On entry' field:-
agent.send("Start", Clinic.doctor)
send("Start", Clinic.doctor)
Error: Description: Cannot make a static reference to the non-static field
agent.send("Start", doctor)
send("Start", doctor)
Error: Description: The method send(Object, Agent) in the type Agent is not applicable for the arguments (String, Clinic._doctor_Population).
How would I do this?
You need to send the message in the "onSeize" code section of the seize block. There, type:
send("Start", unit)
The keyword "unit" will send it to the doctor that has been seized. Read more about those keywords and where to find them here:
http://www.benjamin-schumann.com/blog/2016/2/4/the-magic-lightbulb-and-how-it-can-help-your-anylogic-modelling
I want to let my application to register for topic messaging, but each time I try to call Topic registration it is returning the error below
java.lang.IllegalArgumentException: Invalid topic name:
Using the method bellow
GcmPubSub.getInstance(context).subscribe(regToken, "/topics/testTopic", null);
I am using the tutorial on this link https://developers.google.com/cloud-messaging/topic-messaging. I will greatly appreciate your help on this error.
Please try this with the sample app. "/topics/testTopic" should be fine. As mentioned in the documentation, any topic name matching this regex should be fine: /topics/[a-zA-Z0-9-_.~%]+
For anyone running into this error: double check that you conform to the specification on the topic name: /topics/[a-zA-Z0-9-_.~%]+.
The original question actually does conform to the spec and I have no answer for why the error occurs. However another way to trigger the error is not conforming to the spec. In my case I mistakenly assumed path separator characters are allowed and used a topic like /topics/users/123 to mimic my REST API. The last slash is not allowed.
I use Java to index some documents with a BulkRequestinto Elasticsearch 1.4.2.
Some of these docs only need to be written when they are not already in the index, so I set the CREATE-opType like this:
indexRequestBuilder.opType(IndexRequest.OpType.CREATE)
Now the docs which were already in the index fail in the BulkResponse.
Error message bulkItemResponse.getFailureMessage():
DocumentAlreadyExistsException[...]
I want to ignore this class of exception but retry writing the docs for all other type of exceptions.
So how can I catch just the DocumentAlreadyExistsException?
I can get the Failure with bulkItemResponse.getFailure(), but I cannot find any information about the type of the Exception beside the error message.
I could look in the error-message for the exception name, but this may be rather fragile with new Elasticsearch versions:
if(bulkItemResponse.getFailureMessage().startsWith("DocumentAlreadyExistsException[")
Is there a better way?
This cant be possible. The bulk request is actaully executed on the server side and not client side. And hence all it can do is to sent the stacktrace back and not the Exception object.
I'm implementing the Thrift Remote Procedure call framework in Java. I set up thrift and generated my skeleton code without a lot of issues, but now that I'm actually using the API methods, I get strange errors.
Here are the errors I get:
Exception in thread "main" org.apache.thrift.transport.TTransportException: Cannot write to null outputStream
at org.apache.thrift.transport.TIOStreamTransport.write(TIOStreamTransport.java:142)
at org.apache.thrift.protocol.TBinaryProtocol.writeI32(TBinaryProtocol.java:163)
at org.apache.thrift.protocol.TBinaryProtocol.writeMessageBegin(TBinaryProtocol.java:91)
at SimonSays$Client.send_registerClient(SimonSays.java:102)
at SimonSays$Client.registerClient(SimonSays.java:96)
at simon.main(testClass.java:16)
I don't think I'm not making any mistakes, but just to make sure, here's the code that's leading to the errors:
TProtocol prot = new TBinaryProtocol(new TSocket("http://thriftpuzzle.facebook.com",9030));
SimonSays.Client client = new SimonSays.Client(prot);
client.registerClient("userEmailAddress#gmail.com");
The error is said to be generated from the client.registerClient() call, but that is a call to the code generated by Thrift, which makes me feel that I'm doing something wrong in setting up the connection itself.
The part about making a TProtocol instance I included myself, and it's likely that that's where the problem lies.
I was hoping that someone would have more of an idea about what's going wrong that I do.
Please let me know if more information or clarification is needed.
Edit: I found the TProtocol instantiation statement from the Cassandra Wiki
You need to call the open() method on your TSocket instance in order for it to connect and obtain the input/output streams it needs.
Source: TSocket.java
We are using OC4J 10.1.3.5 and ADF. I have a popup form and when closing we got error below. I wonder what am I missing and how can I resolve it?
Jun 15, 2010 8:26:49 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
SEVERE: java.lang.IllegalStateException: popView(): No view has been pushed.
javax.faces.el.EvaluationException: java.lang.IllegalStateException: popView(): No view has been pushed.
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1087)
at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:204)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:269)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:327)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:233)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:202)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:12
From the documentation:
IllegalStateException signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
There's no silver bullet to resolve these kinds of exceptions; you have to deal with it on a case by case basis, studying the API of whatever library you're using, and figuring out where the illegal state happens.
In this particular case, it looks like popView() is being called when the stack is empty. You may be missing a pushView, or miscalculating the number of pushes vs pops.