cancel
Showing results for 
Search instead for 
Did you mean: 

Problem build a Portal Application : package *** does not exist

Former Member
0 Kudos

Hello,

we have a problem with Netweaver Development Studio 7.3 building an Potal Application. We checked out the  SAP Portal - Ajax Framework  from the svn. We use a local Development Infrastructure. We added the missing jar Files to the java build path via. "Add external libary" but everytime we try to build the project we getting this:

[javac] Compiling 1 source file to C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\t\70E4EA59739031D87940594D2F9C54DA\classes
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:3: package javax.servlet.http does not exist
[javac] ERROR: import javax.servlet.http.HttpSession;
[javac] ERROR:                      ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:5: package com.sapconsulting.portal.utils.html does not exist
[javac] ERROR: import com.sapconsulting.portal.utils.html.EnhancedPortalResponse;
[javac] ERROR:                                       ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:6: package com.sapconsulting.portal.utils.html.elements does not exist
[javac] ERROR: import com.sapconsulting.portal.utils.html.elements.HtmlFactory;
[javac] ERROR:                                                ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:7: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.*;
[javac] ERROR: ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:8: package com.sapportals.portal.prt.pom does not exist
[javac] ERROR: import com.sapportals.portal.prt.pom.IEvent;
[javac] ERROR:                                 ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:9: package com.sapportals.portal.prt.resource does not exist
[javac] ERROR: import com.sapportals.portal.prt.resource.IResource;
[javac] ERROR:                                      ^
[javac] ERROR: C:\Users\Dschenke\Desktop\eclipse\workspace.jdi\LocalDevelopment\tds_ajax_framework\itc.tds.de\ajax_mobile_framework\_comp\src.core\de\itc\tds\mobile\portal\FrameworkPageComponent.java:11: cannot find symbol
[javac] ERROR: symbol: class AbstractPortalComponent

The six Errors corrospond exactly to the six imports in the java File:

import javax.servlet.http.HttpSession;

import com.sapconsulting.portal.utils.html.EnhancedPortalResponse;

import com.sapconsulting.portal.utils.html.elements.HtmlFactory;

import com.sapportals.portal.prt.component.*;

import com.sapportals.portal.prt.pom.IEvent;

import com.sapportals.portal.prt.resource.IResource;

public class FrameworkPageComponent extends AbstractPortalComponent {..

We have not any Idea how to go on. We googeld 2 days on the problem and didn't found a solution.  In the Internet there is a lot stuff talking about adding external jar files as a development component, but as we are using Netweaver 7.3 I think this is outdated. Various Post and Tutorial as the Docu say that adding the jar file to the classpath is the correct way but it didn't work for us. If I comment the portalapp.xml out, it didn't affet the error log of the build process, but here is the portalapp.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<application alias="affs">

  <application-config>

    <property name="Vendor" value="sap.com"/>

    <property name="SecurityArea" value="NetWeaver.Portal"/>

    <property name="PrivateSharingReference" value="com.sap.portal.themes.lafservice, com.sap.portal.pagebuilder"/>

  </application-config>

  <components>

    <component name="layout">

      <component-config>

        <property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>

        <property name="ResourceBundleName" value="pagebuilder_nls"/>

        <property name="SafetyLevel" value="no_safety"/>

      </component-config>

      <component-profile>

        <property name="ComponentType" value="com.sapportals.portal.layout"/>

        <property name="com.sap.portal.pcm.Category" value="platform">

          <property name="inheritance" value="final"/>

        </property>

        <property name="LayoutTagLibrary" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

        <property name="com.sap.portal.reserved.layout.TemplateFile" value="FrameworkPageLayout.jsp"/>

        <property name="com.sap.portal.reserved.layout.Cont1" value="container">

          <property name="title" value="Content"/>

          <property name="orientation" value="vertical"/>

        </property>

        <property name="com.sap.portal.page.builder.optimization.level" value="2"/>

        <property name="AuthScheme" value="anonymous"/>

        <property name="Title" value="AFP Layout"/>

        <property name="EPCFLevel" value="1"/>

        <property name="SupportedUserAgents" value="(*,*,*)">

          <property name="validvalues" value="7/(*,*,*)"/>

        </property>

      </component-profile>

    </component>

    <component name="iview">

      <component-config>

        <property name="ClassName" value="de.itc.tds.mobile.portal.FrameworkPageComponent"/>

        <property name="SafetyLevel" value="no_safety"/>

      </component-config>

      <component-profile>

        <property name="com.sap.portal.iview.ShowTray" value="false"/>

        <property name="AuthScheme" value="anonymous"/>

        <property name="EPCFLevel" value="1"/>

        <property name="SupportedUserAgents" value="(*,*,*)">

          <property name="validvalues" value="7/(*,*,*)"/>

        </property>

      </component-profile>

    </component>

  </components>

  <services/>

</application>

So if u have any idea let us know.

Greetings David

Accepted Solutions (1)

Accepted Solutions (1)

SandipAgarwalla
Active Contributor
0 Kudos

Its because of the Jar reference is missing at build time..when ever you deal with DCs, adding external libs will not work. You need to add the JARs as DC reference.

SAP wuld have given standard DCs which contains these JARs.. Else you can put these JAR in a DC and create a public part..then add this public part to other DC reference.

See my blog on how to reference external libs in DCs.

http://scn.sap.com/community/netweaver-portal/blog/2012/05/25/how-to-add-reference-to-sap-provided-j...


Former Member
0 Kudos

Hey Sandip,

thanks to your answer to my question.

I already tried this. The proplem ist, that the required jar's are not included in the DC'S that comes with the Netweaver Development Studio(NWDS). We use a local Development Infrastructur that generates the available DC's as it is created from scratch, so the question is, how to add a jar that is not included in the SAP DC's, as a DC. That all reminds me pretty much to the plugin concept in Eclipse. I don't know how SAP handels all the dependencys between the different java components, but I think the DC concept is exactly therefor. To hide all the dependency complexity from the developer.

I found several turorials for older versions of the NWDS to add an jar File as a DC, but none for Version 7.3.

Do I oversee somethink? I'm very thankful for further hints.

Greetings

David

Former Member
0 Kudos

Hey Sandip,

thanks to your answer to my question.

I already tried this. The proplem ist, that the required jar's are not included in the DC'S that comes with the Netweaver Development Studio(NWDS). We use a local Development Infrastructur that generates the available DC's as it is created from scratch, so the question is, how to add a jar that is not included in the SAP DC's, as a DC. That all reminds me pretty much to the plugin concept in Eclipse. I don't know how SAP handels all the dependencys between the different java components, but I think the DC concept is exactly therefor. To hide all the dependency complexity from the developer.

I found several turorials for older versions of the NWDS to add an jar File as a DC, but none for Version 7.3.

Do I oversee somethink? I'm very thankful for further hints.

Greetings

David

Former Member
0 Kudos

Hey Sandip,

thanks to your answer to my question.

I already tried this. The proplem ist, that the required jar's are not included in the DC'S that comes with the Netweaver Development Studio(NWDS). We use a local Development Infrastructur that generates the available DC's as it is created from scratch, so the question is, how to add a jar that is not included in the SAP DC's, as a DC. That all reminds me pretty much to the plugin concept in Eclipse. I don't know how SAP handels all the dependencys between the different java components, but I think the DC concept is exactly therefor. To hide all the dependency complexity from the developer.

I found several turorials for older versions of the NWDS to add an jar File as a DC, but none for Version 7.3.

Do I oversee somethink? I'm very thankful for further hints.

Greetings

David

Former Member
0 Kudos

Hey Sandip,

thanks to your answer to my question.

I already tried this. The proplem ist, that the required jar's are not included in the DC'S that comes with the Netweaver Development Studio(NWDS). We use a local Development Infrastructur that generates the available DC's as it is created from scratch, so the question is, how to add a jar that is not included in the SAP DC's, as a DC. That all reminds me pretty much to the plugin concept in Eclipse. I don't know how SAP handels all the dependencys between the different java components, but I think the DC concept is exactly therefor. To hide all the dependency complexity from the developer.

I found several turorials for older versions of the NWDS to add an jar File as a DC, but none for Version 7.3.

Do I oversee somethink? I'm very thankful for further hints.

Greetings

David

SandipAgarwalla
Active Contributor
0 Kudos

David

These classes/interfaces look like provided by SAP - Then it should be given by SAP

Have you looked into the other SCA/DCs which are part of LocalDEv Infra

Go to Dev Infra perpective, click on LocalDevelopment..>component browser -> You should see a structure like this

Most of your required JAR would be available in one of the DCs under the tree..My guess you will find all of them under the SCAs

1) ENGINEFACADE

2) ENGINEAPI

3) EP_BASIS

4) EP-RUNTIME/EP-BUILDT

You just need to do some search..

For example - import javax.servlet.http.HttpSession; 

is available under the SCA - ENGFACDE..And the required DC is engine.jee5.facade

Make sure to select the build/design/run time dependecy..it will work

Former Member
0 Kudos

Hey Sandip,

thanks very much for the fast reply. I'm in a train now with slow bandswitch, but I'm trying right now. I think I found it. Thanks a lot.

Greetings

David

SandipAgarwalla
Active Contributor
0 Kudos

cool, let me know how it goes..

Former Member
0 Kudos

Hey,

so is there any way to figure out which DC to import corrosponding to the jar package name?

Is the a search site or an index that says if you need ex:

com.sapconsulting.portal.utils.html.EnhancedPortalResponse

use DC ...

Greetings David

Former Member
0 Kudos

Hey,

no way. We are stuck, still getting the same error. importing the specific jars didn't work. There is a jar that comes along with the sap portal ajax framework named com.customer.afp.fromscratch.htmlutils.jar that contains the classes used in the com.sapconsulting.* imports which still cause the error. How can I add this as a "public part" as a DC or whatever? Just for getting the build running.

Greetings David

SandipAgarwalla
Active Contributor
0 Kudos

The JAr you mentioned looks like developed by "some other" folks at SAP..

So in order to refer this, you need create a External Library DC project, put the jar file com.customer.afp.fromscratch.htmlutils.jar  in it, and make a public part out of it..

Then reference this public part in your custom project

See this link on how to create external lib DC and Public part

http://scn.sap.com/people/marion.schlotte/blog/2007/12/19/simplify-dc-structures-for-external-librar...

Hope this helps.

Sandip

Former Member
0 Kudos

Thank you for this hint and for your help. But we are using NWDS 7.3 there is no such a perspective. It is similar but not the same. Seems like we have to go deeper into the NWDS to get an understanding of the underlying processes.

Still thankful for usefull information.

Greetings

David

SandipAgarwalla
Active Contributor
0 Kudos

David

Follow the steps in this guide on how to create an external DC project...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/006a6229-b1ed-2e10-0c8c-cc5673cf2...

Hope this solves the issues.

Sandip

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

Did you get this resolved? I have the same problem with NWDS 7.3 SP7. I've got an external DC with my JSF libs. Added that to the web project. Classes resolve fine but when I build, it fails. At a loss...

Regards,

Raj

Former Member
0 Kudos

You have to create an own software component and add it as a dependency to your project. The libs are linked in via this software component. go to the plugin or extension point screen and point to the path where they could be found. Than build the SC that contains the lib. Now your project should run.

I'm having trouble with my JVM right now. When it is running I'll post a screenshot how to do it. If you already solved it let me know.

Former Member
0 Kudos

David,


I'm having this same problem too.  Did you follow Sandip Agarwalla advice and create and external DC Project and perform it that way? You listed that as a correct answer.


It also looks like you are creating a Software Component though, which is different than what Sandip recommended.


Would love to compare notes. My email is <firstname>.<lastname>@gmail.com .. It sounds like I am going through the same process as you at the moment.


also I just realized... are you confusing a Software Component with Development Component? (SC vs DC?)


-Tim Hanbey



Former Member
0 Kudos

Do it this way. I hope the screenshot says it all...

the trick is to bind the jar via the "public part". I've no idea what this is but reminds me to plugins in eclipse.

Former Member
0 Kudos

Hi David, i'm facing the same issue. What is the sharing reference did you use on this DC?

Thanks in advance.

Best regards

Former Member
0 Kudos

Hey Marcelo,

I'm sorry this is way to long ago. after that task I never worked again with NWDS. I hope the screenshot I posted provides some usefull info. Really sorry that I cannot help you out.

David

Former Member
0 Kudos

No problem David, thanks anyway.

Best Regards!

Marcelo