Thanks Harris,
Come over one day, trout fishing on Saturday if I get this done. I have now tracked my fault, it is a database connection issue.
On Localhost, when I compile the server starts with no issues. When connect the browser and/or refresh it logs:
Disconnected
java.lang.NullPointerException
at anywheresoftware.b4j.object.WebSocketModule$Adapter.onWebSocketText(WebSocketModule.java:121)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:127)
at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:64)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:121)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:169)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:302)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:210)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:219)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:257)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.read(AbstractWebSocketConnection.java:500)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:409)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:534)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
at org.eclipse.jetty.util.thread.QueuedThreadPool$1.run(QueuedThreadPool.java:536)
at java.lang.Thread.run(Thread.java:745)
Connected
If I take out the following code the problem disappears.
Can someone steer me in the right direction. In the MAIN I have as Follows:
'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Public srvr As Server
#AdditionalJar: mysql-connector-java-5.1.36-bin.jar
Public sql1 As SQL
End Sub
Sub AppStart (Args() As String)
' Build the Theme
ABMShared.BuildTheme("mytheme")
' create the app
Dim myApp As ABMApplication
myApp.Initialize
' create the pages
Dim myPage As ds_home
myPage.Initialize
' add the pages to the app
myApp.AddPage(myPage.Page)
' start the server
myApp.StartServer(srvr, "srvr", 51042)
StartMessageLoop
End Sub
Then in myfirstpage I have some cells being loaded as follows:
Try
Dim sql1 As SQL
sql1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://104.238.77.163/mydatabse", "myuser", "mypassword)(*&")
cursor = sql1.ExecQuery("SELECT * FROM qualas_productgroup")
Dim myCell As Int = 2
Do While cursor.NextRow
' Read Single record from productgroup table
Dim vRow(1) As Object
vRow(0) = cursor.GetString("s_productgroup")
Dim catg As ABMChip
catg.Initialize(page, vRow(0), vRow(0), True, "chiptheme")
'catg.Refresh
Tabc.Cell(3,2).AddArrayComponent(catg, "catagories")
myCell = myCell +1
Loop
sql1.Close
Catch
Log("ERROR: " & LastException.Message)
End Try
'Tabc.Cell(3,1).AddComponent(ABMShared.BuildParagraphHeader(page, "par1", "{NBSP}"))
End If
I think I have all this is the wrong place. Thanks in advance.
Phil