Specific EJB-QL query for m:n relationship
Hi all,
could anyone help me to write EJB-QL query? I'm designing an application and not sure how to express the following query in EJB-QL notation:
For demo study imagine the following schema (from Sun J2ee tutorial):
Player ------- Team
with m:n relationship
Players: John, Mike, Tom. Jim
Teams: RedHeads, WhiteKnees, BigPlayers
I want to write a query that finds all players that are NOT in e.g. RedHeads team (they can be members of other teams).
Thanks,
Tomas
Can't help you on presenting an all cooked up query, but I suggest solving this kind of problem with a SessionBean containing the logic to filter players in the e.g. RedHeads team.
Using a finder method is very costly, the general advise I hear is using EJBQL only when you really need to and only 'findByName' or 'findAll' style. If you know what I mean.
Similar Messages
-
Please help: deploy Bean with "No resource available" error for M:N relationship
Hi all,
I wonder any one comes across with deploying beans with M:N relationship with
"No resource available".
I defined the relationship in ejb-jar.xml and dbms in the
weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
the following error
------ Error message-----
weblogic.common.ResourceException: No resources available at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:568) at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:400) at weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
cator.java:368) at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
ava:166) at weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
Pool.java:127) at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
Source.java:194) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:219) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
ersistenceManager.java:317) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
le(RDBMSPersistenceManager.java:1149) at weblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
bleVerifier.java:428) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
Unable to deploy EJB: CustomerBean from \ejb:
Errors encountered ''The Container-Managed Persistence Entity EJB failed while
creating its SQL Type Map. The error was: Invalid object name 'localcustomer_localsubscription'.
Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Error encountered
while attempting to create Default DBMS Table: 'localcustomer_localsubscription'.
Error Text: 'weblogic.common.ResourceException: No resource s available'.''
---------------End error ----------------------
---------------my ejb-jar.xml
<ejb-jar>
- <enterprise-beans>
- <entity>
<ejb-name>AddressBean</ejb-name>
<local-home>customer.LocalAddressHome</local-home>
<local>customer.LocalAddress</local>
<ejb-class>customer.AddressBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
- <cmp-field>
<field-name>addressID</field-name>
</cmp-field>
- <cmp-field>
<field-name>street</field-name>
</cmp-field>
- <cmp-field>
<field-name>city</field-name>
</cmp-field>
- <cmp-field>
<field-name>zip</field-name>
</cmp-field>
- <cmp-field>
<field-name>state</field-name>
</cmp-field>
<primkey-field>addressID</primkey-field>
</entity>
- <entity>
<ejb-name>CustomerBean</ejb-name>
<local-home>customer.LocalCustomerHome</local-home>
<local>customer.LocalCustomer</local>
<ejb-class>customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>CustomerBean</abstract-schema-name>
- <cmp-field>
<field-name>customerID</field-name>
</cmp-field>
- <cmp-field>
<field-name>firstName</field-name>
</cmp-field>
- <cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<primkey-field>customerID</primkey-field>
- <query>
- <query-method>
<method-name>findByLastName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
- <query>
- <query-method>
<method-name>findByFirstName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
</entity>
- <entity>
<ejb-name>SubscriptionBean</ejb-name>
<local-home>customer.LocalSubscriptionHome</local-home>
<local>customer.LocalSubscription</local>
<ejb-class>customer.SubscriptionBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>SubscriptionBean</abstract-schema-name>
- <cmp-field>
<field-name>type</field-name>
</cmp-field>
- <cmp-field>
<field-name>title</field-name>
</cmp-field>
<primkey-field>title</primkey-field>
- <query>
- <query-method>
<method-name>findAllSubscriptions</method-name>
<method-params />
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
- <relationships>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationship-role-name>
<multiplicity>one</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>addresses</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>AddressBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customer</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>subscriptions</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>SubscriptionBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customers</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>AddressBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>SubscriptionBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------------End of ejb-jar.xml---------------
Please help
Thanks in advance
MikeHi Gaurav,
Other applications used the same the datasource, which I used for this application,
are running fine.
I think there is some bug in the wlserver 6.1 to create the join table. I think
it is the time I should ask the bea wlserver 6.1.
Mike
"Gaurav Khanna" <[email protected]> wrote:
This implies that there are no database connections available. You need
to
check if you can log into your database instance. By default there are
30
connections specified for an instance in Oracle. FYI.
"Mike" <[email protected]> wrote in message
news:[email protected]...
Hi all,
I wonder any one comes across with deploying beans with M:Nrelationship with
"No resource available".
I defined the relationship in ejb-jar.xml and dbms in the
weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
the following error
------ Error message-----
weblogic.common.ResourceException: No resources available atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:568) atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:400) atweblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
cator.java:368) atweblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
ava:166) atweblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
Pool.java:127) atweblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
Source.java:194) atweblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:219) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
ersistenceManager.java:317) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
le(RDBMSPersistenceManager.java:1149) atweblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
bleVerifier.java:428) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
Unable to deploy EJB: CustomerBean from \ejb:
Errors encountered ''The Container-Managed Persistence Entity EJB failedwhile
creating its SQL Type Map. The error was: Invalid object name'localcustomer_localsubscription'.
Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Errorencountered
while attempting to create Default DBMS Table:'localcustomer_localsubscription'.
Error Text: 'weblogic.common.ResourceException: No resource savailable'.''
---------------End error ----------------------
---------------my ejb-jar.xml
<ejb-jar>
- <enterprise-beans>
- <entity>
<ejb-name>AddressBean</ejb-name>
<local-home>customer.LocalAddressHome</local-home>
<local>customer.LocalAddress</local>
<ejb-class>customer.AddressBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
- <cmp-field>
<field-name>addressID</field-name>
</cmp-field>
- <cmp-field>
<field-name>street</field-name>
</cmp-field>
- <cmp-field>
<field-name>city</field-name>
</cmp-field>
- <cmp-field>
<field-name>zip</field-name>
</cmp-field>
- <cmp-field>
<field-name>state</field-name>
</cmp-field>
<primkey-field>addressID</primkey-field>
</entity>
- <entity>
<ejb-name>CustomerBean</ejb-name>
<local-home>customer.LocalCustomerHome</local-home>
<local>customer.LocalCustomer</local>
<ejb-class>customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>CustomerBean</abstract-schema-name>
- <cmp-field>
<field-name>customerID</field-name>
</cmp-field>
- <cmp-field>
<field-name>firstName</field-name>
</cmp-field>
- <cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<primkey-field>customerID</primkey-field>
- <query>
- <query-method>
<method-name>findByLastName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
- <query>
- <query-method>
<method-name>findByFirstName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
</entity>
- <entity>
<ejb-name>SubscriptionBean</ejb-name>
<local-home>customer.LocalSubscriptionHome</local-home>
<local>customer.LocalSubscription</local>
<ejb-class>customer.SubscriptionBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>SubscriptionBean</abstract-schema-name>
- <cmp-field>
<field-name>type</field-name>
</cmp-field>
- <cmp-field>
<field-name>title</field-name>
</cmp-field>
<primkey-field>title</primkey-field>
- <query>
- <query-method>
<method-name>findAllSubscriptions</method-name>
<method-params />
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
- <relationships>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationshi
p-role-name>
<multiplicity>one</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>addresses</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship
-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>AddressBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customer</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-rela
tionship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>subscriptions</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-rela
tionship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>SubscriptionBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customers</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>AddressBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>SubscriptionBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------------End of ejb-jar.xml---------------
Please help
Thanks in advance
Mike -
EJB QL query error... why??
Ok, so I'm getting an error in my EJB QL and don't know why... do you see anything strange in this query? I append the whole error from the deploytool's verifier. I've double checked that countryBranch exists as a CMR field in BranchCatalog. Any idea?
Error: [ select object(bc) from BranchCatalog bc, in (bc.countryBranch) cb where cb = ?1 ] has parsing error(s)
Exception occured : [Encountered "in ( bc . countryBranch )" at line 1, column 24.
Was expecting one of:
"AbstractSchemaName" ...
"IN" "(" "IdentificationVar" "." "SingleValuedCmrField" "." ...
"IN" "(" "IdentificationVar" "." "CollectionValuedCmrField" ...
EJB QL statement : 'select object(bc) from BranchCatalog bc, in (bc.countryBranch) cb where cb = ?1'
EJB QL method : public abstract com.actaris.eprocurement.domain.catalog.LocalBranchCatalog com.actaris.eprocurement.domain.catalog.LocalBranchCatalogHome.findByCountryBranch(com.actaris.eprocurement.domain.organization.LocalCountryBranch) throws javax.ejb.FinderException
eProcurement: Some tests failed.This my ejb-jar.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<description>Entity Bean ( CMP )</description>
<display-name>Product</display-name>
<ejb-name>Product</ejb-name>
<home>Project.ProductHome</home>
<remote>Project.Product</remote>
<local-home>Project.ProductLocalHome</local-home>
<local>Project.ProductLocal</local>
<ejb-class>Project.ProductBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Long</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Product</abstract-schema-name>
<cmp-field>
<field-name>productid</field-name>
</cmp-field>
<cmp-field>
<field-name>productname</field-name>
</cmp-field>
<cmp-field>
<field-name>productactive</field-name>
</cmp-field>
<primkey-field>productid</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>select object(o) from Product o</ejb-ql>
</query>
</entity>
<entity>
<description>Entity Bean ( CMP )</description>
<display-name>Project</display-name>
<ejb-name>Project</ejb-name>
<home>Project.ProjectHome</home>
<remote>Project.Project</remote>
<local-home>Project.ProjectLocalHome</local-home>
<local>Project.ProjectLocal</local>
<ejb-class>Project.ProjectBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Long</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Project</abstract-schema-name>
<cmp-field>
<field-name>projectid</field-name>
</cmp-field>
<cmp-field>
<field-name>projectname</field-name>
</cmp-field>
<cmp-field>
<field-name>projectactive</field-name>
</cmp-field>
<primkey-field>projectid</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>select object(o) from Project o</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByProjectname</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object (o) from Project o where o.projectname = ?1</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByProjectproduct</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object (o) from Project as o, in (o.projectproduct) as p where p.productname = ?1 and o.projectactive = ?2</ejb-ql>
</query>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>Project - Product</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Project may have one Product</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>Project</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>product_projectproduct</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Product may have many Project</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Product</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>project_projectproduct</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Product</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>Project</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar> -
How to query for specific filename
I'm using a modified folder_action script to ftp files up to a server once they're finished being created.
Is there a way to query for a specific filename to be present in the folder prior to passing it to the actual ftp function? The catch is that the filename will always be in the format of <mmddyy>.mp4. During the process that is creating the actual file to be ftp'd, various temp files are created prior. I'd like to ensure that only the final version of the mp4 is acted upon, which is the one with the mmddyy as the filename.The folder action already has the folder and the item paths passed to it, so you can get the individual file name by using something like:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on adding folder items to this_folder after receiving added_items
repeat with AnItem in added_items
if text (count (this_folder as text)) thru -1 of (AnItem as text) is "<mmddyy>.mp4" then
-- whatever
end if
end repeat
end adding folder items to
</pre>
There are also temporary folders that the system provides, so you shouldn't have to use the folder with the attached action at all:
get path to temporary items
get path to temporary items from user domain -
JPQL Query for specific usecase, help needed
Does anyone knows how to write the JPQL query for this specific use case.
Take 3 tables,
Table 1 contains bids for many auctions (Bid table)
Table 2 Contains many auctions (Auction Table)
Table 3 contains many users (User Table)
I need a query to retrieve all the highest bids per auction for a particular user.
For example if the user has bidded on 10 auctions., but for each auctions has placed 3 bids each. Following the query, I would expect to get 10 bids back, each being the highest per auction.
A Bid has a bid value that can be used for filtering.
Thanks
PeterIt would be something like the JPQL version of 'select * from bids join auctions using (auction_id) where bids.userid = ? group by auctions.auction_id order by bids.amount desc'. But this is primarily an SQL question, and only secondarily a question as to how to translate that into JPQL, which should be straightforward.
-
Create POWL query for specific user (not self)
Hello All,
was wondering if anyone had an idea on how to create a POWL query for a specific user. Even the low level method in class CL_POWL_QUERY_ACCESSOR seem to assume that you either are creating an administrator query for any/everyone or just for yourself.
One option is to create multiple queries (for each selection criteria that I want) and assign these directly to user (rather than the role) in the config - but that's config that I'd need to transport up - for what is essentially user level personalisation.
My strong favourite at the moment is to throw a breakpoint in CL_POWL_QUERY_ACCESSOR and manually change the user name as I save new queries in directly in production - but that's not exactly the cleanest solution.
Surely someone has had a need to actually create queries for users, not just delete them as per program POWL_D01?
Many thanks for any hints and tips
Cheers,
ChrisWell - I should point out that you don't have to transport those user assignment of queries - tables are production maintainable. However, you do have to transport up the query itself - so not ideal.
Oh well - don't think this one has an answer => closing it to open another question.
Cheers,
Chris -
Oracle SQL query for getting specific special characters from a table
Hi all,
This is my table
Table Name- Table1
S.no Name
1 aaaaaaaa
2 a1234sgjghb
3 a@3$%jkhkjn
4 abcd-dfghjik
5 bbvxzckvbzxcv&^%#
6 ashgweqfg/gfjwgefj////
7 sdsaf$([]:'
8 <-fdsjgbdfsg
9 dfgfdgfd"uodf
10 aaaa bbbbz#$
11 cccc dddd-/mnm
The output has to be
S.no Name
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
It has to return "Name" column which is having special characters,whereas some special chars like -, / ," and space are acceptable.
The Oracle query has to print columns having special characters excluding -,/," and space
Can anyone help me to get a SQL query for the above.
Thanks in advance.You can achieve it in multiple ways. Here are few.
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where regexp_like(translate(name,'a-/" ','a'), '[^[:alnum:]]');
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where translate
19 (
20 lower(translate(name,'a-/" ','a'))
21 , '.0123456789abcdefghijklmnopqrstuvwxyz'
22 , '.'
23 ) is not null;
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> -
Help: IllegalExpressionException vs. EJB 2.1 many-to-many relationship
Using Oracle WebLogic 11g (10.3.4). The appc tool is generating a warning regarding an illegal EJB QL expression for a many-to-may relationship in an EJB 2 Bean.
Details:
* Entity Bean "MSProduktKonfiguration"
* Entity Bean "MSAngebot"
* n-m relationship betwenn these two Entites, from MSProduktKonfiguration to MSAngebot by cmr field angebotLocal, from MSAngebot to MSProduktKonfiguration by cmr field produktKonfigurationenLocal
* Join table "MS_PRODUKT.ANGEBOT_POSITION"
Warnings from appc:
[java] Warning: [EJB:013094]The SELECT clause of this query contains an identifier 'bean.angebotLocal' that ends in a cmr-field. The EJB 2.1 specification section 11.2.7.1 requires that any related null objects belonging to the set corresponding to this cmr-field must be returned by this query however the database that will be used to execute this query does not sufficiently support SQL outer joins, therefore this query will not return any null objects that might otherwise be returned.
[java] Warning: [EJB:013094]The SELECT clause of this query contains an identifier 'bean.produktKonfigurationenLocal' that ends in a cmr-field. The EJB 2.1 specification section 11.2.7.1 requires that any related null objects belonging to the set corresponding to this cmr-field must be returned by this query however the database that will be used to execute this query does not sufficiently support SQL outer joins, therefore this query will not return any null objects that might otherwise be returned.
I have no clue what's going on there. Maybe someone can help me out.
Snippet from the ejb-jar.xml Deployment Descriptor:
<ejb-relation id="EJBRelation_9">
<ejb-relation-name>Angebot-ProduktKonfiguration</ejb-relation-name>
<ejb-relationship-role id="EJBRelationshipRole_17">
<ejb-relationship-role-name>ProduktKonfigurationen-Have-Angebote</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source id="RoleSource_17">
<ejb-name>MSProduktKonfiguration</ejb-name>
</relationship-role-source>
<cmr-field id="CMRField_9">
<cmr-field-name>angebotLocal</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role id="EJBRelationshipRole_18">
<ejb-relationship-role-name>Angebote-Have-ProduktKonfigurationen</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source id="RoleSource_18">
<ejb-name>MSAngebot</ejb-name>
</relationship-role-source>
<cmr-field id="CMRField_10">
<cmr-field-name>produktKonfigurationenLocal</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
Snippet from the weblogic-cmp-rdbms-jar.xml Deployment Descriptor:
<weblogic-rdbms-relation>
<relation-name>Angebot-ProduktKonfiguration</relation-name>
<table-name>MS_PRODUKT.ANGEBOT_POSITION</table-name>
<weblogic-relationship-role>
<relationship-role-name>Angebote-Have-ProduktKonfigurationen</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>angebot_id</foreign-key-column>
<key-column>angebot_id</key-column>
</column-map>
</relationship-role-map>
</weblogic-relationship-role>
<weblogic-relationship-role>
<relationship-role-name>ProduktKonfigurationen-Have-Angebote</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>produkt_konfiguration_id</foreign-key-column>
<key-column>produkt_konfiguration_id</key-column>
</column-map>
</relationship-role-map>
</weblogic-relationship-role>
</weblogic-rdbms-relation>Hi,
There are many differences between EJB 1.1 and 2.0. Most of these are
regarding CMP entity EJBs. I would say you should go with 2.0 if you have
entity EJBs.
Also EJB 2.0 has local interfaces and message-driven beans (JMS listeners).
Emmanuel
"Brian" <[email protected]> wrote in message
news:3cf3b4eb$[email protected]..
>
Our standard development tool here is WebGain Visual Cafe 4.5.1. I am toldthat this
tool does not support EJB 2.0. We are generating EJB's through the wizardbased interface
of Visual Cafe.
Is there a compelling reason to use EJB 2.0 instead of 1.1, even thoughthe tool
doesn't support it? Is the time saved by automatic generation of EJB 1.1beans outweighed
by improvements in EJB 2.0?
Thanks for you help! -
Error in EJB JNDI Binding for EMP Bean
Hi friends,
I need to call a ejb from second ejb ( entity bean from a sission bean). I have defined all xml mapping in ejb.xml.jar and server specific jar file (jboss.xml.jar). I am using boss-4.0.5.GA. But when I am calling that session bean from simple desk top client. It show me this error
23:48:59,578 ERROR [STDERR] javax.naming.NameNotFoundException: UserLocalHome not bound
23:48:59,578 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
23:48:59,578 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
23:48:59,578 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
23:48:59,578 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,578 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,578 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,578 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:153)
23:48:59,578 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
23:48:59,578 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
23:48:59,578 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
23:48:59,578 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
23:48:59,578 ERROR [STDERR] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
23:48:59,578 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
23:48:59,578 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
23:48:59,578 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
23:48:59,578 ERROR [STDERR] at com.ejb.service.UserFacadeBean.getHome(UserFacadeBean.java:51)
23:48:59,578 ERROR [STDERR] at com.ejb.service.UserFacadeBean.getAll(UserFacadeBean.java:74)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,578 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,578 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,578 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
23:48:59,578 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
23:48:59,578 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:954)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,578 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,578 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,578 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:48:59,578 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:48:59,578 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:48:59,578 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:48:59,578 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:48:59,578 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
23:48:59,578 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,578 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,578 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,578 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:153)
23:48:59,593 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
23:48:59,593 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
23:48:59,593 ERROR [STDERR] java.lang.NullPointerException
23:48:59,593 ERROR [STDERR] at com.ejb.service.UserFacadeBean.getAll(UserFacadeBean.java:75)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,593 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,593 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,593 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
23:48:59,593 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
23:48:59,593 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:954)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,593 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,593 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,593 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:48:59,593 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:48:59,593 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:48:59,593 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:48:59,593 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:48:59,593 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
23:48:59,593 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:48:59,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
23:48:59,593 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
23:48:59,593 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
23:48:59,593 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:153)
23:48:59,593 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
23:48:59,593 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
23:48:59,593 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
23:48:59,593 INFO [STDOUT] exit from getAll() method.....
Can any one help me. how can I resolve it. When I see server log. when I found then one of bean is not perperly bind with jndi name. it showing message like this.
23:48:21,187 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'FtacostManagerBean' to jndi 'local/FtacostManagerBean@27432016'
It seems like , it unable to bind Manager Bean with local home. but I am not sure. Please help me. how can I resulve it.
Here I am sending my ejb config files.
JBoss.xml.jar
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<!--
To add beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called jboss-beans.xml that contains
the <session></session>, <entity></entity> and <message-driven></message-driven>
markup for those beans.
-->
<entity>
<ejb-name>UserBean</ejb-name>
<local-jndi-name>UserLocalHome</local-jndi-name>
</entity>
<session>
<ejb-name>UserFacadeBean</ejb-name>
<jndi-name>UserFacadeHome</jndi-name>
<ejb-local-ref>
<ejb-ref-name>User</ejb-ref-name>
<local-jndi-name>UserLocalHome</local-jndi-name>
</ejb-local-ref>
</session>
<!--
write a merge file jboss-webservices.ent for webservice-description
-->
</enterprise-beans>
<!--
To specify your own assembly descriptor info here, add a file to your
XDoclet merge directory called jboss-assembly-descriptor.xml that contains
the <assembly-descriptor></assembly-descriptor> markup.
-->
<assembly-descriptor>
<!-- message destinations -->
<!--
To specify additional message-destination elements, add a file in the merge
directory called jboss-message-destinations.ent that contains them.
-->
</assembly-descriptor>
<resource-managers>
</resource-managers>
<!--
| for container settings, you can merge in jboss-container.xml
| this can contain <invoker-proxy-bindings/> and <container-configurations/>
-->
</jboss>
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar >
<description>Umashankar beans</description>
<display-name>Programmed by umashnakar</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session>
<display-name>UserFacade</display-name>
<ejb-name>UserFacadeBean</ejb-name>
<home>com.ejb.service.UserFacadeHome</home>
<remote>com.ejb.service.UserFacadeRemote</remote>
<ejb-class>com.ejb.service.UserFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!-- Entity Beans -->
<entity>
<description>User Bean Made by Uma</description>
<display-name>This is local user Entity</display-name>
<ejb-name>UserBean</ejb-name>
<local-home>com.ejb.persistence.UserLocalHome</local-home>
<local>com.ejb.persistence.UserLocal</local>
<ejb-class>com.ejb.persistence.UserLocalBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>false</reentrant>
<abstract-schema-name>user</abstract-schema-name>
<cmp-field>
<field-name>cuId</field-name>
</cmp-field>
<cmp-field>
<field-name>accessCode</field-name>
</cmp-field>
<cmp-field>
<field-name>password</field-name>
</cmp-field>
<cmp-field>
<field-name>creationDate</field-name>
</cmp-field>
<cmp-field>
<field-name>siteId</field-name>
</cmp-field>
<primkey-field>cuId</primkey-field>
<query>
<description>Query by accessCode</description>
<query-method>
<method-name>findByAccessCode</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.accessCode = ?1</ejb-ql>
</query>
<query>
<description>Query by accessCode</description>
<query-method>
<method-name>findByPassword</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.password = ?1</ejb-ql>
</query>
<query>
<description>Query by accessCode</description>
<query-method>
<method-name>findByCreationDate</method-name>
<method-params>
<method-param>java.sql.Timestamp</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.creationDate = ?1</ejb-ql>
</query>
<query>
<description>Query by accessCode</description>
<query-method>
<method-name>findBySiteId</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.siteId = ?1</ejb-ql>
</query>
<query>
<description>Query by accessCode</description>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>SELECT OBJECT(u) FROM user AS u </ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor >
<container-transaction>
<method>
<ejb-name>UserBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>UserFacadeBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Please rep[y me on [email protected]. I appreciate it if you come on google talk.
Thanks in Advance.
UmaShankar(TumoDev)
Software EngineerHi,
According to WAS 6 , every opened connection has to be commited (or rolledback) explicitly (didnt try autocommit) before closing. Even if all you have done with that connection is a SELECT Query.
This has apparently solved the same problem I was getting. implement it and see whether it helps you. -
O/R tool generates invalid ejb-jar.xml for 1-n cmp bean-to-bean relations
TopLink generates:
<ejb-relation>
<ejb-relation-name>Parent-Child</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Parent-has-childs</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Parent</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>childs</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>child-owned-by-Parent</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete></cascade-delete>
<relationship-role-source>
<ejb-name>Child</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
what's wrong?
it's missing the following tag:
'<cmr-field-type>java.util.Collection</cmr-field-type>'
which should be in the <cmr-field> element after the <cmr-field-name>.
I cannot get the UI tool to add this tag, whenever I manually add it to the ejb-jar.xml it gets removed the next time I generate the ejb-jar.xml. Additionally, if I try to update the project from the ejb-jar.xml, the O/R tool loses ALL my mappings for entity beans.
Expected questions:
TopLink 9.0.3
WebLogic 7.0.1
CMP 2.0
JDK 1.3.1_03
Yes the getter/setter are defined (on the local interface and bean)
FYI,
AndrewThis should take care of it
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>IDMaster</ejb-name>
<home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
<remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
<ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
<persistence-type>Container</persistence-type>
<ejb-local-ref>
<ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
</ejb-local-ref>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>IDMaster</abstract-schema-name>
<cmp-field>
<field-name>idPrefix</field-name>
</cmp-field>
<cmp-field>
<field-name>idValue</field-name>
</cmp-field>
<primkey-field>idPrefix</primkey-field>
<ejb-local-ref>
<ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
</ejb-local-ref>
<query>
<query-method>
<method-name>findAllIDMasters</method-name>
<method-params/>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>IDMaster</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar> -
Hello Experts,
I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
This application has to read and write data in the EP DB (oracle v10).
I'm using:
<u>a Dictionary Project</u> (define the DB Tables)
<u>a Java Project</u> (define class as DAO, DBManager etc)
<u>a Library Project</u>
<u>an EJB Project</u>
<u>an EAR Project</u>
With these projects I can deploy a <u>webService</u> in my EP server.
BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
The query is simple and correct but it does not work...
This is the error message returned (the query id in bold)
(column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
<i>HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/7.00
Content-Type: text/xml; charset=UTF-8
Date: Fri, 21 Sep 2007 14:29:57 GMT
Set-Cookie: <value is hidden>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and not found....
Any help???
Best RegardsHi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
So I tried to use the ':' as indicated in the manual..
<b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
- expecting LPAREN, found ':'</i>
<b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
- 1:26 - SQL syntax error: the token "(" was not expected here
- 1:26 - expecting ID, found '('</i>
Then I tried to avoid the MIN() function and I tried to do just the subtraction:
<b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
<b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
- 1:22 - SQL syntax error: the token "(" was not expected here
- 1:22 - expecting ID, found '('</i>
<b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
- 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
- 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
<b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
- 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
Why these parts of query are not accepted???
I don't understand why... I hope you can help me.
Best Regards
Alessandro -
EJB deployment error for Weblogic server 9.2 mp4
Hi,
While trying to deploy a small EJB jar file which uses EJB 2.1 CMP beans with relationships, getting the following error from Weblogic server 9.2 MP4:
=================================================================================================
<Error> <EJB> <VinodThinkPad> <AdminServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320143988333> <BEA-012036> <Compiling generated EJB classes produced the following Java compiler error message:
C:\bea\user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache\19ivqhpr6jvsc\Test1\Order_cpl9bk__WebLogic_CMP_RDBMS.java:570: incompatible types
found : <nulltype>
required: int
shipmentId = null;
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
>
####<Nov 1, 2011 4:09:48 PM IST> <Error> <Deployer> <VinodThinkPad> <AdminServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320143988380> <BEA-149265> <Failure occured in the execution of deployment request with ID '1320143984947' for task '1'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(EJBTest)
Unable to deploy EJB: EJBTest.jar from EJBTest.jar:
There are 1 nested errors:
java.io.IOException: Compiler failed executable.exec:
C:\bea\user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache\19ivqhpr6jvsc\Test1\Order_cpl9bk__WebLogic_CMP_RDBMS.java:570: incompatible types
found : <nulltype>
required: int
shipmentId = null;
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:493)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:332)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:340)
at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:309)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464)
at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:432)
at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:754)
at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:657)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1201)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:355)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.configPrepareCompleted(DeploymentManager.java:594)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepareCompleted(DeploymentServiceDispatcher.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCompletedCallback(DeploymentReceiverCallbackDeliverer.java:228)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$300(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$4.run(DeploymentReceiverCallbackDeliverer.java:95)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
weblogic.application.ModuleException: Exception preparing module: EJBModule(EJBTest)
Unable to deploy EJB: EJBTest.jar from EJBTest.jar:
There are 1 nested errors:
java.io.IOException: Compiler failed executable.exec:
C:\bea\user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache\19ivqhpr6jvsc\Test1\Order_cpl9bk__WebLogic_CMP_RDBMS.java:570: incompatible types
found : <nulltype>
required: int
shipmentId = null;
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:493)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:332)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:340)
at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:309)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464)
at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:432)
at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:754)
at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:657)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1201)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:355)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.configPrepareCompleted(DeploymentManager.java:594)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepareCompleted(DeploymentServiceDispatcher.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCompletedCallback(DeploymentReceiverCallbackDeliverer.java:228)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$300(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$4.run(DeploymentReceiverCallbackDeliverer.java:95)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:382)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.configPrepareCompleted(DeploymentManager.java:594)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepareCompleted(DeploymentServiceDispatcher.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCompletedCallback(DeploymentReceiverCallbackDeliverer.java:228)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$300(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$4.run(DeploymentReceiverCallbackDeliverer.java:95)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
java.io.IOException: Compiler failed executable.exec:
C:\bea\user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache\19ivqhpr6jvsc\Test1\Order_cpl9bk__WebLogic_CMP_RDBMS.java:570: incompatible types
found : <nulltype>
required: int
shipmentId = null;
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:493)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:332)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:340)
at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:309)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464)
at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:432)
at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:754)
at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:657)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1201)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:355)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.configPrepareCompleted(DeploymentManager.java:594)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepareCompleted(DeploymentServiceDispatcher.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCompletedCallback(DeploymentReceiverCallbackDeliverer.java:228)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$300(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$4.run(DeploymentReceiverCallbackDeliverer.java:95)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>
=================================================================================================
While I'm able to deploy without the CMP 1-1 relationship, the moment I introduce the 1-1 relationship, I get this error. Database used is Oracle 10g XE.
I have been battling this error for more than a day now. Kindly help me fix this.
Thanks in advance!
Regards,
VinodHi,
I was able to figure out the root cause. I was using the primitive data type "int" for primary key and foreign key for one of the beans in the relationship. After I changed it to "Integer" wrapper type, the issue got resolved.
-Vinod -
How to write EJB-QL query with IN notation and list values EJB3.0?
hi,
I would like to write an EJB-QL query where the query would return the objects whose name equals to one of the names in the list.
SELECT DISTINCT OBJECT(feature) FROM MAPSHEET_LOCK feature WHERE feature.name IN ?1
For ?1 I would like to pass in a list. How can I write this query?
ThanksList<String> names;
StringBuilder sb = new StringBuilder("SELECT DISTINCT OBJECT(feature) FROM MAPSHEET_LOCK feature WHERE feature.name IN (");
String separator = "";
for (String name : names) {
sb.append(separator);
sb.append("'");
sb.append(name);
sb.append("'");
separator = ", ";
sb.append(")");
String ejbql = sb.toString();
// Code for execute query
....Message was edited by:
Rulas -
I was told that it is possible to create a separate 'Date for Date Type' for each 'Date Type' in the selection criteria of an adhoc query for IT0041. Can somebody help me with this please?
Hi Sven
Thanks.
I created it with PCH , but very few fields are visible for IT1001
Hence if I want to find chief of Org unit A, then I cannot find it as 'Relationship type/relationship' field of IT1001 is missing here.
Basically I need all the fields which are displayed in IT1001 as shown below:
Need your help to find the way out. Thanks
KP -
Querying for large number of objects... searchspec limitation
As part of a product i'm developing i may come across a scenario where i need to query for 100+ specific objects based on ids.
I know the query input for WS 2.0 has a "searchspec" string field, but based on the sheer number of specific objects i need to query for i'm afraid the string may eventually get too large.
Is there a way around this? Can i send multiple individual queries in a batch request? Can i add more than one search object to a single query page request? Anything?
Thanks!
-KevinA few options available using the WS v2.0 Query methods:
1. Use Arguments like page size and startrownumber arguments. This will allow you to specify the pagesize of the recordset to be returned and also the starting row number.
2. The searchspec is a powerful argument and it supports a set of binary and unary operators. Refer the Ondemand user guide for a more complete set of operators supported by searchspec. To narrow the results of your query, you could use the "AND" operator between 2 or more fields in your object query.
Hope this helps.
Jaya
Maybe you are looking for
-
Well I really need som help on where to even start this program? I'd send u what i have so far but its so full of errors i'd be embarsed. I'll prob need to just start a new and was wondering where the heck i should even begin: Problem Statement: Your
-
How to get back all lost photos after updating the iOS8?
When I updated my IOS8 I thought I lost my photos, so I have restored my iPhone but after restoring I have discovered that I lost all my photos, please advise how can get/ retrieve all the lost photos specially since I didn't do backup?
-
Hi Experts, Please help me! I am integrating SD with FI-CA. I would like to add the field cost center in the tab account assignment. How can I do? Thanks
-
Dear all If posting periods are APRIL TO MARCH 1 to 12 and special periods are 13,14,15,16 can any one explain about special periods with a simple example please?
-
How to Avoid overlapping data label values in Pie Chart
Hi, I am facing the problem when the data is more my pie chart data label value is overlapping. I tried with showing outside the data label value but customer is not accepting ,and i used the CollectedPie option also but still its overlapping .So pl