Compile error web module (war), cannot find symbol but the other class didn't show any error
52 Replies
⌛
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
what could've been the issue?
Here this is the one
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
that theme looks like VSCode, and i dont like that
No
It's intelli J
Just tried and it didn't work
This is the plug in the war module has
there's probably more information before that@dan1st | Daniel
This is where it started
well here are the errors
literally Java compiler errors
but it's already there
is it imported correctly?
yah I can even view the class by ctrl+click
This is the class
How do I check? it usually will show the compile error right?
but it works perfectly fine even I can run the web app
Did you run
mvn install
on the root project?
I think maybe the web project doesn't find the other oneno he can't find the symbol which is the ejb.impl.ClientSessionHandlerBean
any advice on what to search for further google research?
but also you can see in the other package (servlet) I imported another bean from the same package
oh wait, so when I ctrl+click, it doesn't show me the code in the ejb package directly instead it shows the compiled class
also in the
mvn install
command on the root project?
Can you show the pom.xml of the project that fails (I think it's web, right?)Which module contains
ejb.impl
?yah I tried this?
ejb
that's the root project, right?
Can you show the pom.xml of that?
yah ee-app
also I don't know what
<type>ejb-client</type>
is supposed to doit's for client (remotes)
And in the log of the
mvn install
on the root project, does it list all of your modules?
Are you sure it is supposed to access implementation packages then?that's where it is useful I guess
yah ok it's working
after commenting out the type ejb client
let me check one more time
holly shit yah
https://maven.apache.org/plugins/maven-ejb-plugin/examples/generating-ejb-client.html
https://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html
it looks like
ejb-client
means you only have the stubs
so no actual implementations
since these are on the remote side
oh and maybe if you do want <type>ejb-client</type>
, you may need to add <generateClient>true</generateClient>
to the <configuration>
of the maven-ejb-plugin
in the ejb
moduleso ejb client removes everything that is ends with Bean in the end
maybe
this has to be it
looks like it
Stubs means?
essentially it means you just have the API, not the implementation
and for the implementation, it might e.g. send it to a server which then processes it
This means it would used the ejb's clean compiled packaged installed jar file?
When you have a dependency, it typically uses the version in your local repository (
.m2/repository
).
This is created when doing mvn install
.
If none is found, it attempts to download it from a remote repository.
and I guess with <type>ejb-client</type>
, it looks for a -client.jar
in there
at the right location
which is ~/.m2/repository/your/group/id/your-artifact-id/YOUR_VERSION/
ok
and it couldn't find?
?
I was just telling you where it looks for the JAR
IntelliJ will probably directly use the other module
so you don't have to do
mvn install
on every change
maybe that's why you got different results for IntelliJ and Maven (CLI)oh ok
mvn and intelij
generally the Maven CLI is the source of thruth
alright alright
thank you so much
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Root cause for this problem was not undertanding the dependency configuration properly
Post Closed
This post has been closed by <@910524060771971103>.