You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Robles, Rogelio" <Ro...@experian.com> on 2003/04/05 01:45:18 UTC
reloading a turbine webapp in tomcat
When reloading a Turbine webapp in tomcat I'm getting this error:
[Fri Apr 04 15:24:39 PST 2003] -- ERROR -- Turbine.handleException: Error in
BasePeer.initTableSchema(TURBINE_USER): No suitable driver
I searched the tomcat-user mailing list and I got the impression that
reloading webapps it's been a persistent issue and it's hard to tell if the
problem resides in Tomcat or in your app. Usually people give up and use a
work around: running a script to shutdown the app's context, update the
binaries, start the context again, or completely shutdown Tomcat in order to
release the previously open DB connections, update binaries and start Tomcat
again.
When doing active development what do you do to reload your apps in the so
called "edit-compile-test-run" cycle?
Thanks,
Rogelio
my environment:
---------------
JDK 1.4.1
Tomcat 4.1.18
Turbine 2.2
Torque 3.0
DB2 7.2
Win 2K/Solaris
complete stack trace:
--------------------
[Fri Apr 04 15:24:39 PST 2003] -- ERROR -- Turbine.handleException: Error in
BasePeer.initTableSchema(TURBINE_USER): No suitable driver
[Fri Apr 04 15:24:39 PST 2003] -- ERROR --
Exception: java.lang.Error: Error in
BasePeer.initTableSchema(TURBINE_USER): No suitable driver
Stack Trace follows:
java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER): No
suitable driver
at
org.apache.torque.util.BasePeer.initTableSchema(BasePeer.java:250)
at
org.apache.torque.util.BasePeer.initTableSchema(BasePeer.java:225)
at
org.apache.turbine.om.security.peer.TurbineUserPeer.<clinit>(TurbineUserPeer
.java:170)
at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager
.java:153)
at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager
.java:241)
at
org.apache.turbine.services.security.BaseSecurityService.getAuthenticatedUse
r(BaseSecurityService.java:308)
at
org.apache.turbine.services.security.TurbineSecurity.getAuthenticatedUser(Tu
rbineSecurity.java:194)
at
org.apache.turbine.modules.actions.LoginUser.doPerform(LoginUser.java:111)
at org.apache.turbine.modules.Action.perform(Action.java:87)
at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
at org.apache.turbine.Turbine.doGet(Turbine.java:509)
at org.apache.turbine.Turbine.doPost(Turbine.java:658)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:479)
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: dynamically assess the number of columns in a table
Posted by tu...@eigentechnology.com.
thanks I will give it a go.
michael
Quoting Akmal Sarhan <as...@byteaction.de>:
> here is a method I coded to do nearly what you want, it uses reflection
> though,but have not tested it :
>
>
> /**
> * gets the db columns' names
> *
> * @param table the full qualified persistent class name that
> represents
> * the table in the db
> *
> * @return a list of the columns
> */
> public List getColumns(String table)
> {
> Class cl = null;
> List columns = new ArrayList();
>
> try
> {
> String soleTable = table.substring(table.lastIndexOf('.') + 1,
> table.length());
>
> Log.debug(soleTable);
>
> String qualify = table.substring(0, table.lastIndexOf('.') + 1);
>
> Log.debug(qualify);
>
> Class k = Class.forName(qualify + "Base" + soleTable +
> "Peer");
>
> Method m = k.getMethod("getMapBuilder", new Class[] { });
> ColumnMap[] cmap = (ColumnMap[]) ((MapBuilder) m.invoke(null,
> new Object[]
> {
>
> })).getDatabaseMap().getTable(soleTable.toUpperCase()).getCo
> lumns();
>
> for (int i = 0; i < cmap.length; i++)
> {
> columns.add(cmap[i].getColumnName());
> }
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
>
> return columns;
> }
>
> tell me if it works for you
> regards
> Akmal
> ----- Original Message -----
> From: <tu...@eigentechnology.com>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Cc: <to...@db.apache.org>
> Sent: Wednesday, April 09, 2003 5:39 AM
> Subject: dynamically assess the number of columns in a table
>
>
> > Sorry if I have not been clear in my last post.
> >
> > Would appreciate if someone could tell me how to get access to the number
> of
> > columns in a table dynamically.
> >
> > best wishes
> > michael
> >
> >
> > Quoting turbine@eigentechnology.com:
> >
> > > Hi,
> > >
> > > How could I get the number of columns in a table?
> > >
> > > getSize() ??
> > >
> > > Also, would appreciate if anyone could point me to a
> site/turtorial/reply
> > > that
> > > has a list of functions for me to obtain row / column / position in a
> > > row/column
> > > etc...
> > >
> > > best wishes
> > > michael
> > >
> > >
> > > -------------------------------------------------
> > > This mail sent through IMP: http://horde.org/imp/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
cannot resolve getBigInteger during Compilation
Posted by tu...@eigentechnology.com.
I received a compilation error when trying to retreive a ID_REF number:
Porder porder;
int SOME_ID = porder.getSomeRef().getBigInteger();
this one worked before, but this time it gives me a Cannot resolve symbol
getBigInteger() ... ??
any import statement I should include to make it work?
michael
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: dynamically assess the number of columns in a table
Posted by Akmal Sarhan <as...@byteaction.de>.
here is a method I coded to do nearly what you want, it uses reflection
though,but have not tested it :
/**
* gets the db columns' names
*
* @param table the full qualified persistent class name that
represents
* the table in the db
*
* @return a list of the columns
*/
public List getColumns(String table)
{
Class cl = null;
List columns = new ArrayList();
try
{
String soleTable = table.substring(table.lastIndexOf('.') + 1,
table.length());
Log.debug(soleTable);
String qualify = table.substring(0, table.lastIndexOf('.') + 1);
Log.debug(qualify);
Class k = Class.forName(qualify + "Base" + soleTable +
"Peer");
Method m = k.getMethod("getMapBuilder", new Class[] { });
ColumnMap[] cmap = (ColumnMap[]) ((MapBuilder) m.invoke(null,
new Object[]
{
})).getDatabaseMap().getTable(soleTable.toUpperCase()).getCo
lumns();
for (int i = 0; i < cmap.length; i++)
{
columns.add(cmap[i].getColumnName());
}
}
catch (Exception e)
{
e.printStackTrace();
}
return columns;
}
tell me if it works for you
regards
Akmal
----- Original Message -----
From: <tu...@eigentechnology.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Cc: <to...@db.apache.org>
Sent: Wednesday, April 09, 2003 5:39 AM
Subject: dynamically assess the number of columns in a table
> Sorry if I have not been clear in my last post.
>
> Would appreciate if someone could tell me how to get access to the number
of
> columns in a table dynamically.
>
> best wishes
> michael
>
>
> Quoting turbine@eigentechnology.com:
>
> > Hi,
> >
> > How could I get the number of columns in a table?
> >
> > getSize() ??
> >
> > Also, would appreciate if anyone could point me to a
site/turtorial/reply
> > that
> > has a list of functions for me to obtain row / column / position in a
> > row/column
> > etc...
> >
> > best wishes
> > michael
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: dynamically assess the number of columns in a table
Posted by Chris K Chew <ch...@fenetics.com>.
> From: turbine@eigentechnology.com
>
> Would appreciate if someone could tell me how to get access to
> the number of
> columns in a table dynamically.
Try browsing the Torque javadocs. I have never done this, but it looks like
you could do something like:
int numColumns =
Torque.getDatabaseMap.getTable("TABLE_NAME").getColumns().length;
Good luck,
Chris
dynamically assess the number of columns in a table
Posted by tu...@eigentechnology.com.
Sorry if I have not been clear in my last post.
Would appreciate if someone could tell me how to get access to the number of
columns in a table dynamically.
best wishes
michael
Quoting turbine@eigentechnology.com:
> Hi,
>
> How could I get the number of columns in a table?
>
> getSize() ??
>
> Also, would appreciate if anyone could point me to a site/turtorial/reply
> that
> has a list of functions for me to obtain row / column / position in a
> row/column
> etc...
>
> best wishes
> michael
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
dynamically assess the number of columns in a table
Posted by tu...@eigentechnology.com.
Sorry if I have not been clear in my last post.
Would appreciate if someone could tell me how to get access to the number of
columns in a table dynamically.
best wishes
michael
Quoting turbine@eigentechnology.com:
> Hi,
>
> How could I get the number of columns in a table?
>
> getSize() ??
>
> Also, would appreciate if anyone could point me to a site/turtorial/reply
> that
> has a list of functions for me to obtain row / column / position in a
> row/column
> etc...
>
> best wishes
> michael
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
number of columns in a table
Posted by tu...@eigentechnology.com.
Hi,
How could I get the number of columns in a table?
getSize() ??
Also, would appreciate if anyone could point me to a site/turtorial/reply that
has a list of functions for me to obtain row / column / position in a row/column
etc...
best wishes
michael
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
number of columns in a table
Posted by tu...@eigentechnology.com.
Hi,
How could I get the number of columns in a table?
getSize() ??
Also, would appreciate if anyone could point me to a site/turtorial/reply that
has a list of functions for me to obtain row / column / position in a row/column
etc...
best wishes
michael
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Turbine + various OM solutions?
Posted by Eric Emminger <er...@ericemminger.com>.
Goffredo
> Just a quick query. Rather than a need for Turbine as such, I needed a
> good Object Mapping solution
> for my app. I began looking at Torque and to some extent thought it was
> ok. I also looked at other
> solutions, in particular Hibernate, and ended up opting for Hibernate
> for a number of reasons. (I
> found the classes generated by Torque to be confusing - each table with
> four classes - and I found
> the "query language" for Torque to be poorly documented, and limited
> (there is no comprehensive
> documentation, so far as I know(!), illustrating how to use Criteria
> objects, which are the heart of
> the Torque query mechanism. Hibernate had a modest learning curve, good
> examples, a nice query
> language (a bit like SQL), and it didn't produce all those classes. Of
> course Hibernate has a different
> design philosophy, and is at a more advanced stage of development.)
Interesting. Thanks for your summary and perspective.
> My question is this: would it be very difficult to use Turbine with
> Hibernate instead of with Torque?
> Has this been done already? Or more generally, are people using other
> OM tools apart from Torque,
> with Turbine?
I guess the answer is it depends on which parts of Turbine you want to
use. Some parts, such as the default security service, depend on Torque
and switching them could be difficult. Other parts, for example the
Velocity template service, should work without modification.
I'm curious. Have you looked at OJB? If so, what's your perspective on it?
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Turbine + various OM solutions?
Posted by "f.b." <go...@ozonline.com.au>.
Hi All,
Just a quick query. Rather than a need for Turbine as such, I needed a
good Object Mapping solution
for my app. I began looking at Torque and to some extent thought it was
ok. I also looked at other
solutions, in particular Hibernate, and ended up opting for Hibernate
for a number of reasons. (I
found the classes generated by Torque to be confusing - each table with
four classes - and I found
the "query language" for Torque to be poorly documented, and limited
(there is no comprehensive
documentation, so far as I know(!), illustrating how to use Criteria
objects, which are the heart of
the Torque query mechanism. Hibernate had a modest learning curve, good
examples, a nice query
language (a bit like SQL), and it didn't produce all those classes. Of
course Hibernate has a different
design philosophy, and is at a more advanced stage of development.)
My question is this: would it be very difficult to use Turbine with
Hibernate instead of with Torque?
Has this been done already? Or more generally, are people using other
OM tools apart from Torque,
with Turbine?
Thanks for feedback
Regards
Goffredo
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: reloading a turbine webapp in tomcat
Posted by Eric Emminger <er...@ericemminger.com>.
Rogelio
> When doing active development what do you do to reload your apps in the so
> called "edit-compile-test-run" cycle?
In development, I tell Tomcat to automatically reload the webapp; it's a
setting in server.xml in the context element.
<Context path="yourapp" reloadable="true" />
This works for most changes to Java files. When changing something else,
such as a config file, I just stop and start Tomcat.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org