cancel
Showing results for 
Search instead for 
Did you mean: 

JDO on the DC development

Former Member
0 Kudos

Dear All,

I followed instructions of a persistence tutorial that I found from the help.sap.com ("Getting Started with Relational Persistence) and wrote down two projects. The tutorial uses individual projects as units for projects implementation, but I choose to develop projects as DC components.

The whole implementation seems fine until I tried to do the DC build operation. Following is the error messages I got during the DC build:

[javac] Compiling 4 source files to C:\Documents and Settings\Allen\dtr\1\t\070795FD169D26DCB9019563094877AC\classes

[javac] C:\Documents and Settings\Allen\dtr\1\DCs\sap.com\home\jdowebm\_comp\source\temp\persistence\gettingstarted\jdo\BusinessLogic.java:12: package javax.jdo does not exist

[javac] import javax.jdo.*;

[javac] ^

[javac] C:\Documents and Settings\Allen\dtr\1\DCs\sap.com\home\jdowebm\_comp\source\temp\persistence\gettingstarted\jdo\BusinessLogic.java:22: cannot resolve symbol

[javac] symbol : class PersistenceManagerFactory

[javac] location: class temp.persistence.gettingstarted.jdo.BusinessLogic

[javac] private PersistenceManagerFactory pmf; // Persistence Manager Factory (PMF)

[javac] ^

[javac] C:\Documents and Settings\Allen\dtr\1\DCs\sap.com\home\jdowebm\_comp\source\temp\persistence\gettingstarted\jdo\BusinessLogic.java:36: cannot resolve symbol

[javac] symbol : class JDOException

[javac] location:

Can anyone help, please? How can I make JDO package working on a DC component? Seems like the JDO library cannot be found.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Add com.sap.jdo from SAP_JTECHS as a Used DC with Build Time dependency.

Nagarajan's reply is only applicable if the required jars are not in one of the base SC's delivered with NWDI/NWDS.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If u r using DC for ur development then the JDO library that u added in the build path will be removed at build time.

For adding ur libraries u should be using an external library component. Expose this library file as public part. This is only a buildable component.

For deploying this library in the server u should create a new J2EE library component and in this used DC add the exposed public part. Deploy this application.

Finally in the JDO component in used DC add the External library component and in the references of ur project give the j2ee library component.

- Hope it helps,

Nagarajan.

Former Member
0 Kudos

Hi~

Thanks for your reply.

I still have some questions.

You mentioned about "create a new J2EE library component". Under the DC type, there is two options: one is External Libaray,the other is J2EE Server Component-->library. Which one shoule I choose?

Another suggestion you gave is "used DC add the exposed public part". What I wanna do is to add *.jar in the eclipse's plugin folder; however, when I chose to add a Used DC, I can't find them.

What more can I do about this?

tks.

Former Member
0 Kudos

Hi,

For ur questions this blog is the best to describe....

<a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro External Jars in DCs</a>

- Nagarajan.

sid-desh
Advisor
Advisor
0 Kudos

Hi Allen,

As Pascal has mentioned you should add com.sap.jdo from SAP_JTECHS as Used DC.

External Library DC is created when there is a library (jar) that you want to use and it is not part of the three base SCA's or some other SCA which you have added as dependency in SLD and checked-in to the track.

You have to wrap the external library dc in J2EE Server Library when the library is delievered by a third party and is not deployed on the server.

SAP provides a JDO implementation which you can use directly. In case you want to use JDO implementation from some other vendor then you will have to create an External library DC and wrap it in a J2EE Library DC.

Hope this helps.

Regards

Sidharth