Upgrading Java operators and adapters results in com.streambase classes not found
book
Article ID: KB0079096
calendar_today
Updated On:
Description
When importing my StreamBase 10 projects into TIBCO Streaming some classes are not found in the custom Java operator and adapter code.
How can this be repaired?
Resolution
Java imports of classes with package structure:
com.streambase.*
such as:
com.streambase.org.apache.commons.lang.StringUtils
and others which are not:
com.streambase.sb.*
com.streambase.liveview.*
com.tibco.ep.*
are not part of the pubic StreamBase API and may be refactored or removed without notice in newer versions of the TIBCO Streaming platform.
In all cases, the Java import should be changed to require the class and package as provided by the respective 3rd-party provider.
For example, change:
import com.streambase.org.apache.commons.lang.StringUtils;
to:
import org.apache.commons.lang3.StringUtils;
as specified in the new version dependency.
This will require an update to the project's pom.xml to add as a dependency the actual 3rd-party library as a "compile" dependency, and that library will need to be found in the local Maven Repository (the user's .m2/ folder). If the library JAR is found in Maven Central, then simply adding the dependency and saving the pom.xml will cause maven during the next build to retrieve the necessary files. If the library JAR is not available from Maven Central or your corporate maven repository, then it should be obtained from the 3rd-party vendor and imported into your local repository as so (example):
mvn install:install-file -Dfile=kafka-clients-1.0.1-mapr-streams-6.0.0.jar -DgroupId=org.apache.kafka -DartifactId=kafka-clients-mapr -Dversion=6.0.0 -Dpackaging=jar -DgeneratePom=true
For sharing with your team, the 3rd-party library should also be installed into your corporate maven repository. Please contact your repository administrator for instructions how to do this.
Issue/Introduction
Development guidance
Feedback
thumb_up
Yes
thumb_down
No