Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting java.lang.ClassNotFoundException: javax.ws.rs.WebApplicationException while executing FraudDetectionLiveView #123

Open
jgandhi-tibco opened this issue Jul 24, 2023 · 2 comments
Assignees

Comments

@jgandhi-tibco
Copy link

Version Information

Software Version(s)
BusinessEvents 6.3.0
OS Type? Windows
OS Version? 10

What is the expected behavior?

BE engine should get start successfully.

What is the actual behavior?

While starting the be-engine, encountering following exception:

023 Jul 24 12:06:18:457 GMT +05 LVLogs_2 FATAL [main] - [container.standalone] javax/ws/rs/WebApplicationException
java.lang.NoClassDefFoundError: javax/ws/rs/WebApplicationException
        at com.streambase.liveview.client.LiveViewConnectionFactory.getConnection(LiveViewConnectionFactory.java:85)
        at com.tibco.cep.liveview.LVConnectionPool.createObject(LVConnectionPool.java:41)
        at com.tibco.cep.liveview.LVConnectionPool.createObject(LVConnectionPool.java:11)
        at com.tibco.be.util.pool.ObjectPool.initialize(ObjectPool.java:70)
        at com.tibco.cep.liveview.LVConnectionPool.initialize(LVConnectionPool.java:36)
        at com.tibco.cep.liveview.LVMetricsStoreProvider.connect(LVMetricsStoreProvider.java:65)
        at com.tibco.cep.runtime.appmetrics.AppMetricsManager.connect(AppMetricsManager.java:138)
        at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:834)
        at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:303)
        at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:169)
        at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.WebApplicationException
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 11 more

Please provide a unit test that demonstrates the bug.

  1. Create the metric/liveview and channel/sb jars from repo and copy it to BE_HOME/lib/ext/tpcl/contrib
  2. Copy lv-client.jar and sbclient.jar from SB_Home to BE_HOME/lib/ext/tpcl
  3. Start BE studio and import FraudDetectionLiveView example, build ear and start engine

While starting engine, it triggers exception as mentioned above.
Also, while adding all jars from SB_HOME/lib into BE_HOME/lib/ext/tpcl, it gives another exception. Attaching logs files of both scenairos for reference.

LVLogs.zip

@rakulkar-tibco
Copy link
Collaborator

rakulkar-tibco commented Jul 24, 2023

Update your classpath in be-engine.tra in such a way that - SB_HOME/lib is before BE_HOME/eclipse/plugins.
SB_HOME/lib should contain lv-client.jar, sbclient.jar and sb-java-tools.jar.

@jgandhi-tibco
Copy link
Author

jgandhi-tibco commented Aug 3, 2023

Tried updating the classpath as suggested but encountered the following exception: Attached is the log file for reference.

2023-08-03 22:44:28.237+0530 [main] WARN  c.s.l.c.i.w.AbstractLiveViewWebServiceConnection - Error enabling kerberos
org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
	at java.security.jgss/sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162)
	at java.security.jgss/sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:126)
	at java.security.jgss/sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:187)
	at java.security.jgss/sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:439)
	at java.security.jgss/sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:74)
	at java.security.jgss/sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:148)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.createApacheClient(AbstractLiveViewWebServiceConnection.java:403)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.<init>(AbstractLiveViewWebServiceConnection.java:298)
	at com.streambase.liveview.client.internal.ws.LiveViewBinaryWebServiceConnection.<init>(LiveViewBinaryWebServiceConnection.java:76)
	at com.streambase.liveview.client.internal.ws.LiveViewBinaryWebServiceConnection.<init>(LiveViewBinaryWebServiceConnection.java:62)
	at com.streambase.liveview.client.LiveViewConnectionFactory.getConnection(LiveViewConnectionFactory.java:85)
	at com.tibco.cep.liveview.LVConnectionPool.createObjectnectionPool.java:41)
	at com.tibco.cep.liveview.LVConnectionPool.createObject(LVConnectionPool.java:11)
	at com.tibco.be.util.pool.ObjectPool.initialize(ObjectPool.java:70)
	at com.tibco.cep.liveview.LVConnectionPool.initialize(LVConnectionPool.java:36)
	at com.tibco.cep.liveview.LVMetricsStoreProvider.connect(LVMetricsStoreProvider.java:65)
	at com.tibco.cep.runtime.appmetrics.AppMetricsManager.connect(AppMetricsManager.java:138)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:834)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:303)
	at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:169)
	at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)

2023 Aug 03 22:44:28:701 GMT +05 LV6 FATAL [main] - [container.standalone] Could not connect to server with: 'java.lang.NoSuchFieldError: INSTANCE' 
com.streambase.liveview.client.LiveViewException: Could not connect to server with: 'java.lang.NoSuchFieldError: INSTANCE' 
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.streambase.liveview.client.LiveViewExceptionType.error(LiveViewExceptionType.java:578)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.connect(AbstractLiveViewWebServiceConnection.java:660)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.<init>(AbstractLiveViewWebServiceConnection.java:350)
	at com.streambase.liveview.client.internal.ws.LiveViewBinaryWebServiceConnection.<init>(LiveViewBinaryWebServiceConnection.java:76)
	at com.streambase.liveview.client.internal.ws.LiveViewBinaryWebServiceConnection.<init>(LiveViewBinaryWebServiceConnection.java:62)
	at com.streambase.liveview.client.LiveViewConnectionFactory.getConnection(LiveViewConnectionFactory.java:85)
	at com.tibco.cep.liveview.LVConnectionPool.createObject(LVConnectionPool.java:41)
	at com.tibco.cep.liveview.LVConnectionPool.createObject(LVConnectionPool.java:11)
	at com.tibco.be.util.pool.ObjectPool.initialize(ObjectPool.java:70)
	at com.tibco.cep.liveview.LVConnectionPool.initialize(LVConnectionPool.java:36)
	at com.tibco.cep.liveview.LVMetricsStoreProvider.connect(LVMetricsStoreProvider.java:65)
	at com.tibco.cep.runtime.appmetrics.AppMetricsManager.connect(AppMetricsManager.java:138)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:834)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:303)
	at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:169)
	at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)
Caused by: java.lang.NoSuchFieldError: INSTANCE
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:151)
	at org.glassfish.jersey.apache.connector.ApacheConnector.createConnectionManager(ApacheConnector.java:386)
	at org.glassfish.jersey.apache.connector.ApacheConnector.getConnectionManager(ApacheConnector.java:364)
	at org.glassfish.jersey.apache.connector.ApacheConnector.<init>(ApacheConnector.java:255)
	at org.glassfish.jersey.apache.connector.ApacheConnectorProvider.getConnector(ApacheConnectorProvider.java:101)
	at org.glassfish.jersey.client.spi.CachingConnectorProvider.getConnector(CachingConnectorProvider.java:56)
	at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:464)
	at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317)
	at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:819)
	at org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:176)
	at org.glassfish.jersey.client.ClientRequest.getInjectionManager(ClientRequest.java:567)
	at org.glassfish.jersey.client.JerseyWebTarget.onBuilder(JerseyWebTarget.java:371)
	at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:214)
	at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:38)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.postWithRedirect(AbstractLiveViewWebServiceConnection.java:1357)
	at com.streambase.liveview.client.internal.ws.AbstractLiveViewWebServiceConnection.connect(AbstractLiveViewWebServiceConnection.java:647)
	... 14 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants