You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dennis Riedel <De...@web.de> on 2005/06/03 15:07:00 UTC

This feature is not supported by this implementation - UnsupportedOperationException

Hello.
Profile: Cocoon 2.1.7 with OJB 1.0.1 (I guess) on Tomcat 5.5.9 (compat) with Java 1.4.2_08; postgreSQL 8.0.3
Based on the examples by Antonio Gallardo I tried my own stuff with OJB JDO.

My database has its own Sequence Generator so I don`t want OJB do that for me.

I get the following exception when running my application:
#########
Caused by: org.apache.ojb.broker.util.sequence.SequenceManagerException: 
Could not grab next id, failed with 
This feature is not supported by this implementation
Creation of new sequence failed with 
This feature is not supported by this implementation

	at org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUniqueLong(Unknown Source)
	at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(Unknown Source)
	... 63 more
Caused by: java.lang.UnsupportedOperationException: This feature is not supported by this implementation
	at org.apache.ojb.broker.platforms.PlatformDefaultImpl.createSequenceQuery(Unknown Source)
	at org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.createSequence(Unknown Source)
#########

repository_database.xml:
#########
<jdbc-connection-descriptor default-connection="true" jcd-alias="postgres-pool" platform="postgresql" subprotocol="postgresql">	
   <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl" />
</jdbc-connection-descriptor>
#########

repository_user.xml:
#########
<class-descriptor class="com.company.project.component.beans.MyClass" table="TABLE">
    	<field-descriptor name="id" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true" nullable="false" default-fetch="true" sequence-name="boothtypes_bt_id_seq" />
    	<field-descriptor name="name" column="NAME" jdbc-type="VARCHAR" />
    	<field-descriptor name="description" column="DESCRIPTION" jdbc-type="LONGVARCHAR" />
    </class-descriptor>
#########

I had this error when I tried it all yesterday. This morning I changed the definition in repository_database.xml and everything seemed to work. But after I restarted the server, nothing worked anymore.

Is it a MUST DO to configure OJB for a specific database before BUILD ? I just compiled cocoon with the JDO libraries to get the examples work.
Is it useful to upgrade to 1.0.3? If yes, is it easily to update it in Cocoon?

Thx for any suggestions. I read the archive but there was only one thread I found that was not further followed up and had no solution.


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


Re: This feature is not supported by this implementation - UnsupportedOperationException

Posted by Martin Kalén <mk...@apache.org>.
Dennis Riedel wrote:
> repository_database.xml:
> #########
> <jdbc-connection-descriptor default-connection="true" jcd-alias="postgres-pool" platform="postgresql" subprotocol="postgresql">

> Is it a MUST DO to configure OJB for a specific database before BUILD ? I just compiled cocoon with the JDO libraries to get the examples work.

As far as OJB is concerned: no, not at all.

You just change the deployed repository_database.xml and can even modify the
platform selection at runtime (although there are some caveats with cached
connection pools in if you do this, see the mail archives for ojb-user).


When you re-build Cocoon with the OJB block, your deployed repository_database.xml
might get overwritten with configuration from files in src/blocks/ojb/configuration/ [*],
so I think you should investigate how Antonio has structured the block build and
maybe ask cocoon-user's list for more info re this.

*) at least this is where block configuration used to be located up to C2.1.6,
before the new Cocoon feature of external blocks

> Is it useful to upgrade to 1.0.3? If yes, is it easily to update it in Cocoon?

Upgrading the OJB JAR in the Cocoon block will not affect the build process,
this is more of a Cocoon block issue than OJB build procedure.


To verify which database implementation your CocoonServlet/webapp is using,
check the deployed repository_database.xml (which you might find in
Cocoon's WEB-INF/classes or built into a JAR depending on how the block
deployment is configured).

Since you got the "This feature is not supported by this implementation"
exception, it looks very much like your hand-crafted repository got
overwritten by a default one from the block (using default hsqldb platform)
when you re-built your Cocoon.

Hopefully this gave you enough pointers to follow up on the cocoon-user's
list. If you get it to work, please write or CC this list so that we can
give more specific info to OJB-block users in the future.

Regards,
  Martin


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