PDFRenderer.jar version - java

I have a project which uses PDFRenderer.jar v1.0.5 which was probably downloaded from http://grepcode.com/snapshot/repo1.maven.org/maven2/org.swinglabs/pdf-renderer/1.0.5
A quick google search finds the PDFRenderer.jar in a project at https://java.net/projects/pdf-renderer/downloads which shows v0.9.1 as the latest version
version | last-modified | Ant version | # of objects in com.sun.pdfview
-----------------------------------------------------------------------
1.0.5 | 2009-03-15 | 1.7.1 | 82
0.9.1 | 2011-09-15 | 1.8.2 | 91
The problem is that the 0.9.1 version has a more recent last-modified date, and has more objects in the com.sun.pdfview package than the 1.0.5 version.
Does anyone know which one is the most recent version?

don't go through version number because jar provider are different, go through last-modified date.

Related

How to undo a migration using Flyway?

I am working on a Spring project and I have FlyWay as a dependency to manage my migrations, I made a mistake on the SQL command. When I ran the project I got an error showing a problem with the script, a silly mistake that was easy to fix, I misspelled a column name. However, the undo command from the flyway is not working.
I was trying to undo a migration using FlyWay and I follow the tutorial from FlyWay documentation: link-flyway
However, I got this output:
C:\Users\leonardo.freitas\Documents\workspace\api>C:\Users\leonardo.freitas\Documents\workspace\flyway-9.8.1\flyway undo
A new version of Flyway is available
Upgrade to Flyway 9.8.2: https://rd.gt/2X0gakb
ERROR: The command 'undo' was not recognized. Make sure you have added 'flyway-proprietary' as a dependency.
Caused by: No command extension found to handle command: undo
That's my migration history:
C:\Users\leonardo.freitas\Documents\workspace\api>C:\Users\leonardo.freitas\Documents\workspace\flyway-9.8.1\flyway info
A new version of Flyway is available
Upgrade to Flyway 9.8.2: https://rd.gt/2X0gakb
Flyway Community Edition 9.8.1 by Redgate
See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.8.1
ERROR: Skipping filesystem location: sql (not found)
Database: jdbc:mysql://localhost:3306/volimed (MySQL 8.0)
Schema version: 5
+-----------+---------+----------------------------------------+------+---------------------+-----------------+----------+
| Category | Version | Description | Type | Installed On | State | Undoable |
C:\Users\leonardo.freitas\Documents\workspace\api>C:\Users\leonardo.freitas\Documents\workspace\flyway-9.8.1\flyway info
A new version of Flyway is available
Upgrade to Flyway 9.8.2: https://rd.gt/2X0gakb
Flyway Community Edition 9.8.1 by Redgate
See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.8.1
ERROR: Skipping filesystem location: sql (not found)
Database: jdbc:mysql://localhost:3306/volimed (MySQL 8.0)
Schema version: 5
+-----------+---------+----------------------------------------+------+---------------------+-----------------+----------+
| Category | Version | Description | Type | Installed On | State | Undoable |
+-----------+---------+----------------------------------------+------+---------------------+-----------------+----------+
| Versioned | 1 | create-table-medicos | SQL | 2022-11-19 03:12:19 | Future | No |
| Versioned | 2 | alter-table-medicos-add-telefone | SQL | 2022-11-19 13:32:45 | Future | No |
| Versioned | 3 | create-table-pacientes | SQL | 2022-11-19 13:46:17 | Future | No |
| Versioned | 4 | alter-table-medicos-add-column-active | SQL | 2022-11-19 15:28:46 | Future | No |
| Versioned | 5 | alter-table-paciente-add-column-active | SQL | 2022-11-19 15:45:28 | Failed (Future) | No |
+-----------+---------+----------------------------------------+------+---------------------+-----------------+----------+
And I want to redu the last migration.
Undo command is supported in both the Teams and Enterprise edition . Flyway Enterprise is the only version with auto generation of Undo scripts though. Bill, could you point me towards where the information is conflicting?
I find out a way to resolve this problem, I went to the FlyWay table and deleted the last row, when I ran the project the FlyWay applied the migration again.

Apache James Spring distribution not starting

Trying out the Apache James mail server at the moment. After I downloaded the current binary distribution 3.4.0 ("for Spring wiring"), I got the following behaviour when I ran:
bin\james.bat
Log (formatted for readability):
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
(...)
jvm 1 | ERROR 21:30:39,649 |
org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor
Unable to init mailet WithPriority
jvm 1 | org.apache.mailet.MailetException:
Could not load mailet (WithPriority) (java.lang.IllegalArgumentException:
'priority' init parameter is compulsory)
(...)
What's up?
Nevermind, I found the answer - try this:
I will raise the issue up to the project meanwhile a quick fix to make that mailet
work:
in the James app folder, open the file conf/mailetcontainer.xml
find the mailet with class WithPriority
replace the xml tag <value>8</value> by <priority>8</priority>
try to run james server again
Looks like this in conf/mailetcontainer.xml:
(...)
<mailetcontainer enableJmx="true">
<processors>
<processor state="root" enableJmx="true">
<mailet match="All" class="PostmasterAlias"/>
<mailet match="RelayLimit=30" class="Null"/>
<mailet matcher="All" class="WithPriority">
<priority>8</priority>
</mailet>
(...)

Channel closed when running simple example with TLS

I'm trying to run the official "Hello, World" example with TLS, provided by the gRPC team (code on GitHub).
I've cloned the official repo and checked out tag v1.15.0.
I've run the installation script as follows (as shown in the documentation):
./gradlew installDist
I've edited the launch scripts for hello-world-server and hello-world-client to run the classes io.grpc.examples.helloworldtls.HelloWorldServerTls and io.grpc.examples.helloworldtls.HelloWorldClientTls respectively.
I've created the certificates needed for the TLS authentication to happen using the script provided as part of the documentation and stored them in a directory I named cert.
Finally, I've run the server as follows:
./build/install/examples/bin/hello-world-server localhost 50440 cert/server.crt cert/server.pem
The server starts correctly and outputs the following:
Oct 08, 2018 9:15:10 AM io.grpc.examples.helloworldtls.HelloWorldServerTls start
INFO: Server started, listening on 50440
Finally, I try to start the client on another shell with the following command:
./build/install/examples/bin/hello-world-client localhost 50440 cert/ca.crt
Unfortunately, the client fails with the following output:
Oct 08, 2018 9:25:22 AM io.grpc.examples.helloworldtls.HelloWorldClientTls greet
INFO: Will try to greet localhost ...
Oct 08, 2018 9:25:22 AM io.grpc.examples.helloworldtls.HelloWorldClientTls greet
WARNING: RPC failed: Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException
at io.grpc.netty.Utils.statusFromThrowable(Utils.java:169)
at io.grpc.netty.NettyClientTransport$5.operationComplete(NettyClientTransport.java:260)
at io.grpc.netty.NettyClientTransport$5.operationComplete(NettyClientTransport.java:254)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:112)
at io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:89)
at io.grpc.netty.ProtocolNegotiators$AbstractBufferingHandler.fail(ProtocolNegotiators.java:564)
at io.grpc.netty.ProtocolNegotiators$BufferUntilTlsNegotiatedHandler.userEventTriggered(ProtocolNegotiators.java:661)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:329)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:315)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:307)
at io.netty.handler.ssl.SslUtils.handleHandshakeFailure(SslUtils.java:318)
at io.netty.handler.ssl.SslHandler.setHandshakeFailure(SslHandler.java:1551)
at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1023)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1429)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:947)
at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:822)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:464)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.nio.channels.ClosedChannelException
at io.netty.handler.ssl.SslHandler.channelInactive(...)(Unknown Source)
}
The error occurs with mutual authentication as well.
I'm not sure what's going wrong or how to find the root cause of this, do you have any pointers?
As it turns out, I was using incompatible versions of gRPC and BoringSSL.
The "Troubleshooting" section of this document contains a table with known compatible versions of the library.
The following is a table with known compatible versions as of October 2018:
grpc-netty version | netty-handler version | netty-tcnative-boringssl-static version
------------------ | --------------------- | ---------------------------------------
1.0.0-1.0.1 | 4.1.3.Final | 1.1.33.Fork19
1.0.2-1.0.3 | 4.1.6.Final | 1.1.33.Fork23
1.1.x-1.3.x | 4.1.8.Final | 1.1.33.Fork26
1.4.x | 4.1.11.Final | 2.0.1.Final
1.5.x | 4.1.12.Final | 2.0.5.Final
1.6.x | 4.1.14.Final | 2.0.5.Final
1.7.x-1.8.x | 4.1.16.Final | 2.0.6.Final
1.9.x-1.10.x | 4.1.17.Final | 2.0.7.Final
1.11.x-1.12.x | 4.1.22.Final | 2.0.7.Final
1.13.x | 4.1.25.Final | 2.0.8.Final
1.14.x- | 4.1.27.Final | 2.0.12.Final

How to install Hibernate 5 into Apache Karaf v4

I've installed Apache Karaf v4.03 and queried the list of available features for Hibernate, as listed below. Unfortunately, I am using Hibernate v5.
hibernate | 3.3.2.GA | | Uninstalled | enterprise-4.0.3 | Hibernate 3.x JPA persistence engine support
hibernate | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.2.x JPA persistence engine support
hibernate-envers | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Envers 4.2.x
hibernate | 4.3.6.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.3.x JPA persistence engine support
hibernate-envers | 4.3.6.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Envers 4.3.x
hibernate-validator | 5.0.3.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Validator support
I am unable to find instructions for installing Hibernate v5 into Karaf v4. Are there published instructions for performing this task, and perhaps a downloadable features file?
Latest hibernate-release comes Karaf ready already:
If you download the hibernate-release-5.0.5.Final.zip from hibernate's page (http://sourceforge.net/projects/hibernate/files/hibernate-orm/5.0.5.Final/hibernate-release-5.0.5.Final.zip/download) and decompress the file, you will see an osgi folder.
There you can find an already prepared feauture: hibernate-osgi-5.0.5.Final-karaf.xml.
You can just copy it to Karaf's deploy folder and then execute:
feature:install hibernate-orm
It should be installed without any problem.
Another way to install hibernate 5.0.5 feature is to add a repo to features with the command:
feature:repo-add command.
Here you can see the list of hibernate's features and the one I have installed:
karaf#root()> feature:list | grep hibernate
hibernate | 3.3.2.GA | | Uninstalled | enterprise-4.0.3 | Hibernate 3.x JPA persistence engine support
hibernate | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.2.x JPA persistence engine support
hibernate-envers | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Envers 4.2.x
hibernate | 4.3.6.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.3.x JPA persistence engine support
hibernate-envers | 4.3.6.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Envers 4.3.x
hibernate-validator | 5.0.3.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Validator support
hibernate-orm | 5.0.5.Final | x | Started | hibernate-osgi | Combines all Hibernate core dependencies and requ
hibernate-envers | 5.0.5.Final | | Uninstalled | hibernate-osgi | Feature for easily adding Envers support to hiber
hibernate-infinispan | 5.0.5.Final | | Uninstalled | hibernate-osgi | Feature for easily adding Infinispan-based cachin
hibernate-ehcache | 5.0.5.Final | | Uninstalled | hibernate-osgi | Feature for easily adding Ehcache-based caching s
karaf#root()>
Run the following commands on Karaf shell to get Hibernate 5.1.0.Final working on Karaf 4.0.x:
feature:repo-add mvn:org.hibernate/hibernate-osgi/5.1.0.Final/xml/karaf
feature:install hibernate-orm
Hibernate 5 already provides a feature that is also available from maven central. Recent karaf versions provide a nice shortcut to install such features:
feature:repo-add hibernate 5.0.5.Final
feature:install hibernate-orm
So there is no need to manually download the hibernate zip.
If you build your own feature that needs hibernate 5 then you need to provide a element in it that points to the full hibernate feature url.
mvn:org.hibernate/hibernate-osgi/5.0.5.Final/xml/karaf

The ultimate Java version table (J2EE, Java EE, Servlet, JSP, JSTL)

I'm looking for a component break down of Java EE (or previously know as J2EE) and Java SE
E.g.
J2EE 1.3: Servlet 2.3, JSP 1.2. JSTL 1.0, ...
J2EE 1.4: Servlet 2.4, JSP 2.0, JSTL 1.1, ...
Java EE 1.5: Servlet 2.5, JSP 2.1, JSTL 1.2, ...
In a simple table
It can be extracted from:
http://java.sun.com/j2ee/1.3/docs/ , http://java.sun.com/j2ee/1.4/docs/ and http://java.sun.com/javaee/technologies/javaee5.jsp but I'm looking for a simple table.
Is there something like this out there? Or should I write one myself?
Here is one:
Also I want to add some information about Java EE7:
In Java EE 7, no changes were made to JSP and JSTL because these specifications have not been updated.
Expression Language has been removed from JSP and now has its own JSR (341).
Servlets and JSF have both been updated.
WebSocket 1.0 was introduced in Java EE 7.
And also please see this image for Java EE7:
Let me add this as well:
Wikipedia has a Java EE version history. Not in a table, but you can easily bake one yourself based on that if you want. To make it available to everyone, you could just add it as a table to the very same Wikipedia page. The current Java EE 6 uses by the way Servlet 3.0 / JSP 2.2 / JSTL 1.2.
JSP 2.2 is by the way nothing more than a "maintenance release" of JSP 2.1.
In case anyone was still looking for a tabular format ... I had a crack at a java web specs. table as a side-note to a blog post about EL errors. I haven't updated it to include Servlet 3.0 specs.
This one is also nice:
+=============+================+====================+=============================================================================+
| VERSION | DATE | JAVA EE / JDK | FEATURES / CHANGES |
+=============+================+====================+=============================================================================+
| Servlet 4.0 | September 2017 | JavaEE 8 | HTTP/2 |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 3.1 | May 2013 | JavaEE 7 | Non-blocking I/O, HTTP protocol upgrade mechanism |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 3.0 | December 2009 | JavaEE 6, JavaSE 6 | Pluggability, Ease of development, Async Servlet, Security, File Uploading |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.5 | September 2005 | JavaEE 5, JavaSE 5 | Requires JavaSE 5, supports annotation |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.4 | November 2003 | J2EE 1.4, J2SE 1.3 | web.xml uses XML Schema |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.3 | August 2001 | J2EE 1.3, J2SE 1.2 | Addition of Filter |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.2 | August 1999 | J2EE 1.2, J2SE 1.2 | Becomes part of J2EE, introduced independent web applications in .war files |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.1 | November 1998 | Unspecified | First official specification, added RequestDispatcher, ServletContext |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 2.0 | | JDK 1.1 | Part of Java Servlet Development Kit 2.0 |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
| Servlet 1.0 | June 1997 | | |
+-------------+----------------+--------------------+-----------------------------------------------------------------------------+
Found here: https://stackoverflow.com/a/33346887/8682071

Categories