You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm like using Structurizr to create my architecture documentation.
But i have recently ran into a class not found exception:
Container apiBackend = company.addContainer("Backend API", "Provides and Receives company data via JSON/HTTPS API.", "js");
ComponentFinder serviceFinder = new ComponentFinder(apiMiddleware, "com.company.services", new SpringComponentFinderStrategy(
new ReferencedTypesSupportingTypesStrategy(false)
));
Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.NoClassDefFoundError: org/springframework/data/jpa/repository/JpaRepository
at com.structurizr.analysis.SpringRepositoryComponentFinderStrategy.findSpringRepositoryInterfaces(SpringRepositoryComponentFinderStrategy.java:41)
at com.structurizr.analysis.SpringRepositoryComponentFinderStrategy.doFindComponents(SpringRepositoryComponentFinderStrategy.java:28)
at com.structurizr.analysis.AbstractComponentFinderStrategy.findComponents(AbstractComponentFinderStrategy.java:57)
at com.structurizr.analysis.SpringComponentFinderStrategy.doFindComponents(SpringComponentFinderStrategy.java:61)
at com.structurizr.analysis.AbstractComponentFinderStrategy.findComponents(AbstractComponentFinderStrategy.java:57)
at com.structurizr.analysis.ComponentFinder.findComponents(ComponentFinder.java:74)
at com.neanex.MiddlewareApplication.main(MiddlewareApplication.java:79)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.springframework.data.jpa.repository.JpaRepository
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more```
Can you guys point me in the right direction?
Extra info: I'm only using 1 CrudRepository for redis and it's not situated in that package, but in a repositories package.
kind regards
The text was updated successfully, but these errors were encountered:
SpringComponentFinderStrategy uses SpringRepositoryComponentFinderStrategy which references and therefore depends on JpaRepository. If you're only looking for @Service annotated components then try directly using SpringServiceComponentFinderStrategy instead and you should get a little further.
How are you using the library? Are you building from source, or including a dependency on structurizr-spring in your Maven/Gradle/etc build/project file?
Hi guys,
I'm like using Structurizr to create my architecture documentation.
But i have recently ran into a class not found exception:
This package only contains @service annotations.
But when i run this i get:
The text was updated successfully, but these errors were encountered: