Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
16 replies
Subscribers
5 subscribers
Views
6865 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi, I'm trying to add a custom data type to my smart service. Wit
olivierl
over 12 years ago
Hi,
I'm trying to add a custom data type to my smart service. Without CDT declaration, I can install the smart service but if I add it, I get this message in the application-server.log :
com.atlassian.plugin.PluginException: com.appiancorp.type.config.pojo.PojoTypeImportException: Could not generate XSDs for the classes [class com.solypse.etde.etde_import]. Cause: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions (APNX-1-4166-001)
I just added the "netbean" cdt example, it's my first test and I'm not so good with Java so excuse me if the answer is obvious.
I'm using Appian 7 and jre 1.6
Thanks,
Olivier
appian-plugin.xml :
---------------------------------
...
<datatype key="et_importDTin" name="Et Import Data Type">
<class>com.solse.et.et_import</class>
</datatype>
<smart-service name="et_import" key="et_import"
class="com.solse.et.et_import" />
</appian-plugin>
---------------------...
OriginalPostID-57953
OriginalPostID-57953
Discussion posts and replies are publicly visible
0
olivierl
over 12 years ago
You're right, as I was working with java those past days, I went immediately to it. I'm going to your suggestion. And I am happy to know how to create CDT with java anyway ! Thanks very much for your help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
olivierl
over 12 years ago
Hi, I'm sorry, I miss something, I don't understand how to use the @Type and don't find any example.
Do I have to declare it like
@Type(namespace="com.solse.et.et_import", name="et_import")
public class etde_import extends AppianSmartService {
Then, how do I generate an object that I can use in Java, like
i=et_import.getFirst();
s=et_import.setSecond("x");
Thanks very much for your kind help
Oliver
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
olivierl
over 12 years ago
could it be something like
private SampleBean sb;
...
@Input(required = Required.OPTIONAL)
@Name("et_import.second")
public void setSb(String second){
this.sb.setSecond(second);
log("second " + this.sb.getSecond());
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
olivierl
over 12 years ago
This returns : The Smart Service Module was invalid: Smart service input and output count does not match the count for the existing smart service registered as com.solypse.et.et_import
Existing size: 2
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
olivierl
over 12 years ago
Well, I hope I'm on the right track, but don't know how to deal with
[Plugin Hot Deploy] ERROR com.appiancorp.plugins.LoggingPluginEventListener - Failed to enable Plug-in 'et' (com.solse.et) version 1.0.0: 'The Smart Service Module was invalid: The input or output with name 'param0' was removed. Smart service inputs and outputs cannot be changed once deployed (APNX-1-4104-005)'
Yes, param0 was a parameter I used to place this smart service in a process but this process has been deleted and I also deleted previous CDT in data management/
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
olivierl
over 12 years ago
I close this case, too much newbie errors.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<