Call enhancement class method from Bus. workflow task
Hi all,
I recently enhanced a global class from SAP (add a new method). Now I would like to call it from a workflow task (ABAP Class object used in the task). So it seems that only "native" methods from the class itself can be selected for the object method of the task.
Same issue if I try to call it via secondary methods options...
Last idea I have before the repair is: retrieve the instance saved into the WF container via a custom class interfacing IF_IFS_SWF_CONTAINER_EXIT (program exit) and call the enhanced method from the method proposed in this interface.
Maybe someone had the same issue? Anyone could help or propose solution?
Many thanks in advance for your help,
KR,
Olivier
I think it might qualify for an OSS message.
There was simmilar note for BADIs which was corrected: https://service.sap.com/sap/support/notes/1156392
CL_SWF_UTL_DEF_SERVICES which is used in PFTC to determine callable methods doesn't include enhancements when calling function SEO_CLASS_TYPEINFO_GET (parameter WITH_ENHANCEMENTS is default FALSE)
Similar Messages
-
Calling ABAP class methods from JAVA application
Hi All,
I want to fetch ITS related information (SITSPMON Tcode) in my JAVA application. But i didnt find much BAPIs for the same. While debugging I came accross few class methods with help of which I can get the required information. So is there any way we can call and execute methods of ABAP classes through java application?
for e.g. I want to call GET_VERSION method of CL_ITSP_UTIL class.
Thanks,
Arati.Hi,
Yes, as per my knowledge the only way to interact is using BAPI exposed as RFCs. So try to invoke those class methods in one CUSTOM BAPI and expose that BAPI as RFC and consume that RFC to get those details.
Regards,
Charan -
Calling sub class method from superclass constructure
hi all
i have seen a program in which a super class constructure class methods of sub class before initialization of fields in subclass ,i want how this is posibble ?
thanks in advanceHear is the code n other thing i have used final variable without initialization n compiler dosen't report error
abstract class Test
public Test()
System.out.println("In DemoClass Constructer");
this.show();
public void show()
System.out.println("In DemoClass Show() method");
class Sub1 extends Test
private final float number;
public Sub1(float n)
this.number=n;
System.out.println((new StringBuilder()).append("Number is==").append(number).toString());
int j;
public void show()
System.out.println("In Sub1 Class Show method ");
public class DemoClass
public static void main(String s[])
Sub1 obj1=new Sub1(5);
Sub1 obj2=new Sub1(6);
thanks for reply -
Calling public class method from the servlet dopost() implementation
Hi!
My application is a simple application where i wrote a JSP page to enter the USERNAME and PASSWORD. And this JSP will call a HttpServlet
with in which i am calling another Java class ValidateUser which will check aginst the Oracle Database table whether that Username and password combination exists and returns the user's name.
But when i am trying to call that method is throwing me an error. here is the typical code i wrote.
servlet
package isispack;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.*;
public class Login extends HttpServlet{
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException{
String userId = req.getParameter("user_id");
String password = req.getParameter("user_pass");
// if uName is null .. user is not authorized.
String uName = Validate(userId, password);
and
Validate class
package isispack;
import java.sql.*;
import java.util.*;
import java.lang.*;
public class ValidateUser
public String ValidateUser(String inputUserid, String inputPwd) throws
SQLException{
String returnString = null;
String dbUserid = "isis"; // our Database user id
String dbPassword = "isisos" ; // our Database password
Connection con = DriverManager.getConnection("jdbc:odbc:JdbcOdbcDriver","isis","osiris");
Statement stmt = con.createStatement();
String sql= "select user_id from isis_table where user_id = '" inputUserid + "' and user_pass= '" + inputPwd +"' ;" ;
ResultSet rs = stmt.executeQuery(sql);
if (rs.next())
returnString = rs.getString("user_id");
stmt.close();
con.close();
return returnString ;
The ERROR
Error(18,18): method ValidateUser(java.lang.String, java.lang.String) not found in class isispack.Login
One more thing i forgot to tell you. I am trying to run this application on JDeveloper. Please helpme out if you can . Thank you.
-SreekanthOK! I made it static method
and tried to call the method as follows
String uName = ValidateUser.ValidateUser(userId, password);
even if i create the instence and
ValidateUser Validate;
then call
String uName= Validate.ValidateUser(userId,password)
In either case is giving me the following error.Tarun, am new to Java programming, please help me out. And can you please tell me where can i find things in consise to brush up my fundamentals?.
Error(18,43): unreported exception: java.sql.SQLException; must be caught or declared to be thrown -
How to call a class method from a jsp page?
Hi all,
i would like to create a basic jsp page in jdev 1013 that contains a button and a text field. When clicking the button, i would like to call a method that returns a string into the text field.
The class could be something like this:
public class Class1 {
public String getResult() {
return "Hello World";
How do i go about this?
ThanksHere is a sample:
HTML><HEAD><TITLE>Test JDBC for Oracle Support</TITLE></HEAD><BODY>
<%@ page import="java.sql.*, oracle.jdbc.*, oracle.jdbc.pool.OracleDataSource" %>
<% if (request.getParameter("user")==null) { %>
<FORM method="post" action="testjdbc.jsp">
<H1>Enter connection Parameters</H1>
<H5>Please enter host name:</H5><INPUT TYPE="text" name="hostname" value="localhost" />
<H5>Please enter port number:</H5><INPUT TYPE="text" name="port" value="1521" />
<H5>Service nanme:</H5><INPUT TYPE="text" name="service" value="XE" />
<H5>Please enter username: </H5><INPUT TYPE="text" name="user" />
<H5>Please enter password</H5><INPUT TYPE="password" name="password" />
<INPUT TYPE="submit" />
</FORM>
<% } else { %>
<%
String hostName = request.getParameter("hostname");
String portNumber = request.getParameter("port");
String service = request.getParameter("service");
String user = request.getParameter("user");
String password = request.getParameter("password");
String url = "jdbc:oracle:thin:" + user + "/" + password + "@//" + hostName + ":" + portNumber + "/" + service;
try {
OracleDataSource ods = new OracleDataSource();
ods.setURL(url);
Connection conn = ods.getConnection();
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver information
out.println("<TABLE>");
out.println("<TR><TD>");
out.println("<B>JDBC Driver version</B>");
out.println("</TD>");
out.println("<TD>");
out.println(meta.getDriverVersion());
out.println("</TD>");
out.println("</TR>");
out.println("<TR><TD>");
out.println("<B>JDBC Driver Name</B>");
out.println("</TD>");
out.println("<TD>");
out.println(meta.getDriverName());
out.println("</TD>");
out.println("</TR>");
out.println("<TR><TD>");
out.println("<B>JDBC URL</B>");
out.println("</TD>");
out.println("<TD>");
out.println(meta.getURL());
out.println("</TD>");
out.println("<TABLE>");
conn.close();
} catch (Exception e) {e.printStackTrace(); }
%>
<%-- end else if --%>
<% } %>
</BODY>
</HTML> -
Calling a class method from another class
how can i call a method / function of one class without extending that class in another class.
and one thing more i want want o check wether any Swing gui is open or closed.how can i call a method / function of one class without extending that class in another class.What?... Umm... You just call it... as in Foo.bar("doe ray me");
i want want to check if any Swing gui is open or closed.Ummm, what? I don't understand the question. Do you mean find out if a particular java programming is allready running, of do you mean is the JPanel visible, or something else? -
Can we call super class method from Overwrite method using SUPER keyword
Hi All,
For one of our requirement , I need to overwrite "Process Event" method of a feeder class ,where process event is present is protected method. so when we are making a call , then its saying
"Method "process event" is unknown or Protected or PRIVATE ".
But we are just copied the source code in the "Process Event" method to the Overwrite method.
Can anyone provide me the clarification , why system behaving like this.
Thanks
ChannaHi,
I think you can not.
Because, only public attributes can be inherited and they will remain public in the subclass.
for further detail check,
http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
regards,
Anirban -
I suffer problems understanding how to call up class methods from within my programs and would like to see further examples of coding and a lending hand with the problem below, program one ProductClass works out stock item lines of a product, the program then needs to ask for the StaticProduct Class(the second program attached) to check for a valid barcode length and for how many odds and even numbers are within it a valid barcode would be 5000127062092
I would very much appreciate some help:
* This is a program to Enter and check product codes and prices
* and give a summary of values at the end
* @author (Jeffrey Jones)
* @version (version 2 5th April 2003)
public class ProcessProduct
public static void main(String args[])
StaticProduct Product = new StaticProduct();
//declare variables
String manuf;
String name;
int sLength;
String p;
String barcode;
int price;
int quantity;
int totalPrice=0;
int transactions=1;
int totalQuantity=0;
int totalValue=0;
int averageCost=0;
//Input Details
System.out.print("Enter Product Manufacturer : ");
manuf = UserInput.readString();
//start of while loop checking for 0 to exit loop
while (!manuf.equals("0"))
System.out.print("Enter Product Name : ");
name = UserInput.readString();
System.out.print("Enter Bar Code : ");
barcode = UserInput.readString();
//check for invalid data
if (StaticProduct.isValidBarcode(barcode))
{barcode = new code();
p = new Product("manuf","name","quantity","price");
}//closing bracket of if
else
{//error handling
}//closing bracket of if
//check for quantity input and errors
System.out.print("Enter Quantity : ");
quantity = UserInput.readInt();
if (quantity<=0)
{ System.out.print(" Error, invalid value ");
System.exit(0);
}// check for invalid entries
System.out.print("Enter Price :");
price = UserInput.readInt();
//check for price input and errors
if (price<=0)
{ System.out.print(" Error, invalid value ");
}// check for invalid entries
//total price value
totalPrice=price*quantity;
//Output of correctly inputted data
System.out.println(manuf+":"+name+":"+barcode+":"+price);
System.out.println(quantity+" @ "+price+" = "+totalPrice);
//update variables quantities
//update total quantity
totalQuantity = (totalQuantity + quantity);
//keep count of total value
totalValue = (totalValue + totalPrice);
//keep count of totqal no of transactions
transactions = (transactions++);
//Input Details
System.out.print("Enter Product Manufacturer : ");
manuf = UserInput.readString();
}//closure of loop
//display final totals
System.out.println("Transactions: "+transactions);
System.out.println("Total quantity: "+totalQuantity);
System.out.println("Total value: "+totalValue);
System.out.println("Average Cost: "+totalValue/totalQuantity);
System.exit(0);
}//closing bracket input and output of data
}//end class
* Write a description of class StaticProduct here.
* @author Jeffrey Jones
* @version 1 1st April 2003
public class StaticProduct
* isValidBarcode method - to check for correct barcode and length
* @return boolean
public static boolean isValidBarcode(String barcode) {
barcode = new barcode();
// validateBarcode length
if ( barcode.length() != 13 ) {
System.out.println("Invalid barcode " + barcode + " not 13 characters");
return false;
}//if
for ( int i = 0; i < barcode.length(); i++ ){// Check every char a digit
if ( ! Character.isDigit( barcode.charAt(i) ) ){
System.out.println("Invalid barcode " + barcode + " not all digits");
return false;
}//if
}//endfor
int sum1 = 0; // Sum first + third + etc.
for ( int i = 0; i < barcode.length() - 1; i += 2 ){
sum1 += barcode.charAt(i) - '0';
}//endfor
int sum2 = 0; // Sum second + fourth + etc.
for ( int i = 1; i < barcode.length() - 1; i += 2 ){
sum2 += barcode.charAt(i) - '0';
}//endfor
int check = sum1 + 3 * sum2; // 1st sum + three times 2nd sum.
check = check % 10; // Remainder on division by 10.
if ( check != 0 ){
check = 10 - check;
}//endif
if (check != barcode.charAt(12) - '0'){
System.out.println("Invalid barcode " + barcode + " check digit error");
}//endif
return ( check == barcode.charAt(12) - '0' );
}//end isValidBarcode
public static void main(String[] argv) {
System.out.println(isValidBarcode("1234567890123"));
System.out.println(isValidBarcode("123"));
System.out.println(isValidBarcode(""));
System.out.println(isValidBarcode("5018374496652"));
}//end main
}//end classRead through your text book or some java tutorials from this site to understand what classes are, what are methods, etc.
Your program is full of wrong initializations (as you rightly said you dont understand how to call up class method I would add that you dont understand how to call classes and what do they return e.g.
You have declared
String p;
then you go ahead and do this
p = new Product("manuf","name","quantity","price"); This is syntax for calling a class is this class returning a String? :s
Please go through the basics of Object Oriented Programming and then start with the coding part else you will face such very many difficulties and waste more time of yours in just coding with no results.
Look for the tutorials on this site and read through them and do example as given in them. -
How to call a function module from a workflow ? ?
hi all,
i have to call a function module from an workflow, i got a hint from someone that i have to enhance an object and then write and methode, in this methode i can call that function module. I dont know even how to go for it.
Can anyone suggest that how to go for it ?
thanks.
raman khurana.Hi Raman Khurana,
Please go through the links it might be helpful , notsure
http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/content.htm
http://www.abapcode.info/2007/07/standard-function-module-text.html
http://it.toolbox.com/wiki/index.php/SAP_Workflow
Regards,
Sreekar.Kadiri. -
Call a Shell Script from a workflow
Hi,
I need to call a shell script from a workflow. How can I do this.
If the script takes any input, How can I pass that input to the script
and call the script in the workflow.
Suggestions are needed.
Thanks,
PanduHi ,
I am executing the following java code :-
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
public class SetPermissions {
* @param args
public void runCmd()
System.out.println("inside runCmd()");
Runtime r = Runtime.getRuntime(); //get runtime information
try
Process Child = r.exec("/bin/sh") ; //execute command
System.out.println("child process created..");
BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
outCommand.write("test.sh");
System.out.println("command executed..");
outCommand.flush();
Child.waitFor(); //wait for command to complete
System.exit(Child.exitValue());
catch(InterruptedException e)
{ //handle waitFor failure
System.out.println("ERROR: waitFor failure");
System.exit(10); //exit application with exit code 10
catch(IOException e)
{ //handle exec failure
System.out.println("ERROR: exec failure"+e);
System.exit(11); //exit application with exit code 11
public static void main(String[] args) {
// TODO Auto-generated method stub
SetPermissions setPer=new SetPermissions();
setPer.runCmd();
The shell script test.sh is changing the access permissions for a particular folder on Unix server. The code is not exiting , and the acces permissions on the folder are also not changing.
If I execute the shell script directly , the access permissions gets changed on the folder. Please let me know the possible cause for this. -
Call a Webservice method from DotNetApplication
Hi all,
I have created One web service using Axis. My WebServices are below:
import java.util.*;
public class NHLService {
HashMap standings = new HashMap();
public NHLService() {
// NHL - part of the standings as per 04/07/2002
standings.put("atlantic/philadelphia", "1");
standings.put("atlantic/ny islanders", "2");
standings.put("atlantic/new jersey", "3");
standings.put("central/detroit", "1");
standings.put("central/chicago", "2");
standings.put("central/st.louis", "3");
public String getCurrentPosition(String division, String team) {
String p = (String)standings.get(division + '/' + team);
return (p == null) ? "Team not found" : p;
}Its name is NHLService.jws. Then I run this service in my localhost like this "http://localhost:8080/axis/NHLService.jws" It is running and show that
There is a Web Service here
Click to see the WSDL Now I can view the wsdl. Now I want to call this webservice method from DotNet Application.Please any one knows that can you guide me the steps.
Thanks in Advance,
Rajbut i don't understand a thing...
when i create a static stub client i link with the config-wsdl file the path of my webservices wdsl and the client compile and run well...
why with the servlet i had to link .class file or jar file??
thanks a loto -
Calling a service method from a DataAction
Hello!
I'm trying to call a service method from a DataAction, cobbling ideas from the Oracle JDeveloper 10g Handbook and the Oracle ADF Data Binding Primer.
I have created a service method and exposed it using the client interface node of the application module editor. It is called "process()" and it now appears in the data control palette under MyAppDataControl->Operations (just above the built-in action bindings Commit and Rollback). As part of this procedure, I modified MyAppImpl.java and put the process() method there.
I don't want to call process() by dragging and dropping it onto a Data Action because depending on the outcome, I want to branch to different pages. process() returns an int that will tell me where to branch. Thus, I am trying to call it from an overridden invokeCustomMethod() method of the lifecycle of a DataAction, where I can get the int, create a new ActionForward, and set it in the DataActionContext. (If I'm barking up the wrong tree, let me know!)
So, I need to call MyAppImpl.process() from within the invokeCustomMethod() method of my DataAction. Looking at the class declaration, I noticed that it extends ApplicationModuleImpl. I figure that, if I can get the ApplicationModule, I can cast it to MyAppImpl and call the process() method. Unfortunately, that doesn't work. When I got the application module, I checked the class and it's oracle.jbo.common.ws.WSApplicationModuleImpl. I tried casting it and got a class cast exception.
Here's the code I'm using:
protected void invokeCustomMethod(DataActionContext actionContext) {
BindingContext ctx = actionContext.getBindingContext();
DCDataControl dc = ctx.findDataControl("MyAppDataControl");
log.debug("invokeCustomMethod(): dc.getClass().getName()=" + dc.getClass().getName()); // result is: oracle.jbo.uicli.binding.JUApplication
ApplicationModule am = null;
MyAppImpl myAppImpl = null;
int processResult = 0;
if (dc instanceof DCJboDataControl) { // this is true
am = dc.getApplicationModule();
log.debug("invokeCustomMethod(): am.getClass().getName()=" + am.getClass().getName()); // result is: oracle.jbo.common.ws.WSApplicaitonModuleImpl
if (am instanceof ApplicationModuleImpl) { // this is false
log.debug("invokeCustomMethod(): am is an instanceof ApplicationModuleImpl.");
if (am instanceof MyAppImpl) { // this is false
log.debug("invokeCustomMethod(): am is an instanceof MyAppImpl.");
processResult = ((MyAppImpl)am).process();
log.debug("invokeCustomMethod(): processResult=" + processResult);
super.invokeCustomMethod(actionContext);
What am I doing wrong? Can anyone explain the different class hierarchies and why my application module isn't the class I'm expecting?
Thanks,
-Anthony CarlosGeorg,
it was in the javadoc of oracle.adf.model.binding.DCBindingContainer
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/vtTopicFile.bc4jjavadoc36%7Crt%7Coracle%7Cadf%7Cmodel%7Cbinding%7CDCBindingContainer%7Ehtml/navId.4/navSetId._/
However, I see it's not the case in other sub-classes of JboAbstractMap like DCControlBinding and DCDataControl.
Weird... I'm keeping you informed if I find more information.
Regards,
Didier. -
How to call backing bean method from java script
Hi,
I would like to know how to call backing bean method from java script.
I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
So could any please letme know how to call backing bean method from java script
Thanks
Murali
Edited by: mchepuri on Oct 24, 2009 6:17 PM
Edited by: mchepuri on Oct 24, 2009 6:20 PMHello,
May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
the problem is.
1. before loading the page a javascript comes on which i clicked ok
2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
I m trying to do this through server listener and click listener. the code is(adf jspx page)
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
<af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
<af:commandButton text="commandButton 1"
binding="#{backingBeanScope.backing_check4.cb1}"
id="cb1" action="#{beanCheck4.submit1}"/>
<af:clientListener type="click" method="delRow"/>
<af:serverListener type= "jsServerListener"
method="#{backingBeanScope.backing_check4.submit1}"/>
<f:facet name="metaContainer">
<af:resource type ="javascript">
x=confirm("hi");
// if(x){
delRow = function(event){
AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
return true;
</af:resource>
</f:facet>
</af:form>
</af:document>
</f:view>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
</jsp:root>
the backing bean code is -----
public class classCheck4 {
public classCheck4() {
public String submit1() {
System.out.println("hello");
return null;
} -
Problem calling a Java Method from C++
hi everyone,
i'm using JNI and i'm trying to call a Java method from C++, this is the code:
SocketC.java
public class SocketC
private native void conectaServidor();
private void recibeBuffer()
System.out.println("HELLO!!!");
public static void main(String args[])
SocketC SC = new SocketC();
SC.conectaServidor();
static {
System.loadLibrary("Server_TCP");
Server_TCP.cpp
char* recibirSock()
int _flag = 1;
while(_flag != 0)
memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
recv(sock,buffer,sizeof(buffer),0);
printf(" Mensaje del cliente: %s\n",buffer);
_flag = strcmp(buffer,"salir");
}//fin while
return buffer;
void enviarSock()
int _flag = 1;
getchar();
while(_flag != 0)
memset(buffer,0,sizeof(buffer));//procedimiento para enviar
printf("\n Escriba: ");
gets(buffer);
// err=scanf("%s",buffer);
send(sock,buffer,sizeof(buffer),0);
_flag = strcmp(buffer,"salir");
}//fin while
}//fin enviarSock
DWORD servicio(LPVOID lpvoid)//
char *buf;
printf("\n Cliente aceptado!!!!!\n");
buf=recibirSock();
return 0;
JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)
//void main()
/*this is the problem i'm calling the method recibeBuffer*/
jclass cls = env->GetObjectClass(obj);
jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "(V)V");
if (mmid == 0)
return;
env->CallVoidMethod(obj, mmid); //llama a Java
WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock
printf("TCP conexion Sockets\n\n");
//estimez vous heureux que je foute pas de copyright ;)
system("TITLE TCP Conexion Sockets (Version server)");
//fo avouer que c'est plus joli
int port;
printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
scanf("%i",&port);
sinserv.sin_family=AF_INET; //Je ne connais pas d'autres familles
sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
sinserv.sin_port=htons(port);
server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
//SOCK_STREAM pour le TCP
bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
//On lie les parametres du socket avec le socket lui meme
listen(server,SOMAXCONN);//On se met � �couter avec server, 0 pour n'accepter qu'une seule connection
printf(" Servidor conectado.");
while(1)
sinsize=sizeof(sin);
if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
{//accept : acepta cualquier conexion
if (hReadThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
servicio, 0, 0, &dwThreadID))
printf("\nHOLA!");
GetExitCodeThread(hReadThread,&dwExitCode);
CloseHandle (hReadThread);
else
// Could not create the read thread.
printf("No se pudo crear");
exit(0);
when i'm running the proyect i get this error:
C:\POT Files\UCAB\tesis\esmart\french>java SocketC
Exception in thread "main" java.lang.NoSuchMethodError: recibeBuffer
at SocketC.conectaServidor(Native Method)
at SocketC.main(SocketC.java:16)
i don't know why this is happening i got declare the method recibeBuffer in my SocketC.java class, but doesn;t work can anyone help me?
PD: sorry for my bad english i'm from VenezuelaNext time please paste your code between [code] tags with the code button just above the edit message area.
To answer your question, you wrote the wrong method signature. It should be:jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "()V");Regards -
How to call a bean method from javascript event
Hi,
I could not find material on how to call a bean method from javascript, any help would be appreciated.
RalphHi,
Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
Cheers,
Ralph
Maybe you are looking for
-
How can I create a new worksheet every time that one cell it´s filled
I was looking in the references formulas and I find the formula "Direcction". My goal it´s to create a new worksheet everytime that some cells are filled. So I need one formula that alows me to put this reference and open automaticaly a new worksheet
-
We have itunes music on a computer, an ipod nano, and a new ipod touch under two different accounts. How can we combine the music from both accounts to one device?
-
Conversion from milliseconds to Date in 1.5
A java.util.Date object can be constructed by passing the number of milliseconds since 1 January 1970 as a constructor argument. This Date can then be formatted to a human-readable format with SimpleDateFormat. I have tested this conversion from mill
-
What do I do about Error Code 0x80070057 when I attempt to upload a mpg 4 file into MobileMe?
What do I do about Error Code 0x80070057 when I attempt to upload a mpg 4 file into MobileMe?
-
Hi guys! I am planning on reinstalling windows on my laptop. I have updated my ipod with all my music, and plan on just copying over the 'control' folder to my newly reinstalled computer. What I am wondering is, when I try to connect my iPhone back u