Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1088905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:08:22+00:00 2026-05-16T23:08:22+00:00

Is there any way to force Scala interpreter (started through SBT) to print complete

  • 0

Is there any way to force Scala interpreter (started through SBT) to print complete stack trace. By default, less than 10 lines are displayed:

scala> new CacheMonitoringClient
javax.management.InstanceNotFoundException: com.bea:Name=DomainRuntimeService,Type=weblogic.management.beanservers.domainrun
time.DomainRuntimeServiceMBean
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:195)
        at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
        at javax.management.remote.rmi.RMIConnectionImpl_921_WLStub.getAttribute(Unknown Source)
        at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:498)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
        at weblogic.security.Security.runAs(Security.java:61)
        at weblogic.management.remote.common.RMIConnectionWrapper.getAttribute(ClientProviderBas...

As a workaround I’m using try { new CacheMonitoringClient } catch { case ex => ex.printStackTrace} (explicitly wrapping the calls that throw the exceptions I’m interested in), but that really ugly…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:08:23+00:00Added an answer on May 16, 2026 at 11:08 pm

    Use lastException if you want just one thing:

    scala> 1 / 0
    java.lang.ArithmeticException: / by zero
        at .<init>(<console>:12)
        at .<clinit>(<console>)
        at RequestResult$.<init>(<console>:9)
        at RequestResult$.<clinit>(<console>)
        at RequestResult$scala_repl_result(<console>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.util.control.Exception$Catch.apply(Exception.scala:79)
        at scal...
    scala> lastException.printStackTrace
    java.lang.ArithmeticException: / by zero
        at line101$object$$iw$$iw$$iw$$iw$$iw$$iw$.<init>(<console>:12)
        at line101$object$$iw$$iw$$iw$$iw$$iw$$iw$.<clinit>(<console>)
        at RequestResult$line101$object$.<init>(<console>:9)
        at RequestResult$line101$object$.<clinit>(<console>)
        at RequestResult$line101$object.scala_repl_result(<console>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.util.control.Exception$Catch.apply(Exception.scala:79)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1.apply(Interpreter.scala:980)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1.apply(Interpreter.scala:980)
        at scala.util.control.Exception$Catch.apply(Exception.scala:79)
        at scala.tools.nsc.Interpreter$Request.loadAndRun(Interpreter.scala:979)
        at scala.tools.nsc.Interpreter.loadAndRunReq$1(Interpreter.scala:578)
        at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:597)
        at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:575)
        at scala.tools.nsc.InterpreterLoop.reallyInterpret$1(InterpreterLoop.scala:471)
        at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:514)
        at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:361)
        at scala.tools.nsc.InterpreterLoop.processLine$1(InterpreterLoop.scala:242)
        at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:248)
        at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:558)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:72)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
    

    Or set settings.maxPrintString to 0, though that will change how normal results are printed too.

    scala> settings.maxPrintString = 0
    
    scala> 1 /0
    java.lang.ArithmeticException: / by zero
        at .<init>(<console>:12)
        at .<clinit>(<console>)
        at RequestResult$.<init>(<console>:9)
        at RequestResult$.<clinit>(<console>)
        at RequestResult$scala_repl_result(<console>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
        at scala.util.control.Exception$Catch.apply(Exception.scala:79)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1.apply(Interpreter.scala:980)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1.apply(Interpreter.scala:980)
        at scala.util.control.Exception$Catch.apply(Exception.scala:79)
        at scala.tools.nsc.Interpreter$Request.loadAndRun(Interpreter.scala:979)
        at scala.tools.nsc.Interpreter.loadAndRunReq$1(Interpreter.scala:578)
        at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:597)
        at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:575)
        at scala.tools.nsc.InterpreterLoop.reallyInterpret$1(InterpreterLoop.scala:471)
        at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:514)
        at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:361)
        at scala.tools.nsc.InterpreterLoop.processLine$1(InterpreterLoop.scala:242)
        at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:248)
        at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:558)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:72)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to force operator precedence in Scala like you do in
Is there any way to force a UITabBarController to be a size less than
Is there any way to force Maven 2 (>2.0.10) to print the actual javac
Is there any way to force a Route to be executed, only if all
Is there any way to force a browser to refresh or empty it's cache,
Is there any way to force wpf to run the value converter again on
Is there any way to force an alignment of a particular element of a
I'd like to know if there's any way to force the System.Net.Dns class to
Is there any way to force install a pip python package ignoring all its
Is there any way to force gravatar to always return the identicon URL? The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.