peer code compilation problem

2 views
Skip to first unread message

Borislav

unread,
Oct 11, 2008, 9:46:26 PM10/11/08
to HyperGraphDB
Hi Cipri,

I just noticed the peer code with the Java 5 SDK (same codebase
compiles fine with eclipse!). I get the following:

peer-compile:
[javac] Compiling 62 source files to C:\work\hg\core\build
[javac] C:\work\hg\core\src\java\org\hypergraphdb\peer\workflow
\RememberTaskServer.java:81: inconvertible types
[javac] found :
org.hypergraphdb.peer.workflow.AbstractActivity<capture of ?>
[javac] required:
org.hypergraphdb.peer.workflow.ProposalConversation
[javac] ProposalConversation conv =
(ProposalConversation)conversation;

[javac]
^
[javac] C:\work\hg\core\src\java\org\hypergraphdb\peer\workflow
\RememberTaskClient.java:216: inconvertible types
[javac] found :
org.hypergraphdb.peer.workflow.AbstractActivity<capture of ?>
[javac] required:
org.hypergraphdb.peer.workflow.ProposalConversation
[javac] ProposalConversation conversation =
(ProposalConversation)fromActivity;

[javac]
^
[javac] C:\work\hg\core\src\java\org\hypergraphdb\peer\workflow
\RememberTaskClient.java:258: inconvertible types
[javac] found :
org.hypergraphdb.peer.workflow.AbstractActivity<capture of ?>
[javac] required:
org.hypergraphdb.peer.workflow.ProposalConversation
[javac] Object msg =
((ProposalConversation)fromActivity).getMessage();
[javac] ^
[javac] Note: C:\work\hg\core\src\java\org\hypergraphdb\peer\jxta
\DefaultJXTANetwork.java uses or overrides a deprec
ated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 3 errors

Boris

Ciprian Costa

unread,
Oct 17, 2008, 12:53:55 PM10/17/08
to hyperg...@googlegroups.com
Hi Boris,

  Sorry for the late response, I was away on a short vacation.

  I tried compiling from the command line in Java 5 SDK, but I get no errors. Can you please give me a more precise description of your environment.

  The line of code the yield the errors tries to make a cast between AbstractActivity<?> and a the following class:

public class ProposalConversation extends Conversation<ProposalConversation.State>

Conversation is defined as

public class Conversation<StateType> extends AbstractActivity<StateType>

the thing that might be causing the error is that ProposalConversation.State is defined as an enum in the ProposalConversation class (maybe your version of the jdk has a problem with that):

public enum State {Started, Proposed, Accepted, Rejected, Confirmed, Disconfirmed, Done};

Regards,
Cipri Costa
Reply all
Reply to author
Forward
0 new messages