1. Layne Strong
  2. PowerBuilder
  3. Saturday, 26 June 2021 00:39 AM UTC

Is there a powerbuilder detail debug log that contains java call exceptions with stack trace info?

 The jboss-client.jar is on the classpath but org.wildfly.naming.client.WildFlyInitialContextFactory class from the jar can not be instantiated. Why can't PowerBuilder instantiate the class?

 

For example, when trying to execute i_ejbconn.connecttoserver (properties), we get the following error:

Failed to connect to the EJB server.Cannot instantiate class: org.wildfly.naming.client.WildFlyInitialContextFactory

 

Source code:

properties[1] = "java.naming.factory.initial=" + is_jndi_initial_context_factory //is_jndi_initial_context_factory
properties[2] = "java.naming.provider.url=" + is_jndi_provider_url // is_jndi_provider_ur
properties[3] = "java.naming.factory.url.pkgs=org.jboss.ejb.client.naming"
properties[4] = "jboss.naming.client.ejb.context=true"

i_ejbconn = CREATE ejbconnection

TRY

i_ejbconn.connecttoserver( properties )  //FAILS

ib_ejbconn_init = TRUE

CATCH ( exception e)
string info
info = "URL=" + properties [2] + " factory=" + properties[1]
f_handle_exception (info, e)

END TRY

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 26 June 2021 21:16 PM UTC
  2. PowerBuilder
  3. # 1

Hi Layne;

    FYI: Here is an example PB application based EJB class example and detailed instructions on how to proceed in setting up a PB / EJB App, JDK, proxies, etc to call Java classes ...

http://chrispollach.blogspot.com/2018/04/pb2j.html

HTH

Regards... Chris

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 26 June 2021 19:49 PM UTC
  2. PowerBuilder
  3. # 2

I'm not sure if this will help you, but I think you have to add those drivers from the menu "Tools > System Options" and then go to the "Java" tabpage on the right. (We use a Tibero database, hence the entry for "tibero6-jdbc.jar").

In your case, I'm not sure if you would have to add "pbejbclient.jar", but here's some useful information:

https://docs.appeon.com/pb2019/connecting_to_your_database/ch03s01.html

regrds

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.