DS-Java | Object-Relational Mapping library
kandi X-RAY | DS-Java Summary
kandi X-RAY | DS-Java Summary
DS-Java
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DS-Java
DS-Java Key Features
DS-Java Examples and Code Snippets
Community Discussions
Trending Discussions on DS-Java
QUESTION
When I run the Java example OpenDDS-3.14.1/java/tests/messenger I am getting tons of messages like this:
WARNING in native method: JNI call made without checking exceptions when required to from CallStaticObjectMethodV.
I am using the openjdk 11.0.9.1 2020-11-04 LTS on a Mac. But same warnings I get on Linux.
Is that just not handled well in the example?
Or is it not well handled in the DDS-Java-Wrapper?
I have to admin that I have not yet read any Developer Documentation...
ANSWER
Answered 2020-Dec-16 at 07:43JNI is what allows Java and the native C++ code to interact with one another. OpenDDS's JNI code isn't checking for Java exceptions like it should and this is what the warnings are about. They show up in the all Java tests I can see, but apparently they are ignored by the system that report errors and warnings. I think they come up because -Xcheck:jni
is one of the java
arguments in the test script framework. So if you take out that argument of the file I linked or run java
directly without that argument the warnings shouldn't be there.
QUESTION
While I was in a dockerization project in my current job, I got this doubt: Which java can I use?
This doubt is due to :
So after some researches I got these conclusions:
- (0) Oracle does not show any message related to license changes for java 4,5,6 y 7 downloads. So we can use them, accepting issues and security problems.
- (1) Since the java 8 update at April 16, 2019 8u221, all versions and updates for (java 8,9,10,11 y 13) has no cost just for personal use and development purposes. Any other use, needs a Commercial License
- (2) Legacy versions prior to 7, does not have and will not have any update. Maybe a sales contact could be a solution if an update in these versions are required for Legacy Systems Support.
- (3) If I want to use java 8 oracle version for commercials purposes and FREE, I need to use a previous version of April 16, 2019 8u221 update
- (4) An alternative to oracle java 8 version for commercials purposes and FREE are these java open implementations
- (5) Oracle Java 9 y 10 has reached end of support.
According to my conclusions:
- If my development strictly needs or was developed with JDK 8, Can I only use Oracle Java SE 8 JDK 8u202 and earlier versions for FREE and commercial purposes accepting issues and security problems?
- If I can change my development and I want still FREE, and I want to have improvements and security updates, I must use one of these java open implementations?
- End of Public Updates for Oracle JDK 8
- The Oracle JDK License has changed for releases starting April 16, 2019.
- Official List of updates and release versions
- Java official supported versions
- Oracle Java 8 download alert
- Oracle Java 8 unsupported but free version
- Java 4 legacy official download page
- Java 5 legacy official download page
- Java 6 legacy official download page
- Java 7 legacy official download page
...I think this is a point to keep in mind in order to choose the right java version for our java developments in enterprise environments.
ANSWER
Answered 2019-Oct-07 at 08:23Oracle made a number of significant changes to how the Java platform is developed, distributed and updated at the same time as the launch of JDK 9.
The key facts to answer your questions are these:
- Oracle was using the Oracle Binary Code License (OBCL) for Java. This had field of use restrictions (you needed a commercial license for embedded use) but granted free use of the Oracle JDK for general purpose development and deployment.
- As of JDK 11, the license changed to the Oracle Technology Network License Agreement (OTNLA), which requires you to purchase a Java SE Subscription for use in commercial production. This license has also been applied to updates of JDK 8 since April (update 211/212).
- As of JDK 11, Oracle eliminated all functional differences between the Oracle JDK and a binary built purely from the OpenJDK source code. The important things no longer in the Oracle JDK 11 are the browser plugin, Java Web Start and JavaFX.
- You can continue to use any public Oracle binaries of JDK 7 (and earlier) in production without the need for a Java SE subscription, as the license is still the OBCL (it has not been changed retrospectively). You can also, as you say, use JDK 8 up to update 202 under the OBCL without cost.
- There are several options for continuing to use JDK 8 with updates for free. One of those is Zulu Community from Azul (who I work for). This is a free, TCK-tested binary with a couple of additional backported features (TLS 1.3 and Java Flight Recorder). Since this passes the TCK, from a functional perspective, it is identical to the Oracle JDK. Unless you are using Applets or Web Start your applications will work in the same way as with the Oracle JDK.
- If you want to move to JDK 11 (the current long-term support release, as defined by Oracle but followed by all other JDK providers), then you will need to choose one of the free distributions (like Zulu Community).
It is highly recommended to ensure your JDK is up to date and contains all relevant security patches. Continuing to use an older version could expose you to significant security exploits.
QUESTION
I am a newbie in Ballerina. I am importing a platform lib as a executable jar , which is an inter op method call in java using openstack swift api using jclouds.
There has been a known issue with JCLOUDS where it fails to build due to gson version issues higher than 2.5 not compatible with jclouds Apache jclouds java.lang.NoSuchMethodError when using Rackspace in a Spring Boot application.
I face the same error when trying to execute this inter op method call from my bal file which was built during ballerina build. Upon inspection of the jar, which ballerina created during the build of the project , it shows that the jar is created with a set of prebuilt dependencies with gson 2.7.
is there any way i can change this dependency , i am not also very clear on how ballerina packages all this jars during the build phase of bal files.
It will help to have a detailed understanding on what happens below the hood when ballerina build is invoked.
...ANSWER
Answered 2019-Nov-30 at 02:09The following GitHub issue explains why we had to package com.google:gson:2.7 with any Ballerina executable jar.
https://github.com/ballerina-platform/ballerina-lang/issues/17878
Let me try to explain why Ballerina compiler packages some third-party jars with the executable jar created for your Ballerina program. We can categorize these third-party jars into two main categories.
- Jar dependencies of the Ballerina runtime
- Jar dependencies of each Ballerina module that you've imported in your program.
Dependencies of the Ballerina runtime
Every Ballerina executable program contains the Ballerina runtime - the bare minimum layer on top of the JVM that is required to execute any Ballerina program. Runtime contains the Java implementations of Ballerina values, types, Ballerina modules in the lang lib, and the runtime type checker logic. This layer is essential to enforce Ballerina language semantics on top of the JVM.
At the moment, Ballerina runtime depends on many third-party Java libraries. GSON is one such library that we are planning to remove soon. You can get more details from the above issue.
Dependencies of a Ballerina module
Each Ballerina module, whether it belongs to the standard library or whether you pulled it from the Ballerina central, may depend on one or more third-party Java libraries. The Ballerina module author lists these dependencies in Ballerina.toml of the project in which they develop the Ballerina module. Here are some examples.
While I was working on this answer, I realized the requirement of a debugging tool that emits the details of third-party libraries. It would be nice if this tool can be integrated into the ballerina
command-line tool. Here is the issue that I've created to track this.
https://github.com/ballerina-platform/ballerina-lang/issues/20116
QUESTION
I have the below code.
Note that I have an interface MySuperCoolEntityRepositoryContract.
And I have a "concrete interface" MySuperCoolEntityJpaRepository that implements my above MySuperCoolEntityRepositoryContract interface and JpaRepository.
All of that works fine with @ComponentScan.
I am changing my code to "java config", aka a centralized location where I can code up my DI definitions. (Also known as CompositionRoot in some circles).
The issue is when I try to "code up" the concrete for the interface. (Skip down to later in this question.
...ANSWER
Answered 2019-Oct-30 at 09:38Spring boot magically provides implementation for the methods defined in your interface. The @EnableJpaRepositories
scans all packages below the package for interfaces extending JpaRepository and creates a Spring bean for it that is backed by an implementation of SimpleJpaRepository (spring data provides default imlpementations of CRUD repository through this class).
Your interface MySuperCoolEntityJpaRepository
extends the interface MySuperCoolEntityRepositoryContract
, but you only extend the JpaRepository
on the interface MySuperCoolEntityJpaRepository
which means spring will only provide the default implementations for methods in the interface MySuperCoolEntityJpaRepository
. So try it like :
QUESTION
I used to send emails with javamail and Java 8.
Now that I upgraded to Java 12 I get the java.lang.NoClassDefFoundError: javax/activation/DataHandler
.
I added the javax.activation-api-1.2.0.jar
and now I get java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
.
This is because javax.activation-api-1.2.0.jar
doesn't have the com.sun...
package that previous versions had.
What jars should I put on my project to properly send and email with java 12? And where to find them?
There are a lot of confusing sources like:
https://repo1.maven.org/maven2/javax/activation/javax.activation-api/1.2.0/
...ANSWER
Answered 2019-Sep-24 at 20:08You need the implementation jar file, not the API jar file. Use this.
QUESTION
There are plenty of posts on StackOverflow and other communities (AskUbuntu, Unix & Linux etc.) which provide advice on how to use wget
or cUrl
to automate downloading a Java distribution from the Oracle website. They all involve sending a cookie which pretends that one accepted the license agreement which one usually has to to manually before the real download link appears.
However, none of these work for me when trying to download Java 7 SDK which recently has been moved to the Oracle Archive page.
If I go to this page, accept the license agreement manually and then copy a download link, it looks like this:
http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Note that it has otn
in the middle while all the other posts are about URLs which are stored underotn-pub
.
Using the usual way that worked for the otn-pub
links looks like this:
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
However, this does not work for the otn
type of URL. Instead, wget
returns:
ANSWER
Answered 2017-May-25 at 12:34This curl command works for me:
QUESTION
I am self-learning Binary Tree-related content using the Open Data Structure Textbook on line.
However, I am working through the excercises I came to one which I really have no idea what it is asking. Take a look at Exercise 6.7 in ODS, which reads:
Exercise 6..7 Create a subclass of
BinaryTree
whose nodes have fields for storing pre-order, post-order, and in-order numbers. Write recursive methodspreOrderNumber()
,inOrderNumber()
, andpostOrderNumbers()
that assign these numbers correctly. These methods should each run in O(n) time.
I am not asking for a solution here, I am just having a hard time understanding what the author of the textbook is asking to do for this particular exercise. In my opinion, pre-order, in-order or post-order should be used for traversal, so what is the purpose of keeping a field to store numbers? And I am actually confused about what numbers he is referring to as well.
Any suggestion is greatly appreciated here. Thanks in advance!
...ANSWER
Answered 2019-Aug-21 at 01:32It sounds like the author is interested in having you create classes like:
QUESTION
Looking around at similar posts for this error, it seems that the issue comes from having incompatible versions of the same dependency. I have one project that calls a class from another, thus I have two separate pom.xml's, but both have the same version of the jackson dependency so I'm not sure what is causing this error. Here are my two pom.xml's:
pom.xml #1
...ANSWER
Answered 2019-Jul-30 at 15:13I poked around deeper through some of the dependencies and found that one was using a lower version of Jackson that you couldn't see on the surface. So if you have this problem and you're using Eclipse, view your pom.XML through the Dependencies Hierarchy view and you should be able to see where the incompatibility comes from.
QUESTION
I'm reading about Eytzinger's method for storing binary trees as an array.
I like how straight forward this is, but in my specific case I need to store a random binary tree, that isn't consistent in structure. Something like this where the amount of nodes at any given depth is not predictable:
Is there a simple method for implementing something like this with arrays?
Note: No preference on language in answers.
...ANSWER
Answered 2017-Jul-20 at 01:21So far I'm finding that it will be easier and more efficient to implement such a tree with objects.
Each node can be based on a class which stores parent, left, and right
.
Example of node class in Ruby:
QUESTION
Suppose I have a topic called "batch" with 1 partition and I publish millions of records to it for processing. I have a consumer group of 3 to process those millions of records. I encounter a case where I no longer need to process certain subset of messages which satisfy a certain criteria like age < 50
How do I remove those messages from the topic in a programmatic way. Like I click a "Cancel" button in the UI and it should remove those subset of records from the topic whose age < 50
so that it wont be processed by the consumers.
I know that I can remove messages by running a command line with offsets:- https://github.com/apache/kafka/blob/trunk/bin/kafka-delete-records.sh
And also the Java API but again by offsets:
Delete records whose offset is smaller than the given offset of the corresponding partition
But in my case I cannot use offsets because I only need to remove certain records and not all records smaller than the given offset
ANSWER
Answered 2019-May-17 at 16:55The main thing that I need to point out is that you shouldn't consider data in Kafka the same thing as data in a Database. Kafka has not been designed to work in such a way ( e.g: when I click the X button, the Y records will be deleted ).
Instead, you should see a topic as a stream of never-ending data. Every record that is produced to a Kafka topic will be consumed and processed independently by the consumer.
Perceiving the topic as a stream gives you a different solution:
You can use a second topic with the filtered results in it!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DS-Java
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page