Discussion:
[Middlegen-user] Sequence problem.
John Woolsey
2004-01-01 03:23:00 UTC
Permalink
I am trying to deploy a second middlegen ejb to the same JBoss server
and I get the error:

org.jboss.deployment.DeploymentException: Sequence: Duplicate
abstract-schema name 'Sequence'. Already defined for Entity 'Sequence'.

Is this something I did or is deploying two middlegens to the same
server not supported? They are accessing two different databases.

Also if anyone cares I just wanted the EJBs so I fixed up the
dependencies in the Ant file so you could simply build the CMP stuff
without building struts and the like.

- bfn - JAW
John Woolsey
2004-01-01 03:34:00 UTC
Permalink
I just got further, but now the error is more obvious. It is claiming I
have created two Sequence objects of the same name.

javax.management.InstanceAlreadyExistsException:
jboss.j2ee:jndiName=middlegen.sequencegenerator.ejb.SequenceLocalHome,service=EJB
already registered.

Is there any way to fix the problem? I orginally tried to use the
autoincrement feature of mysql but then middlegen didn't seem to work at
all. Suggestions would be appreciated.

BTW Middlegen is a great product. It really took the work out of CMP.

- bfn - JAW
Eivind Waaler
2004-01-01 19:56:04 UTC
Permalink
Have you tried the jndiprefix attribute on the sequenceblock subtask of
the cmp20 task?

http://boss.bekk.no/boss/middlegen/plugins/cmp20.html#sequenceblock

Seems like the problem is that both sequence beans get the same jndi name.
Might be a bug if the jndiprefix attribute doesn't solve it..

.eivind
Post by John Woolsey
I just got further, but now the error is more obvious. It is claiming I
have created two Sequence objects of the same name.
jboss.j2ee:jndiName=middlegen.sequencegenerator.ejb.SequenceLocalHome,service=EJB
already registered.
Is there any way to fix the problem? I orginally tried to use the
autoincrement feature of mysql but then middlegen didn't seem to work at
all. Suggestions would be appreciated.
BTW Middlegen is a great product. It really took the work out of CMP.
- bfn - JAW
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
John Woolsey
2004-01-02 00:59:04 UTC
Permalink
I'd say it's probably a bug. I noticed that SequenceBlock and
SequenceSession both work fine. The jndiprefix is preset in the example
so I was using it already.

- bfn - JAW

public interface SequenceLocalHome
extends javax.ejb.EJBLocalHome
{
public static final String COMP_NAME="java:comp/env/ejb/Sequence";
public static final String
JNDI_NAME="middlegen.sequencegenerator.ejb.SequenceLocalHome";

public honour.interfaces.SequenceLocal create(java.lang.String param1)
throws javax.ejb.CreateException;

public honour.interfaces.SequenceLocal
findByPrimaryKey(java.lang.String pk)
throws javax.ejb.FinderException;

}
Post by Eivind Waaler
Have you tried the jndiprefix attribute on the sequenceblock subtask of
the cmp20 task?
http://boss.bekk.no/boss/middlegen/plugins/cmp20.html#sequenceblock
Seems like the problem is that both sequence beans get the same jndi name.
Might be a bug if the jndiprefix attribute doesn't solve it..
.eivind
Post by John Woolsey
I just got further, but now the error is more obvious. It is claiming I
have created two Sequence objects of the same name.
jboss.j2ee:jndiName=middlegen.sequencegenerator.ejb.SequenceLocalHome,service=EJB
already registered.
Is there any way to fix the problem? I orginally tried to use the
autoincrement feature of mysql but then middlegen didn't seem to work at
all. Suggestions would be appreciated.
BTW Middlegen is a great product. It really took the work out of CMP.
- bfn - JAW
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
John Woolsey
2004-01-05 01:21:00 UTC
Permalink
I was wondering. I have a table map with X and Y on it. MiddleGen seems
to build out finders on every field for me, but what I really want is
x,y. Being smart (ok at least not totally dumb ;) I figured I will just
build an index x, y and middlegen will detect that and build a finder.
It didn't. Is there a way to force extra finders by configuring the
build script? I don't list tables in my build script if that makes a
difference. I figure the point of middlegen is being able to create a
database and have it do everything from there.

I really like the way Middlegen works BTW. Thanx for a great product.

- bfn - JAW

PS My sequence bug thing do I report that on SourceForge now?
Eivind Waaler
2004-01-05 06:16:02 UTC
Permalink
I think using merge files would do what you want:

http://boss.bekk.no/boss/middlegen/plugins/cmp20.html (bottom of page)

The airline sample that comes with Middlegen has some examples of using
merge files. Check out the cmp20_ro-persons-class-comments.txt file. Think
it does what you want for the persons table..

Report the bug in Jira, we're switching to using that instead:

http://jira.codehaus.org/secure/BrowseProject.jspa?id=10110

Regards
.eivind
Post by John Woolsey
I was wondering. I have a table map with X and Y on it. MiddleGen seems
to build out finders on every field for me, but what I really want is
x,y. Being smart (ok at least not totally dumb ;) I figured I will just
build an index x, y and middlegen will detect that and build a finder.
It didn't. Is there a way to force extra finders by configuring the
build script? I don't list tables in my build script if that makes a
difference. I figure the point of middlegen is being able to create a
database and have it do everything from there.
I really like the way Middlegen works BTW. Thanx for a great product.
- bfn - JAW
PS My sequence bug thing do I report that on SourceForge now?
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...