Derby migration fail during Artifactory upgrade from 6 to 7 - artifactory

I am upgrading Artifactory from 5.5.1 to latest 7.35 using manual.
Until 6.x major it went well, but after trying to migrate from 6.12.2 or 6.23.21 to different 7.x majors it always ends up in bad state. I tried migrating it from different 6.x versions to different 7.x versions, nothing helped.
migration.sh always shows success, but after starting Artifactory it stucks in broken state with no UI accessible. However localhost:8081 still redirects to localhost:8082/ui.
This can be seen in derby.log. Looks like database migration problem.
# cat derby.log
----------------------------------------------------------------
Fri Mar 11 14:30:23 UTC 2022:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.14.2.0 - (1828579): instance a816c00e-017f-7963-434f-00001e025fc0
on database directory /var/opt/jfrog/artifactory/data/derby with class loader java.net.URLClassLoader#4f970963
Loaded from file:/opt/jfrog/artifactory/app/artifactory/tomcat/lib/derby-10.14.2.0.jar
java.vendor=AdoptOpenJDK
java.runtime.version=11.0.2+9
user.dir=/
os.name=Linux
os.arch=amd64
os.version=3.10.0-1160.49.1.el7.x86_64
derby.system.home=null
derby.stream.error.file=/opt/jfrog/artifactory/var/log/derby.log
Database Class Loader started - derby.database.classpath=''
Fri Mar 11 14:30:41 UTC 2022 Thread[localhost-startStop-1,5,main] (XID = 176494570), (SESSIONID = 3), (DATABASE = /opt/jfrog/artifactory/var/data/artifactory/derby), (DRDAID = null), Cleanu
p action starting
Fri Mar 11 14:30:41 UTC 2022 Thread[localhost-startStop-1,5,main] (XID = 176494570), (SESSIONID = 3), (DATABASE = /opt/jfrog/artifactory/var/data/artifactory/derby), (DRDAID = null), Failed
Statement is: INSERT INTO access_configs (config_name, modified, data) VALUES (?, ?, ?) with 3 parameters begin parameter #1: shared.security.joinKey :end parameter begin parameter #2: 164
7009041746 :end parameter begin parameter #3: BLOB:Length=93 :end parameter
ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'ACCESS_CONFIGS_PK' defined on
'ACCESS_CONFIGS'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy81.executeUpdate(Unknown Source)
at org.jfrog.storage.JdbcHelper.executeUpdate(JdbcHelper.java:229)
at org.jfrog.access.server.db.util.AccessJdbcHelperImpl.executeUpdate(AccessJdbcHelperImpl.java:104)
Any ideas for debugging this?
Thank you kindly for your help.

Related

GRPC Exception sendHeaders has already been called

It seems that when the size of requests > 32k, the excetions will appears. But I don't know why this happens and how to solve it.
Apr 25, 2020 10:25:13 PM io.grpc.internal.SerializingExecutor run
SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1OnReady#2f3f487b
java.lang.IllegalStateException: sendHeaders has already been called
at com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at io.grpc.internal.ServerCallImpl.sendHeaders(ServerCallImpl.java:88)
at com.xz.hosting.serverbase.request.RpcDispatcherModule$GenericRpcServerCallHandler$1.onReady(RpcDispatcherModule.java:336)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.onReady(ServerCallImpl.java:307)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1OnReady.runInContext(ServerImpl.java:755)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
You are facing this issue because it's a not thread compatible call.
click here for details

JX browser 6.21 fails to initialize

We are trying to upgrade JX browser from 6.5.1 to 6.21.
We are having several problems with this.
One is occasional problems initializing the jx browser.
Here some errors from the log:
ERROR [2018-08-13 19:05:02,581] (null:-1) - 07:05:02 SCHWERWIEGEND: [0813/190502.567:FATAL:window_impl.cc(196)] Check failed: ::IsWindow(parent).
ERROR [2018-08-13 19:05:03,158] (null:-1) - 07:05:03 SCHWERWIEGEND: Failed to execute task
java.lang.IllegalStateException: Channel stream was closed before response has been received.
at com.teamdev.jxbrowser.chromium.internal.ipc.SocketChannel.post(SourceFile:221)
at com.teamdev.jxbrowser.chromium.Browser.b(SourceFile:624)
at com.teamdev.jxbrowser.chromium.Browser.getURL(SourceFile:2046)
at ov$e.onFinishLoadingFrame(Unknown Source)
at com.teamdev.jxbrowser.chromium.aa.run(SourceFile:3400)
at com.teamdev.jxbrowser.chromium.internal.r.run(SourceFile:79)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR [2018-08-13 19:06:58,011] (null:-1) - com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 4
at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:485)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:402)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:348)
at ... calling code ...
What could be the problem here?

JavaFX desktop app won't start in a specific machine (works in others)

I have a java desktop app using Swing which I rewrote in JavaFX using SceneBuilder.
The Swing app works fine on all users machines (35 Machine). After rewriting the app in JavaFX, on one specific machine the app won't start and gives the below error message.
I couldn't figure out the issue. I appreciate if someone can give any help.
Thank you.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/PaintConverter
at com.jfoenix.controls.JFXPasswordField$StyleableProperties.<clinit>(JFXPasswordField.java:205)
at com.jfoenix.controls.JFXPasswordField.<init>(JFXPasswordField.java:156)
at idehmis.controller.LoginController.<init>(LoginController.java:51)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at idehmis.IDEHMIS.start(IDEHMIS.java:30)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
it looks like the JVM is finding it difficult to locate the com.sun.javafx.css.converters.PaintConverter at runtimewhich causes the ClassNotFoundException Exception error, and which in turn causes the JFoenix library to throw java.lang.NoClassDefFoundError meaning the class was not found on the classpath. This indicates that we were trying to load the class definition, and the class did not exist on the classpath
so first make sure you have the right version of java which is Java 8 to support JFoenix, them make sure The JFoenix library is located in you classpath.
The stack trace, because it prefaces each fully-qualified class name (for example java.lang.ClassLoader) with a module name (e.g. java.base) indicates that the machine is trying to run the application using Java 9.
The CSS converter classes, such as PaintConverter, were promoted from private API, where they were located in Java 8 and earlier, to public API in Java 9. So the class com.sun.javafx.css.converters.PaintConverter no longer exists, and has been replaced by javafx.css.converter.PaintConverter. Hence, when running your application in Java 9, you get a ClassNotFoundException.
The bottom line here is that using any API that is not public, or using third party libraries that do so, is liable to make your application fail if the user updates their JVM. The possible solutions to this problem are:
Avoid using private API, or libraries that use private API
Create and maintain different versions of your code that are for specific JVM versions. In the case of the third-party JFoenix library you are using, there is a separate version for Java 9, so you could create a Java 9 version of the application that uses that version of the library. Note that not only does this create an additional burden on the developer, but it also can potentially create issues for the end user, who will be forced to update the version of your application they use in sync with updating their JVM.
Create a "Self-Contained Application Bundle" for your application. This bundles a specific JVM with your code, so you essentially control the JVM the user uses to run your application. The downsides to this are that you need to create a different bundle for each platform (Windows 32 bit, Windows 64 bit, Mac, Linux) that you want to support, and that the size of the application will increase substantially (to include the JVM).
I would generally recommend the first option when possible, and the third when not.

Exception while running AWS dynamoDb in Local Machine

I have downloaded AWS dynamodb zip file and extracted to D:/dynamoDB folder
When tried to run via command prompt using
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar
Exception as below occurs
Exception in thread "main" java.lang.NoSuchFieldError: completionKey
at sun.nio.fs.WindowsNativeDispatcher.initIDs(Native Method)
at sun.nio.fs.WindowsNativeDispatcher.<clinit>(Unknown Source)
at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.util.calendar.ZoneInfoFile.<clinit>(Unknown Source)
at sun.util.calendar.ZoneInfo.getTimeZone(Unknown Source)
at java.util.TimeZone.getTimeZone(Unknown Source)
at java.util.TimeZone.setDefaultZone(Unknown Source)
at java.util.TimeZone.getDefaultRef(Unknown Source)
at java.util.TimeZone.getDefault(Unknown Source)
at org.eclipse.jetty.util.DateCache.<init>(DateCache.java:88)
at org.eclipse.jetty.util.log.StdErrLog.<clinit>(StdErrLog.java:68)
at org.eclipse.jetty.util.log.Log.initStandardLogging(Log.java:185)
at org.eclipse.jetty.util.log.Log.initialized(Log.java:168)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:435)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:425)
at org.eclipse.jetty.util.IO.<clinit>(IO.java:44)
at org.eclipse.jetty.util.log.Log$1.run(Log.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.util.log.Log.<clinit>(Log.java:85)
at org.eclipse.jetty.util.component.AbstractLifeCycle.<clinit>(AbstractL
ifeCycle.java:33)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServe
r(ServerRunner.java:123)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServe
rFromCommandLineArgs(ServerRunner.java:119)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.main(Server
Runner.java:70)
I am having Java7 sdk in my windows 32 system.
NoSuchFieldError exceptions are thrown "if an application tries to access or modify a specified field of an object, and that object no longer has that field". In this case, it's likely the jar was compiled against one version of java (or other dependency) and you're using a different version that is not compatible.
I'd suggest updating to Java8 since support for Java7 ended as of April 2015. Also, check your version of jetty (since the last call outside the JVM was caused by org.eclipse.jetty.util.DateCache.<init>(DateCache.java:88)) to make sure it's compatible.

JAX-WS context listener initializing failed in JBOSS

I'm getting below error when trying to deploy a JAX-WS web service in JBOSS 4.0.3. I'm using JAX-WS RI runtime libraries. I'm not using JBOSS-WS the JBOSS specific JAX-WS.
18:31:21,125 INFO [STDOUT] Feb 20, 2015 6:31:21 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
18:31:21,203 INFO [STDOUT] Feb 20, 2015 6:31:21 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor:
java.lang.AbstractMethodError: javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z)V
java.lang.AbstractMethodError: javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z)V
at com.sun.xml.ws.util.xml.XmlUtil.newTransformerFactory(XmlUtil.java:392)
at com.sun.xml.ws.util.xml.XmlUtil.newTransformerFactory(XmlUtil.java:400)
at com.sun.xml.ws.util.xml.XmlUtil.<clinit>(XmlUtil.java:233)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.getXMLInputFactory(XMLStreamReaderFactory.java:127)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.<clinit>(XMLStreamReaderFactory.java:89)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:176)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
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)...
In the web.xml I've put the listener for the class: com.sun.xml.ws.transport.http.servlet.WSServletContextListener
The class javax.xml.transform.TransformerFactory is abstract, and you need an Implementation of that class somewhere in your classpath. The exception java.lang.AbstractMethodError: javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z) often indicates a version conflict in your dependencies, because the implementation you use was build against a different version of the interface.
To solve it you must use a matching implementation. TransformerFactory-implementations are contained withing XML parsers like Xalan or Xerces. You can tell Java to use a certain parser implementation by setting the appropriate system properties:
Properties p = System.getProperties();
p.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
p.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
p.setProperty("javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
System.setProperties(p);
Executing this during initialization of your application will set the default parser implementation to the internal Xalan parser of the JRE. To use other parsers, include their dependencies and put the Implementations classes' names in the setProperties methods.

Resources