Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8793603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:08:34+00:00 2026-06-13T23:08:34+00:00

public void query(String sql, QueryResult queryResult) { q = queryResult; realQuery(sql, conString); } public

  • 0
public void query(String sql, QueryResult queryResult) {
    q = queryResult;
    realQuery(sql, conString);
}

public static native void realQuery(String sql, String conString) /*-{
    $wnd.pg.connect(conString, function(err, client) {
        client.query(sql, function(err, result) {
            console.log(result.rows);
            var code = "@db.tud.bp.werkstatt.client.PgClient::result(Ljava/lang/String;)(" + '"' + JSON.stringify(result.rows).replace('"','\\"') + '"' + ");";
            console.log(code);
            eval(code);
        });
    });
}-*/;

I get this error:

com.google.gwt.event.shared.UmbrellaException: Exception caught: (Error) 
@de.tud.bp.werkstatt.client.PgClient::realQuery(Ljava/lang/String;Ljava/lang/String;)
([string: 'SELECT age FROM person WHERE name='Ayeb'', string: '/rest/query']): 
  unrecognized calling format
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)

What does “unrecognized calling format” mean, and why do I not get any Google results when searching for it?

I suspect that I am calling the JSNI function in a wrong way in line 3. But I am AFAIK following all rules specified in the docs here.

EDIT:

This works:

public static native void realQuery(JavaScriptObject parsed) /*-{
    var sql = parsed[0];
    var conString = parsed[1];
    $wnd.pg.connect(conString, function(err, client) {
    });
}-*/;

This doesn’t:

public static native void realQuery(JavaScriptObject parsed) /*-{
    var sql = parsed[0];
    var conString = parsed[1];
    $wnd.pg.connect(conString, function(err, client) {
        client.query(sql, function(err, result) {
            console.log(result.rows);
        });
    });
}-*/;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:08:35+00:00Added an answer on June 13, 2026 at 11:08 pm

    You can’t eval JSNI invocations into Java – that code is not real JavaScript, but is part of how JS and Java interact within GWT. The way this ends up working is that those invocations are rewritten so that they call the real JavaScript function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public static void MyFunction(MyErrorClass err) { var query = from filter in DataContext.ErrorFilters select
I'm working on the following LINQ query: public void GetAuditRuleAgencyRecords(IEnumerable<Entities.AuditRule> rules) { using (LinqModelDataContext
public void EditAndSave(String fileName) { Bitmap b = new Bitmap(fileName); /** * Edit bitmap
i've got the following problem: here is my sql for the update public void
public void printList( ){ Node<E> p ; System.out.printf( [ ) ; for ( p=head.next
public void openOptions() { Intent intent=new Intent(this,Game.class); //intent.putExtra(razmer, level); startActivity(intent); // Intent intent=new Intent(this,Options.class);
public void swap(Point var1, Point var2) { var1.x = 100; var1.y = 100; Point
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Init(); backthread tr=new backthread(); tr.execute(0,0,0); } backthread
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); TextView lattv=(TextView)findViewById(R.id.lat); TextView lngtv=(TextView)findViewById(R.id.lng); JSONParstring jParser =
public void GrabData() throws IOException { try { BufferedReader br = new BufferedReader(new FileReader(data/500.txt));

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.