• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1922
  • Last Modified:

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
0
Bogeyduffer
Asked:
Bogeyduffer
  • 3
  • 3
  • 2
2 Solutions
 
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now