Add MouseClick Event on ScrollPane in JavaFX - events

I have created a Scroll Pane (with Anchor Pane) in JavaFX.
On runtime I am creating a rectangle and adding it to the ScrollPane.
I want to add a mouse click event on the scroll pane, in which I can change the contents of the scrollPane on runtime.
I tried doing that but I get this exception when I click on the ScrollPane
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.Trampoline.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Scene$ClickGenerator.postProcess(Unknown Source)
at javafx.scene.Scene$ClickGenerator.access$7900(Unknown Source)
at javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.notifyMouse(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/1109371569.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Here is my JavaFX fxml part,
<ScrollPane fx:id="scrollPane" layoutX="229.0" layoutY="183.0" onMouseClicked="#ChangeImageColor" prefHeight="137.0" prefWidth="143.0">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="154.0" prefWidth="157.0" />
</content>
</ScrollPane>
And My Java Code,
#FXML
void ChangeImageColor(ActionEvent event)
{
System.out.print("Hit!");
scrollPane.setContent(null);
Rectangle rectangle = new Rectangle(200, 200, Color.BLUEVIOLET);
rectangle.setStroke(Color.BLACK);
rectangle.setStrokeWidth(25);
scrollPane.setContent(rectangle);
}
This is what i am doing on initialization,
Rectangle rectangle = new Rectangle(200, 200, Color.RED);
rectangle.setStroke(Color.BLACK);
rectangle.setStrokeWidth(25);
scrollPane.setContent(rectangle);

The problem you are facing is because of the declaration of the method
#FXML
void ChangeImageColor(ActionEvent event)
Here the parameter should be of type MouseEvent instead of ActionEvent. You can also remove the parameter if you are not sure of the kind of event it is. Try using :
#FXML
void ChangeImageColor()
or
#FXML
void ChangeImageColor(MouseEvent event)

I am not sure why did adding the event in the fxml did not work.
I simply added the event definition in the Java code and it worked perfectly fine.
scrollPane.setOnMouseClicked(new EventHandler<Event>()
{
#Override
public void handle(Event event)
{
//Logic on event occurrence
}
});

Related

The 11th image is never recognized by the reader

I am trying to convert a gif into an Arraylist of buffered images. I had used a piece of code from Convert each animated GIF frame to a separate BufferedImage before, but it returned buffered images where every pixel was the same exact color. Thus, I decided to use this instead:
public ArrayList<BufferedImage> getFrames(File gif) throws IOException {
ArrayList<BufferedImage> frames = new ArrayList<BufferedImage>();
try {
ImageReader reader = ImageIO.getImageReadersByFormatName("gif").next();
ImageInputStream stream = ImageIO.createImageInputStream(gif);
reader.setInput(stream);
int count = reader.getNumImages(true);
System.out.println("count is "+count);
for (int index = 0; index < count; index++) {
System.out.println("index is "+index);
BufferedImage frame = reader.read(index);
frames.add(frame);
}
} catch (IOException ex) {
System.out.println("An I/O problem has occurred");
}
return frames;
}
The output indicates that there is an error on the 10th image:
count is 70
index is 0
index is 1
index is 2
index is 3
index is 4
index is 5
index is 6
index is 7
index is 8
index is 9
index is 10
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 4096
I'm wondering: why 10? What happens at the 11th image that causes this problem? How do I fix the error so that I can have all 70 frames?
Here is the rest of the errors (with a stacktrack added in):
at com.sun.imageio.plugins.gif.GIFImageReader.read(Unknown Source)
at javax.imageio.ImageReader.read(Unknown Source)
at Pointilismo.getFrames(Pointilismo.java:104)
at Pointilismo.updateimage(Pointilismo.java:116)
at Pointilismo.switchimage(Pointilismo.java:135)
at Pointilismo.actionPerformed(Pointilismo.java:210)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I don't have any experience with Image processing but found maybe the cause of your problem:
bug

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

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.

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

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.

Resources