I cant import com.sapportals.htmlb.*
Hi!
I just installed netweaver and started out by making a new portal application project. After that I made a new portal application object but when I compile my java-file I get errors regarding the following imports.
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.*;
import com.sapportals.htmlb.event.*;
import com.sapportals.htmlb.page.*;
import com.sapportals.portal.htmlb.page.*;
import com.sapportals.portal.prt.component.*;
Error: The import com.sapportals.htmlb cannot be resolved.
I know that the error might be about me missing af reference to some jar-file which contains the packages. Am I wrong?
Regards Anders
Hi Anders,
Have you downloaded the PDK plugin for EP6? If so, assign yourself the Java Developer role, and download the required jar files. Login to the portal Java Development>Development>Downloads. Download and unpack the Portal Archive Wizards into your eclipse\plugins directory. Then create classpath references to the required jar files in your par file .classpath file. For example, htmlb.jar
<classpathentry kind="lib" path="C:/portal/eclipse/plugins/com.sap.developmentTools.libs_1.2.0/htmlb.jar"/>
Hope this helps,
Marty
PS.
If you dont have the pdk plugin, here is a workaround (assuming you have a portal installed). You can copy the jar files to your local directory in order to successfully compile a par project. For example the following three jar files to your eclipse\plugins directory on your local machine. Then in your classpath, create entries for the ones you require (in your case, htmlb.jar). So something like:
<classpathentry kind="lib" path="C:/portal/eclipse/plugins/com.sap.developmentTools.libs_1.2.0/htmlb.jar"/>
Under your portal, C:\usr\sap\<instance>\j2ee\j2ee_00\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.htmlb\lib contains an htmlb.jar and an htmlbbridge.jar
C:\usr\sap\<instance>\j2ee\j2ee_00\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\portal\system\lib contains a prtcore.jar file
Similar Messages
-
The import com.sapportals.htmlb cannot be resolved
Hi,
I am working on EP7 and trying to create a sample application for DynPage Portal Component.
After I create a new DynPage in NWDS, i get the following error:
The import com.sapportals.htmlb cannot be resolved
I found a link similar to this problem but not clear abt how to solve it:
Re: I cant import com.sapportals.htmlb.*
How do I resolve this error? Are there some set of files that need to be import before I can develop this application.
Thanks in advance,
CDHi CD,
1. Regarding the availability of the KIT, checkout the link:
Link: [Role for a Java developer;
2. Regarding the Path for the mentioned libraries:
**Program FilesSAPJDTeclipseplugins
**must be in your C:
If you do not find the specified jar file there, you can use the JAR File Locator. Checkout the link:
Link: [Re: EP7 PDK;
Regards,
Chander Kararia
#If problem solved, close the thread after rewarding points. -
Com.sapportals.htmlb.FileUpload;
Hi Experts,
I am building this file upload utility.
Following is my code"
package com.xyz.ws.di;
import java.io.Serializable;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import com.sapportals.htmlb.event.Event;
import com.sapportals.htmlb.rendering.IPageContext;
import com.sapportals.htmlb.rendering.PageContextFactory;
import com.sapportals.htmlb.FileUpload;
import com.sapportals.portal.prt.component.*;
import com.sapportals.wcm.repository.AccessDeniedException;
import com.sapportals.wcm.repository.Content;
import com.sapportals.wcm.repository.ICollection;
import com.sapportals.wcm.repository.IResource;
import com.sapportals.wcm.repository.NotSupportedException;
import com.sapportals.wcm.repository.ResourceContext;
import com.sapportals.wcm.repository.ResourceException;
import com.sapportals.wcm.repository.ResourceFactory;
import com.sapportals.wcm.util.uri.RID;
import com.sapportals.portal.security.usermanagement.IUser;
public class FileUpload implements Serializable{
protected IPortalComponentRequest request;
protected IPortalComponentResponse response;
protected IPortalComponentSession session;
protected IPortalComponentContext context;
protected IPortalComponentProfile profile;
protected String userId;
protected String fileName;
private DAO DAO = null;
private final static int INITIAL_STATE = 0;
private final static int ERROR_STATE = 1;
private int state = INITIAL_STATE;
public void uploadUtility(IPortalComponentRequest request, IPortalComponentResponse response)
String mimetype;
String resourceName;
String repository;
FileInputStream sourceFileInput = null;
session = request.getComponentSession();
DAO = new DAO();
DAO = (DAO)session.getValue("DAO");
IUser epUser=DAO.getEpUser();
System.err.println("berry + Getting Iuser from inside UploadUtility SAI " + epUser);
/* IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.wdUser.getSAPUser(); */
// IUser epUser=(IUser)request.getUser().getUser();
System.err.println("epUser - " + epUser);
ResourceContext ctx = new ResourceContext(epUser);
repository = "/Folder1/new";
RID rid=RID.getRID(repository);
System.err.println("getting RID :- " + rid);
IPageContext context = PageContextFactory.createPageContext(request,response);
// PageContext context = PageContextFactory.createPageContext(request, response);
Event event=context.getCurrentEvent();
if(null!=event)
String event_name=event.getAction();
if(null!=event_name && event_name.trim().equalsIgnoreCase("upload_file"))
FileUpload fileUpload = (FileUpload)context.getComponentForId("fileupload");
if(null !=fileUpload && null!=fileUpload.getFile())
mimetype = fileUpload.getFile().getContentType();
resourceName = fileUpload.getFile().getFileName();
System.err.println("resourceName inside fileUploadUtility :- " + resourceName);
//sourceFileInput = new FileInputStream(fileUpload.getFile().getFile().getAbsolutePath());
fileName = resourceName;
System.err.println("filename :- " + fileName);
try {
sourceFileInput = new FileInputStream(fileUpload.getFile().getFile().getAbsolutePath());
} catch (FileNotFoundException fnf) {
state = ERROR_STATE;
System.err.print("FileNotFoundException Occured " + fnf.toString());
Content content = new Content(sourceFileInput, mimetype, -1L);
IResource resource = null;
try {
resource =(IResource) (ResourceFactory.getInstance().getResource(rid, ctx));
} catch (ResourceException resexp) {
state = ERROR_STATE;
System.err.print("Resource Exception Occured for IResource" + resexp.toString());
ICollection aCollection=(ICollection)resource;
//IResource newResource = aCollection.createResource(resourceName, null, content);
try {
IResource newResource = (IResource) aCollection.createResource(resourceName, null, content);
} catch (NotSupportedException e2) {
state = ERROR_STATE;
System.err.print("Not Supported Exception Occured" + e2.toString());
} catch (AccessDeniedException e2) {
state = ERROR_STATE;
System.err.print("Access Denied Exception Occured" + e2.toString());
} catch (ResourceException e2) {
state = ERROR_STATE;
System.err.print("Resource Exception Occured for ICollection" + e2.toString());
}//end of catch
}//end of innermost if
}//end of 2nd if
}//end of 1st If
DAO.setFileName(fileName);
DAO.setState(state);
session.putValue("DAO", DAO);
}// end of uploadUtil
I am getting a complie error in my NWDS at the following line:
FileUpload fileUpload = (FileUpload)context.getComponentForId("fileupload");
The error is : Cannot cast from component to FileUpload.
Also, I am getting an error on the following Import statement:
import com.sapportals.htmlb.FileUpload;
The error is : The import import com.sapportals.htmlb.FileUpload conflicts with a type defined in the same file.
Any Idea why this would be happening?
Thanks
S.Bimport com.sapportals.htmlb.FileUpload;
is conflicting with the class name. Both are same.
Change the class name.
Thread closed. -
Runtime exception: NoClassDefFoundError: com/sapportals/htmlb/Component
Hi,
I'm trying to use htmlb to have some javascript in my page:
Button myButton = (Button) view.getElement("DNMO.MainWindowView.testButton");
myButton.setJsObjectNeeded(true);
but at run time this exception is raised:
java.lang.NoClassDefFoundError: com/sapportals/htmlb/Component
Libraries com.sap.portal.htmlb_api.jar and htmlb.jar are in my project java build path.
Has anyone seen this problem before?
Thanks for your help,
RomainOK, so:
- In SAP NW developer studio, project properties -> Web Dynpro References -> Sharing References tab, if I add the htmlb reference there, next time I deploy my application, portalapp.xml is generated with that line:
<property name="SharingReference" value="htmlb"/>
- but I've got this warning when deploying:
Caught exception during application startup from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application arch.com/portal and wait. Reason: Clusterwide exception: server ID 27977350:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application XXX for startup. Reason=Clusterwide exception: Failed to start application XXX: The referenced application htmlb cannot be started. Check the causing exception for details. Hint: Is the referenced application deployed correctly on the server?
at com.sap.engine.services.webdynpro.WebDynproContainer.prepareStart(WebDynproContainer.java:1507)
- On the server, in the Visual Administrator, Services > Deploy selected in the left-hand pane, I can see sap.com/com.sapportals.htmlb.ear is deployed and started in the servlet_jsp container, but not in the webdynpro container
Is this my problem? If so, do you know how to deploy this application in the webdynpro container? I've been playing a bit with this visual admin tool but I can't find a way to do it...
Thanks
Edited by: Romain83 on Mar 18, 2010 11:12 AM -
Source for library com.sapportals.htmlb.*
Hi,
I would be most grateful if anyone could point me to a source for the com.sapportals.htmlb.* library. This would enable me to attach it to the Java build path of my SAP NWDS project and get it to compile.
I am unable to find it anywhere in our portal. It is not in the PDK either.
Thanks in advance,
John
Edited by: John Kuriakose on Jun 9, 2009 3:32 PMYou are right, Michael.
I found it on the Portal server and in the PDK.
Would also like to refer an earlier thread:
Re: where to find source code for PDK
Thank you.
John -
Using library com.sapportals.htmlb.*;
Hi,
i had created a portal aplication in the wizard. And i had joined this library (com.sapportals.htmlb.*;) to my program, meanwhile i had initialized my new form and other components of my form...such as textviews,labels, buttons and so on..
The question is, when i make the deploy in a file '.par' to the portal i can´t see the changes i had made in the components of my form...can anybody tel me why? can you give references to study implementations of this library?
Regards,
HugoHi Hugo,
Assuming that you have installed the PDK for Java,
have you tried cleaning the par file and re-deploying?
This is done via: Java Development>Development>Component Manager>Archive Remover> From here select your particular project and hit clean. This removes the old code entirely from the system and you can redeploy with satisfaction that the old code will not be referenced.
Regards
Daniel -
when i use the tag <hbj:tableview> in the jsp of the project portal application!
01:56_02/04/09_0006_9369850
[EXCEPTION]
java.lang.NullPointerException
at com.sapportals.htmlb.table.TableView.getColumnCount(TableView.java:539)
at com.sapportals.htmlb.unifiedrendering.controls.TableViewRow.<init>(TableViewRow.java:33)
at com.sapportals.htmlb.unifiedrendering.controls.TableView.<init>(TableView.java:50)
at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.render(TableViewRenderer.java:28)
at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:987)
at com.sapportals.htmlb.taglib.TableViewTag.doEndTag(TableViewTag.java:139)
at pagelet._sapportalsjsp_admin.subDoContent(_sapportalsjsp_admin.java:543)
at pagelet._sapportalsjsp_admin.doContent(_sapportalsjsp_admin.java:40)
at pagelet._sapportalsjsp_admin.service(_sapportalsjsp_admin.java:24)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:360)
at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)
at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)
at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)
at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
at com.sapportals.portal.prt.component.AbstractPortalComponent.doPreview(AbstractPortalComponent.java:240)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:168)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)be answered
-
Portal Runtime Error: com.sapportals.htmlb.enum.CellHAlign
Guys ,
I am getting this error . though my xml is properlyd efined
Portal Runtime Error
An exception occurred while processing a request for :
iView : iGate.iGatePortal
Component Name : iGate.iGatePortal
Tag 'tabStrip',attribute 'horizontalAlignment': invalid value 'null', must be a com.sapportals.htmlb.enum.CellHAlign.
Exception id: 11:31_21/12/04_0023
See the details for the exception ID in the log fileHi Jelbin,
Following is the solution of this error,
Step 1: Check the system alias in application which you are opening and maintain same in system object also, or take system object default system alias and maintain it in iView property named as "System", either of above is valid.
Step 2: Add every One group to the system object with end user ticked.
Step 3: Logoff and login again it should work,
Kindly reply if this works.
Regards,
Bhavin Anajwala -
import com.sapportals.portal.security.usermanagement.IUser; is deprecated
Is there any alternative???Hi,
could please tell me, what kind of jar-file I have to add to the project to use
com.sapportals.portal.security.usermanagement.IUser ?
Thank you in advance.
Kind regards, Patrick. -
Cant import com.sun.xml.internal.ws.spi
I was intalled NetBeans IDE 6.1, JDK/JRE 1.6.0_07.
but
import com.sun.xml.internal.ws.spi.ProviderImpl;
This statement comes an error (package com.sun.xml.internal.ws.spi does not exist )
but JDK6(rt.jar) has this package and class.
why this happen?Probably it wasn't his fault:
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*$Id: Provider.java,v 1.8.2.6 2007/03/09 23:51:10 kohlert Exp $
package javax.xml.ws.spi;
import java.net.URL;
import java.util.List;
import javax.xml.ws.Endpoint;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.namespace.QName;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import org.w3c.dom.Element;
* Service provider for <code>ServiceDelegate</code> and
* <code>Endpoint</code> objects.
* <p>
* @since JAX-WS 2.0
public abstract class Provider { .....
static private final String DEFAULT_JAXWSPROVIDER
= "com.sun.xml.internal.ws.spi.ProviderImpl";
Edited by: mgb on Oct 7, 2008 3:59 PM -
Com.sapportals.htmlb.*;
guys where to get this plug-in ?
You'll need to include the htmlb.jar
It's available on your portal ( either from the system admin ) or through the downloads page
Java Development -> Pdk Tools -> Download page -
Com.sapportals.htmlb.rendering.IFileParam
is there some api for IFileParam??
Hi,
If you are trying to find out the method of IFileParam interface, check this:
public String getFileName();
public File getFile();
public String getContentType();
public String getSelectedFileName();
So implement themto create a IFileParam object
Regards,
Praveen Gudapati -
Hi all
when i import the following one in the portal component then it is not allowing to me giving error seems in red color.but i added all jar files to the java build path.
<b>import com.sapportals.portal.htmlb.page.PageProcessorComponent</b> (error)
<b>public class testapp extends PageProcessorComponent</b>
can u tell me what r the things required to add to allow the above 2 lines.
Regards
SunilHi,
Just use the Class Locator.
Checkout this blog:
<a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4051">https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4051</a>
or download from here: http://classlocator.sourceforge.net/
Best Regards,
Avishai Zamir -
Com.sapportals.portal.htmlb.* path not found.
Hi friEnds,
i have added the path of htmlb.jar file in the project properties using eclipse. I downloaded this htmlb.jar file from server only. But when i am trying to import
com.sapportals.portal.htmlb.page.* it is giving me error.
The code on which i am working is the old one which was running in EP6. But now i need to do some changes and i am facing this error.
rgds,
NilzHi Nilz,
Can you post your portalapp.xml and the stack trace of your error.
Prakash -
Com.sapportals.pct import issue
hi,
One of my programs uses the flollowing libraries.
import com.sapportals.pct.util.pdv.IDataViewer;
import com.sapportals.pct.util.pdv.PDVDynPage;
import com.sapportals.pct.util.pdv.source.ISource;
but it complaints that it cannot find com.sapportals.pct
can anybody direct me where I can import this from.
thanks a lot.Hi,
For future reference use this very helpful tool called class locator.
Once configured, it will automatically locate the jar you need for you.
You can download it from <a href="http://sourceforge.net/project/showfiles.php?group_id=69863">here</a>
Hope it helps,
Roy
Maybe you are looking for
-
My Iphone is stuck on a facebook screen and will not Exit or Turn off when i press the buttons
Well i clicked on a Music vid And It said Sign up for facebook to post So i went to fill in my details To show freinds and My iphone wont let me exit Facebook meaning im Stuck on it i tried holding the home button And the off button but no Good I use
-
Purchase price of a apple store product
Where do I find total purchase price of a application through the apple store????
-
What exactly does the screen lock do?
I am looking at this thing but I have no idea what it does. It wasn't on my 4g. What is it?
-
Procedure for Antenna replacement on 1522 Outdoor AP
Is disabling the radios on the antenna enough to replace the existing 3 of the 2.4 Ghz antenna with a different model? Not sure if I need to shutdown the power by unplugging the POE cable from Power Injector and RESET the button to also stop the batt
-
anyone can tell how to use dos to run Java program? I learn Eclipse few month, so I dont know how to run java in dos. I did follow the install guide to set the PATH like that C:\Program Files\Java\jdk1.5.0_02\bin in "Path" in the User Variables but I