Exception while passing null as param in custom tag

Hi,
I am using Oracle 10g AS(10.1.2). In my j2ee application,while passing NULL as parameter in custom tags, i am getting exception. But it was working fine with oracle 9i as.
for example:
This is my code in jsp:
<%
String str =null;
%>
<test:getInfo id="<%=str%>" />
While executing the above code, I am getting the following exception :
javax.servlet.ServletException
at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)
at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)
at ListAlerts.jspService(_ListAlerts.java:1827)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
at com.evermind.server.http.GetParametersRequestDispatcher.newInclude(GetParametersRequestDispatcher.java:80)
at com.evermind.server.http.GetParametersRequestDispatcher.include(GetParametersRequestDispatcher.java:34)
at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
at Content.jspService(_Content.java:181)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
at com.evermind.server.http.GetParametersRequestDispatcher.newInclude(GetParametersRequestDispatcher.java:80)
at com.evermind.server.http.GetParametersRequestDispatcher.include(GetParametersRequestDispatcher.java:34)
at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
at Main.jspService(_Main.java:360)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:845)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:734)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Please help me....

Hello,
I do not remember exactly how the null where handle in Oracle 9iAS. Have you tested what is the differences in the way the <%= null %> is returned in both 9iAS and 10.1.2?
You may just have to modify the way the value is sent to the bean from the tag.
Regards
Tugdual Grall

Similar Messages

  • JDK 1.6 null object  genetates null pointer Exception  while passing to JNI

    Hi All,
    I 've a problem with passing null to JNI method getStringNative( JString name) it throws NullPointerException.
    Instead of null, we pass String "null" its working fine .
    But it this problem is not Occuring inJDK 1.4.
    Can u please let me know ? why In JDK 1.6 this problem is Occuring, is there any differ in jdk 1.6 null obj passing to JNI method.
    Thanks & Regards
    Prakash

    I 've a problem with passing null to JNI method getStringNative( JString name) it throws NullPointerException.There is no such method in the JNI 1.6 Specification.
    Instead of null, we pass String "null" its working fine .Of course. "null" is a String, not a null pointer. Just like "not-null" is a String. Or "Prakash". They are all Strings.
    But it this problem is not Occuring inJDK 1.4.
    Can u please let me know ? why In JDK 1.6 this problem is Occuring, is there any differ in jdk 1.6 null obj passing to JNI method.It's not a JNI method.
    Whatever it is, its specification will tell you whether or not it supports a null parameter.

  • Passing params to custom tag from jsp

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

  • DB Adapter 902 binding exception while passing parameters for simple string

    Hi,
    I have an PlSQL API with two input paramters of string type... But this is only started after XML validation TRUE on the BPM server.
    The error is
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>902</code>
    </part><part name="detail"><detail>
    Internal Exception: java.sql.SQLException: ORA-00902: invalid datatype
    Error Code: 902</detail>
    </part><part name="summary"><summary>file:/oracle/product/10.1.3/soa/bpel/domains/Website/tmp/.bpel_BPELProcess1_1.0_c64929dfd2dacf95db3c9da081c1797d.tmp/callingAPI.wsdl [ callingAPI_ptt::callingAPI(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'callingAPI' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXRBA.XXRBA_WEB_ADAPTER.FETCH_CUSTOMERS API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    [Caused by: ORA-00902: invalid datatype
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXRBA.XXRBA_WEB_ADAPTER.FETCH_CUSTOMERS API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    [Caused by: ORA-00902: invalid datatype
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part></bindingFault>
    The input XSD parameters in BPEL input
    <element name="input" type="string"/>
    The input XSD parameters in ADAPTER
    <element name="P_WEB_ACCOUNT" type="string" db:index="1" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    <element name="P_SOLICITED_ONLY" type="string" db:index="2" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    The assignment I am doing in the .bple file is
    <assign name="Assign_1">
    <copy>
    <from expression="bpws:getVariableData('inputVariable','payload','/client:BPELProcess1ProcessRequest/client:input')"/>
    <to variable="Invoke_1_callingAPI_InputVariable" part="InputParameters"
    query="/ns2:InputParameters/ns2:P_WEB_ACCOUNT"/>
    </copy>
    <copy>
    <from expression="string('o')"/>
    <to variable="Invoke_1_callingAPI_InputVariable" part="InputParameters"
    query="/ns2:InputParameters/ns2:P_SOLICITED_ONLY"/>
    </copy>
    </assign>
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You have an attribute type in an object service that is supposed to be numeric, but when reading form the database it seems that is retrieving a non-numeric content...
    Cheers,
    Vlad

  • Exception while Registering Cursor Output Param

    Hi All,
    I am Trying to call a SP through java class. The SP has one of its output as CURSOR object.
    now during runtime when callableStatement.registerOutputParam () is called on that cursor object
    an SQL Exception is thrown giving mesasge as Invalid Column Index.
    Can Anyone please help me as to what may be the problem here.
    I have checked a number of times and the parameter index of the Cursor Object is correct.
    Thanks in advance.
    Regards,
    Sumbul.

    hi All,
    Can anyone please elaborate on the previous thread.
    I am still not able to execute the Procedure.
    From where should I match the Output Parameter index of my java code.
    Regards,
    Sumbul.
    Edited by: user10583473 on Jul 30, 2010 7:54 PM

  • JSP Custom Tags, Tag Handlers, Passing values

    Multiple questions here while I try to work with custom tags (its a requirement):
    From what I have had so far - I have a .tld file, a .java file and a .jsp page.
    (this is not a working version as I just got it from a website)
    platform: tomcat on an xp box.
    I was wondering if we can pass the parameters that are passed to the the jsp page (like blah.jsp?param1=value1&param2=valu2 ) to the tag handler?
    This is because the processing that I need to do in the handler would depend on what I have in the passed values.
    Any help in letting me know where to place those files on the tomcat context root would help. Please see, I do have a couple of servlets running on the box also and they might be in the same context root.
    Any good short tutorial link is also welcome as a short answer as I try to unravel the custom tags in jsp.

    I am using TomCat 5.5
    What I need to do using tags is to build a web-page on the fly by polling a couple of different tables in the database.
    This is to be done using a jsp and custom tag (requirement) which would be able to handle any resultsets. We also have to come up with pageContext attribute names and supply column names as those attributes. Thus we will have to come up with the meta data file and a tag library descriptor as well.
    I found a helloworld solution on a website and was trying to modify it to meet my needs. But I guess I under-estimated the work that needed to be done in this one.

  • [Custom Tags] Dynamic Variable Name // Spring MVC

    I am having a problem with a tag,
    i try to make a dynamic select tag that is reuseable, the problem is that my spring controller generates a model where i can access the list information for a select and that i have to pass this to the dynamic tag, the model could have different name, so it could be ${listitemsa} ${listitemsb} ${listitemsc} and i want to pass this list to my custom tag.
    i tried the following, but the problem is that the var is passed as a string and not the list, does anybody know how to do this?
    <tag:formfield-selectbox name="listA" path="prototypeForm.selectionA" list="${listitemsa} " />
    <tag:formfield-selectbox name="listB" path="prototypeForm.selectionB" list="${listitemsb} " />
    <tag:formfield-selectbox name="listC" path="prototypeForm.selectionC" list="${listitemsc} " />     
    <%@ tag body-content="scriptless" %>
    <%@ attribute name="name" required="true" %>
    <%@ attribute name="path" required="true" %>
    <%@ attribute name="list" required="false" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> 
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    <spring:bind path="${path}">
         <c:if test="${status.error}">
              <span class="error">
                   <c:forEach items="${status.errorMessages}" var="error">
                        <c:out value="${error}"/>
                   </c:forEach>
              </span><br />
         </c:if>
         <label for="<c:out value="${status.expression}"/>">${name}: </label>
         <form:select path="${path}">
              <form:option value="-1" label="--Please Select--" />
              <form:options items="${list}" />
         </form:select>
    </spring:bind>

    I've sorted it. Here's the solution for anybody experiencing the same problem.
    The problem is with switching from Java 1.2.1 to Java 1.3.0_02. Custom tags are (as of the JSP 1.1 spec) JavaBean compnents, and the Introspector appears to work differently in different Java versions.
    Consider this example:
    public void setAbc(String abc){}
    public boolean getAbc(){}Since the setter method takes a String and the finder method returns a boolean, the 1.2 Introspector takes the property type to be String, and returns null as the finder name. Java 1.3 (I haven't tested this explicitely, but this is what seems to be happening), returns null for both the setter name and the finder name (Probably a better way to do it, but breaks old code).
    We've rolled back to Java 1.2 and everything works again. It looks to me like the best way to fix the problem for 1.3 is to write custom BeanInfo classes for each JSP custom tag (Can anybody recommend a good JavaBeans book?). I don't yet know what will happen when you have multiple setter methods with different parameter types??? - something I've always found useful in custom tags.
    You don't get the problem on some JSP engines that don't use the Introspector (apparently JRun just puts the method name in the code and lets it fail at runtime if it doesn't exist, whereas apache and iPlanet check the methods exist at compile time).
    Here's where I got most of the answers from:
    http://groups.google.com/groups?hl=en&safe=off&ic=1&th=9330b85b1867cc7,3&seekm=8rnl24%24ef1%241%40nnrp1.deja.com#p
    http://groups.google.com/groups?hl=en&safe=off&ic=1&th=edd3053ac670ff5b,8&seekm=D8E32A666B62F7BD0076240185256A16.0073785185256A15%40webforums#p
    http://groups.google.com/groups?hl=en&safe=off&ic=1&th=7b5480449150ea26,3&seekm=3B2FA8C3.3F14A9F3%40switzerland.org#p

  • Custom tags:without package structure,showing error

    Hi evrybdy
    While making a simple jsp using custom tags,if i m keeping my java file wothout package structure it is giving jasper exception.On the contrary if i m keeping it inside pckg structure it is working properly.Any idea why so???????

    This reason would be why so: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4361575
    Basically you can't access classes in the 'unnamed' package from classes which are in a 'named' package.
    JSPs always compile into servlets in a 'named' package.
    Your classes should always be in a package structure.

  • Questions in Custom Tag

    Hi,
    I have couple of questions in Custom Libraray Tags:
    1) How I can from Tag Java file to open a new JSP window without the toolbars and determine the window size.
    2) How I can read a JSP parameter from Tag Java file. For example I have a field called "x" in JSP is not connected to the TAG by setAttribute.
    3) How I can pass a dynamic value to custom tag. <route:routeList agentID = "1" >
    how I can change the "1" to a field. When I change it to: <route:routeList agentID = "<%=request.getParameter("agentID")%>" > or to <route:routeList agentID = <%=request.getParameter("agentID")%> > I get empty value, even though the field has a value.
    Thank you ...

    [email protected] ... Well, if you put something as an attribute in the pageContext object, you can get it... same as request or session scope attributes, but I thought the OP meant to do this (I guess not, though.. see below):
    <%
    String str = "...";
    %>
    <mytag:stuff .... />
    And within the stuff tag, use str as a variable. I don't believe that's possible, because the compiled page in effect becomes like this:
    String str = "...";
    doStuffTag(whatever the parameters are);
    Obviously that's not the right naming for the tag, but you get the idea...
    JavaUserProg....
    2) First, it's best to put quotes around the tag attributes...
    <INPUT readOnly style="WIDTH: 84px; HEIGHT: 22px" name="operation[<%= lineNum%>"] value="<%=operation%>">
    Second, do you mean you want to read from the tag what the HTML input field has in it? First, you have to submit the form, then the call request.getParameter("fieldname") to get the value. Otherwise, I'm not clear on what you are really trying to do.
    3) If the field in the tag is an int field: setAgentID(int)
    Then you can define the tag value as:
    <mytag:stuff agentID="1" />
    or
    <% int aid = 1; %>
    <mytag:stuff agentID="<%= aid %>" />
    If you just put a static string value like the first way, it converts it. If you put an expression, the expression has to match the type of value it really is. So int for int, String for String, Collection for Collection.

  • Problem with custom tag attribute types

    Hi,
    I try to figure out how to pass an attribute to a custom tag that is of a type other than "String"?
    In my case, I should pass an attribute with a type of "java.util.ResourceBundle".
    My tag looks like this:
    <tt:cs sel="ab" ce="<%= java.util.ResourceBundle.getBundle("de", Application.getApp().getLocale())%>" />
    I always get the message that the attribute ce is empty.
    Isn't it possible to have attirbutes that are of an other type than string? How could I solve this problem?
    Thanks a lot!
    Regards Patrick

    In JSP 1.2, in the Tag Library Descriptor, you can specify a tagt attribute as
    <attribute>
       <name>attr1</name>
       <required>true|false|yes|no</required>
       <rtexprvalue>true|false|yes|no</rtexprvalue>
       <type>fully-qualified_type</type>
    </attribute> Notice the XML element <type>fully-qualified_type</type>
    Not sure if you can do this in JSP 1.1

  • Exception while running custom scheduler OIM 11g R1

    I have OIM 11g R1 installed on win 32 platform, and am getting the following exception while running the custom scheduler: Samplescheduledtask
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    <Jan 12, 2013 7:37:13 PM IST> <Warning> <oracle.iam.scheduler.impl> <BEA-000000>
    <XSD Validation Exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot fin
    d the declaration of element 'scheduledTasks'.>
    java.lang.ClassNotFoundException: ADP ClassLoader failed to load: oracle.iam.sam
    ple.scheduledtask.SampleScheduledTask
    at com.thortech.xl.dataobj.tcADPClassLoader.findClass(tcADPClassLoader.j
    ava:219)
    at oracle.iam.transUI.impl.CustomTaskLoaderImpl.getClassInstance(CustomT
    askLoaderImpl.java:12)
    at oracle.iam.scheduler.impl.quartz.QuartzJob.execute(QuartzJob.java:146
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:529)
    java.lang.ClassNotFoundException: ADP ClassLoader failed to load: oracle.iam.sam
    ple.scheduledtask.SampleScheduledTask
    at com.thortech.xl.dataobj.tcADPClassLoader.findClass(tcADPClassLoader.j
    ava:219)
    at oracle.iam.transUI.impl.CustomTaskLoaderImpl.getClassInstance(CustomT
    askLoaderImpl.java:12)
    at oracle.iam.scheduler.impl.quartz.QuartzJob.execute(QuartzJob.java:146
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:529)
    java.lang.ClassNotFoundException: ADP ClassLoader failed to load: oracle.iam.sam
    ple.scheduledtask.SampleScheduledTask
    at com.thortech.xl.dataobj.tcADPClassLoader.findClass(tcADPClassLoader.j
    ava:219)
    at oracle.iam.transUI.impl.CustomTaskLoaderImpl.getClassInstance(CustomT
    askLoaderImpl.java:12)
    at oracle.iam.scheduler.impl.quartz.QuartzJob.execute(QuartzJob.java:146
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:529)
    Following is the code of the custom scheduler:
    package oracle.iam.sample.scheduledtask;
    import java.util.HashMap;
    import oracle.iam.scheduler.vo.TaskSupport;
    public class SampleScheduledTask extends TaskSupport {
    public void execute(HashMap hashMap) throws Exception {
    // Display a message when this scheduled task is run
    System.out.println("Running the OIM Sample Scheduled Task...");
    public HashMap getAttributes() {
    return null;
    public void setAttributes() {
    kindly suggest......
    Regards,
    KK
    Edited by: 958122 on Jan 12, 2013 11:38 PM

    Hi,
    Please use the below commands to register the plugin:
    set the environment variable ORACLE_HOME, OIM_ORACLE_HOME, ANT_HOME,JAVA_HOME,MW_HOME and execute
    $ORACLE_HOME/server/plugin_utility/ant -f pluginregistration.xml register
    and provide the necessary input.
    $ORACLE_HOME/server/bin/PurgeCache.sh All
    and provide the necessary input
    Restart the OIM managed server
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14309/plugins.htm#CHDHECGH
    Regards,
    Sunny

  • Security Exception while using Custom Entity Property Manager

    Hi,
    I am using Portal 7.0 UUP example (specified in dev2dev.com site) to implement
    custom entity property manager.
    It all works fine using Portal 7.0 admin tool.
    Now I am proving the same concept by writing java code to insert record in UUP_Example
    table.
    This is the code I am writing in my class
    UserManager userManager = getUserManager(); (calling method to get Remote Interface
    of UserManager).
    ProfileWrapper pw = userManager.createUser(identifier,password,"User");
    MyEntityPropertyManager myEntityPropertyManager=getMyEntityPropertyManager();(calling
    method to get remote interface of MyEntityPropertyManager)
    long num=myEntityPropertyManager.createUniqueId(null,identifier);
    pw.setProperty("UUPExample","word1","mike_headen");
    Code gets compiled successfully but when I execute these statements, following
    run time exception occurs:
    EJB Exception: ; nested exception is: java.lang.SecurityException: Users can only
    be modified by themselves, or by a member of the role DelegatedAdminRole||SystemAdminRole.
    This problem comes while executing last statement i.e
    pw.setProperty("UUPExample","word1","ajay_dogra");
    I know I am missing something here. Any guidance will be highly appreciated.
    Thanks
    Mike

    Mike,
    You approach is wrong and you have to code your program in a different way to
    get rid of this problem.
    Here, you are trying to update User property using pw.setProperty() even before
    authenticating and logging in the user.
    Why you are getting this error becuase user is not logged in and u are trying
    to update the user property.
    These are the steps you need to perform to update/insert user properties at the
    time of login.
    1. createUser(using usermanager.createUser).
    2. Authenticate user(Authentication.login(identifier, password, req);
    3. Initialse the profile in session
    ProfileWrapper profile =
    ProfileFactory.getProfile(identifier, null);
    4. Fire UserRegistrationEvent and Session Login event.
    5. Update user property using profilewrapper.setProperty.
    Hope this helps,
    You can either perform these steps in java or can use the usemanager custom tag
    in ur JSP.
    Thanks
    Sanjay
    Thanks
    Sanjay
    "Mike" <[email protected]> wrote:
    >
    Hi,
    I am using Portal 7.0 UUP example (specified in dev2dev.com site) to
    implement
    custom entity property manager.
    It all works fine using Portal 7.0 admin tool.
    Now I am proving the same concept by writing java code to insert record
    in UUP_Example
    table.
    This is the code I am writing in my class
    UserManager userManager = getUserManager(); (calling method to get Remote
    Interface
    of UserManager).
    ProfileWrapper pw = userManager.createUser(identifier,password,"User");
    MyEntityPropertyManager myEntityPropertyManager=getMyEntityPropertyManager();(calling
    method to get remote interface of MyEntityPropertyManager)
    long num=myEntityPropertyManager.createUniqueId(null,identifier);
    pw.setProperty("UUPExample","word1","mike_headen");
    Code gets compiled successfully but when I execute these statements,
    following
    run time exception occurs:
    EJB Exception: ; nested exception is: java.lang.SecurityException: Users
    can only
    be modified by themselves, or by a member of the role DelegatedAdminRole||SystemAdminRole.
    This problem comes while executing last statement i.e
    pw.setProperty("UUPExample","word1","ajay_dogra");
    I know I am missing something here. Any guidance will be highly appreciated.
    Thanks
    Mike

  • Custom SharePoint 2010 designer page throws "The data source control failed to execute the insert command" exception while adding the new item after the August 13, 2013 CU has installed

    We have the SharePoint Server 2010 with SP1 environment on which the custom SP2010 designer pages were working as expected before the
    August 13, 2013 CU has installed. But, getting the below exception while trying to add the new item after the CU has installed.
    Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteInsert(IDictionary values)     at
    System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65  w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control
    failed to execute the insert command. 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex)     at System.Web.UI.DataSourceView.Insert(IDictionary
    values, DataSourceViewOperationCallback callback)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e)    
    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean
    inclu... 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65* w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected ...deStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    I have tried changing the "DataSourceMode" as below, now the insert command is working, but update command is not working.
    <SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" />
    Also, the lookup dropdown fields are displaying the value as "<a href="Daughterhttp://cpsp10/sites/Employees/_layouts/listform.aspx?PageType=4&ListId={8F62F444-FB6A-4F03-9522-C4696B45DCD1}&ID=10&RootFolder=*">Daughter</a>"
    instead of only "Daughter".
    Please provide the solution to get rid of this issue.
    Thanks
    Ramasubbu

    Try below:
    http://social.technet.microsoft.com/Forums/en-US/ae910269-3a0c-4506-844b-e8bc89d95b71/data-source-control-failed-to-execute-the-insert-command
    http://blog.jussipalo.com/2012/01/sharepoint-2010-data-source-control.html
    While there can be many causes for this generic error message, in my case the first parameter or ddwrt:DataBind function inside the SharePoint:FormFields element was
    'i' and I was working with an Edit Form. Changing it to
    'u' as it was with every other FormField fixed the issue.
    <SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="Edit" FieldName="Esittaja" __designer:bind="{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Esittaja')}"
    />
    Explanation:
    DataBind operation type parameters (the first parameter) are listed below:
    'i' stands for INSERT,
    'u' stands for UPDATE,
    'd' stands for DELETE.
    http://webcache.googleusercontent.com/search?q=cache:d9HHY4I7omgJ:thearkfloats.blogspot.com/2014/03/sharepoint-2010-data-source-control.html+&cd=4&hl=en&ct=clnk&gl=in
    If this helped you resolve your issue, please mark it Answered

  • Uncaught Java Exception while persisting the null bean at e-biz suite login

    Dear Friends,
    Recently, there was a java upgrade in my system and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?
    Regards,
    Sreekanth
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:49 AM
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:51 AM

    Please post the details of the application release, database version and OS.
    Recently, there was a java upgrade in my system What is this upgrade? From what version to what version?
    What is your client OS/Browser?
    What is the Jinitiator version?
    and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?Is the issue with all clients and all browsers?
    Have you tried to clear the jcache and the browser history files?
    Thanks,
    Hussein

  • Oracle 10g JDev IDE 9.0.5.2 Null Pointer Exception while debugging

    Hi,
    In windows XP m/c, I am facing following Null Pointer
    Exception while debugging basic Java application through
    10g JDev 9.0.5.2, and it failed in debugging that application...
    May I know, How to get it out of this problem..., am
    suspecting Is it related to any of my windows XP configuration?
    Here's the stack trace shown in the 10g JDev console while
    debugging simple java application..,
    java.lang.NullPointerException
    at javax.swing.border.EmptyBorder.<init>(EmptyBorder.java:54)
    at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRendere
    r.getTableCellRendererComponent(WindowsTableHeaderUI.java:63)
    at oracle.jdevimpl.runner.debug.ThreadsPanel$3.getTableCellRendererCompo
    nent(ThreadsPanel.java:306)
    at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTabl
    eHeaderUI.java:394)
    at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableH
    eaderUI.java:428)
    at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTable
    HeaderUI.java:454)
    at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTable
    HeaderUI.java:485)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1275)
    at oracle.jdevimpl.runner.debug.ThreadsPanel.threadsPanelSettingsChanged
    (ThreadsPanel.java:538)
    at oracle.jdevimpl.runner.debug.ThreadsWindow$AllThreadsPanel.threadsWin
    dowSettingsChanged(ThreadsWindow.java:408)
    at oracle.jdevimpl.runner.debug.ThreadsWindow.threadsWindowSettingsChang
    ed(ThreadsWindow.java:138)
    at oracle.jdevimpl.runner.debug.ThreadsWindow.<init>(ThreadsWindow.java:
    112)
    at oracle.jdevimpl.runner.debug.JDebugger.getThreadsWindow(JDebugger.jav
    a:3048)
    at oracle.jdevimpl.runner.debug.DebuggingProcess.selected(DebuggingProce
    ss.java:565)
    at oracle.ideimpl.runner.RunManager.viewSelectionChanged(RunManager.java
    :467)
    at oracle.ide.addin.AbstractView.fireViewSelectionChanged(AbstractView.j
    ava:484)
    at oracle.ideri.navigator.DefaultNavigatorWindow.fireViewSelectionChange
    d(DefaultNavigatorWindow.java:791)
    at oracle.ideri.navigator.DefaultNavigatorWindow$3.viewSelectionChanged(
    DefaultNavigatorWindow.java:1218)
    at oracle.ide.addin.AbstractView.fireViewSelectionChanged(AbstractView.j
    ava:484)
    at oracle.ideimpl.explorer.BaseTreeExplorer.actionPerformed(BaseTreeExpl
    orer.java:2077)
    at javax.swing.Timer.fireActionPerformed(Timer.java:271)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh

    John,
    You mentioned "I closed the IDE so that the TopLink project would pick up the changes..."
    1. We need to find out why you needed to close the IDE? Was TopLink mapping editor not picking up your changes?
    2. I am sure you did not modified .java outside of Jdev, but in case if you did, let me know.
    3. After removing a superclass attribute, did you save all changes?
    4. We tried various combinations, but were unable to reproduce the project reopen issue that you mentioned was fixed by changing the ClassDescriptor.xml. It would be extremely helpful if you could either send us (anuj dot k dot jain at oracle dot com) a project that can reproduce this issue, or outline the exact steps.

Maybe you are looking for