Regarding packageing in sharepoint

I have created a small solution for practice. 
Soulution Name : Sample
Class Library : Sample.ClassDB (Data Layer)
Class Library : Sample.ClassLib (Business Layer)
UI : Sample.UI (Which has webpart code)
In Sample.ClassLib project have refrence of "Sample.ClassDB" and "Sample.UI" has reference of "Sample.ClassLib".
In sharepoint package i added both assembly to make the safe control entry by clicking on Advance tab in package designer.
When tried to deploy the solution i received the below error.
The type or namespace name 'ClassDB' does not exist in the namespace 'Sample' (are you missing an assembly reference?)
Please suggest.
Akhilesh Rao

Since you haven't provided the full details of the assemby definitions, I can't say for certain, but my guess is that you've made a mistake in the Safe Controls section of the ClassDB assembly. But here are some specific observations that may help:
First, why are you declaring Safe Controls in either Sample.ClassDB.dll or Sample.Classlib.dll at all? Are there web controls or web parts in either of those assemblies? This seems inconsistent with your layered architecture — I would expect all the UI controls
to be in Sample.UI.dll. If you don't have any ASP.net controls in those assemblies, you should remove any Safe Control items (which will likely fix the deployment error, assuming there's something wrong with them)
Conversely, if you have web parts (or other ASP.net controls) in Sample.UI.dll, you need to provide safe control declarations for those classes (otherwise they will fail with a security error when you try to add one to a page). Since Sample.UI.dll isn't
listed in your screenshot, I'm guessing that it's because that's the default target assembly for your SharePoint solution project. To declare safe controls in the default assembly, you need to do the following:
Add the Sample.UI.dll assembly to the list of additional assemblies. The definition should look something like the following:
This is assuming all your web parts are in the namespace 'Sample.UI.WebParts'; change as necessary. If your controls are in multiple namespaces, include a safe control entry for each one.
View the Project Properties and change Include Assembly In Package to
False, otherwise MSVS will try to include the target assembly twice.
Hope this helps.

Similar Messages

  • Regarding Packaged function...!

    Hi,
    i have a packaged function which i am trying to use in my
    report query....
    i am passing 2 params for this function.....
    one is report parameter and the other one is a col in the select query....
    so i need to get rows returned based on the conditon satisfying in the query...!
    i have a select stat for each condition which will return one column value to the
    local variable which i am trying to check in the condition....
    My problem is whenever i am running it it's get hanged or it takes a lot of time..
    if iam hard coding the parameter value it's fetching records...
    plz do the needful....
    select
    a.latest_version_no,
    a.custom_ref_no,
    d.customer_name1,
    etc.....
    etc.....
    from
    cstbs_contract a,
    fxtbs_contract_master b,
    cstbs_contractis c,
    sttms_customer d
    where
    a.contract_ref_no=b.contract_ref_no
    and
    a.latest_version_no=b.version_no
    and
    b.contract_ref_no = c.contract_ref_no
    and
    d.customer_no=b.counterparty
    and
    NVL(b.netting_status,'N') ='N'
    AND
    b.VERSION_NO = (SELECT MAX(M1.VERSION_NO) FROM FXtbs_contract_master M1 WHERE M1.CONTRACT_REF_NO = B.CONTRACT_REF_NO)
    AND
    B.CONTRACT_REF_NO IN(SELECT PK_RET_ROWS.FN_RET_ROWS(:P_INST_CHANGE,'FXWFWXP023290102') FROM DUAL)

    Ravi
    For one thing you could avoid the unnecessary select from dual:
    AND B.CONTRACT_REF_NO IN(SELECT PK_RET_ROWS.FN_RET_ROWS(:P_INST_CHANGE,'FXWFWXP023290102') FROM DUAL)can be changed to:
    AND B.CONTRACT_REF_NO = PK_RET_ROWS.FN_RET_ROWS(:P_INST_CHANGE,'FXWFWXP023290102')You could simplify further, to make sure you only evaluate the function once, and definitely drive off M1, then B:
    AND (B.CONTRACT_REF_NO, B.VERSION_NO) = (
    SELECT M1.CONTRACT_REF_NO, M1.VERSION_NO
    FROM FXtbs_contract_master M1
    WHERE M1.CONTRACT_REF_NO = PK_RET_ROWS.FN_RET_ROWS(:P_INST_CHANGE,'FXWFWXP023290102')
    )As for the speed: if you still have a problem, check you have the right indexes (eg on CONTRACT_REF_NO and (LATEST_)VERSION_NO for M1, A, B, C and on D.CUSTOMER_NO)?
    HTH
    Regards Nigel

  • Regarding package creation

    hi all,
    I tried executing this program....its showing Noclassdeffound error....
    ***//this file i ve named it as demos.java***
    package pack1;
    import pack2.demo2;
    public class demos
         int x,y;
         public demos(){
         demo2 obj=new demo2(2,3);
              this.x=obj.x;
    public static void main(String args[])
    //int i=8;i++;
    //System.out.println("i++="+ i++ +"++i ="+ ++i +"i++=" + i++);
    demos o=new demos();
    System.out.println("x="+o.x/*+"y="+demo2.y*/);
    *//this file i ve named as demo2.java*
    package pack2;
    public class demo2{
         public int x;
         public int y;
    public demo2(int p,int q){
              this.x=p;
              this.y=q;
    Here i am trying to create two packages pack1 and pack2.....but its not executing plz help????

    hi ,
    I have named the .java file containing main() method as demos.java and i want that .java file to under a package and the package name is "pack1".
    So ,if i want to the program to execute correctly --i ve to change the package name to "pack1.demos;" is it?
    This is my question?
    Also post a code sample on package(apart from java packages).One created on own.
    regards...
    arjun

  • Help is needed regarding PACKAGE -- Transport Layer

    Dear,
    I am working on CRM upgrade ,where i found one z-package
    in their production system.but if i look into it one z transport layer was defined and if i search for F4 i am not able to find that Trasport layer. how can it be possible to That package without existing Trasport layer.
    Please treat as urgent.
    Thanks in advance.
    with  regards,
    Rajesh c

    Dear,
    problem is regarding SAP SPI provided  by HP .
    i  am working on CRM 2007 upgrade project .in CRM 4.0 SPI package is present.
    but in this i am confused.
    as All dictionary objects , FM are starting with customer name space i.e Z---
    even package they are using is ZSPI for which Transport layer is ZLPO.
    but if i search for F4 i am not able to find ZLPO.
    and comment in FM is
    Copyright(c) 1998 by Hewlett-Packard Company.                       *
    All rights reserved.                      
    so shall i go for manual creation of these object .
    Please treate it as urgent.
    Thanks in advance.
    with  regards,
    Rajesh c

  • Query regarding Packages??

    Hi All,
    My database is updated after every 15 days. I am creating a package that will use Ref Cursor , including procedures and functions. So Shuld i Execute that procedures every time after 15 days or the new rows will be populated directly into the bind variables. We are calling the values in JSP that will inturn affect our website.
    Reply
    Regards.

    I guess this statement explains a lot
    We are calling the values in JSP that will inturn affect our website.but the rest of your question is not very clear.
    What I think you are asking is this: you have some procedures which return ref cusrors to an application. Do need to rerun your procedures to get the data which has been inserted into the database since the last time you ran those procedures? To which teh answer is yes.
    If I have misinterpreted the question you will need to have another crack at explaining your scenario.
    Cheers, APC

  • Best practice regarding package-private or public classes

    Hello,
    If I was, for example, developing a library that client code would use and rely on, then I can see how I would design the library as a "module" contained in its own package,
    and I would certainly want to think carefully about what classes to expose to outside packages (using "public" as the class access modifier), as such classes would represent the
    exposed API. Any classes that are not part of the API would be made package-private (no access modifier). The package in which my library resides would thereby create an
    additional layer of encapsulation.
    However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?
    Thanks in advance!

    Jujubi wrote:
    ...However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?I've always gone by this rule of thumb: Do I want others using or is it appropriate for others to use my methodes. Are my methods "pure" and not containing package speicific coding. Can I guarentee that everything will be initialized correctly if the package is included in other projects.
    Basically--If I can be sure that the code will do what it is supposed to do and I've not "corrupted" the obvious meaning of the method, then I usually make it public--otherwise, the outside world, other packages, does not need to see it.

  • Regarding packages

    Hi guys
    what is the difference of is/as keyword in package body declaration.....

    There isn't any.
    You are in the wrong forum. This is for the SQL Developer tool, not for general PL/SQL questions. The clue is in the title.

  • Error regarding package concept and classpath

    Dear All,
    I am just compiling two java classes which is part of struts frame work.
    Register Form.java:
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername(){return username;}
    public String getPassword1(){return password1;}
    public String getPassword2(){return password2;}
    public void setUsername(String username){this.username=username;}
    public void setPassword1(String password){this.password1=password;}
    public void setPassword2(String password){this.password2=password;}
    I am compiling this file its compiling and i put this class file in app folder and the i am compiling the second java file.
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    when i am compiling i got error as
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    C:\j2sdk1.4.1_04\bin>javac RegisterAction.java
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    ^
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    no problem in struts jar and servlet jar file i set classpath correctly for this but i cant resolve thsi error.
    can any one help on this issue.
    i need urgently.
    Thanks
    Balaji.A.U.

    i need urgently.Oh. In that case, I'm probably too late. What a bummer.

  • Regarding packages,help please

    Hi,
    As I have understood it for example,
    What is the difference in putting the/source class files in the
    package package1;
    and
    package my.own.package1
    Its the same right,why do we have to put the extra my.own
    and setting the class path accordingly
    Hope that I conveyed my question correctly.
    Help appreciated
    Thanks
    AS

    You can use a single named package just fine.
    Packages are typically used for ogranization as well
    as reduced name collisions.
    The normal naming convention for packages is as
    follows:
    domain.company.package;
    So if your domain is org and you're developing a gui
    project for apache then it would look like:
    org.apache.gui;
    Just think if everyone started using single name
    packages how many more collisions there would be. For
    example, if you and I were developing web components
    and we both decided to use the package name web then
    it would be tough to intermingle our code as the
    potential for conflicts is higher. For example, if we
    both had an upload object in our package that did
    different things then they couldn't co-exist. See
    below:
    package web
    //My servlet to receive uploads
    class Upload extends Servlet
    package web
    //Your component to help POST uploads
    class Upload extends URLStreamHandler
    }However if we prepend our domains and company names to
    the package then we could share code:
    package com.ics.web
    //My servlet to receive uploads
    class Upload extends Servlet
    package org.apache.web
    //Your component to help POST uploads
    class Upload extends URLStreamHandler
    }Furthermore you'd most likely want some organization
    to your code. you wouldn't just want one package with
    all of your classes in it. It would be hard to
    decipher which is which. So you'd create sub-packages
    under your main package. You get something like
    org.apache.web.servlets and org.apache.web.client. Why
    do this? because you want to treat your client
    classes differently than your servlets. It makes it
    easier at build time as well when the classes need to
    deploy in different places. It's just easier to say
    grab everything from the servlets package and put them
    in my web archive (war). Also grab everything from
    client and put them in the root of my Enterprise
    archive (EAR). There are other uses for this as well,
    I'm sure.
    CliffThanks Cliff for the comprehensive introduction for using packages.Will understand it programatically now.Any doubts will keep posting.
    AS

  • Regarding package

    how to make a plsql procedure, which can call http url using post method. ???

    Welcome to the forum.
    Sounds like UTL_HTTP.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_http.htm#sthref11939
    http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
    http://technology.amis.nl/blog/358/consuming-web-services-from-plsql-part-ii-a-pure-plsql-solution-using-utl_http-oracle-9i-or-10g
    But it would be helpful to know a bit more regarding your requirement.

  • Regarding package...help me

    I declared one procdure in package specification but not defined in body
    I did not declared procedure in package spec but defined in body
    Whis is correct.
    asp

    Another case (albeit an unusual one) for having a SPEC without a body is when th eapplication is being beployed incrementally.
    Release 1 has a program P1 that depends upon two packages A and B. We need to release the first tranche of the application, that actually only implements the logic for package A. However, to minimise subsequent disruption we would like to release P1 in its final state.
    So in the first release we deploy:
    P1 - whatever
    A - package spec
    A - package body
    B - package spec
    So P1 compiles and can call functionality relating to A. It will fail if it calls functionality relating to B.
    The second release is much simpler:
    B - package body
    Note that this is a risky strategy. We have to be certain that P1 will not execute B calls before the B package body has been deployed. In the example of which I'm thinking, P1 was a consumer of data files, so it was a matter of tweaking the data load configuration file as part of the second release.
    So it is true to say that we can have a package spec without a body, but we cannot execute its public procedures. And, as Asish points out, we can reference any public variables it declares.
    Cheers, APC

  • Google Analytics or other low cost analytics package for Sharepoint

    We have a standard MOSS site I have have seen post about using GA with sharepoint sites.
    I use GA for my public websites and I would love to be able to get it working, but I am being stumped at the very first hurdle.
    I added the site to my GA account but am unable to even verify the site as I get permission errors. Verification failed. GA Reply Your verification file returns a status of 401 (Not authorized) instead of 200 (OK). 
    I dont know how to add the meta tag to the homepage and fairly sure I will get the same error message as a username and password is needed to get to the site

    Is your MOSS site accessible from the Internet? Usually MOSS portals are behind a firewall, which precludes you from using GA.
    M.
    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc - jQuery Library for SharePoint Web Services

  • Sharepoint 2010 package problem

    I have a Sharepoint 2010 projet, when I click right the solution and select "Package All Sharepoint Projects (CKSDev)" it gives me the output message:
    ------ Build started: Project: ABCDE.Intranet, Configuration: Debug Any CPU ------
      ABCDE.Intranet -> C:\Workspace\BNP\ABCDE.Intranet\ABCDE.Intranet\bin\Debug\ABCDE.Intranet.dll
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    When I go to the path "C:\Workspace\BNP\ABCDE.Intranet\ABCDE.Intranet\bin\Debug\" the files where not updated!
    NOT UPDATED:
    ABCDE.Intranet.wsp
    ABCDE.Intranet.dll
    Any ideas pls?
    thanks

    Please try to clean your solution and then click on "Package All SharePoint Projects".
    Hope this helps.
    Tomasz von Oertzen-Groszewski - SOLVIN Information management GmbH
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful if a post has been useful to you.
    This can help other community members reading the thread.

  • In Existing SSIS package how we can call _vti_bin\listdata.svc service using script

    we have already used SSIS package using SharePoint List adapter but its not working properly... Can you will pref-are sharepoint list adapter for business purpose?  
    so we have decided to go with web service (_vti_bin\listdata.svc) and my main challenge is writing script i have to access list oblect from the webservice.
    Can
    you guide me how to write script ..how we can add service into script ...any examples for
    accessing SharePoint list( From Sql server to SharePoint list update)
    Regards,
    Anoop Nagappan

    We have already used SSIS package using SharePoint List adapter but its not working properly... Can you will pref-are sharepoint list adapter for business purpose?  
    so we have decided to go with web service (_vti_bin\listdata.svc) and my main challenge is writing script i have to access list oblect from the webservice.
    Can
    you guide me how to write script ..how we can add service into script ...any examples for
    accessing SharePoint list( From Sql server to SharePoint list update)
    Regards,
    Anoop Nagappan

  • Unable to resotre files/sites in Sharepoint 2013

    I have just setup DPM(2012 Sp1 R2) to backup out new SharePoint 2013 farm, from what i can see it is backup up the farm without a problem.
    When i go to restore a site it gives me the following error:
    The job to recover SharePoint Farm Sharepoint Farm\SQL-Sharepoint\Sharepoint2013\SharePoint_Config to SHAREPOINTSVR.domain.com, that started at 23 September 2014 14:32:26, failed using optimized ILR. Another job using unoptimized ILR has been triggered.
    (ID 33330)
    DPM was unable to export the item
    https://sharepoint.domain.com/ICT-test/ from the content database SQL-SHAREPOINT\SHAREPOINT2013\Sharepoint.domain.com. Exception Message = Value cannot be null.
    Parameter name: AppSiteDomainPrefix. (ID 32017 Details: Invalid pointer (0x80004003))
    Can anyone help?
    Thanks

    Hi,
    We had another customer report the exact same error and it turned out that the latest SharePoint update fixed his issue.
    Can you apply this update if it applies to your SharePoint version and see if it also resolves your issue ?
    Cumulative update package for SharePoint Foundation 2013 (SharePoint Foundation server-package): May 7, 2014 
    Prerequisites
    You must install the following public update before you apply this cumulative update package:
    2768000
    Description of the SharePoint Foundation 2013 update: March 12, 2013
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

Maybe you are looking for

  • Table to see PIR

    Hi, Can anyone tell the table or tables where i can see How  many times PIR in MD61/MD62 has been changed &  the PIRs deleted from the MD61/MD62 where do all these records get stored. I just want to know weather any PIR has been entered last year for

  • Reference Variable syntax??

    I have a large table that I want to filter on any field. I have the dataProvider array and the fieldname in a variable.  Can anyone point me in the right direction on how to set up a dynamic filter, all I can find are static item.arrayLabel in a filt

  • Spam detector doesn't work?

    I move unwanted e's to spam detector but they keep coming through

  • Private IP Addressing---? Manual Settings

    Our Cbeyond service gives info that we have Private IP Addressing for Network Config. Public IP Addressing is not provided. Does that mean that I can't use Automatic but must do Manual Settings for Internet Accesss?

  • Automatically generated (Sound) classes

    Hi all, Quick summary: I'm trying to compile a SWC file with a lot of assets in it in an as easy possible way. "Easy" for a not so technical end user, not perse the way to acchieve that goal. Goal is to streamline a process to generate SWC files with