Error on compiling class under Linux

Posted by DenDuze on 05-Dec-2016 09:07

I tried the use of the ServerSocket-class.
This works great in development (Windows)
When I move the code to our test environment (linux) and I want to compile the source I'm getting the following error. Invalid datatype specified: com.dotr.socket.serversocket. Specify a xdatatype such as 'character' or the name of a class. (5638)   Could not understand line 1. (196) .

So why do i get this error on the following statement:
define variable oServerSocket as com.dotr.socket.ServerSocket no-undo.

When I look to my propath the ServerSocket.cls is in the correct directory and has the correct casing.
Is there some catch with compiling  classes on Linux??

Regards

All Replies

Posted by Matt Baker on 05-Dec-2016 09:09

Your class name probably doesn't match the file name case.  Unix file systems are case sensitive and first reference to classes during compile has to match.  Either consistently use camel case or consistently use lower case in both the file names and the source code.

Posted by bronco on 05-Dec-2016 09:14

well, according to the error message you posted there's somewhere in the code something like:

def var bla as com.dotr.socket.serversocket no-undo.  (all lowercase) That's why you get the error.

Posted by DenDuze on 05-Dec-2016 09:21

HI,

No my casing is correct (like I mentioned in my first post)

I just changed the serversocket to ServerSocket (after I copied the compile error) because the class is really named ServerSocket.cls but I forgot to change the compile error.

I changed that because maybe someone had also used this class and would tell me that it should be ServerSocket

So now the correct code and the error

define variable oServerSocket as com.dotr.socket.ServerSocket no-undo.

Invalid datatype specified: com.dotr.socket.ServerSocket. Specify a datatype such as 'character' or the name of a class. (5638)  Could not understand line 1. (196)

Source is under ./com/dotr/socket and is named ServerSocket.cls

Regards

Posted by Brian K. Maher on 05-Dec-2016 09:24

What about the .r file for the class?  Does it have the proper casing?

Posted by Peter Judge on 05-Dec-2016 09:30

Just a gotcha/warning for the future: in 11.6 and beyond that the dotr.* classes ARE NOT available as part of OE .
 
They are publicly available at https://bitbucket.org/jmls/dotrsocket . I would recommend that you use that version (or create a PL/folder that’s not in $DLC with this code).
 
 
 

Posted by DenDuze on 06-Dec-2016 00:49

@Brian: I do not have a .r file yet

@Peter: thanks for the info, I already use that one

Will look further  @this problem and will let you know if find the reason (it has to be casing but .....)

This thread is closed