I have huge project and to simplify maintenance I want to put all my code for jrdc2 in class.
I can access to jrdc2 server,
My sub
My sub:
public Sub checkInternetEtServeur As ResumableSub
Main.rdcLink = "http://192.168.1.149:17178/rdc"
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_test", Array())
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
LogColor("Server ok",Colors.Green)
Return True
Else
LogColor("Server no ok",Colors.Red)
Return False
End If
End Sub
On jrdc2 server sql.select_test=select Version()
.
but I receive an error:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: java.lang.ClassNotFoundException: yves.fleury.dbserveur$_dbcommand, Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 java.lang.ClassNotFoundException: yves.fleury.dbserveur$_dbcommand</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /rdc. Reason:
<pre> java.lang.ClassNotFoundException: yves.fleury.dbserveur$_dbcommand</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
Server no ok
Sub Class_Globals
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
End Sub
Sub CreateRequest As DBRequestManager
Dim req As DBRequestManager
req.Initialize(Me, Main.rdcLink)
Return req
End Sub
public Sub CreateCommand(Name As String, Parameters() As Object) As DBCommand
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = Name
If Parameters <> Null Then cmd.Parameters = Parameters
Return cmd
End Sub