[EJB/JBoss] - generating EJBs with Xdoclet, deployed on jboss4.0.2/ EJB sp
by MmarcoM
hi all,
i have written few EJBs (2.0)and have generated releted classes using xdoclet..
i have deployed them on jboss 4.0.2, and as a result i got this followign exception
| ..
| Bean : StatusRecipient
| Method : public abstract Collection findStatusRecipients(String, String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : ReplenRequest
| Method : public abstract ReplenRequestLocal findByRecordKey(String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : TransferRecord
| Method : public abstract Collection findTransferRecord(String, int, int, String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
| .
Thing is, i don't know why jboss is raising this excepiton since i can see the query correctly defined in ejb-jar.xml and in the generated LocalHome...
here are my files...(i pick only one of EJBs, since it looks like it fails for every custom finder..)
**** ExpectedReceipt ****
| /**
| * @ejb.bean
| * name="ExpectedReceipt"
| * type="CMP"
| * primkey-field="receiptID"
| * view-type="local"
| * local-jndi-name="marco/mw/ExpectedReceiptLocalHome"
| *
| * @ejb.persistence table-name="expectedreceipt"
| *
| * @ejb.finder
| * signature="com.marco.mw.ejb.ExpectedReceiptLocal findByRecordKey(String recordKey)"
| * query="select object(o) from ExpectedReceipt o where o.recordKey = ?1"
| *
| * @ejb.finder
| * signature="com.marco.mw.ejb.ExpectedReceiptLocal
| * findByTicket(String ticket)"
| * query="select object(o) from ExpectedReceipt o
| * where o.ticket = ?1"
| *
| */
| ..
|
*** ejb-jar.xml ***
| <query>
| <query-method>
| <method-name>findByRecordKey</method-name>
| <method-params>
| <method-param>String</method-param>
| </method-params>
| </query-method>
| <ejb-ql><![CDATA[select object(o) from ExpectedReceipt o where o.recordKey = ?1]]></ejb-ql>
| </query>
| <query>
| <query-method>
| <method-name>findByTicket</method-name>
| <method-params>
| <method-param>String</method-param>
| </method-params>
| </query-method>
| <ejb-ql><![CDATA[select object(o) from ExpectedReceipt o where o.ticket = ?1]]></ejb-ql>
| </query>
| <!-- Write a file named ejb-finders-ExpectedReceiptBean.xml if you want to define extra finders. -->
|
and here's the localHome of bean, generated by xdoclet
| ...
| public com.marco.mw.ejb.ExpectedReceiptLocal create(java.lang.String receiptID)
| throws javax.ejb.CreateException;
|
| public com.marco.mw.ejb.ExpectedReceiptLocal findByRecordKey(String recordKey)
| throws javax.ejb.FinderException;
|
| public com.marco.mw.ejb.ExpectedReceiptLocal findByTicket(String ticket)
| throws javax.ejb.FinderException;
|
| public com.marco.mw.ejb.ExpectedReceiptLocal findByPrimaryKey(java.lang.String pk)
| throws javax.ejb.FinderException;
|
can anyone help me out?
heres' the exception
| Bean : StatusRecipient
| Method : public abstract Collection findStatusRecipients(String, String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : ReplenRequest
| Method : public abstract ReplenRequestLocal findByRecordKey(String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : TransferRecord
| Method : public abstract Collection findTransferRecord(String, int, int, String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : ReceiptConfirmation
| Method : public abstract ReceiptConfirmationLocal findByRecordKey(String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,031 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : ExpectedReceipt
| Method : public abstract ExpectedReceiptLocal findByRecordKey(String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,031 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : ExpectedReceipt
| Method : public abstract ExpectedReceiptLocal findByTicket(String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
| 2006-08-16 16:14:31,046 DEBUG [org.jboss.ejb.EJBDeployer.verifier] Bean checked: Configurator: Verified.
| 2006-08-16 16:14:31,062 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
| Bean : SiteTransmissionType
| Method : public abstract Collection findByWarehouseAndDlf(String, String) throws FinderException
| Section: 10.5.6
| Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
|
it looksl ike every custom finder i created fails.....
any clues?
thanks in advance and regards
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965520#3965520
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965520
19 years, 9 months
[JBoss Portal] - Re: File download from CMS
by PeterJ
Handling this in the portal is pretty much the same as handling it for a regular web site. First, one of the HTML pages you uploaded to CMS needs to have links to the files you would like user to be able to download. Second, you have to be aware of the types of files being downloaded. If the file is HTML, it will appear in the CMS portlet. Other file types will appear in a separate window/tab (the Reference Guide provides details on this, rather than my looking it up to confirm what I just wrote I leave it to you to verify this). If the browser believes it can display the file, it will do so. If not, it will pop up the file download dialog box. Of course, the user can always right-click on any link and choose download. Knowing this browser behavior, I usually add "right-click to download" next to links for files the browser can display.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965518#3965518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965518
19 years, 9 months