NullPointerException when compile_fmu used for simulation of Dymola *.mo file from library - jmodelica

The libraray I‘m using is based on the MSL and the Modelica Buildings Library. The model can be simulated by Dymola without any error messages or warnings.
The MODELICAPATH is set in the bashrc and the PYTHONPATH too. I use JModelica 2.1, Python 2.7 and Ubuntu 16.04.
Obviously library and model are found, so I assume the path is not the actual problem.
When I use compile_fmu for simulating a model that is not part of a library everything works perfectly. So to me it seems that pymodelica has problems with the library structure or something like that. Do you have any idea what is happening here?
from pymodelica import compile_fmu
...
fmu=compile_fmu('BuildingModel.Examples.ExampleBuilding','ExampleBuilding.mo')
Error message:
File 'ExampleBuilding.mo' is part of library at '/home/debs/Schreibtisch/BuildingModel', using library instead.
Unknown program error, java.lang.NullPointerException
Traceback (most recent call last):
File "Building_Simulation.py", line 239, in <module>
fmu=compile_fmu('BuildingModel.Examples.ExampleBuilding','ExampleBuilding.mo')
File "/home/debs/Downloads/JModelica/JModelica/Python/pymodelica/compiler.py", line 141, in compile_fmu
separate_process, jvm_args)
File "/home/debs/Downloads/JModelica/JModelica/Python/pymodelica/compiler.py", line 248, in _compile_unit
compiler_options, compile_to, compiler_log_level, jvm_args)
File "/home/debs/Downloads/JModelica/JModelica/Python/pymodelica/compiler.py", line 362, in compile_separate_process
return log.end();
File "/home/debs/Downloads/JModelica/JModelica/Python/pymodelica/compiler_logging.py", line 334, in end
raise JError("%s\n%s" % (exception.message, exception.stacktrace))
pymodelica.compiler_exceptions.JError:
java.lang.NullPointerException
at org.jmodelica.modelica.compiler.CommonForIndex.addReplacementEntry(Unknown Source)
at org.jmodelica.modelica.compiler.FIterExp.splitArrayExp(Unknown Source)
at org.jmodelica.modelica.compiler.FArray.splitArrayExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstArrayComponentDecl.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.ASTNode.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.ASTNode.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.ASTNode.Define_splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.splitBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstAssignable.getBindingFExp_compute(Unknown Source)
at org.jmodelica.modelica.compiler.InstAssignable.getBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstAssignable.hasBindingFExp(Unknown Source)
at org.jmodelica.modelica.compiler.InstAssignable.isCircular_compute(Unknown Source)
at org.jmodelica.modelica.compiler.InstAssignable.isCircular(Unknown Source)
at org.jmodelica.modelica.compiler.FIdUseInstAccess.isCircular(Unknown Source)
at org.jmodelica.modelica.compiler.FIdUseExp.isCircularCalc(Unknown Source)
at org.jmodelica.modelica.compiler.FAbstractExp.isCircular_compute(Unknown Source)
at org.jmodelica.modelica.compiler.FAbstractExp.isCircular(Unknown Source)
at org.jmodelica.modelica.compiler.FExp.ceval(Unknown Source)
at org.jmodelica.modelica.compiler.FExp.ceval(Unknown Source)
at org.jmodelica.modelica.compiler.MutableSize.evaluate(Unknown Source)
at org.jmodelica.modelica.compiler.MutableSize.get(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.childDimensionLength(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.getInstComponentDeclList_compute(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.getInstComponentDeclList(Unknown Source)
at org.jmodelica.modelica.compiler.InstComposite.getInstComponentDecls(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.compareCompositeTypes(Unknown Source)
at org.jmodelica.modelica.compiler.InstComposite.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.compareCompositeTypes(Unknown Source)
at org.jmodelica.modelica.compiler.InstArrayComponentDecl.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.compareCompositeTypes(Unknown Source)
at org.jmodelica.modelica.compiler.InstComposite.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.compareCompositeTypes(Unknown Source)
at org.jmodelica.modelica.compiler.InstComposite.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.compareCompositeTypes(Unknown Source)
at org.jmodelica.modelica.compiler.InstComposite.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.subType(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.typeCheckReplacingComponent(Unknown Source)
at org.jmodelica.modelica.compiler.InstReplacingComposite.typeCheck(Unknown Source)
at org.jmodelica.modelica.compiler.ErrorChecker$TypeChecker.check(Unknown Source)
at org.jmodelica.modelica.compiler.ASTNode.allChecks(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstExtends.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstComponentDecl.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstNode.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstBaseClassDecl.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstFullClassDecl.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.InstLibNode.collectErrors(Unknown Source)
at org.jmodelica.modelica.compiler.ASTNode.errorCheck(Unknown Source)
at org.jmodelica.modelica.compiler.InstClassDecl.checkErrorsInModelInstance(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.doInstantiateModel(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.instantiateModel(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.instantiateModel(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.doCompileModel(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.compileModel(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.doCompileUnit(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.compileUnit(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.compileUnit(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.compileModelFromCommandLine(Unknown Source)
at org.jmodelica.modelica.compiler.ModelicaCompiler.main(Unknown Source)

JModelica.org handles structured libraries with no particular problems. You can see from the first line of the log that it detected that the file you referred to is inside a library. The problem looks to be a bug that triggers on some expression used in a modification on an array of components somewhere in the model. I'd suggest trying the latest version (currently 2.4).
I'd also recommend using a working directory that is outside the library, so that generated files do not wind up in the library.

Related

Processing not working

I'm trying to run this code in processing:
This is the simple code..
void setup()
{
size(400,400);
background(255,255,0);
}
void draw()
{
ellipse(mouseX,mouseY,40,40);
fill(0,255,255);
strokeWeight(5);
}
But when i click run button i see no output,but get this:
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:62)
at processing.app.contrib.ContributionListing$2.run(ContributionListing.java:362)
at java.lang.Thread.run(Unknown Source)
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:62)
at processing.app.contrib.ContributionListing$2.run(ContributionListing.java:362)
at java.lang.Thread.run(Unknown Source)
I have downloaded java jdk for windows 7 x64,processing 2.2.1...please help me!
I ran your code with processing 2.2.1 both Java and Javascript mode.. and working ._.
Since I saw that: "java.net.SocketException: Permission denied: connect"
I recommend to Check Firewall, antivirus, install Javascript mode, reboot computer, re-create the sketch, move the sketch directory...
The code is valid.
Do you have any sketches working, or is this the first. If so, I would suggest uninstalling and reinstall. Sounds as though something is missing. Also, processing 3 is now out with debug added.

Getting java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet

Woking on Oracle Forms v 10.1.2.3.0, The Form works in most of the system, but in some systems getting this error
basic: updateValidationResultsForApplet update
cache: Mark prevalidated: http://www.url.com/forms/java/frmwebutil.jar true tm=1392121370281 cert=1370584360000
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
Exception in thread "thread applet-oracle.forms.engine.Main-1" java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet;
at oracle.forms.webutil.common.VBeanCommon.init(VBeanCommon.java:281)
at oracle.forms.handler.UICommon.instantiate(Unknown Source)
at oracle.forms.handler.UICommon.onCreate(Unknown Source)
at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
at oracle.forms.engine.Runform.startRunform(Unknown Source)
at oracle.forms.engine.Main.createRunform(Unknown Source)
at oracle.forms.engine.Main.start(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks

graphml generate from my application cannot open on yEd Graph Editor

I generate graphml file from my application writing in Delphi7. Every thing is fine except when I open some my graphml file using yEd Graph Editor It raise Error like this.
test.graphml.
at B.A.A.I.A.ā(Unknown Source)
at B.A.A.I.D.ā(Unknown Source)
at B.A.A.I.D.ă(Unknown Source)
at B.A.A.B$4.run(Unknown Source)
at B.A.A.U.Ċ(Unknown Source)
at B.A.A.U$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: D.H.B.B.a: IOException :Invalid byte 1 of 1-byte UTF-8 sequence.
at D.H.B.B._.ā(Unknown Source)
at D.H.B.A$13.ā(Unknown Source)
at D.H.B.A.ā(Unknown Source)
at D.H.B.A.ā(Unknown Source)
at D.H.S.ā(Unknown Source)
at B.A.A.I.A.A.ā(Unknown Source)
at B.A.A.B.I.O.Ă(Unknown Source)
at B.A.A.B.I.O.ā(Unknown Source)
at B.A.A.O.E.ā(Unknown Source)
... 7 more
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
... 16 more
How I solved this problem? Thank you in advance.
I think problem should come from Unicode invalid bytes sequence problem but without your file I can only guess.
I think you may load string from non-Unicode encoding file and use it directly without convert to Unicode encoding. Please try convert these strings to Unicode by see this post.

Error Connecting to Oracle Database from Pentaho Report Designer

I am new to Pentaho, and I am struggling to set up a new database connection. I am trying to connect to an Oracle 10g database, but whenever I test the connection, I get the below error. It doesn't really seem to list any specific error message so I'm not really sure what to do or where to go from this point.
I placed ojdbc jar's in my tomcat lib folder, but maybe there is another place those should go.
Any help/hints would be greatly appreciated.
Error connecting to database [OFF SSP Cert] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
oracle/dms/instrument/ExecutionContextForJDBC
org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
oracle/dms/instrument/ExecutionContextForJDBC
org.pentaho.di.core.database.Database.normalConnect(Database.java:366)
org.pentaho.di.core.database.Database.connect(Database.java:315)
org.pentaho.di.core.database.Database.connect(Database.java:277)
org.pentaho.di.core.database.Database.connect(Database.java:267)
org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:76)
org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2443)
org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:510)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
org.pentaho.ui.xul.swing.tags.SwingButton$OnClickRunnable.run(SwingButton.java:58)
java.awt.event.InvocationEvent.dispatch(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.Dialog$1.run(Unknown Source)
java.awt.Dialog$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Dialog.show(Unknown Source)
java.awt.Component.show(Unknown Source)
java.awt.Component.setVisible(Unknown Source)
java.awt.Window.setVisible(Unknown Source)
java.awt.Dialog.setVisible(Unknown Source)
org.pentaho.ui.xul.swing.tags.SwingDialog.show(SwingDialog.java:234)
org.pentaho.reporting.ui.datasources.jdbc.ui.XulDatabaseDialog.open(XulDatabaseDialog.java:237)
org.pentaho.reporting.ui.datasources.jdbc.ui.ConnectionPanel$EditDataSourceAction.actionPerformed(ConnectionPanel.java:162)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.Dialog$1.run(Unknown Source)
java.awt.Dialog$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Dialog.show(Unknown Source)
java.awt.Component.show(Unknown Source)
java.awt.Component.setVisible(Unknown Source)
java.awt.Window.setVisible(Unknown Source)
java.awt.Dialog.setVisible(Unknown Source)
org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java:661)
org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin.performEdit(JdbcDataSourcePlugin.java:67)
org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction.actionPerformed(AddDataFactoryAction.java:79)
Seems you are using some sort of native JDBC driver. Make sure that the native libararies are there and can be read at runtime. You probably have to copy more than one jar into the lib/jdbc directory to make it work.
Your Oracle manual should contain all the details on how to install a JDBC driver.

How to debug a beanshell script?

I have troubles to debug a beanshell script all I get all the time is:
Exception invoking imported object method. : at Line: 194 : in file: inline evaluation of: ``import java.lang.reflect.InvocationTargetException; import java.util.Arrays; i . . . '' : migrateModels ( models , apiManager , isSAPRetailImportCondition , isSAPAFSCondition )
Called from method: initMissingImportSources : at Line: -1 : in file: :
Target exception: java.lang.reflect.InvocationTargetException
at bsh.BshMethod.invoke(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.Name.invokeLocalMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHBlock.evalBlock(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BshMethod.invokeImpl(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.This.invokeMethod(Unknown Source)
at ImportSourceMigration.initMissingImportSources(BeanShell Generated via ASM (www.objectweb.org))
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:585)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHBlock.evalBlock(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHTryStatement.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.servlet.BshServlet.evalScript(Unknown Source)
at bsh.servlet.BshServlet.doGet(Unknown Source)
I am trying to retrieve the full stack trace with this code
try {
migration.initMissingImportSources();
} catch (java.lang.Throwable e) {
print(ExceptionUtils.getFullStackTrace(e));
}
Is there a possibility to retrieve the causing exception?
Thanks a lot.
What is you "ExceptionUtils.getFullStackTrace()" really doing? Are you sure it's printing the nested exception?
Thanks a lot for the reply. Yes the getFullStackTrace is from apache commons and should work. I found the problem. The point is here that I didnt have the complete script in one method call. This is important, only then you are able to surround it with a try catch and see the exception. Hope that will helpful for the others in the future too. I see the exception now. I had several methods calling each other.

Resources