[Beginner's Corner] - Problem with that error java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource cannot be cast to javax.sql.DataSource
by shincham
shincham [https://community.jboss.org/people/shincham] created the discussion
"Problem with that error java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource cannot be cast to javax.sql.DataSource"
To view the discussion, visit: https://community.jboss.org/message/753085#753085
--------------------------------------------------------------
Hello guys. I'm having a problem with that error.
java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource cannot be cast to javax.sql.DataSource
The issue is, we have a system, in JBOSS 6, and we're trying to include this system in a webapp.
The system is working normally on JBOSS 6, but it isn't working on the webrun, because of that error.
The system also works on a software that we use in the firm, called Maker.
The problem is only in integrate the system with the webapp of the client.
The webapp uses JBOSS, JEE and JSP, so it's not a problem of compatibility.
I made some researchs in the forum, and i saw that thread:
https://community.jboss.org/message/250795#250795 https://community.jboss.org/message/250795#250795
Where the guy was having the same problem. He resolved the problem copying the jdbc-driver of the webapp. He copied to server/standard/lib.
But, the problem is, we don't have access to the webapp =/, we're just integrating a new system in the webapp, and despite the system is working, we're having this error when we try to make it work in the webapp.
If somebody could help i appreciate.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/753085#753085]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months
[jBPM] - Workflow design
by new bee
new bee [https://community.jboss.org/people/newbird] created the discussion
"Workflow design"
To view the discussion, visit: https://community.jboss.org/message/753084#753084
--------------------------------------------------------------
Hi,
I am planning to design a simple workflow framework which contains simple nodes which includes actions to perform in that node and parameters of that node.. ....
In this i want to add persistency feature so that if client ends session in the middle and wants to restart process, then i can get info from database and restart session....
Here i need your help for schema design?
My main questions are :
1) Parameters and attributes of node changes from one node to another node....Then how could i store node info in DB? Is Serializing the object and storing in relation database is better approach? Or Any other format or databases?
2) If at any point client wants to come back,How would i know the previous node? Do i need to store previous node of each node in database?
3) We give conditions on the edge between nodes in workflow...What is suggested format and datatype for conditions ?
Please reply as soon as possible...
All suggestions are welcome.......
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/753084#753084]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months
[jBPM] - Re: Process Parameters through REST API?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"Re: Process Parameters through REST API?"
To view the discussion, visit: https://community.jboss.org/message/752814#752814
--------------------------------------------------------------
Hi Franck,
Finally Made It! :)
so here is how to do it.
first, you have to render the form
something like this
responseString = requestGetService(
" http://localhost:8080/gwt-console-server/rs/form/process/ http://localhost:8080/gwt-console-server/rs/form/process/"
+ "com.sample.evaluation" + "/render", null, false);
if (responseString.contains("<html>")) {
responseString = authenticate(address, "krisv", "krisv");
responseString = requestGetService(
" http://localhost:8080/gwt-console-server/rs/form/process/ http://localhost:8080/gwt-console-server/rs/form/process/"
+ "com.sample.evaluation" + "/render", null, false);
}
ok. this will get you the input form
then call the form process complete like this
String address = " http://localhost:8080/gwt-console-server/rs/form/process/com.sample.evalu... http://localhost:8080/gwt-console-server/rs/form/process/com.sample.evalu...";
String responseString = "";
Map<String, Object> map = new HashMap<String, Object>();
map.put("employee", "thomas");
map.put("reason", "theReason");
responseString = requestPostMultipartService(address, map);
if (responseString.contains("<html>")) {
responseString = authenticate(address, "krisv", "krisv");
responseString = requestPostMultipartService(address, map);
}
the result should be:
<div style='font-family:sans-serif; padding:10px;'><h3>Successfully processed input</h3><p/>You can now close this window.</div>
:)
and for the functions that I use are:
private String requestPostMultipartService(String url,
Map<String, Object> parameters) {
String responseString = "";
try {
HttpPost httpPost = new HttpPost(url);
if (parameters == null)
parameters = new HashMap<String, Object>();
MultipartEntity entity = new MultipartEntity(
HttpMultipartMode.BROWSER_COMPATIBLE);
Set<String> keys = parameters.keySet();
for (Iterator<String> keysIterator = keys.iterator(); keysIterator
.hasNext();) {
String keyString = keysIterator.next();
String value = parameters.get(keyString).toString();
entity.addPart(keyString, new StringBody(value));
}
httpPost.setEntity(entity);
HttpResponse response = httpClient.execute(httpPost);
responseString = this.getRequestString(response);
} catch (Exception e) {
}
return responseString;
}
and
private String getRequestString(HttpResponse response) throws Exception {
InputStreamReader inputStreamReader = null;
BufferedReader bufferedReader = null;
String req = "";
InputStream inputStream = response.getEntity().getContent();
inputStreamReader = new InputStreamReader(inputStream);
bufferedReader = new BufferedReader(inputStreamReader);
StringBuilder stringBuilder = new StringBuilder();
String line = bufferedReader.readLine();
while (line != null) {
stringBuilder.append(line);
line = bufferedReader.readLine();
}
req = stringBuilder.toString();
return req;
}
just give it a try and let me know if it works for you :)
Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752814#752814]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months