HIBERNATE AND HSQLDB - Works on PC - Error on Linux - java

I've created a test application on my PC to get familiar with Hibernate on an HSQLDB.
I made an executable JAR and moved the application on to a Linux VM. When I run the same program after set up, my HSQLDB throws the following message when I try to run the test app:
A pre-9.0 client attemtped to connect. We rejected them.
This occurs when I try to create the SessionFactory.
Any idea what I'm over looking?
Thanks,
Trev

The message indicates that you are using the client / server mode. The server is running the HSQLDB 2.0 jar, but the client is using an earlier jar, probably version 1.8.
In order to use HSQLDB 2.0 with Hibernate, you should use the HSQLDB snapshot jar from http://hsqldb.org/support/ (both on the client and server) together with the latest Hibernate version 3.5.6.

Related

Remote Apache Tomcat Configuration on IntelliJ Idea

I'M Using DigitalOcean Server with Debian 9, in this server, I installed Apache tomcat, JVM, PostgreSQL
I developed one project on my own machine (Macbook Air) and it is run on the IntelliJ Idea,
I just want to try it by using Remote Debian 9 Server. not on my own machine.
Remote machine is allows to using SFTP, i added it and tested so connection is okay. But Apache Tomcat Configuration is not.
Apache Tomcat Error:
https://ibb.co/60nPLyf
SFTP Configuration:
https://ibb.co/G7kBT53
SFTP Test is Okay:
https://ibb.co/j4mmvHQ
And also same thing is happens to Remote PostgreSQL connection,
Default user, database and I'm sure for password because i changed it, Again it says failed.
PostgreSQL error case : https://ibb.co/Fskr1mR

JDBC Connector for MySQL not working in JMeter

As per the problems this person was having;
JDBC Connector not working
I'm running Debian 9.1
I installed Java via the package manager
I added Java to the path in /etc/config & added JAVA_HOME to the path in /etc/environment
I then installed jmeter via the package manager
I then downloaded the mysql-connector-java-5.1.44-bin.jar and copied this to /usr/share/jmeter/lib
But after all this, I still dont get the JDBC connection option under Add->Config Element within JMeter, nor do i get any options for JDBC within JMeter.
Can anyone help me as to what im doing wrong?
While I am new to JMeter, I have successfully run simple "Hello World" HTTP requests queried from a PHP Script & a NodeJS script so far.
Update
Added JMeter log by request
Jmeter log
I have no idea what the problem was with Jmeter on my Debian machine... (as prior to this I was trying to use it on Ubuntu Server, and it had the same issue as Debian);
But anyway, I just installed the Oracle JDK & JMeter for Windows, on my old Windows 7 laptop, dropped in the JDBC connector to the lib directory - & immediately it had the option for 'JDBC Connection', which never appeared on either the Ubuntu or Debian installs.
So if anyone else runs into this issue on Ubuntu or Debian ~ I might suggest trying a Windows 7 VM for running it.
Note here
This was the JMeter I installed on Windows (I didn't get it from Apache):
JMeter for Windows
For some reason I cannot find JMeter JDBC components either in Debian or in Ubuntu repositories, maybe it wasn't included by maintainers.
So instead of installing JMeter using package manager you can just download the latest JMeter version (which is JMeter 3.2 as of now while in repositories you have much older versions, 2.11/2.13) from the official website. JMeter is pure Java-based application so all you will need to do in order to be able to use it is to install Java 8 or above.
Alternative option would be downloading jmeter-jdbc JAR appropriate to your JMeter version and dropping it under /usr/share/jmeter/lib/ext folder (super-user privileges might be required), this way you will get JDBC test elements.

How to embedd sql in Java application?

I have created an application in Java using eclipse and MySQL using Xampp.I have used a connector.jar to link the same.
How can I create an exe that contains the database(without having to install xampp) and run it on a system where there is no java or sql installed?
You can use Excelsior JET compiler.
Also MySQL is not need to install on client, just include connector jar in exe. Client should able to connect server with firewall on necessary port.

Installing Oracle REST Data Services (ORDS) on Tomcat

I have installed JDK and Tomcat 8 on the server. Now I need to install ORDS and connect it to Tomcat. I went through various documentation and downloaded ORDS on the server. Now I have a couple of questions as all this stuff is new to me and documentation is not very clear most of the time.
There is java.exe in the directory to which I installed JDK and there is java.exe in the directory where all the ORDS files are unzipped. Does it matter which one I use to run the installation?
java -jar ords.war standalone --port 8090
Now my second question is do I run standalone ORDS installation and specify port 8090 and then copy ords.war file into Tomcat diirectory Tomcat/webapp and make sure Tomcat is running and it will install ords on its own? That's where I am confused...
My third question is how do I check if ORDS has been installed correctly? Would going to http://localhost:8090/ords suffice?
P.S. Oracle database installed on another server, I have all the passwords, hostname, port, and service name. APEX is also installed on another server.
Appex is the old name for ORDS. After the ORDS version 3.x you don't need to install apex.
ORDS 3.0 is able to deploy WITHOUT Application Express. It has its own database schema now.
Answers for your questions:
It doesn't matter. But make sure it is java 7+. You can instead install java globally and just run: java -jar ords.war command. You can follow this tutorial to install java on your machine: https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html
When you run java -jar ords.war command then at this stage it starts installation of ORDS on your system. Before installation it asks for the oracle server hostname, oracle port, SID, and sysdba username and password to connect. Once you provide all the details and the type of installation you want, then it starts installation to the specific database server. Your tomcat/WLS/glassfish server will act as a rest endpoint between the database server and the clients.
Once installed ORDS on your database, if you right click on your connection in SQL Developer then you can see the Rest Service options. And yes the other way is like you mentioned: http:<host-name>:<port-name>/<schema-alias>/<object-alias>/ and see the result.
If you want to know the detail architecture, I would suggest to follow this oracle document: http://www.oracle.com/technetwork/developer-tools/rest-data-services/overview/index.html
I have recently installed the ORDS in production environment successfully. Actually there are two ways you can install ORDS:
Standalone mode:
Using sql developer you can easily configure the standalone mode: http://www.thatjeffsmith.com/archive/2015/04/deploying-oracle-rest-data-services-from-oracle-sql-developer/
But if you would like to use the terminal you can use the following steps:
https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-standalone-mode
Advanced mode:
https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-3-installation-on-tomcat-7.
In the advanced mode ORDS supports Tomcat, WebLogic, and Glassfish application servers
When to use which:
Use Advanced Mode for production
Use Standalone Mode for Development and Testing. You can use Advanced Mode for development and testing but since the standalone mode is quite easy for installation, it is recommended one.
For querying:
http://www.toadworld.com/platforms/oracle/w/wiki/11471.more-oracle-rest-data-services-features
https://svgonugu.com/2015/11/21/adf-bc-rest-services-i/
Note: If your database is PDB you could have some problem installing it and there are some tricks to solve it depending on the problem. Please let me know I would love to answer.

Connecting to Jenkins from Cruise Control CCTray using HTTPS

Does anyone know how to get Cruise Control's CCTray to connect to a Jenkins Https CI Server instance running on Openshift? The URL I want to connect to is in the form : https://jenkins-rhcloud.com/cc.xml
I have read the responses here (using CCtray with Jenkins, while security enabled (using HTTPS)) about adding a transport extension to CCTray and have tried building and deploying jenkins transport dll as per the instructions. I built it in visual studio 2012 express and deployed to c:\program files\cctray\extensions and restarted cctay (version 1.8), but on restart it doesn't allow the jenkins plugin to be selected in the transport extension drop down? CCtray doesn't seem to know the trasport extension exists even though its deployed in the place according to the instructions! Does anyone have any ideas?
From experience (and having just got this working!) the .net version for the JenkinsTransport.DLL build cannot be of a higher version than the CCTray install.
CCTray tries to load all DLLs in \extension and swallows any exception arising. A .net 3.5 built of JenkinsTransport.DLL doesn't work (not selectable) with CCTray 1.8.0.0 but does work against CCTray 1.8.4.0.

Categories

Resources