[O'Reilly JBoss 3.0/4.0 Workbook] - Jboss not Running/starting
by tirunahari
Hi All ,
I am new to JBoss and EJB3.0.
I have downloaded jboss-5.0.0.GA.zip and unzipped the required files into C:\jboss-5.0.0.GA. I have downloaded "jdk-1_5_0_17-windows-i586-p" (ie.jdk1.5 update 17) and installed my jdk in C:\Java\jdk1.5.0_17 and i have set the JAVA_HOME to C:\Java\jdk1.5.0_17 and path to C:\Java\jdk1.5.0_17\bin.
And when i click on run.bat it blinks and disappears or when i give the command C:\jboss-5.0.0.GA\bin>run.bat i get an error saying
'findstr' is not recognized as an internal or external command,
operable program or batch file.
Can any one walk me through the installation. I have just started learning EJBs from Orielly but i am unable to do the code example as i am unable to install JBOSS.
Can anyone point me where i am going wrong.
With Regards
Deepthi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200424#4200424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200424
17 years, 3 months
[JBoss jBPM] - Re: Trying to persist process instances - need some help
by terigox
So it turns out I think I had a couple of things missing/wrong. (Of course :) )
So #1, it seems when trying to load up an external DB and use the jbpm-console there are a couple of things that should be known:
a) The database build scripts located under {jbpm-install}/database do not include any of the authentication tables needed to actually use the jbpm-console web app.
b) When installing jbpm through the jar installer, if you chose hypersonic as your database, it *will* however give you the correct tables needed for jbpm-console (hence why it works out of the box)
So what I ended up doing was copying the SQL out of my {jboss-server}/data/hypersonic/JbpmDB.script that hypersonic was using to create the remaining tables needed for my jbpm-console to work correctly.
Once I was able to get the console working correctly (knowing I had the correct DB settings and hibernate) I was able to then compare/use these settings in my own app.
I'm working closer to getting it working correctly. Now I'm getting what seems to be a more manageable exception :)
org.hibernate.AssertionFailure: null id in org.jbpm.graph.def.ProcessDefinition entry (don't flush the Session after an exception occurs)
I'm happy though that the jbpm-console examples are working and persisting correctly to Mysql!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200413#4200413
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200413
17 years, 3 months
[JBoss Cache: Core Edition] - Deadlock in JDBCCacheLoader
by gpklimek
It is possible to have a deadlock in JDBCCacheLoader when concurrently trying to put two different entries into it. Timing has to be right of course and even then chances are small (like 1 to 16384). But still it is a problem.
I have found it in version 1.4.1.SP8 but it is still a problem in 3.0.1.GA
I have put together a unit test (for 3.0.1.GA) which demonstrates the issue: trying to put Fqns "/a/b" and "/c/d" at the same time is fine, but "/a/m" and "/l/p" is not
| import static org.easymock.EasyMock.*;
|
| import java.sql.Connection;
| import java.sql.DatabaseMetaData;
| import java.sql.PreparedStatement;
| import java.sql.ResultSet;
| import java.util.Hashtable;
| import java.util.Properties;
|
| import javax.naming.Context;
| import javax.naming.NamingException;
| import javax.naming.spi.InitialContextFactory;
| import javax.sql.DataSource;
|
| import junit.framework.TestCase;
|
| import org.easymock.Capture;
| import org.easymock.IAnswer;
| import org.jboss.cache.CacheSPI;
| import org.jboss.cache.Fqn;
| import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
| import org.jboss.cache.io.ByteBuffer;
| import org.jboss.cache.loader.JDBCCacheLoader;
| import org.jboss.cache.marshall.Marshaller;
|
| public class JDBCCacheLoaderTest extends TestCase {
| private static final long EXECUTE_QUERY_DELAY = 1000;
| private static final long MAX_TIME_FOR_PUT = 10000;
|
| private static Context context;
|
| public static class SimpleContextFactory implements InitialContextFactory {
| public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException {
| return context;
| }
| }
|
| private JDBCCacheLoader jdbcCacheLoader;
|
| @Override
| protected void setUp() throws Exception {
| System.setProperty("java.naming.factory.initial", "JDBCCacheLoaderTest$SimpleContextFactory");
|
| //JDBC mocks
| context = createNiceMock("context", Context.class);
| final CacheSPI cacheSPI = createNiceMock("cacheSPI", CacheSPI.class);
| final Marshaller marshaller = createNiceMock("marshaller", Marshaller.class);
| final DataSource dataSource = createNiceMock("dataSource", DataSource.class);
| final Connection connection = createNiceMock("connection", Connection.class);
| final DatabaseMetaData databaseMetaData = createNiceMock("databaseMetaData", DatabaseMetaData.class);
| final PreparedStatement preparedStatement = createNiceMock("preparedStatement", PreparedStatement.class);
| final ResultSet resultSet = createNiceMock("resultSet", ResultSet.class);
| makeThreadSafe(cacheSPI, true);
| makeThreadSafe(marshaller, true);
| makeThreadSafe(dataSource, true);
| makeThreadSafe(connection, true);
| makeThreadSafe(databaseMetaData, true);
| makeThreadSafe(preparedStatement, true);
| makeThreadSafe(resultSet, true);
|
| //mock expectations
| expect(context.lookup("java:/JDBCCacheLoader")).andStubReturn(dataSource);
| expect(cacheSPI.getMarshaller()).andStubReturn(marshaller);
| expect(marshaller.objectToBuffer(capture(new Capture<Object>()))).andStubReturn(new ByteBuffer(new byte[] {'a'}, 0, 1));
| expect(dataSource.getConnection()).andStubReturn(connection);
| expect(connection.getMetaData()).andStubReturn(databaseMetaData);
| expect(databaseMetaData.getDriverName()).andStubReturn("a driver name");
| expect(connection.prepareStatement(capture(new Capture<String>()))).andStubReturn(preparedStatement);
| expect(preparedStatement.executeQuery()).andStubAnswer(new IAnswer<ResultSet>() {
| public ResultSet answer() throws Throwable {
| Thread.sleep(EXECUTE_QUERY_DELAY);
| return resultSet;
| }
| });
| preparedStatement.executeUpdate();
| expectLastCall().andStubReturn(1);
|
| replay(context, cacheSPI, marshaller, dataSource, connection, databaseMetaData, preparedStatement, resultSet);
|
| //JDBCCacheLoader init
| Properties props = new Properties();
| props.put("cache.jdbc.table.name","TREE_CACHE");
| props.put("cache.jdbc.table.create","false");
| props.put("cache.jdbc.fqn.column","FQN");
| props.put("cache.jdbc.node.column","NODE");
| props.put("cache.jdbc.datasource","java:/JDBCCacheLoader");
|
| IndividualCacheLoaderConfig config = new IndividualCacheLoaderConfig();
| config.setProperties(props);
|
| jdbcCacheLoader = new JDBCCacheLoader();
| jdbcCacheLoader.setConfig(config);
| jdbcCacheLoader.setCache(cacheSPI);
| jdbcCacheLoader.start();
| }
|
| public void testPutCaseDeadlock() throws Exception {
| Thread thread1 = new Thread(new Putter("/a/m"));
| Thread thread2 = new Thread(new Putter("/l/p"));
| thread1.start();
| thread2.start();
| thread1.join(MAX_TIME_FOR_PUT);
| thread2.join(MAX_TIME_FOR_PUT);
| assertEquals(Thread.State.TERMINATED, thread1.getState());
| assertEquals(Thread.State.TERMINATED, thread2.getState());
| }
|
| public void testPutCaseNoDeadlock() throws Exception {
| Thread thread1 = new Thread(new Putter("/a/b"));
| Thread thread2 = new Thread(new Putter("/c/d"));
| thread1.start();
| thread2.start();
| thread1.join(MAX_TIME_FOR_PUT);
| thread2.join(MAX_TIME_FOR_PUT);
| assertEquals(Thread.State.TERMINATED, thread1.getState());
| assertEquals(Thread.State.TERMINATED, thread2.getState());
| }
|
| private class Putter implements Runnable {
| private String name;
|
| public Putter(String name) {
| this.name = name;
| }
|
| public void run() {
| try {
| jdbcCacheLoader.put(Fqn.fromString(name), "a key", "a value");
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200407#4200407
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200407
17 years, 3 months
[JBoss jBPM] - problem with eclipse 3.2.2 and jbpm jpdl designer!!
by bonaparte
Hello all,
I'm a newbie with jBPM and just woulk like to start to use it in eclipse.
My banking company uses RSA7, so underlying eclipse 3.2.2 as IDE.
I'vre tried to install many versions of jbpm-jpdl-designer as eclipse plugin, among which 3.1.6, 3.1.5, and 3.1.3.SP2, but unfortunately no one is running well.
More exactly, the installation happens well (except for the documentation feature, as said in an ealier post, that generates an exception) but if i don't choose this option and only jBPM jPDL Tools 3.1.6, all is ok.
The problem is that when i restart the eclipse, i just don't see any File ->New -> Project -> jBPM Project.
What i am exacty doing during installation:
- download eclipse-SDK-3.2.2-win32.zip and extract it in $eclipse-folder.
- download jbpm-jpdl-designer-3.1.6.zip, extract it somewhere and copy feature and plugin folders in $eclipse-folder
- open eclipse
no File->New->Project->Jbpm Project!!!!
although the plugin is well installed. i verify it by Help->Software Update-> Manage Configuration, i can see the item jBPM jPDL Tools 3.1.6!
What's wrong with this way of doing?
Did anyone be successfull on installing designer plugin with eclipse 3.2.2?
By the way, i doesn't seem to work neither with eclipse 3.4!
Having spent about a day searching, reading and testing, I could do with some clues as to where to look next.
I'd very much appreciate your suggestions. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200406#4200406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200406
17 years, 3 months