[JBoss Seam] - jbpmContext not found
by wsollers
I have 2 datasources 1 for application use that works fine, can do CRUD ops etc... The other I was going to use to run jbpm in hsqldb. My basic problem is that the jbpContext cannot be found:
2006-08-24 17:45:18,326 DEBUG [org.jboss.seam.Component] seam component not found: jbpmContext
After that the null that is jbpmContext just blows off everytime I try to do a pageflow / process...
Need some help / pointers here. I cannot seem to get jbpm configured for anything. Here is my jbpm.cfg.xml (c&p reuse from dvd store):
<jbpm-configuration>
<jbpm-context>
</jbpm-context>
</jbpm-configuration>
I have the hibernate.cfg.xml from dvd store as well:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
false
java:/jbpmDatasource
org.hibernate.transaction.JTATransactionFactory
org.hibernate.transaction.JBossTransactionManagerLookup
org.hibernate.cache.HashtableCacheProvider
create-drop
<!--property name="transaction.flush_before_completion">true</property-->
<!-- ############################################ -->
<!-- # mapping files with external dependencies # -->
<!-- ############################################ -->
<!-- following mapping file has a dependendy on -->
<!-- 'bsh-{version}.jar'. -->
<!-- uncomment this if you don't have bsh on your -->
<!-- classpath. you won't be able to use the -->
<!-- script element in process definition files -->
<!--
-->
<!-- following mapping files have a dependendy on -->
<!-- 'jbpm-identity-{version}.jar', mapping files -->
<!-- of the pluggable jbpm identity component. -->
<!-- comment out the following 3 lines if you don't-->
<!-- want to use the default jBPM identity mgmgt -->
<!-- component -->
<!--
-->
<!-- ###################### -->
<!-- # jbpm mapping files # -->
<!-- ###################### -->
<!-- hql queries and type defs -->
<!-- graph.def mapping files -->
<!-- graph.node mapping files -->
<!-- context.def mapping files -->
<!-- taskmgmt.def mapping files -->
<!-- module.def mapping files -->
<!-- bytes mapping files -->
<!-- file.def mapping files -->
<!-- scheduler.def mapping files -->
<!-- graph.exe mapping files -->
<!-- module.exe mapping files -->
<!-- context.exe mapping files -->
<!-- msg.db mapping files -->
<!-- taskmgmt.exe mapping files -->
<!-- scheduler.exe mapping files -->
<!-- logging mapping files -->
</session-factory>
</hibernate-configuration>
here is the jbpm-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>jbpmDatasource</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpm</connection-url>
<connection-url>jdbc:hsqldb:mem</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
</local-tx-datasource>
jbpm
true
jbpm is configured in the components.xml:
launchbatch.jpdl.xml todo.jpdl.xml
Packaging is in EAR format with the class path attribute in the META-INF/MANIFEST.MF of the war :
Class-Path: jboss-seam.jar jbpm-3.1.1.jar
I see hibernate find all of my entities in their jars and map them but I never see hibernate find the hbm's for jbpm in its jar.
Anyone have an idea of what am I doing wrong? Or where to even start looking?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967363#3967363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967363
19 years, 8 months
[JNDI/Naming/Network] - Jboss with mySql
by jbossnatasha
Hello,
I need urgent help with my application. I am trying to connect to MySql with jboss and getting error.
My mysql-ds.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml,v 1.3.2.3 2006/02/07 14:23:00 acoliver Exp $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://desktop/employee</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>root</user-name>
password
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
_-----------------------------------------
I have all the jndi.jar, fsconfig.dar, providerURL.jar in the JAVA_HOME/jre/lib/ext folder.
The jdbc driver is set correctly, I know, as I can connect to the database usin the DriverManager code.
-----------------------------------------------
my application code is:
import java.io.*;
import javax.naming.*;
import java.net.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
public class ShowBedrock extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 4920882690562885989L;
public String getServletInfo()
{
return "Servlet connects to MySQL database and displays result of a SELECT";
}
// Use http GET
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
Context ctx;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "jdbc:mysql://desktop/employee");
// Output stream to STDOUT
PrintWriter out = response.getWriter();
try
{
ctx = new InitialContext(env);
response.setContentType("text/html"); // Response mime type
out.println("Bedrock");
out.println("<H1>Bedrock</H1>");
String name = "java:MySqlDS";
DataSource ds = (DataSource) ctx.lookup(name);
Connection conn;
Statement statement;
conn = ds.getConnection();
String query = "SELECT name, dept, ";
query += " jobtitle ";
query += "FROM employee ";
statement = conn.createStatement();
// Perform the query
ResultSet rs = statement.executeQuery(query);
out.println("<TABLE border>");
// Iterate through each row of rs
while (rs.next())
{
String m_name = rs.getString("name");
String m_dept = rs.getString("dept");
String m_jobtitle = rs.getString("jobtitle");
out.println("" +
"" + m_name + "" +
"" + m_dept + "" +
"" + m_jobtitle + "" +
"");
}
out.println("");
rs.close();
statement.close();
conn.close();
}
catch (NamingException e) {
System.err.println("Problem looking up " + ": " + e);
}
catch (SQLException ex) {
while (ex != null) {
System.out.println ("SQL Exception: " + ex.getMessage ());
ex = ex.getNextException ();
} // end while
} // end catch SQLException
catch(java.lang.Exception ex)
{
out.println("" +
"" +
"Bedrock: Error" +
"\n" +
"SQL error in doGet: " +
ex.getMessage() + "");
return;
}
out.close();
}
}
------------------------------------------
I am getting a runtime error
Am I accessing the jndi object correctly in my code
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967361#3967361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967361
19 years, 8 months