Posted by
Fladd !!! on
Nov 08, 2005; 7:28am
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Users-OFBIZ-300-and-stand-alone-Tomcat559-It-almost-works-tp136376.html
Hi, i'm novice in ofbiz, so i need somebody more qualified take a look
at my problems.
Situation:
1) Windows/Linux + Tomcat5.5.9 + ofbiz-3.0.0;
2) I HAVE to use ofbiz with stand alone tomcat;
3) Another application which works also under that tomcat should
interract with ofbiz (as a matter of fact ofbiz should be used as
part of this application).
Couple days i spent trying to make ofbiz working in described way. My steps:
1) *.jar were copied into tomcat/shared/lib
2) *.xml;*.properties were copied into tomcat/shared/classes
-- this is first problem many files have same names so copying all
of them simply in tomcat/shared/classes is probably wrong but when
i copy them with directory structure UtilURL.fromOfbizHomePath()
fails to find them...
3) entityengine.xml already contains section:
<transaction-factory class="org.ofbiz.entity.transaction.JNDIFactory">
<user-transaction-jndi
jndi-server-name="default"
jndi-name="java:comp/UserTransaction"/>
<transaction-manager-jndi
jndi-server-name="default"
jndi-name="java:comp/UserTransaction"/>
</transaction-factory>
instead
<transaction-factory class="org.ofbiz.entity.transaction.JotmFactory"/>
4) Into server.xml following lines were added:
<Context>
<Resource name="UserTransaction"
auth="Container"
type="javax.transaction.UserTransaction"/>
<ResourceParams name="UserTransaction">
<parameter>
<name>factory</name>
<value>
org.ofbiz.entity.transaction.TransactionFactory
</value>
</parameter>
</ResourceParams>
</Context>
5) OFBIZ_HOME was set to directory where startofbiz.bat, components... (in short
root directory of ofbiz)
6) All components were builded into war's and copied into tomcat/webapps
7) Code modifications:
:: ComponentContainer:
-----------------------
if (classPath == null) {
classPath = new Classpath(System.getProperty("java.class.path"));
}
-----------------------
:: JNDIFactory:
-----------------------
// InitialContext ic = JNDIContextFactory.getInitialContext(jndiServerName);
// With original version namingexception were thrown
InitialContext ic = new InitialContext();
if (ic != null) {
transactionManager = (TransactionManager) ic.lookup(jndiName);
}
-----------------------
:: Start is activated now from InitServlet and
jetty section was commented in the fbiz-containers.xml
My achivements:
Server had started without errors, when i tried to requst accounting
login form was shown, but when i try to login the system works (it seems to me)
but works very, verY, veRY, vERY, VERY SLOWLY. I tried to debug it: JobPoller
recieves some tasks and activates them ... in short i see infinit
connection opeening (minerva and dbcp fail jdbc -- success) and data base
selects, commits and so on. In logs -- nothing,
in server output -- see log. SO HELP ME!!
---------------------------------------------------
at org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:29)
at org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav:346)
at org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav:330)
at org.ofbiz.entity.datasource.GenericDAO.singleUpdate(GenericDAO.java:64)
at org.ofbiz.entity.datasource.GenericDAO.customUpdate(GenericDAO.java:12)
at org.ofbiz.entity.datasource.GenericDAO.update(GenericDAO.java:206)
at org.ofbiz.entity.datasource.GenericHelperDAO.store(GenericHelperDAO.ava:218)
at org.ofbiz.entity.GenericDelegator.store(GenericDelegator.java:1522)
at org.ofbiz.entity.GenericDelegator.store(GenericDelegator.java:1502)
at org.ofbiz.entity.GenericValue.store(GenericValue.java:90)
at org.ofbiz.service.job.PersistedServiceJob.<init>(PersistedServiceJobjava:85)
at org.ofbiz.service.job.JobManager.poll(JobManager.java:165)
at org.ofbiz.service.job.JobPoller.run(JobPoller.java:96)
at java.lang.Thread.run(Thread.java:595)
1726839[ ConnectionFactory.java:74 :ERROR] There was an error getting a DBCP dtasource.java.lang.NullPointerException
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknownource)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSurce.java:110)
at org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection(DBCConnectionFactory.java:61)
at org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources(onnectionFactory.java:71)
at org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.jva:161)
at org.ofbiz.entity.transaction.TransactionFactory.getConnection(TransationFactory.java:103)
at org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactry.java:53)
at org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:29)
at org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav:346)
at org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.jav:330)
at org.ofbiz.entity.datasource.GenericDAO.singleUpdate(GenericDAO.java:64)
at org.ofbiz.entity.datasource.GenericDAO.customUpdate(GenericDAO.java:12)
at org.ofbiz.entity.datasource.GenericDAO.update(GenericDAO.java:206)
at org.ofbiz.entity.datasource.GenericHelperDAO.store(GenericHelperDAO.ava:218)
at org.ofbiz.entity.GenericDelegator.store(GenericDelegator.java:1522)
at org.ofbiz.entity.GenericDelegator.store(GenericDelegator.java:1502)
at org.ofbiz.entity.GenericValue.store(GenericValue.java:90)
at org.ofbiz.service.job.PersistedServiceJob.<init>(PersistedServiceJobjava:85)
at org.ofbiz.service.job.JobManager.poll(JobManager.java:165)
at org.ofbiz.service.job.JobPoller.run(JobPoller.java:96)
at java.lang.Thread.run(Thread.java:595)
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users