Hello everyone, I'm sorry to disturb but I have an Issue that I'm not able to fix by myself, so I ask for anyone who has the knowledge to point me in the right address
I'm currently working with AWS Lambda functions, I have sucked on connecting to a Aurora Serverless BD with these functions and they work great!
But now, In one of the lambdas of my API I have to make a post to a URL, this is normal to me because I've been doing the same post to the same URL with a VPS since, at least, 1 year ago and everything is OK
I'm currently using Java 11 for the lambda, like I said everything works fine except the HTTP post, I'm publishing here part of the code I use (the important) and the logs I get from testing the lambda:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
And the Logs I get from testing the lambda are:
A
B
C
httputils2service._submitjob (java line: 148)
java.lang.NullPointerException
at com.cronos.lambda.arucompraweb.httputils2service._submitjob(httputils2service.java:148)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:509)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:489)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:563)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:47)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:43)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:175)
at com.cronos.lambda.arucompraweb.main._responsehandler(main.java:749)
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 lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:282)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:199)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:899)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:262)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:199)
at lambdainternal.AWSLambda.main(AWSLambda.java:193)
I don't know what am I doing wrong, but any help will be highly appreciated
Many Thanks
			
			I'm currently working with AWS Lambda functions, I have sucked on connecting to a Aurora Serverless BD with these functions and they work great!
But now, In one of the lambdas of my API I have to make a post to a URL, this is normal to me because I've been doing the same post to the same URL with a VPS since, at least, 1 year ago and everything is OK
I'm currently using Java 11 for the lambda, like I said everything works fine except the HTTP post, I'm publishing here part of the code I use (the important) and the logs I get from testing the lambda:
			
				lambda code:
			
		
		
		'Non-UI application (console / server application)
#Region Project Attributes
    #MergeLibraries: True
    #AdditionalJar: mysql-connector-java-8.0.29.jar
#End Region
Sub Process_Globals
    Private urlRespuesta As String
End Sub
Public Sub responsehandler(mapIn As Object) As String
    Try   
        Dim strData As String=mapIn
        Dim MyJPData As JSONParser
        MyJPData.Initialize(strData)
        Dim MapDatos As Map=MyJPData.NextObject
        Dim strEmail As String = MapDatos.Get("email")
        Dim jSQL As SQL
        jSQL.Initialize2("com.mysql.cj.jdbc.Driver","jdbc:mysql://xxxxxxxxxxxxxxx.us-east-1.rds.amazonaws.com:3306/xxx?", "XXXXXX","XXXXXX")
        ...
        Do some stuff
        ...
        Plexo(Message)
        
        StartMessageLoop
        
        jSQL.Close
        
        Return urlRespuesta
        
    Catch
        jSQL.Close
        Return "https://aru.sportsticket.uy/error.html"
    End Try
End Sub
Sub Plexo (strM As String)
    Dim j As HttpJob
Log("A")
    j.Initialize("",Me)
Log("B")
    j.PostString("https://xxxxx/plexo",strM)
Log("C")
    Wait For (j) JobDone(j As HttpJob)
Log("D")
    If j.Success Then
Log("E")
        Dim JP As JSONParser
Log("F")
        JP.Initialize(j.GetString)
Log("G")
        Dim mapRespuesta As Map=JP.NextObject
Log("H")
        urlRespuesta=mapResuesta.Get("Uri")
Log("P")
    Else
Log("Q")
        urlRespuesta="https://aru.sportsticket.uy/error.html"
Log("R")
    End If
Log("V")
    j.Release
Log("W")
    StopMessageLoop
End SubAnd the Logs I get from testing the lambda are:
A
B
C
httputils2service._submitjob (java line: 148)
java.lang.NullPointerException
at com.cronos.lambda.arucompraweb.httputils2service._submitjob(httputils2service.java:148)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:509)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:489)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:563)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:47)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:43)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:175)
at com.cronos.lambda.arucompraweb.main._responsehandler(main.java:749)
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 lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:282)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:199)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:899)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:262)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:199)
at lambdainternal.AWSLambda.main(AWSLambda.java:193)
I don't know what am I doing wrong, but any help will be highly appreciated
Many Thanks
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		