Discussion:
[Middlegen-user] Deployment Problem
G***@xcomp.com.au
2002-07-29 06:44:02 UTC
Permalink
Hi,

I am using the CVS version of middlegen checked out today (29/7/02),
Jboss 3.0.0, Ant 1.5, and a postgresql database.

I have managed to successfully build the ear file (connect to the DB ok,
etc). When I try to deploy it, Jboss reports the error:

18:22:34,911 ERROR [EjbModule] Initialization failed
org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml :
datasource-mapping not found at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:365)
...
...


I looked in the generated /build/ejb-meta/META-INF/jbosscmp-jdbc.xml
file and the datasource-mapping tag is indeed empty:
...
<defaults>
<datasource>java:/airline_DS</datasource>
<datasource-mapping></datasource-mapping>
</defaults>
...

Have I missed some configuration somewhere? Can anyone help?


Thanks!

--
Glenn
M-Leander Reimer
2002-07-29 07:01:06 UTC
Permalink
Hi there,

you have to set the datasource mapping in the jboss subtask of the
ejbdoclet task in the samples build.xml.

Look in the standardjbosscmp-jdbc.xml in your Jboss conf dir, to find
the correct name for the Postgres mapping.

It might be that you also have to change the datasource name to the name
your Postgres datasource is configured under Jboss (which is probably
not java:/airline_DS). The name (default is PostgresDS) is configured in
the postgres-service.xml in your deploy directory.

CU
Leander
Post by G***@xcomp.com.au
Hi,
I am using the CVS version of middlegen checked out today (29/7/02),
Jboss 3.0.0, Ant 1.5, and a postgresql database.
I have managed to successfully build the ear file (connect to the DB ok,
18:22:34,911 ERROR [EjbModule] Initialization failed
datasource-mapping not found at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:365)
...
...
I looked in the generated /build/ejb-meta/META-INF/jbosscmp-jdbc.xml
...
<defaults>
<datasource>java:/airline_DS</datasource>
<datasource-mapping></datasource-mapping>
</defaults>
...
Have I missed some configuration somewhere? Can anyone help?
Thanks!
--
Glenn
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
--
M.-Leander Reimer
Dipl.-Inf. (FH)

Techdivision
Kunstmühlstr. 17
83022 Rosenheim

Fon: (08031) 356 38 32
Fax: (08031) 356 38 48
Mail: ***@techdivision.com
G***@xcomp.com.au
2002-07-29 23:19:02 UTC
Permalink
Thanks for the info on the datasource mapping! I have managed to get bit
further but have run into some more problems:


Problem 1:
----------
Now when I try to deploy the generated code there is an exception like
this:

org.jboss.deployment.DeploymentException: ejb-local-ref:
ejb/Reservation, target not found, add valid ejb-link; - nested
throwable: (javax.naming.NamingException: ejb-local-ref:
ejb/Reservation, target not found, add valid ejb-link)

Should middlegen/xdoclet be generating an ejb-link tag???


Problem 2
---------
I tried manually adding <ejb-link>Reservation</ejb-link> to the web.xml
file (was this the correct thing to do?). I also needed to add links in
web.xml for Flight and Person.

This got me to a stage where I could deploy the airline.ear
successfully.

Now when I browse http://localhost:8080/struts and click on one of the
links (e.g."Find person") I get the following error:

HTTP ERROR: 500 /struts/personForm.jsp(22,0) Attribute onSubmit invalid
according to the specified TLD
RequestURI=/airline/struts/person.do

Any ideas what the problem is?


Question
--------
As an aside, can anyone explain what the JDO 1.0 and CMP 2.0 tabs are
for in the middlegen GUI ... they are always empty for me ...



Any help very much appreciated!

cheers

--
Glenn
M-Leander Reimer
2002-07-30 05:13:02 UTC
Permalink
Hi,
adding it to the generated web.xml is OK, but not the best solution,
since you have to do it again next build.

Instead, add the "link" attribute to the @web:ejb-local-ref definition
in the struts action classes of the sample. This field is usually
optional but JBoss requires it for some reason (I had the same problem).

But these ejb-local-ref declarations are currently unused anyway, since
the lookup for the home interface is done via the Util classes (at least
in my samples which might be out of date).

Leander
Post by G***@xcomp.com.au
Thanks for the info on the datasource mapping! I have managed to get bit
----------
Now when I try to deploy the generated code there is an exception like
ejb/Reservation, target not found, add valid ejb-link; - nested
ejb/Reservation, target not found, add valid ejb-link)
Should middlegen/xdoclet be generating an ejb-link tag???
Problem 2
---------
I tried manually adding <ejb-link>Reservation</ejb-link> to the web.xml
file (was this the correct thing to do?). I also needed to add links in
web.xml for Flight and Person.
This got me to a stage where I could deploy the airline.ear
successfully.
Now when I browse http://localhost:8080/struts and click on one of the
HTTP ERROR: 500 /struts/personForm.jsp(22,0) Attribute onSubmit invalid
according to the specified TLD
RequestURI=/airline/struts/person.do
Any ideas what the problem is?
Question
--------
As an aside, can anyone explain what the JDO 1.0 and CMP 2.0 tabs are
for in the middlegen GUI ... they are always empty for me ...
Any help very much appreciated!
cheers
--
Glenn
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
--
M.-Leander Reimer
Dipl.-Inf. (FH)

Techdivision
Kunstmühlstr. 17
83022 Rosenheim

Fon: (08031) 356 38 32
Fax: (08031) 356 38 48
Mail: ***@techdivision.com
Eivind Waaler
2002-07-30 04:45:04 UTC
Permalink
Hi Glenn,

Not sure about problem 1.

For problem 2: The struts examples have some bugs right now. I'll fix
those asap.

The tabs in the GUI are empty until you select a table or column. They
should then display various information and choices.

.eivind
Post by G***@xcomp.com.au
Thanks for the info on the datasource mapping! I have managed to get bit
----------
Now when I try to deploy the generated code there is an exception like
ejb/Reservation, target not found, add valid ejb-link; - nested
ejb/Reservation, target not found, add valid ejb-link)
Should middlegen/xdoclet be generating an ejb-link tag???
Problem 2
---------
I tried manually adding <ejb-link>Reservation</ejb-link> to the web.xml
file (was this the correct thing to do?). I also needed to add links in
web.xml for Flight and Person.
This got me to a stage where I could deploy the airline.ear
successfully.
Now when I browse http://localhost:8080/struts and click on one of the
HTTP ERROR: 500 /struts/personForm.jsp(22,0) Attribute onSubmit invalid
according to the specified TLD
RequestURI=/airline/struts/person.do
Any ideas what the problem is?
Question
--------
As an aside, can anyone explain what the JDO 1.0 and CMP 2.0 tabs are
for in the middlegen GUI ... they are always empty for me ...
Any help very much appreciated!
cheers
--
Glenn
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...