You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Samir Khobragade <SK...@digmap.com> on 2001/03/23 19:48:07 UTC

database values

Sorry if following question sounds very primitive.

After creating default newapp with latest turbine-all, i get following
exceptioin in log file when i try to execute the application. When i looked
at the code of IDBroker.java, it's trying to execute the query SELECT
NEXT_ID, QUANTITY FROM ID_TABLE WHERE TABLE_NAME = 'RDF'.
Which returns nothing, since i don't have any values in my table. 
Am i suppose to put some default values in the tables generated by turbine?


	Exception:  java.lang.reflect.InvocationTargetException
	Stack Trace follows:
	java.lang.reflect.InvocationTargetException:
org.apache.turbine.util.TurbineException: The table RDF does not have a
proper entry in the ID_TABLE
	at org.apache.turbine.util.db.IDBroker.selectRow(IDBroker.java:588)
	at org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java,
Compiled Code)
	at org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java:238)
	at org.apache.turbine.util.db.IDBroker.getNextId(IDBroker.java:211)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:713)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:616)
	at com.dmp.nelson.om.peer.BaseRdfPeer.doInsert(BaseRdfPeer.java:53)
	at com.dmp.nelson.om.peer.BaseRdfPeer.doInsert(BaseRdfPeer.java:201)
	at com.dmp.nelson.om.BaseRdf.save(BaseRdf.java:242)
	at com.dmp.nelson.modules.actions.SQL.doInsert(SQL.java:89)


Regards,
Samir

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: database values

Posted by Oskar <os...@2n.pl>.
Nope, that means you don't have 
ID_TABLE properly filled.

Turbine ID broker selects next primary key value from 
special table ID_TABLE (this is part of Turbine system not your table).
There you should have entries for all other tables in your
application.

If you are using TDK, you probably should run

 build-project.sh init

which creates required tables.

			Oskar



On Fri 23. March 2001 19:48, you wrote:
> Sorry if following question sounds very primitive.
>
> After creating default newapp with latest turbine-all, i get following
> exceptioin in log file when i try to execute the application. When i looked
> at the code of IDBroker.java, it's trying to execute the query SELECT
> NEXT_ID, QUANTITY FROM ID_TABLE WHERE TABLE_NAME = 'RDF'.
> Which returns nothing, since i don't have any values in my table.
> Am i suppose to put some default values in the tables generated by turbine?
>
>
> 	Exception:  java.lang.reflect.InvocationTargetException
> 	Stack Trace follows:
> 	java.lang.reflect.InvocationTargetException:
> org.apache.turbine.util.TurbineException: The table RDF does not have a
> proper entry in the ID_TABLE
> 	at org.apache.turbine.util.db.IDBroker.selectRow(IDBroker.java:588)
> 	at org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java,
> Compiled Code)
> 	at org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java:238)
> 	at org.apache.turbine.util.db.IDBroker.getNextId(IDBroker.java:211)
> 	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:713)
> 	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:616)
> 	at com.dmp.nelson.om.peer.BaseRdfPeer.doInsert(BaseRdfPeer.java:53)
> 	at com.dmp.nelson.om.peer.BaseRdfPeer.doInsert(BaseRdfPeer.java:201)
> 	at com.dmp.nelson.om.BaseRdf.save(BaseRdf.java:242)
> 	at com.dmp.nelson.modules.actions.SQL.doInsert(SQL.java:89)
>
>
> Regards,
> Samir
>
> ---------------------------------------------------------------------
> 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: database values

Posted by Rafal Krzewski <Ra...@e-point.pl>.
Samir Khobragade wrote:
> After creating default newapp with latest turbine-all, i get following
> exceptioin in log file when i try to execute the application. When i looked
> at the code of IDBroker.java, it's trying to execute the query SELECT
> NEXT_ID, QUANTITY FROM ID_TABLE WHERE TABLE_NAME = 'RDF'.
> Which returns nothing, since i don't have any values in my table.
> Am i suppose to put some default values in the tables generated by turbine?

Yes, you are supposed to put a row into the ID_TABLE for each of your
tables.
Torque probably should handle this for you, or at least remind you that
you
need to add these rows yourself. 
BTW, not so long ago Turbine would crash with NPE inside Peer code
instead 
of giving you an informative message in this situation. We improve all
the time :-)

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:Rafal.Krzewski@e-point.pl
+48 22 8534830 http://e-point.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org