Jaiyachandhiran Thangaraju [http://community.jboss.org/people/jaiyachandhiran] created the discussion
"Re: How to add Java code to the jbpm process" To view the discussion, visit: http://community.jboss.org/message/630873#630873 -------------------------------------------------------------- Hi Thanks for ur reply. Now i have created a simple process and wrote a simple java code. *Java Code* ***public void execute(ExecutionContext executionContext) throws Exception { // TODO Auto-generated method stub String query = "SELECT login_name from rs_users"; System.out.println("Testing JAVA Code"); Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","resonancedev","resonancedev"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(query); while (rs.next()) { String message = rs.getString("login_name"); System.out.println("name-->" +message); } con.close(); //executionContext.getContextInstance().setVariable("message", message); } *** * I tried to start the process from console and i get the below error. Failed to start process: class 'oracle.jdbc.driver.OracleDriver' could not be found by the process classloader I have added the jar file to the project, I need to know where to add this jar file? Please reply me * -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/630873#630873] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
