I'm trying to give (following different sources) my first steps with Hibernate using Eclipse and a local MySQL 8.0 database on a W11 environment.
I'm using Hibernate 5.6 version and JDBC connector 8.0.31 and I managed to create a mapping configuration.
The mapping classes are generated correctly but strangely I get this message (it seems that the compiler is looking for ODBC connector). Should I have installed?
11:03:51 **** Incremental Build of configuration Debug for project
Conexion_ODBC **** Info: Internal Builder is used for build gcc
"-LC:\Program Files\MySQL\Connector ODBC 8.0" -o Conexion_ODBC.exe
"src\Conexion_ODBC.o" -lmyodbc8w
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe:
cannot find -lmyodbc8w collect2.exe: error: ld returned 1 exit status
11:03:51 Build Failed. 1 errors, 0 warnings. (took 187ms)
Related
The dagger project uses bazel.build system to build. I have installed bazel on Fedora, it runs and builds the project but apparently dagger has Java 1.8 code, and bazel targets java 7.
There is a build_def.bzl file and java target version is defined like so:
SOURCE_7_TARGET_7 = ["-source 1.7 -target 1.7"]
changing it to
SOURCE_7_TARGET_7 = ["-source 1.8 -target 1.8"]
does not help. Both master and rc11 branches fail to build because of the same error (java compiler complains about target version 1.7 not supporting lambda and method reference). There is no guide for building dagger on the wiki or project page and I'm unfamiliar with bazel. I wonder if something like retrolambda must be added to the build runtime path but it doesn't seem easy with bazel.
Sample output:
$> bazel build :all
INFO: Found 8 targets...
ERROR: /home/user/dagger/java/dagger/internal/codegen/BUILD:44:1: Building java/dagger/internal/codegen/libcodegen.jar (116 source files) failed: java failed: error executing command external/local_jdk/bin/java -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-2.jar -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -jar ... (remaining 2 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
java/dagger/internal/codegen/AbstractComponentWriter.java:612: error: method references are not supported in -source 1.7
(use -source 8 or higher to enable method references)
java/dagger/internal/codegen/AnnotationExpression.java:80: error: lambda expressions are not supported in -source 1.7
(use -source 8 or higher to enable lambda expressions)
java/dagger/internal/codegen/AnnotationSpecs.java:41: error: method references are not supported in -source 1.7
(use -source 8 or higher to enable method references)
# Rest of output removed for brevity, the error above repeats for many more files.
I had wrong version of bazel installed. Building is as simple as running:
bazel build :all
I already had Oracle JDK 8 installed on my machine (Fedora) and downloaded this release of bazel (bazel-0.5.0-without-jdk-installer-linux-x86_64.sh).
when trying to link my linux (CentOS 7) application against static qt 5 libraries I get the following error:
debug/app_debug_plugin_import.o: In function `StaticQPSQLDriverPluginPluginInstance::StaticQPSQLDriverPluginPluginInstance()':
<src>/app_debug_plugin_import.cpp:24: undefined reference to `qt_static_plugin_QPSQLDriverPlugin
linking to the mysql plugin works.
I followed the tutorial here:
http://doc.qt.io/qt-5/sql-driver.html#qpsql
And I have both plugins (libqsqlpsql.a and libqsqlmysql.a)
But the mysql plugin defines the function:
qt_static_plugin_QMYSQLDriverPlugin()
While the psql plugin has no equivalend function.
What am I missing.
Thanks in advance
It seems that is was caused by remaining compiled object files that were compiled with an old qmake (from Qt 4.7)
After cleaning them up, it compiled correctly.
I installed pl/java on Ubuntu with:
sudo apt-get install postgresql-9.1-pljava-gcj
but have hit a snag which I think is a gcj/jdk 1.7 incompatibility between the jar and pl/java. These are the steps used with guidance from http://www.javacodegeeks.com/2012/10/introduction-to-postgresql-pljava.html:
select sqlj.install_jar('file:///home/me/temp/testJar.jar', 'sandbox', true);
select sqlj.set_classpath('public', 'sandbox');
CREATE FUNCTION public.hello(varchar) RETURNS varchar
AS 'sandbox.PLJava.hello'
LANGUAGE java;
We're happy until execution:
SELECT hello('world');
Which generates this error:
ERROR: java.lang.ClassFormatError: sandbox.PLJava (unrecognized class file version)
SQL state: XX000
The jar was made with a standard eclipse/export to jar (jdk 1.7.0).
Anyone travel this road before? Thanks in advance.
This problem would be caused by, as you say, an incompatibility between the JVM that you are running via pl/java and your java code. This is hence a packaging issue if you are running everything from repos and you can follow up with your distro or compile from source.
If you can compile from source, that may be the best option at present.
I created an application with EclipseFP, the yesod application. With the out of the box settings, I get an error when I try to run a 'main.hs' file. It looks like it compiles but when I try to run I get the error. I attempted to run by 'right clicking' and then 'run'. The console opens:
What might be the issue?
Here is the error:
<command line>:
Could not find module `OverlappingInstances':
Use -v to see a list of the files searched for.
Failed, modules loaded: none.
Prelude> main
Version: Indigo Service Release 2
Eclipse FP Haskell Plugin - 2.2.4
GHC version 7.0.3
Possible solutions:
I tried to add '{-# LANGUAGE OverlappingInstances #-}' at the top of all of the haskell files
This is a bug, I've fixed it in the github version of EclipseFP/BuildWrapper. Will be part of the 2.3.0 release of EclipseFP. We're getting the wrong options from the cabal file and pass OverlappingInstances to GHCi without the -X. Sorry!
I'm running java 1.6 in Eclipse on my Intel Mac. I'm using the 1.6.0 version under System/Library/Frameworks and set the default compiler to this in Eclipse.
How do I attach the source code?
First, I downloaded the 1.6 source from oracle, thinking I could attach that 'cause the installed 1.6 didn't have source.
When I click a java class to get the Source Code Editor, there are problems:
first, the top line says Compiled from File.java (version 1.5 : 49.0, super bit)
most important, when I attach the 1.6 source jar file, it gets an error:
An error has occurred. See error log for more details.
Unable to create resource org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor#50417ba8
This also appears in the error log:
java.lang.ClassNotFoundException: org.eclipse.ui.internal.views.log.LogView
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
The Eclipse version is: Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911
When I click for installation details, I get:
An internal error occurred during: "Fetching children of _SELF_".
Registry Directory not available: /Users/rfrail/Downloads/eclipse 2/p2/org.eclipse.equinox.p2.engine/profileRegistry.
I'm running Eclipse from my Download directory (it's worked fine in the past); however, there are 2 folders for Eclipse:
eclipse, and
eclipse 2.
So that looks like a source of confusion right there. Eclipse operates fine otherwise.
Can you help, please?
http://java.decompiler.free.fr/ is your answer
it has an eclipse plugin which decompiles code in place