Jdeveloper connection to Iseries AS400

I'm trying to us Jdeveloper ADF in conjunction with an iSeries. I can connect without a problem, I can access and update SQL Tables without a problem. However, I cannot access and update system files that were created using DDS. When I try to create the entity objects from the database, it will create views but no  Entity Objects. Can anyone help?
DatabaseConnection.docx
BogeydufferAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
1) Make sure you are using the latest version of the AS/400 JDBC driver.  As of today, the latest version is JTopen 7.3, released 2/23/2010:

http://jt400.sourceforge.net/

2) Verify that the profile that you are using in your connection has authority to all of the objects in question (maybe the DDS-defined objects are owned and secured differently than the SQL objects?).

3) What OS version are you running on the AS/400?  Verify that you are running the latest Database Group PTF and CUME PTF for your OS version.

4) Make sure you are running the latest jDeveloper build:

http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html

If none of these suggestions resolve the issue, I suggest that you open a support ticket with Oracle.

This problem sounds familiar.  If I think of something else I'll post again.

- Gary Patterson
0
BogeydufferAuthor Commented:
Thanks for the quick response.

I'm pretty new to jDeveloper and I'm trying to figure out if it is a good tool for working with the iSeries. So, I'm not sure if I get things in the right place. Initially I could not connect at all but found a link that indicated where I needed to put the jt400.jar file. That worked for the SQL tables but not the system files. There already existed a version of jtopen ( jtopen_7_2.zip) but i left it as it was. I'm just not sure if it is in the right place for the tool and the local deployment for testing.

As for your suggestions:

1.      I downloaded the latest version of JTOpen.jar (jtopen_7_3.zip) and placed it in “C:\Documents and Settings\IBM User\Application Data\JDeveloper\system11.1.1.4.37.59.23\DefaultDomain\lib”.
I then unzipped the file and place the objects (i.e. jt400.jar) into the same folder. I’m not sure if this was required or if I could have just left it there as a zip file.
This is the error I receive when I try to create enity objects from the tables:
Business Components:
Save error -Soabrep
Entity creation failed for the following Database Object.  No primary key attributes and does not support ROWID.  Use the Entity Wizard to create the Entity Object.
SOGEN.SOABREP    

2.      I’m using my own ID and password to access the files as I would on the iSeries when I have full access to the files.
3.      I’m running V7R1 on the iseries.  I believe these are the most recent.
a.      SF99710               CUMULATIVE PTF PACKAGE C0229710
b.      SF99709               GROUP HIPER                    
c.      SF99701               DB2 FOR IBM I        

4.      I think I’m running the latest build: Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923 Studio Edition Version 11.1.1.4.0
0
tliottaCommented:
By the looks of it, the problem is described with this:

No primary key attributes and does not support ROWID.

It seems that "Entity Objects" are only meaningful for database objects that support ROWID or have a primary key.

I'm not aware of any way to define a ROWID column with DDS. AFAIK, only SQL can create such a column.

DDS can create "primary keys" though. It's just that that wasn't done for the physical files that you're trying to access. But you can assign a primary key by running a ADDPFCST TYPE(*PRIKEY) command against each of those PFs. Of course, you'll need to choose valid columns for each primary key. If LFs already exist that define useful "primary key" columns, you might be able simply to re-specify the same columns for the PF. I haven't actually tested what the result would be, i.e., whether or not it could result in a shared index or create a totally separate one.

Tom
0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

BogeydufferAuthor Commented:
Hi, Tom

Thanks for the response.

I previously tried adding a primary key to the file. unfortunately that did not work either.  When I do that, I get an object created and views. But, the attributes are not brought done. I end up with empty objects.

Attached is the compile log.
 Compile-Log.docx

Any other ideas would be appreciated.

Thanks

Bob
0
Gary PattersonVP Technology / Senior Consultant Commented:
Tom's right.  Based on your last post, the problem isn't on the AS/400 side.  The problem is that ADF can't import TABLE objects that don't have a ROWID or primary key, and apparently the DDS-described physical files you are missing don't have either of these characteristics.  You may or may not be able to define a primary key column on the AS/400.  You can recreate the tables with the needed primary key or ROWIN column on the AS/400, or yo can just deal with it in ADF.

Oracle tells you the solution right in the error message:

Use the Entity Wizard to create the Entity Object.  SOGEN.SOABREP

Use the Jbuilder Entity Wizard to help you create the entity.  You can add a ROWID column on the ADF side and leave your AS/400 DDS-described tables untouched.

http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcentities.htm#ADFFD162
http://forums.oracle.com/forums/thread.jspa?threadID=147770

- Gary Patterson
0
tliottaCommented:
Gary's comment about using the Entity Wizard is probably the best direction. Even if you only cancel out of it, it should help explain some of the overall issue.

Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary PattersonVP Technology / Senior Consultant Commented:
This is a common, documented issue that happens with ADF.  I said earlier that the problem sounded familiar.  When I saw the Oracle ADF docs, I remembered it.  I ran into this issue once before.  

From the first link above:

4.2.3.2 What Happens When a Table Has No Primary Key

If a table has no primary key constraint, then JDeveloper cannot infer the primary key for the entity object. Since every entity object must have at least one attribute marked as a primary key, the wizard will create an attribute named RowID and use the database ROWID value as the primary key for the entity. If appropriate, you can edit the entity object later to mark a different attribute as a primary key and remove the RowID attribute. When you use the Create Entity Object wizard and you have not set any other attribute as primary key, you will be prompted to use RowID as the primary key.


Assuming you're using the "Business Components from Tables" wizard to generate the majority of your entities (hopefully!), you then create the remaining entities individually.  See the following section from the Oracle Documentation link above for instructions:

4.2.2 How to Create Single Entity Objects Using the Create Entity Wizard

- Gary Patterson
0
BogeydufferAuthor Commented:
The responses were very helpful, timely, and professional. Greatly appreciated.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.