CodenameOne build fails reporting SSLHandShakeException - windows

I am following CodenameOne Hello World Tutorial.
My setup is Windows 10, Oracle JDK 11 and Netbeans 12.2.
I have registered in CodenameOne to get an account. I can run the app in simulator, however when I send a an Android or Windows UWP build to cloud I get a SSL Handshake Exception.
I have reinstalled Netbeans and CodenameOne but the issue still persists. I noticed this line in the trace:
Sending build to account: null
I can login successfully from CodenameOne plugin but account value is always null.
Trace log below.
Any idea what could be wrong?
Thanks
build-for-windows-device:
Your build size is: 2kb
Sending build request to the server, notice that the build might take a while to complete!
Sending build to account: null
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1356)
at java.base/sun.net.www.protocol.http.HttpURLConnection$8.run(HttpURLConnection.java:1323)
at java.base/sun.net.www.protocol.http.HttpURLConnection$8.run(HttpURLConnection.java:1321)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:793)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1320)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:241)
at com.codename1.build.client.BuildProcess.sendS3Build(BuildProcess.java:460)
at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:491)
at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:550)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at jdk.internal.reflect.GeneratedMethodAccessor89.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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1254)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:123)
C:\Projects\NetBeans\CN1\CodenameOne\build.xml:617: Error in server build process
BUILD FAILED (total time: 4 seconds)

I was running Netbeans with Java11, seems that CodenameOne works with Java 8.
I changed the netbeans_jdkhome variable from netbeans.conf file to jdk8 and now works fine.
Problem solved.

Related

XCode upload issue with iTMSTransporter

I'm trying to upload my archive to iTunesConnect through xCode but I keep getting this error and I can't find information anywhere about how to resolve it:
App Store Connect Operation Error
An error occurred while trying to start the iTMSTransporter
I'm not even sure what iTMSTransporter is or why it stopped working. Screenshot of the error message.
Also is there a way for me more detailed logs about the failure somewhere or more generally when xCode fails to upload an archive?
Thanks in advance.
Update: I managed to retrieve the logs and seems like Transporter is crashing due to a stack overflow, is there a way of preventing this?
[...]
[2020-01-15 15:40:01 GMT] <main> ERROR: An error occurred while trying to start the iTMSTransporter
java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:207)
at org.apache.http.impl.conn.SystemDefaultRoutePlanner.determineProxy(SystemDefaultRoutePlanner.java:94)
at com.apple.transporter.core.impl.DataCenterRoutePlanner.determineRoute(DataCenterRoutePlanner.java:50)
at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.apple.transporter.JSONService.invoke(JSONService.java:385)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1244)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1203)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1167)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1163)
at com.apple.transporter.WebService.keepSessionAlive(WebService.java:1798)
at com.apple.transporter.WebService.preProcessResult(WebService.java:1750)
at com.apple.transporter.JSONService.invoke(JSONService.java:393)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1244)
at com.apple.transporter.WebService.invokeStandard(WebService.java:1203)
at
[...]

OSGi update site fails with "null" error

Sometimes, after server restart all applications fail because of missing ExtLib libraries. They should be installed during HTTP startup from NSF update site. Server log shows:
HTTP JVM: CLFAD0330I: NSF Based plugins are being
installed in the OSGi runtime. For more information please consult the
log
HTTP JVM: null. For more detailed information,
please consult error-log-0.xml located
in /data/domino/workspace/logs
... repeated ~30x
Content of the error-log-0.xml is no help - fails show only as empty line. Thankfully there is another log file startup.log containing stack trace of the problem:
!ENTRY org.eclipse.osgi 4 0 2015-04-24 09:20:02.450 !MESSAGE Error
installing bundle:
osginsf:update/extlib.nsf/E7D8A0430DEAFDF2C1257B4F003FF202/com.ibm.xsp.extlib.core_8.5.3.20130315-0724.jar
!STACK 0 java.io.IOException at
com.ibm.domino.internal.protocol.osginsf.OSGiNSFUrlConnection.getInputStream(OSGiNSFUrlConnection.java:133)
at java.net.URL.openStream(URL.java:1022) at
org.eclipse.core.runtime.adaptor.EclipseStarter.installBundles(EclipseStarter.java:1105)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.loadBasicBundles(EclipseStarter.java:646)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.access$1(EclipseStarter.java:623)
at
org.eclipse.core.runtime.adaptor.EclipseStarter$1.bundleChanged(EclipseStarter.java:308)
at
... stripped ...
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611) at
com.ibm.domino.http.bootstrap.osgi.LaunchRCP.startRCP(LaunchRCP.java:342)
at
com.ibm.domino.http.bootstrap.osgi.LaunchRCP.launchOSGIFramework(LaunchRCP.java:172)
at
com.ibm.domino.http.bootstrap.BootstrapOSGIClassLoader.launchOSGIFramework(BootstrapOSGIClassLoader.java:79)
at
com.ibm.domino.http.bootstrap.BootstrapOSGIClassLoader.loadClass(BootstrapOSGIClassLoader.java:63)
at java.lang.ClassLoader.loadClass(ClassLoader.java:638) at
com.ibm.domino.http.bootstrap.BootstrapClassLoader.findClass(BootstrapClassLoader.java:79)
!ENTRY org.eclipse.update.configurator 4 0 2015-04-24 09:20:02.762
!MESSAGE
D:\Lotus\Domino\data\domino\workspace.config\domino\eclipse\plugins\plugins
is not a valid plugins directory.
What catched my eye is the last line - the mentioned plugin directory does not exist (one extra '/plugins' directory).
The only workaround is to recreate update site from scratch (delete all content and reimport local update site).
BTW, I have found very old discussion, with no solution on ExtLib project site.
What is the cause of failed update? I can't tell whether IO exception is caused by wrong file path or dead URL to update site (network misconfiguration).
Problem was solved by increasing disk size for Domino binaries - it went out of space (and nobody noticed) by growth of Windows directory (Windows updates). Data and translog directories use different drives, so server was running with no "out of space" errors.
It seems IO Exception was thrown during unsuccessful disk write.

wso2 esb deploy failed on windows

I'm using WSO2 ESB 4.8.1 with JDK 1.7.0_67 x64 on windows 7 x64.
I'm deploying carbon application(.car) using any method:
maven car deploy plugin
web admin console
CarbonAppUploader web service
First deployment succeeds but log file contains:
CarbonAppUploader temp file: C:\Java\WSO2ES~1.1\bin\..\tmp\carbonappsuploads\first-esb_1.0.0.car deletion failed, scheduled deletion on server exit.
Second deployment of same car (name and version) fails with exception in logs (see below)
I Apologize for localized error message but generally it says cant overwrite this file.
If you check, it's actually locked for deletion. Looks like CarbonAppUploader class didn't properly close InputStream.
Strangely enough this bug is not reproducible in unix (centos)
Question to WSO2: do you plan to fix that?
Question to all: Did you meet such bug and how did you solve it?
exception stack trace (partially)
TID: [0] [ESB] [2014-08-18 22:04:58,254] ERROR {org.wso2.carbon.application.upload.CarbonAppUploader} - Error occurred while uploading Carbon App artifacts {org.wso2.carbon.application.upload.CarbonAppUploader}
java.io.FileNotFoundException: C:\Java\WSO2ES~1.1\bin\..\tmp\carbonappsuploads\first-esb_1.0.0.car (Запрошенную операцию нельзя выполнить для файла с открытой пользователем сопоставленной секцией)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at org.wso2.carbon.application.upload.CarbonAppUploader.writeResource(CarbonAppUploader.java:78)
at org.wso2.carbon.application.upload.CarbonAppUploader.uploadApp(CarbonAppUploader.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I checked out source code from svn, fixed bug myself. If anybody experiencing same issue, you may download sources and compiled jar from https://wso2.org/jira/browse/ESBJAVA-3272
Hopefully this bug fix will be included in next releases

Oracle Data Integrator (ODI - v11.1.1.3) "unable to load language: beanshell" Error

Following an install of Eclipse 3.7.2 on my Ubuntu 12.04 development machine, I have been unable to execute any ODI packages/interfaces/procedures. On execution (for both simulated and actual runs), an error is thrown (java trace below). I am not sure if it's anything to do with the Eclipse install, but it seems likely. Does anyone have an idea how to fix this?
Also, when launching ODI from the terminal using 'bash odi', the following error is displayed in the terminal:
2013-08-15 14:43:46.162 ERROR Error during RuntimeClassLoader initialization. ODI will start without RuntimeClassLoader
Error output:
oracle.odi.core.exception.OdiRuntimeException: Error during Code Interpretor creation
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.getInstance(SnpCodeInterpretor.java:209)
at com.sunopsis.dwg.codeinterpretor.SnpGeneratorSQLCIT.<init>(SnpGeneratorSQLCIT.java:300)
at com.sunopsis.graphical.dialog.SnpsDialogExecution.doPackageExecuter(SnpsDialogExecution.java:907)
at oracle.odi.ui.action.SnpsPopupActionExecuteHandler.actionPerformed(SnpsPopupActionExecuteHandler.java:68)
at oracle.odi.ui.SnpsActionControler.handleEvent(SnpsActionControler.java:75)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:674)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:633)
at java.awt.EventQueue$2.run(EventQueue.java:631)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:647)
at java.awt.EventQueue$3.run(EventQueue.java:645)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:644)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: org.apache.bsf.BSFException: unable to load language: beanshell
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:718)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.loadEngine(SnpCodeInterpretor.java:85)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.<init>(SnpCodeInterpretor.java:75)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.getInstance(SnpCodeInterpretor.java:184)
... 45 more
After digging around for about a day on this issue, I brazenly tried running ODI as the root user on the off chance that this was a permissions issue. I started ODI from the command line (using 'bash odi') for greater verbosity, and it loaded without the error mentioned above. Something gave me the impression that this wasn't a permissions issue, but one related to the user settings.
To rectify the issue, I removed my user's odi settings folder (renaming it, for safety):
mv ~/.odi ~/.backup_odi
Then I started ODI from the terminal under my own user (i.e. not root) - there were no errors! None of my connections were available in the new settings folder though. This I fixed by closing ODI and entering the following:
cp ~/.backup_odi/oracledi/snps_login_work.xml ~/.odi/oracledi/
If anybody else encounters this issue, I hope you find this post quicker than it took me to fix it!
org.apache.bsf.BSFException: unable to load language: beanshell
The exception was thrown because bsh-2.Ob4.jar was not in the classpath and it is a dependent jar of bsf.jar

Apple Push Notification, PKCS12 in java-apns

I try to send a push notification from a java application to an iphone. there is the source code :
PayLoad payLoad = new PayLoad();
payLoad.addAlert("My alert message");
payLoad.addBadge(45);
payLoad.addSound("default");
PushNotificationManager pushManager = PushNotificationManager.getInstance();
pushManager.addDevice("iPhone", "f4201f5d8278fe39545349d0868a24a3b60ed732");
log.warn("Initializing connectiong with APNS...");
// Connect to APNs
pushManager.initializeConnection(HOST, PORT,
"/etc/Certificates.p12", "password",
SSLConnectionHelper.KEYSTORE_TYPE_PKCS12);
Device client = pushManager.getDevice("iPhone");
// Send Push
log.warn("Sending push notification...");
PushNotificationManager.getInstance().sendNotification(client, payLoad);
I receive an exception in the line :
pushManager.initializeConnection(HOST, PORT,
"/etc/Certificates.p12", "password",
SSLConnectionHelper.KEYSTORE_TYPE_PKCS12);
Here is the exception :
java.io.IOException: failed to decrypt safe contents entry: java.io.IOException: getSecretKey failed: PBE SecretKeyFactory not available
at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at com.anthil.apns.service.ExtractFile.main(ExtractFile.java)
Caused by: java.io.IOException: getSecretKey failed: PBE SecretKeyFactory not available
at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.getPBEKey(Unknown Source)
... 3 more
Caused by: java.security.NoSuchAlgorithmException: PBE SecretKeyFactory not available
at javax.crypto.SecretKeyFactory.(DashoA13*..)
at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
... 4 more
can any one help me with this ?
I have recently encountered the same exception. It turned out to occur only when I ran my code through Eclipse (version 3.7.0 Indigo), using the new Sun JDK 1.7.0. Running the code either outside of Eclipse, or using a JDK 1.6.x fixed the problem for me.
I had a similar problem that was resolved by removing the '-Djava.ext.dirs' flag from my java command. See: http://www.scottmcmaster365.com/2009/03/perils-of-abusing-javaextdirs-property.html
Btw, from the code you provided, you seem to be using an old version of JavaPNS (1.6?). You might want to upgrade to the latest version (2.0 public, or even the latest 2.1-level build) from http://code.google.com/p/javapns/, as you will get MANY reliability improvements and you will be able to push notifications with a single line of code instead of all these "complicated" steps.

Resources