The error is introduced by not having good network connectivity to Maven Central. The problem is that the local repository is missing some artifacts and this is not corrected by creating a new project or updating an old one.
To correct this, the prerequisites are:
1. You must have good internet access to:
https://repo.maven.apache.org/maven22. You must have set environment variable
TIBCO_EP_HOME in StreamBase Studio's working environment.
MANUAL FIX #1 (involves deleting the local maven repository):
1. Connect to a network that gives you clean access to:
https://repo.maven.apache.org/maven22. Stop SB Studio.
3. Delete the local Maven repository, which is under your home directory and is a folder named ".m2".
4. Restart Studio and create a
new StreamBase project. This project will be created successfully.
Note 1: Deleting a fully populated ".m2" local repository is
not recommended because many download events will be needed to fully reload it. You may also have some manually inserted libraries which this would remove.
Note 2: Using the Maven Update (right-click the project and choose menu item:
Maven > Update Project) will
not add the StreamBase nature to the incomplete project.
MANUAL FIX #2 (does
not involve deleting the local maven repository):
1. Connect to a network that gives you clean access to:
https://repo.maven.apache.org/maven22. Right-click on any incomplete StreamBase project and choose:
Run As > Maven clean
This action downloads some of the required libraries into the local ".m2" repository.
3. Then create a
new StreamBase Project.
This action downloads the rest of the required libraries into the local ".m2" repository. This project will be created successfully.
This new project is error free and has the "natures" (Builders): Java Builder, Maven Project Builder, StreamBase Project Builder.
MANUAL FIX #3 (involves removing and downloading again small parts of the local maven repository):
If there are persistent problems with specific artifacts and no new files are being downloaded from Maven Central, then check which files it is having trouble with, such as:
Failed to read artifact descriptor for antlr:antlr:jar:2.7.7This gives you the directory path in your local repository. Your local repository on Windows is here:
C:\Users\{you}\.m2
The path for this example error is:
C:\Users\{user}\.m2\repository\antlr\antlr\2.7.7
The fix is to:
1. Delete the "2.7.7" directory from the .m2 repository
2. In SB Studio, open the view: Window > Show View > Other > Maven > "Maven Repositories"
3. In the Repositories view, expand "Local Repositories" and right-click "Local Repository (C:\Users\{user}\.m2\repository)" and select "Rebuild Index".
4. Right-click on any broken project and choose: Run As > Maven clean
With good connectivity to Maven Central you should be able to rebuild your index repeating this steps only a few times.
TIP-1: Do not try to correct an initially incorrectly created project. Delete it and work from a good one.
TIP-2: After making changes. If your project has troublesome Problem-view entries, before attempting to change the project to correct them, use project right-click menu:
Maven > Update Project. This resets the Problems view, removing all old and invalid problem markers.