[Datasource Configuration] - can not be javax.naming.Reference cast to javax.sql.DataSource
by Oscar Gutierrez
Oscar Gutierrez [http://community.jboss.org/people/gutiaes1024] created the discussion
"can not be javax.naming.Reference cast to javax.sql.DataSource"
To view the discussion, visit: http://community.jboss.org/message/630156#630156
--------------------------------------------------------------
Hello everyone,
I have trouble getting a JBoss JNDI datasorce of thing happens in particular in windows works correctly at the time of making the lookup of the datasource, but when I do the same exercise in linux I get an error "can not be javax.naming.Reference cast to javax.sql.DataSource " I have tried several ways to solve the problem but I could not,
has been added to the project all.jar jbossclient, but the error continues.
the following test to verify that the lookup was not null, then perform a print of the object, trying to cast the datasource object to get the following exception can not be cast to javax.naming.Reference javax.sql.DataSource.
EXAMPLE
DataSource ds = null;
Connection conn = null;
Object obj = initContext.lookup("jdbc/gestdoc");
System.out.println(obj.toString());
print console:
--------------------
Reference Class Name: javax.sql.DataSource
Address Type: ProxyData
AddressContents: ffffffac ffffffed 0 5 73 7d 0 0 0 1 0 14 6a 61 76 61 78 2e 73 71 6c 2e 44 61 74 61 53 6f 75 72 63 65 ...
Address Type: VMID
AddressContents: ffffffac ffffffed 0 5 73 72 0 13 6a 61 76 61 2e 72 6d 69 2e 73 65 72 76 65 72 2e 55 49 44 f 12 70 d ffffffbf ...
Type: JndiName
Content: jdbc/gestdoc
------------------
ds = (javax.sql.DataSource)obj;//Generate Exception -> javax.naming.Reference cannot be cast to javax.sql.DataSource
the definition xml of the datasource for oracle
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/gestdoc</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>gestdoc</user-name>
<password>gestdoc</password>
<check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
thank you very much for the collaboration.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630156#630156]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Using "signavio-core-components" BPMN2.0 processes with jBPM5
by Alexander Jiteg
Alexander Jiteg [http://community.jboss.org/people/alexndr79] created the discussion
"Using "signavio-core-components" BPMN2.0 processes with jBPM5"
To view the discussion, visit: http://community.jboss.org/message/630063#630063
--------------------------------------------------------------
Hi!
I have used "Signavio-core-component"-editor to create a very simple BPMN2.0 process. The process flow goes like: start->task->end.
I have imported the process in jBPM5 Eclipse and managed to open it there. Next I've tried to run the process in the jBPM5 engine which works fine (eventhough the process does nothing really).
I've now tried to implement some functionality for the task by using a WorkItemHandler. Doing that I realized that the outgome from the "Signavio-core-component"-editor is not 100% compatible with the jBPM5 engine. For example, the WorkItemHandler seems to require a taskName- attribute for the task which is not generated by "Signavio-core-component" editor. If I add this attribute manually to the task I can get the process to run, using a WorkItemHandler.
I thought that the jBPM5 web designer was based on "Signavio-core-component"-editor and that the outcome for both editors would be the same? I have just scratched the surface here so I guess there are more things that differs in the generated processes between the two editors? Maybe using "Signavio-core-component"-editor is not really an option for jBPM5 at all? The reason to why I'm sticking to "Signavio-core-component" is because we alrerady have some other projects utilizing it.
Suggestions? Comments?
/Alex
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630063#630063]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Re: How to persist a timer
by Ryan Peterson
Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the discussion
"Re: How to persist a timer"
To view the discussion, visit: http://community.jboss.org/message/630113#630113
--------------------------------------------------------------
I've had similar issues. The way I worked around mine was to not call the .dispose() method on the ksession until all processes have finished executing. For some reason calling dispose during processInstance execution put things into a weird state. Maybe that's how it's supposed to work, its unclear to me if .dispose() should be called every every unit of work (check on the status of a running processInstance for example), or only at the completion of all work.
Using the previous approach I also found if the processInstance is persisted while waiting in a timer state, and is retrieved after the timer has expired, the process instance will not continue firing. Basically the session has to be re-loaded from the DB before timer expiration.
I haven't played with the KnowledgeBase, I'll give that a shot & see if there's a better solution that way.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630113#630113]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months