SSAS relationship help
Hi all,
I have created an SSIS package which takes forecasting info from one system, and has lookups that lookup a bunch of stuff from another system. I then dump all this info into a table as below. Users, as they are, have now said ooooo wouldn't it be great
if we could analyse all this by customer, time, parts, pricing etc. which is all stored in this table. That immediately made me think SSAS cube. Now i'm pretty comfortable in SQL and SSIS. When it comes to SSAS i'm a bit of a noob.
My attempts to turn this into a cube have been a bit in vain. Therefore considering the following relationships how could i implement this in SSAS.
Customers have their own parts and share parts with other customers. (some customers have identical products)
Even if a customer has the same product as another they will have different PRICING. All other data i.e. weights, qty's etc. can just be aggregated.
For a customer and product the price could also CHANGE. So therefore a customer's product can have multiple prices. (but 1 active price)
I was thinking of creating a TIME dimension and linking that to W/C date. Basically I just need a bit of guidance into how to break this up and create in SSAS. A fast response would be much appreciated as they need this info for financial reporting
etc. Thanks for your help!
Could someone help me with this please it's getting quite urgent...
Hi jhowe1,
According to your description, you want to create a cube for the data in your above table. Right?
In this scenario, these data should be from different tables. In database, I think you have dim tables like Customer, Product, Date. We can create
dimensions based on these tables. And you can define attribute relationship in dimension, like different customer has identical product with different price. Please refer to a link below:
Dimension Relationships
Creating a New Dimension Using the Dimension Wizard
For data like Quantities, Sales, which need to be aggregated based on dimension. We should have some fact tables in database, and we can create
measures based on these fact tables.
For creating a entire cube, please see an article below:
Create First OLAP Cube in SQL Server Analysis Services
Also you can download an
AdventureWorksDW sample database for practice based on the tutorial below:
Multidimensional Modeling (Adventure Works Tutorial)
Best Regards,
Simon Hou
TechNet Community Support
Similar Messages
-
Repost based on Char Relationships help !
Hi,
I need help with the above function please. I'm doing this in IP but I think it would be equally relevant in BPS.
I have 2 derivations
1. VAT is derived as its an attribute of contract. (so its characteristic relationship of type attribute)
2. Cash date is derived in an exit from Event date and Debtor days.(so its characteristic relationship of type exit)
When doing a repost based on characteristic relationships (after changing master data attributes), the VAT derives properly but I get an error on the cash date derivation.
I'm not sure if its important, but VAT flag is actually in the cube whereas Debtor days is simply looked up from contract master and then used to calculate cash date in the exit.
The characteristic relationship does work properly when simply planning data into the cube, but not on the repost function.
Any help/ideas would be appreciated.
Cheers
sueHi,
No its not possile. If you put CALWEEK as a target in the derivation, the CHECK on the derivation will fail as you cannot derive Generic Time characteristics.
I overcame the problem however by ticking CALWEEK in the Repost with Characteristic Relationships function. ie. even though the function did not suggest that it could be derived, ticking it did not lead to error and in this way the function worked.
Just further FYI, I've found that Exit derivations and Attribute derivations cannot be achieved in a single function that they have to be created separately.
Regards
Sue -
Hi all,
I have extended the Problem class and form to create a new relationship called 'Problem Owner'. I've done this rather than create just a new property because I wanted to have it use the 'User' object as its source.
First question, is this a good way of achieving this?
The extended MP has imported correctly and appears to be bound to the User object, allowing me to enter user details in the Problem Owner box on the form (using the user picker). This correctly displays in the History of the Problem record with a relationship
change entry.
The problem I have is that I am unable to search for (using Advanced Search) or use the 'Problem Owner' field in custom views as it doesn't appear as a property. If I select the 'Problem (advanced)' combination class there are lots of related
classes but my new Problem Owner doesn't appear.
Have I missed something?
Thanks in advanceHi,
You have to create a new type projection (take an existing one for problems as a sample) and add your relationship. Then while creating the view, select your type projection. Please don't add too many fields and relationships to your custom type projection,
cause it affects the performance of the SCSM consoles.
Cheers,
Marat
Site: www.scutils.com Twitter:
LinkedIn:
Graveyard: -
Unable to Hide *Review and Save* step using personlization
Hi,
using personlization we want to hide * Review and Save* step in bank information iview under Personal Information.
FYI...
Step 1) click on Content Administration
Step 2) Expand Portal Content
Step 3) Expand Content Provided by SAP
Step 4) Expand End User Content
Step 5) Expand Employee Self Service
Step 6) Expand Roles
Step 7) double click Employee Self service
Step 8) Expand Personal Information
Step 9) Select the Personal Information page and click on preview buttonStep
Step 10) In the popup window click on Bank Information
Step 11) select Review and Save and control right click to open the
Personalization window
step 12) In the Personalization window, select Review and save and
select the radio button visible No and click on the Apply Button.
Step 13) As a result the following error screen is displayed
java.lang.IllegalArgumentException: Name portal_content/com.sap.pct/srvconfig/com.sap.pct.erp.srvconfig.ess.employee_self_service/com.sap.pct.erp.srvconfig.in/com.sap.pct.erp.srvconfig.bank/com.sap.pct.erp.srvconfig.fpmapplications/com.sap.pct.erp.srvconfig.per_bank_in/com.sap.xss.config.roadmapsteps/r3 is incorrect. It must only contain a..zA..Z0..9._-$ symbols.
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.checkCreate(DelegatorRepositoryModelClass.java:400)
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.createRelatedModelObject(DelegatorRepositoryModelClass.java:318)
at com.sap.tc.webdynpro.progmodel.personalization.ViewPersonalization$Implementation.createInElements(ViewPersonalization.java:128)
at com.sap.tc.webdynpro.progmodel.view.ViewElement._getPersonalization(ViewElement.java:318)
at com.sap.tc.webdynpro.progmodel.view.PersonalizationHelper.setOverriddenProperty(PersonalizationHelper.java:942)
Thanks,
vijay.Hi Vijay,
To edit the text you can follow the method or follow Note 1234273.
And For making any changes to the roadmap you might want to look at modifying it from Self Service Administrator.
Check the below links on more info on SSA.
http://help.sap.com/saphelp_erp2005/helpdata/en/43/3b6c0cfa6c1bcbe10000000a1553f7/frameset.htm
http://help.sap.com/erp2005_ehp_03/helpdata/EN/bf/a74fecb9434fe7bd760c75db094366/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/6a/3e47d0a0dc4abaa58f93689a077334/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/07/acc80592b4451badb0f90ccd3bc55b/frameset.htm
Hope this helps.
Cheers-
Pramod -
Justification for Using Oracle Text
Hello,
Can someone give me good cause (justification) for utilizing Oracle Text over other tools out there that are not tied directly to Oracle?
Apparently it is possible to identify metadata within text and do keyfield and keyword searches this way with other tools, but I question the accuracy, speed, or value in terms of data relationships with this approach. I feel the relationships belong in the database along with the indexes but can't convince anyone of this.
Has anyone experience working with Oracle Text where relationships help to drive the search and can give me good cause to this approach?
thanksHi,
Justification depends on your use. For starters:
1) It is included in both standard and enterprise editions of the db at no added charge
2) Uses SQL to query and maintain
3) Includes a number of built-ins for maintenance and optimization
4) It has 4 different index types for various uses
5) It can index any data type
6) UltraSearch is included in both standard and enterprise editions of the db at no additional charge (this is a crawler built on Oracle Text).
As for the integration - it is optimized for Oracle. If you were to build a standalone indexing solution you would probably design it a bit different, but Oracle Text takes into account the optimizer and database structure.
It has other features (same as some of the other tools) like a knowledge base, classification, clustering, theme extraction, language-specific features, ability to index documents in and out of the database, stopwords, stemming, wildcard, progressive relaxation, and the list goes on.
I guess my question would be, what is the reason for NOT using it? That might give me a better line on the reasoning so that I can respond with something a bit more specific.
Thanks,
Ron -
Justification for using Oracle Text vs Other Search Tools
Hello,
Can someone give me good cause (justification) for utilizing Oracle Text over other tools out there that are not tied directly to Oracle?
Apparently it is possible to identify metadata within text and do keyfield and keyword searches this way with other tools, but I question the accuracy, speed, or value in terms of data relationships with this approach. I feel the relationships belong in the database along with the indexes but can't convince anyone of this.
Has anyone experience working with Oracle Text where relationships help to drive the search and can give me good cause to this approach?
thanksTools like Autonomy have fantastic searching functions, far in excess of what we get with Text. What they aren't very good at is the database side of things. So if your prime concern is to be able to search free text documents on your file system using a baroque range of filters then Text is not the right choice. But if you want to join the outcomes of free text searches with structured data in database tables or if the text you want to search is stored in database tables then using Oracle's built-in functionality is the better approach.
From your post I'm not sure which scenario fits your situation more closely.
Cheers, APC -
SQL Alias for Analysis Server for SharePoint 2013
Hi
I created a SQL Alias for my Analysis Server but somehow, It is not working.
I am frequently using SQL Alias for my SQL database servers within the SharePoint 2013 and it is working correctly.
Could you please guide me for this.
Regards,
Yogendra
My name is yogendraA Sql Aliase works only for relational database engines, but not for multidimensional engines / SSAS
Olaf Helper
[ Blog] [ Xing] [ MVP] -
No Response From My iPad.
Hello, My iPad will NOT respond. I have tried resetting it, plugging it into the computer, charging it, EVERYTHING! And yet, it still will not do anything. I am seriously worried...
I was laying on my bed, and I was going to play COD: Zombies on my iPad. Well, there was no audio, so I decided to reset it. I have reset it before and the audio returns to the App. While I held the home and power button, a bar came up, that said something like: turn off/shutdown. I thought, "Aw, what the heck" and I slid it. The ipad turned off. I help down the buttons again to reset it, and there was no response.
It's been 4 days without my iPad. I can't stand on/off relationships;)
HELP ME PLEASE!Thank you for that. I actually don't think that the power has to do with it. It had around 87% battery life when "it" happened.
Also, Let me tell the Full and Complete story.
I have the game COD: Zombies on my iPad. Unless I go to the home screen of the game before closing the app, the next time I start up the app, it will freeze when I start to play. There is also no audio.
I was going to play COD: Zombies, and I started up the app. The game had no audio, and I knew I had to reset it. (Resetting the iPad has always fixed the audio and freeze problems before) I held the Power and Home buttons. A little bit afterward, the red slider bar came down. I said, "Aw, what tha heck." and I slid the bar. The iPad shut off. I then attempted to reset it(again). I held the reset buttons for the required time, in order for it to reset. I set it down and answered a text message(SMS). I grabbed the iPad, and the next thing I knew, it wouldn't respond to anything at all. Thank you all for your help. I have sent my iPad away to get fixed
When it comes back, it will hopefully be fixed, and I will post the solution up on this thread. Thank you all, again, for your time. -
Hi guru's what is forign key , and what is foriegn key table
hi guru's what is forign key , and what is foriegn key table
hi...
Foreign key is nothing but simply we can say,
A field in one table related to field in another table..see the below example...
consider, there are two tables like emp_personal and emp_official .
In emp_personal table , the fields are empid,empname, dob for example. In this table, empid is the primary key field.
In emp_official table , the fields are empid,dept,designat ion for example. In this also, empid is the Primary key or may not be a Primary key field.
now we relate these two tables using the foreign key relationship. Foreign key relationship is used to avoid the redundancy mainly...
now, emp_personal is the Check table( Bcos it holds the empid field, which has the primary key...)
emp_official table is the Foreign key table (Bcos it holds the empid field, which may or may not be a Primary key).
now, we foreign key relationship is given. (click the KEY Like icon in ABAP Dict - Database Table : Emp Official )
Tables are ready to enter the records...for example create some 5 records in the emp_personal table .
Table : emp_personal : Primary Key - empid
empid empname empdob Status
1 AAA 1.1.1990 Record saved successfully
2 BBB 2.2.1990 Record saved successfully
3 CCC 3.3.1990 Record saved successfully
4 DDD 4.4.1990 Record saved successfully
5 EEE 5.5.1990 Record saved successfully
records are saved in the table : emp_personal.
now, we are tryiing to create records in emp_official table.
Table : emp_official : Primary Key or not a Primary Key - empid
empid dept designation Status
1 Dept1 S.E Record saved successfully
2 Dept2 S.SE Record saved successfully
now, if u try to create the record which is not in the table emp_personal , which has the empid = 6. but it'll not allow us to create the record 6, bcos of the foreign key relationship between these two tables....
6 Dept6 P.M Record doesn't exist......
now, the foreign key relationship helps us to avoid the duplicate entry......
Foreign key relationship is possbile between the tables having atleast one same type of field. Also the Technical characteristics of the fields should be same . this is done in the value table.....
this is the concept of Foreign key...I think this explantion is enough to describe the Foreign key.... -
I read on an article : "
1. entity beans are slow (due to RMI calls).
2. EJBQL is a weak language; complex operations are not permitted.
3. it is difficult to map into an entity bean complex data.
You should utilize JDO instead of Entity Beans."
What do you think about these statemets?1. With local interfaces you can eliminate many RMI calls. Many
containers had optimized this anyway prior to EJB 2.0
2. EJBQL is new and will be enhanced rapidly as it is adopted. The
latest draft addresses these issues.
3. EJB relationships help in this area although they will also require
time to mature.
I feel JDO has its place. I especially like JDO where many rows are
required - it can be an excellent active/passive caching mechanism. But I would pursue EJB for bringing up the state of a business process/transaction. -
SSAS - Many to Many Relationship Grain Filters Out Data (Many to One)
I have a simple Many to One example: One Fact Table record has many Dimensional Items. The Example I'm using is One FactEvent record can have multiple EventMembers. These members are always unique so the relationship is really many to one (vs.
many to many). The grain of the Fact is one row for every event. Not all events have members, but I have stubbed those with -1
I tried using a Referenced dimensional relationship, but it threw my total counts off. I decided to make it more complicated by using a
Many to Many relationship, but I had issues once I started slicing the data.
The following are my two very simple tables:
FactEvents:
EventMemberID MemberKey EventMemberKey MemberName MemberGender
1 1 -1 None N
2 2 E2 Tyler M
3 3 E2 John M
4 4 E2 Sue F
5 5 E5 Tim M
6 6 E5 Jane F
7 7 E12 Ashley F
8 8 E12 Jessica F
9 9 E12 Kristy F
10 10 E17 Mike M
11 11 E17 Josh M
12 12 E18 Warren M
13 13 E18 Eric M
Here is the bridge Table:
EventID EventBK EventName EventMemberKey EventCount
1 E1 Hockey Game -1 1
2 E2 Soccer Game E2 1
3 E3 Baseball Game -1 1
4 E4 Concert -1 1
5 E5 Food Festival E5 1
6 E6 Movie Night -1 1
7 E7 Data Group Event -1 1
8 E8 City Tour -1 1
9 E9 Ski Trip -1 1
10 E10 Camping Trip -1 1
11 E11 Hiking Trip -1 1
12 E12 Community Cleanup E12 1
13 E13 Block Party -1 1
14 E14 Toastmasters -1 1
15 E15 Train Spotting -1 1
16 E16 Plane Spotting -1 1
17 E17 Fishing Trip E17 1
18 E18 Hunting Trip E18 1
19 E19 Street Hockey -1 1
20 E20 Bonspiel -1 1
You can see many events have no members and some events have multiple members. There is not separate members Dim, just the bridge table. I tried to build view that would work as bridge tables, but it started to feel like overkill.
Here is the SSAS structure:
Cube:
I tried creating a bridge Dim and Measure Group that can be used to join FactEvents with DimMemberEvent:
When I query the database tables directly, I can get the structure I'm looking for:
Gender Count
F 5
M 7
N 15
This represents that although there are 20 events, there were 5 Female and 7 Male participants and 15 events with No participants. When looking at the cube in excel I get:
Gender Count
F 3
M 4
N 15
Grand Total 20
The grand total is correct, however, it looks like it is grouping the events, so if there are multiple Female members at a particular event, they get rolled up. You can see this better if I pull in member name:
It includes all the names with count 1 ie. 5 Females with count 1, but the gender subtotal is 3 (as it is grouping the gender dimension)
The detail member counts are good, but the rolled up M and F counts are stripping out duplicates. Is there a way to model this in SSAS to preserve the detail member counts when the member dimension is used? Is a many to many the best solution?
This is all using SQL Server 2012 Multi-Dimensional Model. Thanks.Ok, for starters, if it's a one to many relationship, don't set it up as a many to many! Avoid many to many relationships and really anything other than "regular" relationships.
Second, the tables you pasted the data for aren't the tables you are describing them as, based on the dsv screenshot you included. If your post is confusing to the people who are wanting to help you, they will quickly move on.
It seems that you are not clear on how to construct a star schema. I will lay one out for you and hopefully this can help you on your journey.
fact_member_event:
event_id
member_id
member_event_count
dim_member:
member_id
member_key
member_name
member_gender
dim_event:
event_id
event_name
fact_event:
event_id
event_count
Or alternately, you could drop the fact_event fact table and have a calculated member that uses dimEvent.event.event.allmembers.count. It's a little bit of a weird situation that I would want to play with, but I would start with the above.
Also if you post back and show query results, you should make it clear what columns you are displaying. I see "count" in your query above, but nowhere in the star schema do I see "member count"
as a field.. I guess that's event count?
Hope this helps,
Ken -
SSA Portal & NetWeaver Relationship
Hi:
I'm trying to better understand the relationship between SSA Global's SSA Portal and Netweaver. I think that their portal is/was TopTier, meaning that their portal is really NetWeaver. Is that correct?
Bowstreet Portlet Factory has integration capability that extends to SAP at the BAPI level, so I'm trying to see if we can perhaps help SSA customers get at SAP data through our integration w/ IBM WebSphere.
Any insight would be helpful,
-SamAsked and answered. Deeper digging has revealed that SSA's Portal is starndardized in WebSphere portal.
-S -
Need help on Modifying Jsp Code to establish relationships in iStore.
I am currently working on iStore an internet enabled product
from Oracle.
In iStore one can establish relationships between products like
cross sell , complimentary, substitute, conflict etc. However at
the moment only one relationship works i.e: Related. This is
because this is a bug in iStore. Only the relationship Related
is defined in the jsp. We have been asked to modify the jsp
ibeCCtdItemDetail.jsp
Please find pasted below the jsp which only had the arrays for
related i.e: relitems and service i.e service have added the
array complimentary to establish such a relationship and pasted
the relitems code once again and changed relitems to
complimentary. I am stuck up on this since the past 2 weeks i
would appreciate if anybody could help.
<%@include file="jtfincl.jsp" %>
<!-- $Header: ibeCCtdItemDetail.jsp 115.24 2001/06/16 15:21:05
pkm ship $ -->
<%--
=================================================================
========
| Copyright (c)2000 Oracle Corporation, Redwood Shores, CA
| All rights reserved.
+================================================================
===========
|
| FILE
| ibeCCtdItemDetail.jsp - Item Detail display
|
| DESCRIPTION
| Displays Item Detail page. Item's description, long
description, large
| image, flexfields, available services, and related items
are displayed.
| The list price and best price (selling price) for each of
the Item's
| available units of measure is displayed. Displays Add to
Cart,
| Express Checkout, Configure buttons (if appropriate).
|
| PARAMETERS (SOURCE)
| party Id IN (RequestCtx) - user's party
id
| account Id IN (RequestCtx) - user's
account id
| currency code IN (RequestCtx) - currency code
| item IN (URL) - Item ID
| section IN (URL) - section ID of
section we are
| coming from
(optional)
| item IN (pageContext) - Item ID
| section IN (pageContext) - Section ID
| qty IN (pageContext) - Quantity
entered by user
| uom IN (pageContext) - UOM selected
by user
| errorMsg IN (pageContext) - error message
from buy
| routing page
| * pageContext attributes for "item" and "section" are used
when the URL
| does not contain valid values for "item" and "section"
(such as when an
| error occurred in the buy routing page and the request is
forwarded
| back to this page)
|
| oneclick_obj OUT (pageContext) - OneClick
object containing
| user's
Express Checkout
| preferences
| postingID OUT (pageContext) - Integer
posting Id, for
| iMarketing
integration
| itemIDs OUT (pageContext) - int[] itemIDs
on the page
| (for use by
postings)
| numRequested OUT (pageContext) - Integer
number of postings,
| for
iMarketing integration
| random OUT (pageContext) - Boolean
whether to randomize
| posting
retrieved, for
| iMarketing
integration
| type OUT (HTML form) - "single" (1
item)
| item OUT (HTML form) - Item ID
| refpage OUT (HTML form) -
"ibeCCtdItemDetail.jsp" plus any
| parameters
needed to return
| to this page
in case of error.
| uom OUT (HTML form) - UOM code
selected by user
| qty OUT (HTML form) - quantity
entered by user
| Add to Cart.x OUT (HTML form) - user clicks
Add to Cart
| 1-Click.x OUT (HTML form) - user clicks
Express Checkout
| Configure.x OUT (HTML form) - user clicks
Configure
|
| OBJECTS REFERENCED
| oracle.apps.ibe.catalog.Item
| oracle.apps.ibe.order.OneClick
|
| APIs REFERENCED
| Item.getItemID() - get Item ID
| Item.getDescription() - get item description
| Item.getLongDescription() - get item long description
| Item.isConfigurable() - whether item has
configuration UI set up
| Item.getFlexfields() - get Item flexfield
prompts and values
| Item.getRelatedItems() - get related items and
service items
| Item.getMediaFileName() - get media based on
display context
| OneClick.loadSettingFrDB() - load Express Checkout
settings for
| current user
|
| JSPs REFERENCED
| ibeCCtpPostingI.jsp - set iMarketing
parameters (include)
| ibeCCtpSetItem.jsp - retreive and set item
information (include)
| ibeCCtpItmDspRte.jsp - Item display routing
page (link)
| ibeCCtpBuyRoute.jsp - Buy routing
page (form POST)
| ibeCCtdSctPath.jsp - Path Traversed
Display (include)
| ibeCXpdShowTag.jsp - Express Checkout Tag
Area (include)
| ibapstng.jsp - iMarketing integration
page (include)
|
| ADDITIONAL NOTES
| iMarketing posting ID can be changed by editing file
ibeCCtpPostingI.jsp
|
| HISTORY
| 08/01/2000 auyu Created.
| 04/09/2001 auyu Added compile-time include for retrieving
item
| information
|
+================================================================
=======--%>
<%@page import="oracle.apps.ibe.order.*" %>
<%@page import="oracle.apps.ibe.catalog.*" %>
<%@page import="oracle.apps.ibe.store.*" %>
<%@page import="oracle.apps.jtf.displaymanager.*" %>
<%@page import="oracle.apps.jtf.base.Logger" %>
<%@page import="oracle.apps.jtf.minisites.*" %>
<%@include file="ibeCZzpHeader.jsp" %>
<%@page import="oracle.jdbc.driver.*" %>
<%@page import="java.sql.*" %>
<%-- declaration --%>
<%!
/* Retrieve parent section ids for a given item.
* int itemId - Item whose parent section ids will be retrieved
int getParentSectionId(int itemId)
int parentSectionId = -1;
Connection conn = null;
OraclePreparedStatement stmt = null;
ResultSet rs = null;
try {
BigDecimal minisiteId = RequestCtx.getMinisiteId();
conn = TransactionScope.getConnection();
StringBuffer sql = new StringBuffer(400);
sql.append("select jdsi.section_id ");
sql.append("from jtf_dsp_section_items jdsi, ");
sql.append("jtf_dsp_msite_sct_items jdmsi ");
sql.append("where jdsi.inventory_item_id = ? ");
sql.append("and jdsi.section_item_id =
jdmsi.section_item_id ");
sql.append("and jdmsi.mini_site_id = ? ");
sql.append("and nvl(jdsi.start_date_active, sysdate) <=
sysdate ");
sql.append("and nvl(jdsi.end_date_active, sysdate) >=
sysdate ");
sql.append("and nvl(jdmsi.start_date_active, sysdate) <=
sysdate ");
sql.append("and nvl(jdmsi.end_date_active, sysdate) >=
sysdate");
stmt = (OraclePreparedStatement)conn.prepareStatement
(sql.toString());
stmt.setInt(1, itemId);
stmt.setInt(2, minisiteId.intValue());
stmt.defineColumnType(1, Types.INTEGER);
rs = stmt.executeQuery();
if (rs.next())
parentSectionId = rs.getInt(1);
} catch (Exception e1) {
parentSectionId = -1;
IBEUtil.log("ibeCCtdItemDetail.jsp",
"Caught exception while retrieving parent
section id");
IBEUtil.log("ibeCCtdItemDetail.jsp", e1.getMessage());
} finally
try { if (rs != null) rs.close(); } catch (Exception e2) {}
try { if (stmt != null) stmt.close(); } catch (Exception
e2) {}
try {
if (conn != null) TransactionScope.releaseConnection
(conn);
} catch (Exception e2) {}
return parentSectionId;
%>
<%-- end declaration --%>
<%@include file="ibeCCtpSetItem.jsp"%>
<%
The compile-time inclusion of ibeCCtpSetItem.jsp will declare
and set
the following variables:
boolean bItemLoaded - whether section was
loaded
Item lItem - Item
boolean bItemCanBeOrdered - whether item can be
ordered
String[] uomCodes - Item's UOM Codes
Vector itemSellPriceDisplayVec - vector containing
item's selling
prices in formatted
strings
Vector itemListPriceDisplayVec - vector containing
item's list
prices in formatted
strings
int nPriceDefined - number of prices
defined for the item
Perform the following actions:
Set "itemIds" in the PageContext.REQUEST_SCOPE
Set "item" in PageContext.REQUEST_SCOPE
Set "section" in PageContext.REQUEST_SCOPE
MessageManagerInter lMsgMgr =
Architecture.getMessageManagerInstance();
pageContext.setAttribute("_pageTitle",
lMsgMgr.getMessage
("IBE_PRMT_CT_PRODUCT_DETAILS"),
PageContext.REQUEST_SCOPE);
%>
<%@ include file="ibeCCtpPostingI.jsp" %>
<%@ include file="ibeCZzdTop.jsp" %>
<%@ include file="ibeCZzdMenu.jsp" %>
<%
if (bItemLoaded)
OneClick lOneClickObj;
String xprTagArea = "", confirmXpr = "";
String lBuyRoutePage;
String lSectionPathPage = "";
int sectid = 0;
Item[] services = new Item[0];
Item[] relItems = new Item[0];
Item[] complimentary = new Item[0];
ItemFlexfield[] itemFlexfields = new ItemFlexfield[0];
String lItemImage = "", lItemAddtlInfoFile = "";
StringBuffer lRef = new StringBuffer("ibeCCtdItemDetail.jsp?
item=");
String qty = "", userSelUOM = "";
String errorMsg = "";
//--------------- load express checkout preferences ---------
if (IBEUtil.useFeature("IBE_USE_ONE_CLICK"))
xprTagArea = DisplayManager.getTemplate
("STORE_XPR_TAG_AREA").getFileName();
if (xprTagArea == null)
xprTagArea = "";
confirmXpr = lMsgMgr.getMessage("IBE_PRMT_EXPR_CONFIRM");
if (RequestCtx.userIsLoggedIn()) {
//initialize OneClick if user is logged in
BigDecimal partyId = RequestCtx.getPartyId();
BigDecimal accountId = RequestCtx.getAccountId();
lOneClickObj = new OneClick();
lOneClickObj.loadSettingsFrDB(partyId, accountId);
} // end user express checkout
//------------ set "section", lSectionPathPage --------------
String lSectionId = IBEUtil.nonNull(request.getParameter
("section"));
if (lSectionId.equals(""))
lSectionId =
IBEUtil.nonNull((String)pageContext.getAttribute
("section", PageContext.REQUEST_SCOPE));
if(IBEUtil.useFeature("IBE_USE_SECTION_PATH"))
lSectionPathPage = DisplayManager.getTemplate
("STORE_CTLG_SCT_PATH").getFileName();
try {
sectid = Integer.parseInt(lSectionId);
pageContext.setAttribute("section", String.valueOf
(sectid), PageContext.REQUEST_SCOPE);
} catch (NumberFormatException e) { }
if(lSectionPathPage == null)
lSectionPathPage = "";
lBuyRoutePage = DisplayManager.getTemplate
("STORE_CTLG_BUY_PROCESS_ROUTE").getFileName();
/* if error and forwarded back to this page, get values
selected by user */
qty = IBEUtil.nonNull((String)pageContext.getAttribute
("qty", PageContext.REQUEST_SCOPE));
if (qty.equals(""))
qty = "1";
userSelUOM = IBEUtil.nonNull((String)pageContext.getAttribute
("uom", PageContext.REQUEST_SCOPE));
errorMsg = IBEUtil.nonNull((String) pageContext.getAttribute
("errorMsg", PageContext.REQUEST_SCOPE));
//set ref for returning to this page in case of error
lRef.append(lItem.getItemID());
if (sectid > 0)
lRef.append("§ion=");
lRef.append(sectid);
/* Get Bin Open and Bin Close Images */
String binOpenImg = "", binCloseImg = "";
try {
Media binOpenMedia = DisplayManager.getMedia
("STORE_BIN_OPEN_IMAGE", true);
if (binOpenMedia != null)
binOpenImg = binOpenMedia.getFileName();
} catch (MediaNotFoundException mnfe) {}
if (binOpenImg == null)
binOpenImg = "";
try {
Media binCloseMedia = DisplayManager.getMedia
("STORE_BIN_CLOSE_IMAGE", true);
if (binCloseMedia != null)
binCloseImg = binCloseMedia.getFileName();
} catch (MediaNotFoundException mnfe) {}
if (binCloseImg == null)
binCloseImg = "";
/* Get images, additional info, flexfields, related items,
service items */
lItemImage = lItem.getMediaFileName
("STORE_PRODUCT_LARGE_IMAGE");
lItemAddtlInfoFile = lItem.getMediaFileName
("STORE_PRODUCT_ADDTL_INFO");
// check for defaulting
String defaultFromSection = "Y";
if ("Y".equals(defaultFromSection))
if (lItemImage == null || lItemAddtlInfoFile == null)
try {
int parentSectionId = getParentSectionId
(lItem.getItemID());
Section parentSection = Section.load(parentSectionId);
if (lItemImage == null)
lItemImage = parentSection.getMediaFileName
("STORE_SECTION_SMALL_IMAGE");
if (lItemAddtlInfoFile == null)
lItemAddtlInfoFile = parentSection.getMediaFileName
("STORE_SECTION_ADDTL_INFO");
} catch (Exception e) {}
itemFlexfields = lItem.getFlexfields();
try {
services = lItem.getRelatedItems("SERVICE");
} catch (ItemNotFoundException e) {}
try {
relItems = lItem.getRelatedItems("RELATED");
} catch (ItemNotFoundException e) {}
try {
complimentary = lItem.getRelatedItems("COMPLIMENTARY");
} catch (ItemNotFoundException e) {}
%>
<!-- body section -----------------------------------------------
------------->
<table border="0" width="100%">
<%
if (IBEUtil.showPosting()) {
%>
<!--------- iMarketing integration ----------------->
<tr><td colspan="4" align="center">
<% try {
%>
<jsp:include page="ibapstng.jsp" flush="true" />
<% } catch (Throwable e) {
IBEUtil.log("ibeCCtdItemDetail.jsp", "iMarketing error",
Logger.ERROR);
%>
</td></tr>
<% } //end iMarketing installed
%>
<tr><td> </td>
<%
if(!lSectionPathPage.equals(""))
%>
<td colspan="4" class="smallLink">
<jsp:include page="<%=lSectionPathPage%>" flush="true" />
</td>
<% }
%>
</tr>
<tr><td valign="top"> </td>
<!-- center column ------------------------------------------
------------->
<td valign="top" width="70%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="3">
<span class="pageTitle"><%=lItem.getDescription()%
</span></td></tr>
<tr>
<% if (lItemImage != null) {
%>
<td valign="TOP"><img src="<%=lItemImage%>"></td>
<td valign="TOP" colspan="2"><%
=lItem.getLongDescription()%></td>
<% } else {
%>
<td valign="TOP" colspan="3"><%
=lItem.getLongDescription()%></td>
<% }
%>
</tr>
<% if (lItemAddtlInfoFile != null) {
%>
<tr><td colspan="3"><br>
<jsp:include page="<%=lItemAddtlInfoFile%>"
flush="true" />
</td></tr>
<% }
%>
<tr><td colspan="3"><br></td></tr>
<%
for (int i=0; i < itemFlexfields.length; i++)
String prompt = itemFlexfields.getPrompt();
String value = itemFlexfields[i].getValue();
if (value != null && !value.equals(""))
%>
<tr>
<td align="LEFT" width="20%">
<span class="sectionHeader2"><%=prompt%
</span></td>
<td align="LEFT" colspan="2" width="80%"><%=value%
</td></tr>
<% }
if (services.length > 0)
%>
<tr><td colspan="3"><br></td></tr>
<tr><td align="RIGHT" class="sectionHeader1" width="20%">
<%=lMsgMgr.getMessage("IBE_PRMT_CT_WARRANTIES")%>
</td>
<td colspan="2" align="left" class="sectionHeaderBlack"
width="80%"><hr>
</td></tr>
<%
for(int i=0; i < services.length; i++)
%>
<tr>
<td valign="TOP" class="sectionHeaderBlack"
width="20%"> </td>
<td align="left" colspan="2" valign="TOP" width="80%">
<span class="sectionHeaderBlack">
<A HREF="<%= DisplayManager.getURL
(STORE_CTLG_ITM_ROUTE", "item=" + services[i.getItemID()) %>">
<%=services.getDescription()%></A>
</span>
<%=services[i].getLongDescription()%>
</td>
</tr>
<tr>
<td colspan="3" class="sectionHeaderBlack"> </td>
</tr>
<% } //end loop through services
} // end if services.length > 0
if (relItems.length > 0) {
%>
<tr><td colspan="3"><br></td></tr>
<tr>
<td align="RIGHT" class="sectionHeader1" width="20%">
<%=lMsgMgr.getMessage("IBE_PRMT_CT_REL_PRODUCTS")%>
</td>
<td align="left" colspan="2" class="sectionHeaderBlack"
width="80%"><hr></td>
</tr>
<%
for(int i=0; i < relItems.length; i++)
%>
<tr>
<td valign="TOP" class="sectionHeaderBlack"
width="20%"> </td>
<td colspan="2" align="left" valign="TOP"
width="80%">
<span class="sectionHeaderBlack">
<A HREF="<%= DisplayManager.getURL
("STORE_CTLG_ITM_ROUTE", "item=" + relItems[i].getItemID()) %>">
<%=relItems[i].getDescription()%></A>
</span>
<%=relItems[i].getLongDescription()%>
</td>
</tr>
<tr>
<td colspan="3" align="RIGHT"
class="sectionHeaderBlack"> </td>
</tr>
<% } // end loop through related items
} // end if relItems.length > 0
%>
</table>
</td>
<%if (complimentary.length > 0) {
%>
<tr><td colspan="3"><br></td></tr>
<tr>
<td align="RIGHT" class="sectionHeader1" width="20%">
<%=lMsgMgr.getMessage("IBE_PRMT_CT_REL_PRODUCTS")%>
</td>
<td align="left" colspan="2" class="sectionHeaderBlack"
width="80%"><hr></td>
</tr>
<%
for(int i=0; i < complimentary.length; i++)
%>
<tr>
<td valign="TOP" class="sectionHeaderBlack"
width="20%"> </td>
<td colspan="2" align="left" valign="TOP"
width="80%">
<span class="sectionHeaderBlack">
<A HREF="<%= DisplayManager.getURL
("STORE_CTLG_ITM_ROUTE", "item=" + complimentary[i].getItemID())
%>">
<%=complimentary[i].getDescription()%></A>
</span>
<%=complimentary[i].getLongDescription()%>
</td>
</tr>
<tr>
<td colspan="3" align="RIGHT"
class="sectionHeaderBlack"> </td>
</tr>
<% } // end loop through related items
} // end if complimentary.length > 0
%>
</table>
</td>
<!-- right column -------------------------------------------
------------->
<td valign="top" width="20%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<% if (! binOpenImg.equals("")) {
%>
<td><img src="<%=binOpenImg%>"></td>
<% }
%>
<td nowrap class="binHeaderCell" width="100%">
<%
if (!lItem.isConfigurable()) {
%>
<%=lMsgMgr.getMessage("IBE_PRMT_CT_2_WAYS_TO_SHOP")%>
<% } else {
%>
<%=lMsgMgr.getMessage("IBE_PRMT_CT_CONFIG_PRODUCT")%>
<% }
%>
</td>
<% if (! binCloseImg.equals("")) {
%>
<td><img src="<%=binCloseImg%>"></td>
<% }
%>
</tr>
</table>
</td></tr>
<tr><td class="binColumnHeaderCell">
<table border="0" cellspacing="1" width="100%">
<tr><td class="binContentCell" align="CENTER">
<% /////////////////////////////// error
messages //////////////////////////////
if (!errorMsg.equals("")) {
%>
<table><tr><td align="center" class="errorMessage">
<%=errorMsg%>
</td></tr></table>
<% }
/////////////////////////////// display
form //////////////////////////////////%>
<!--Javascript for express checkout confirmation-->
<script language="JavaScript">
function get_confirmation(form)
if (confirm("<%=confirmXpr%>" ) ) {
form.tmpx.name = '1-Click.x';
form.tmpy.name = '1-Click.y';
form.submit();
return true;
else
return false;
</script>
<form method=POST action="<%=lBuyRoutePage%>">
<input type=hidden name="type" value="single">
<input type=hidden name="item" value="<%=lItem.getItemID()%
"><input type=hidden name="refpage" value="<%=lRef.toString
()%>">
<INPUT TYPE="HIDDEN" NAME="tmpx" VALUE="100">
<INPUT TYPE="HIDDEN" NAME="tmpy" VALUE="100">
<%= RequestCtx.getSessionInfoAsHiddenParam() %>
<%
if ( ! lItem.isConfigurable())
{ // display prices
%>
<table>
<tr><td align ="left" nowrap>
<span class="sectionHeaderBlack">
<%=lMsgMgr.getMessage("IBE_PRMT_CT_LIST_PRICE_COLON")%>
</span>
</td>
<%
for (int i=0; i < uomCodes.length && i <
itemListPriceDisplayVec.size(); i++)
if (uomCodes[i] != null && uomCodes[i].equals
(lItem.getPrimaryUOMCode()))
if (itemListPriceDisplayVec.elementAt(i) != null &&
!itemListPriceDisplayVec.elementAt(i).equals(""))
%>
<td align="right">
<%=itemListPriceDisplayVec.elementAt(i)%
<%=lItem.getPrimaryUOM()%></td>
<% } else {
%>
<td> </td>
<% }
break;
} // end primary uomcode
} // end loop through uoms and list price
%>
</tr>
<tr><td align="left" nowrap>
<span class="sectionHeaderBlack">
<%=lMsgMgr.getMessage("IBE_PRMT_CT_YOUR_PRICE_COLON")%>
</span>
</td>
<td>
<% // display selling price for each uom
if (nPriceDefined > 1) {
//prices defined for multiple UOMs for the item
%>
<select name = "uom">
<%
//--------- loop through uoms and prices ------------------
for (int i=0; i < itemSellPriceDisplayVec.size() && i <
uomCodes.length; i++)
if (itemSellPriceDisplayVec.elementAt(i) != null &&
!itemSellPriceDisplayVec.elementAt(i).equals(""))
boolean bSelectUom = false;
if (uomCodes[i] != null && uomCodes[i].equals
(lItem.getPrimaryUOMCode()))
bSelectUom = true;
if (bSelectUom)
%>
<option value="<%=uomCodes[i]%>" SELECTED>
<% } else {
%>
<option value="<%=uomCodes[i]%>">
<% }
%>
<%=itemSellPriceDisplayVec.elementAt(i)%
<%=IBEUtil.nonNull(lItem.getUOM(uomCodes))%
<%
} // end current uom has price
} //end loop i through uoms and prices
%>
</select>
<% //end more than 1 UOM with price defined for the item
} else {
if (nPriceDefined == 0) { //multiple UOMs, none with
price defined
%>
<input type=hidden name="uom" value="<%
=lItem.getPrimaryUOMCode()%>">
<% } else { // 1 UOM with price defined
String formatSellPrice = "";
String uomWithPrice = "";
for (int i=0; i < uomCodes.length && i <
itemSellPriceDisplayVec.size(); i++)
if (itemSellPriceDisplayVec.elementAt(i) != null &&
!itemSellPriceDisplayVec.elementAt(i).equals(""))
formatSellPrice = (String)
itemSellPriceDisplayVec.elementAt(i);
uomWithPrice = uomCodes;
break;
%>
<input type=hidden name="uom" value="<%=uomWithPrice%>">
<%=formatSellPrice%> <%=IBEUtil.nonNull
(lItem.getUOM(uomWithPrice))%>
<% } //end 1 UOM with price defined
} // end display selling prices
%>
</td></tr></table> <%-- end table for the price --%>
<% } // end non-configurable item
if (bItemCanBeOrdered)
// show quantity and buttons only if item can be ordered
%>
<p><%=lMsgMgr.getMessage("IBE_PRMT_CT_QUANTITY")%>
<input type="TEXT" name="qty" size="3" maxlength="20"
value="<%=qty%>">
</p>
<% if (lItem.isConfigurable()) {
%>
<p>
<input type=hidden name="uom" value="<%
=lItem.getPrimaryUOMCode()%>">
<input type=submit name="Configure.x"
value="<%=lMsgMgr.getMessage("IBE_PRMT_CT_CONFIGURE")%
"></p>
<% } else {
%>
<p>
<input type=submit name="Add to Cart.x"
value="<%=lMsgMgr.getMessage
("IBE_PRMT_ADD_TO_CART_PRMT_G")%>">
</p>
<%
if (!xprTagArea.equals(""))
%>
<p><%=lMsgMgr.getMessage("IBE_PRMT_CT_OR")%></p>
<p><jsp:include page="<%=xprTagArea%>"
flush="true" /></p>
<% }
} // end item can be ordered
%>
<br>
</form>
</td></tr></table> <%-- end table for bin content and
header --%>
</td></tr></table>
<p> </p>
<p> </p>
</td></tr></table> <%-- end page table --%>
<% } // end item loaded
%>
<%@ include file="ibeCZzdBottom.jsp" %>
<!-- ibeCCtdItemDetail.jsp end -->my bad...didnt think anyone was gonna come in ...lol......nothing populates in the second drop down...I was thinking of making a separate page and just pass the parameter in, bu i never used jsp include.....any suggestions on how to get this thing working??
-
Many to Many Relationships in ejb.....Urgent Pls help
hi all,
Am working in EJB.Now we are coding for many to many relationship.
Company and Salary register
One Company can have many salary register and More than one company can have one salary register
Companyand Salary register are the two tables having details of it.And the intermediate table having pk of company and salary register is Company_salary_register table,I want to add the value in this table having seperate interface.
How to model it? I have given the add method of this company_salary_register table in company bean.I am getting the value of this one as collection.But it is asking me to add the values as the instance of LocalSalary(interfaceand entitybean).If i type cast it as Local Salary Class castexception occurs
Please help me.Even Material of Modelling Many to Many relationship in EJB is enough.
thanx in advance,THaaaaaanks alottt for the quick reply...
I used the first way to insert the document and i was successful...
but thing is that..
when i do
SQL>desc message_type
message_type is NOT FINAL
Name Null? Type
SYS_XDBPD$ XDB.XDB$RAW_LIST_T
to VARCHAR2(4000 CHAR)
from VARCHAR2(4000 CHAR)
subject VARCHAR2(4000 CHAR)
body VARCHAR2(4000 CHAR)
i can see the structure...
and when i
select count(*) from messages
it says count is 1.
so how to know where the data is ..like below in the data :
'to' it has '[email protected]'
and for 'from' it has '[email protected]'..and so on..
<message>
<to>[email protected]</to>
<from>[email protected]</from>
<subject>Question</subject>
<body>Does this demo work?</body>
</message>
so what is the command to get that data...
because when i do
select * from message_type..it says
select * from message_type
ERROR at line 1:
ORA-04044: procedure, function, package, or type is not allowed here
Plss help me outt.......this will be my final step...
Thankssssssssssssssss -
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
Maybe you are looking for
-
Bluetooth connection to car hands free
i have a motorola car hands free kit installed with my old 6230i the connection was automatic but i now have a 5500 sport this needs to be re-installed every time i get into my van does anyone know why or is the sport a H.O.S
-
Adobe Photoshop 12 and PSCS CS5 relation
Anyone knew about relationship between Adobe Photoshop 12.0 and Photoshop CSx? It seems to me Photoshop 12.0 is corresponding to Photoshop CS5, doesn't it?
-
I have a new 24 inch aluminum iMac. I also have a year old 23 inch Apple Cinema display that I was thinking of adding as a second display. If I did, would that mirror my existing display, or would it allow me to extend the desktop that I already have
-
Print issue!!!urgent!!!!
Hi, I have a problem when i print report.I called report from Form, I use the code as below: lv_rep := run_report_object(p_repid,plid); lv_rep_status := report_object_status(lv_rep); if lv_rep_status = 'FINISHED' then lv_job_id := substr(lv_rep,
-
LSMW - Upload purchase contracts (ME31K) with BAPI
I'm trying to upload some contracts from the legacy to SAP ECC 6.0 using LSMW. I've already worked with Direct Input and Batch Input record with LSMW but never with BAPI. I found business object BUS2014 / Message Type - PURCONTRACT_CREATE but I don't