Re: Classes not explicitly used is not in classpath of fetched dependency

28 views
Skip to first unread message
Message has been deleted

christoffer pedersen

unread,
Aug 25, 2012, 4:30:02 PM8/25/12
to simple-b...@googlegroups.com
And another thing. If i run "console" in the server project i can find the class just fine in the scala REPL. 
I'm no wizard in dependency management, all wise words are welcome

Den lørdag den 25. august 2012 22.15.45 UTC+2 skrev christoffer pedersen:
Greetings,

I've tried searching for an answer with no luck. My problem is simple in nature, i have a client/server application where the server performs some client work when persisting changes in a database. As such the server application depends on the client library. Everything works fine in a development setup when i have both server and client in an IDE. 

However, for production i publish the client library to my self-hosted maven style repository. Again everything get's fetched properly, and code is running perfectly until i need to persists something in the database where i'll eventually get a ClassNotFoundException. The problem (i think) is that the class that can't be found is never used directly in my code. It's used by a model class in my code, but not before runtime. I've tried explicitly importing the class, of course my IDE reports it as unused (because it technically is) and i'm thinking that's why it's not fetched (?) I've checked the published jar, and the class is included. 
So my problem is just that it's not being fetched, is there a way to tell SBT to fetch everything or something like that? I find it hard to believe that no one else have had this problem
 

Chris Twiner

unread,
Aug 26, 2012, 5:09:24 AM8/26/12
to simple-b...@googlegroups.com
hiya, just to be sure here - are you running the application in
production via sbt?

If not then your server application / framework / app server controls
the classpath and you have a deployment problem.
> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/simple-build-tool/-/Mva6Z2naNLUJ.
>
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to
> simple-build-t...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/simple-build-tool?hl=en.

christoffer pedersen

unread,
Aug 26, 2012, 7:16:51 PM8/26/12
to simple-b...@googlegroups.com
Yes, production is run in SBT. My development setup works only in my IDE. When i run from SBT (when dependencies are fetched from my repository) the problem arises. 

christoffer pedersen

unread,
Aug 27, 2012, 4:01:43 AM8/27/12
to simple-b...@googlegroups.com
Okay, I think the problem boils down to some scala to java conversion. Possible because i have class extending a function. Might not be ST after all
Reply all
Reply to author
Forward
0 new messages