NullPointerException using loadbundle

I'm a newbie to JSF and am getting a NullPointerException when trying to use the loadbundle tag. I saw someone else posted a similar post here but didn't see any resolution.
I'm using NetBeans 4.1 and have all of my property files in a package:
com.mycompany.myproject.bundles.Login.properties
com.mycompany.myproject.bundles.Login_en_US.properties
com.mycompany.myproject.bundles.Login_es_ES.properties
etc...
In the body of the html in my login.jsp file I'm using:
<f:loadBundle basename="com.mycompany.myproject.bundles.Login" var="loginBundle" />
I don't know if this is relavent, but this is how the url pattern looks in my web.xml:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
Anyone have any idea? TIA.

Nevermind I figured this out...
I had to manually add library references to jstl.jar and standard.jar. Don't know why they are automatically added? :-\
I also changed the url mapping to *.jsf (just my preference). During debugging with NetBeans you have to manually type in the name of the altered page name (login.jsf instead of login.jsp). I also added preventive-access security settings to the web.xml:
<security-constraint>
<display-name>Restrict access to JSP pages</display-name>
<web-resource-collection>
<web-resource-name>
          Restrict access to JSP pages
</web-resource-name>
     <url-pattern>*.jsp</url-pattern>
     </web-resource-collection>
<auth-constraint>
<description>
With no roles defined, no access granted
</description>
</auth-constraint>
</security-constraint>
That way the *.jsp pages cannot be accessed directly (since they need to go through the faces servelet via *.jsf).
Sort of a pain-in-the-ass IMO.

Similar Messages

  • "java.lang.NullPointerException" using the calender-iview

    Hi,
    We are using SAP NetWeaver Portal 6.0.14.0.0, KM-Version 6.0.14.2.0 and Microsoft Exchange 2000.
    Our SysAdmin has integrated Exchange into the portal and I integrated two calender-iviews (one-month-overview & one-daay-overview). Until last week everything worked fine and everybody was able to see his appointments within this two iviews. But now we get the error-message "
    java.lang.NullPointerException" in this iviews. 
    We haven´t changed anything, this error-message appeared suddenly. Has anybody an idea what´s wrong?
    Thanks for help.
    Greetings,
    Sven

    Hi Sven,
    (a) You should definitely check the log files (default.X.trc) to get a more specific idea where the error comes from.
    (b) If you don't realise immediately where the problem comes from when watching the traces, consider opening an OSS message, for at least a NPE should never be thrown on the UI.
    Hope it helps
    Detlev

  • Got NullPointerException using plain/text content in the mail.

    Hi,
    Here is the code sipnet, and i am facing problems, when i use it
            InternetAddress[] addressTo = new InternetAddress[tok.countTokens()];
            int i=0;
            while(tok.hasMoreTokens())
                addressTo[i++] = new InternetAddress(tok.nextToken());
            msg.setRecipients(Message.RecipientType.TO, addressTo);
            tok = new StringTokenizer(cc,",");
            InternetAddress[] addressCC = new InternetAddress[tok.countTokens()];
            i=0;
            while(tok.hasMoreTokens())
                addressCC[i] = new InternetAddress(tok.nextToken());
            msg.setRecipients(Message.RecipientType.CC, addressCC);
            // Optional : You can also set your custom headers in the Email if you Want
            msg.addHeader("MyHeaderName", "myHeaderValue");
            // Setting the Subject and Content Type
            msg.setSubject(subject);
            msg.setContent(message, "text/html; charset=\"UTF-8\"");
         //msg.setText(message);
            Transport.send(msg);on execution of the above code, i get the following exceptions please help..
    java.lang.NullPointerException
    at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:98)
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
    at javax.activation.DataHandler.writeTo(DataHandler.java:295)
    at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:222)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1065)
    at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1914)
    at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1895)
    at javax.mail.Transport.send(Transport.java:79)
    at com.prosoft.workflow.extensions.SMTPMailAuthenticationExtension.postMail(SMTPMailAuthenticationExtension.java:114)
    at com.prosoft.workflow.extensions.SMTPMailAuthenticationExtension.execute(SMTPMailAuthenticationExtension.java:62)
    Any sugession also welcome.
    Thanks in advance
    Thanks,
    - Moses.

    Hi Krupa,
    Still same error .
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: expecting end tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {}Content at state

  • NullPointerException using weight based load algorithm?

              We're using WL451, on Solaris. We have two clusters, Cluster A (running
              servlets) and Cluster B (running EJB's).
              We've enabled weight-based load balancing on cluster B. Each machine
              has a weblogic.system.weight property defined.
              When running code on cluster A, we get frequent null pointer exceptions
              in Weblogic. Has anyone seen this?
              Wed Aug 30 17:11:54 EDT 2000 <E> [ShockExServlet] Unexpected failure:
              java.lang.NullPointerExceptio
              n. Exception: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.service.RichReplicaList.getMaxServerWeight(Compiled
              Code)
              at
              weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              Code)
              at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              Code)
              at
              weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              at
              com.shockmarket.ejb.ir.ShockInformationReceiverBeanEOImpl_ServiceStub.exOccurred(Compiled
              Code)
              at
              com.shockmarket.data.ShockInformationReceiverProxy.exOccurred(Compiled
              Code)
              at com.shockmarket.servlet.ShockExServlet.recordEx(Compiled
              Code)
              at com.shockmarket.servlet.ShockExServlet.emitHTML(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet.sendHTML(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet._jspService(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              and
              Wed Aug 30 17:12:01 EDT 2000 <E>
              [UUID=prodweb2.shockmarket.com967669921432] [_RG] Failed processing
              form request. data = BH=foo&U=1. Exception:
              java.lang.NullPointerException
              java.lang.NullPointerException
              at
              weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              Code)
              at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              Code)
              at
              weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              at
              com.shockmarket.ejb.subscriber.ShockSubscriberBeanHomeImpl_ServiceStub.findByBrIDB
              rHandle(Compiled Code)
              at
              com.shockmarket.ejb.ShockEJBClientUtils.getSubscriberState(Compiled
              Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.getSubscriberState(Compiled
              Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.getNextSubpage(Compiled Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.processRequest(Compiled Code)
              at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at weblogic.servlet.JSPServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
              Code)
              at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
              at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              David Michaels <[email protected]>
              Director of Technology
              ShockMarket Corporation (650) 330-4665
              [david.vcf]
              

    Which service pack? Could you use most recent service pack?
              Cheers - Wei
              David Michaels <[email protected]> wrote in message
              news:[email protected]...
              >
              > We're using WL451, on Solaris. We have two clusters, Cluster A (running
              > servlets) and Cluster B (running EJB's).
              >
              > We've enabled weight-based load balancing on cluster B. Each machine
              > has a weblogic.system.weight property defined.
              >
              > When running code on cluster A, we get frequent null pointer exceptions
              > in Weblogic. Has anyone seen this?
              >
              > Wed Aug 30 17:11:54 EDT 2000 <E> [ShockExServlet] Unexpected failure:
              > java.lang.NullPointerExceptio
              > n. Exception: java.lang.NullPointerException
              > java.lang.NullPointerException
              > at weblogic.service.RichReplicaList.getMaxServerWeight(Compiled
              > Code)
              > at
              > weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              > at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              > Code)
              > at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              > Code)
              > at
              > weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              > at
              >
              com.shockmarket.ejb.ir.ShockInformationReceiverBeanEOImpl_ServiceStub.exOccu
              rred(Compiled
              >
              > Code)
              > at
              > com.shockmarket.data.ShockInformationReceiverProxy.exOccurred(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockExServlet.recordEx(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockExServlet.emitHTML(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet.sendHTML(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet._jspService(Compiled
              >
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              >
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              >
              > and
              >
              > Wed Aug 30 17:12:01 EDT 2000 <E>
              > [UUID=prodweb2.shockmarket.com967669921432] [_RG] Failed processing
              > form request. data = BH=foo&U=1. Exception:
              > java.lang.NullPointerException
              > java.lang.NullPointerException
              > at
              > weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              > at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              > Code)
              > at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              > Code)
              > at
              > weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              > at
              >
              com.shockmarket.ejb.subscriber.ShockSubscriberBeanHomeImpl_ServiceStub.findB
              yBrIDB
              >
              > rHandle(Compiled Code)
              > at
              > com.shockmarket.ejb.ShockEJBClientUtils.getSubscriberState(Compiled
              > Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.getSubscriberState(Compiled
              > Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.getNextSubpage(Compiled Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.processRequest(Compiled Code)
              > at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              >
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at weblogic.servlet.JSPServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
              > Code)
              > at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
              > at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              >
              >
              > --
              > David Michaels <[email protected]>
              > Director of Technology
              > ShockMarket Corporation (650) 330-4665
              >
              >
              

  • NullPointerException Using PrintStream or PrintWriter

    Here is the code that I am using. I am taking the output of a program and trying to write that output to a file. When outputting to the file I receive a null pointer exception that I don't know why I am getting. I am using PrintStream here but I also tried using PrintWriter and I got the same error. If I uncomment the System.out.println statement the first line is printed to the console window, but then when it tries to print that line to the file I apparently get the NullPointerException. Can anyone help? Thank you. Here is that bit of code.
    p = r.exec(myprogram);
                                  InputStream in = p.getInputStream();
                                  BufferedReader br = new BufferedReader(new InputStreamReader(in));
                                  String line = null;
                                  try
                                       PrintStream outFile = new PrintStream(new FileOutputStream("testresults.txt"));
                                  catch(FileNotFoundException fe)
                                       System.out.println("File not found: " + fe);
                                  while ((line = br.readLine()) != null)
                                       //System.out.println(line);
                                       outFile.println(line);
                                  p.waitFor();

    I can tell you exactly why... Here's an example
    public static void aMethod() {
      String s = "Foo";
        String s = "Bar";
      System.out.println(s);
    }The value output is "Foo" because the 's' declared in the parenthesis is a different variable in it's own scope.
    Your code does something similar when you did the following
    try {
      PrintStream outFile = new PrintStream(new FileOutputStream("testresults.txt"));
    } catch(FileNotFoundException fe) {
      System.out.println("File not found: " + fe);
    }This declares a variable in the scope of the try block and assigns a reference to a new PrintStream object. However this variable ceases to exist immediately following the closing parenthesis of the catch block.
    Since your code compiles you must, further up have already declared outFile so I would change the code to
    try {
      outFile = new PrintStream(new FileOutputStream("testresults.txt"));
    } catch(FileNotFoundException fe) {
      System.out.println("File not found: " + fe);
      outfile = null;
    }Note that this means if the exception occurs, outFile will be null. You need to decide what action to take in this situation.
    Hope that helps - now put up your Dukes... ;)

  • How to set the rows of dataTable using loadBundle tag?

    Hi,
    Can i set the rows property of a <h:dataTable> using the value from a <f:loadBundle> tag?
    I tried the following code
    <f:loadBundle basename="com.message.NumberOfRows" var="numRows"/>
    I have NumberOfRows.properties file with the following entry
    rows=5
    The dataTable code
    <h:dataTable value="#{mastData.list}" rows="#{numRows.rows}" align="center" var="mastBean">
    </h:dataTable>
    This code is generating ClassCast Exception.
    Please comment on this issue.
    Thanks,
    Renju

    Hi,
    Exactly Reymond, See Renju you already using mastData bean for datatable. In that create a bean method something like rows & create a getter/setter method returning int. In getter method try this code as
    ResourceBundle bundle = ResourceBundle.getBundle("ur resource bundle");
    rows = Integer.parseInt(bundle.getString("rows_to_display"));
    return rows.
    Hope you can now get some clear idea i guess
    Regards,
    A.

  • NullPointerException using DeploymentXMLGenerator

    Hi,
    I'm using JDeveloper 10.1.3.2 with TopLink. I'm building the application with Maven and I would like during the build process to export the mappings.
    I found out that the DeploymentXMLGenerator class mentionned in the TopLink docs was located in tl_mappingeditor.jar under JDEV_HOME/jdev/lib. So I'm trying to use it to generate the xml deployment descriptor, however I'm always getting a NullPointerException:
    java.lang.NullPointerException
            at oracle.toplink.workbench.external.api.Generator.generate(Generator.java:65)I'm using the following code:
    new DeploymentXMLGenerator().generate(new File("path-to-mwp-file"), new File("path-to-xml-file"));What's wrong? Is there another way around?
    Thanx
    Olivier

    I should probably give a more accurate example. The original is over-simplified and you might think I am passing null into setObject().
    for ( int j = 0; j < data.length; j++ ) {
    for ( int k = 0; k < data[j].length; k++ ) {
    if ( data[j][k] == null ) {
    statement.setNull(k + 1, getSqlType(k));
    } else {
    statement.setObject(k + 1, data[j][k]);
    statement.addBatch();
    statement.executeBatch();

  • NullPointerException using xjc

    I'd like to use xjc to generate the Java Bindings from my schemas.
    Using the console to start xjc (xjc ATE_Display.xsd ATE_Template.xsd) I've got the following error.
    Exception in thread "main" java.lang.NullPointerException
         at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._getBindInfoReadOnly(BGMBuilder.java:383)
         at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.getBindInfo(BGMBuilder.java:367)
         at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.getLocalDomCustomization(BGMBuilder.java:405)
         at com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.particle(RawTypeSetBuilder.java:79)
         at com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.build(RawTypeSetBuilder.java:43)
         at com.sun.tools.xjc.reader.xmlschema.ct.MixedComplexTypeBuilder.build(MixedComplexTypeBuilder.java:46)
         at com.sun.tools.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder.build(ComplexTypeFieldBuilder.java:64)
         at com.sun.tools.xjc.reader.xmlschema.BindRed.complexType(BindRed.java:37)
         at com.sun.xml.xsom.impl.ComplexTypeImpl.visit(ComplexTypeImpl.java:237)
         at com.sun.tools.xjc.reader.xmlschema.ClassSelector$Binding.build(ClassSelector.java:175)
         at com.sun.tools.xjc.reader.xmlschema.ClassSelector.executeTasks(ClassSelector.java:321)
         at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:139)
         at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:77)
         at com.sun.tools.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:387)
         at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:145)
         at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:91)
         at com.sun.tools.xjc.Driver.run(Driver.java:287)
         at com.sun.tools.xjc.Driver.run(Driver.java:173)
         at com.sun.tools.xjc.Driver._main(Driver.java:98)
         at com.sun.tools.xjc.Driver.access$000(Driver.java:56)
         at com.sun.tools.xjc.Driver$1.run(Driver.java:78)
    I am using Java 1.5.0_08 & Jaxb2_20060801

    Yes I am using JAXB2 (JAXB2_20060801) & java 1.5.0_08
    I tried the "Simple Mode" (with the call xjc -extension simpleMode.xsd ATE_Display.xsd ATE_Template.xsd) described at the Website you posted me, but the error message was just the same as before.

  • NullPointerException using @Resource for JDBC lookup

    I had the following working and am trying to convert to using @Resource and have been unsuccessful:
    First I had the following working, inside a jar within an ear deployed to glassfish v3 and no sun-ejb-jar.xml file:
    public CM
    public CM() {
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/xDataSource");
    Connection conn = ds.getConnection();
    When I switched to the following I get a NullPointerException when I deploy, indicating that the resource could not be found
    @Stateful
    public CM
    @Resource(name="jdbc/xDataSource", mappedName="jdbc/xDataSource")
    private DataSource ds;
    public CM() {
    Connection conn = ds.getConnection();
    and added sun-ejb-jar.xml file to META-INF directory
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 EJB 3.1//EN"
    "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>CM</ejb-name>
    <resource-ref>
    <res-ref-name>jdbc/xDataSource</res-ref-name>
    <jndi-name>jdbc/xDataSource</jndi-name>
    </resource-ref>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    P.S. Sorry about not using code tags I'm not sure which tag to use to properly format it.

    Do you know what those authorizations should be when using a standard JDBC Lookup mapping function?  Currently we have a custom UDF that calls the table via a <schema>.<table name> and the current user in the Receiver Comm Channel works just fine.  It appears that when using the standard SAP JDBC Lookup function it calls the table directly and the user in the Comm Channel no longer has the correct permissions.
    I would expact that the JDBC Lookup function would allow for a standard "Read" on any table as long as the user has that level of access...but not in this case.  I am going to bring it up to our SAP XI software development team and see what they say, but wanted to get some views from our other experts as well.
    Thanks,
    Matt

  • NullPointerException using custom aggregator

    We have implemented a custom parallel-aware aggregator, extending from AbstractAggregator, and tried running it against a distributed cache on a single member. The calling code is:
              Map map = (Map) cache.aggregate(
                   new AlwaysFilter(),
                   GroupAggregator.Parallel.createInstance("getCcyPair",
                        new TestAggregator()
    This works fine when we substitute the TestAggregator initialisation with: new LongSum("getBalance")
    In trying to resolve this issue, TestAggregator was reduced to:
    public class TestAggregator extends AbstractAggregator {
         private static final long serialVersionUID = 1L;
         @Override
         protected Object finalizeResult(boolean arg0) {
              return new Long(7);
         @Override
         protected void init(boolean arg0) {
         @Override
         protected void process(Object arg0, boolean arg1) {
    However, we still receive the following exception on execution:
    java.lang.NullPointerException
         at com.tangosol.util.InvocableMapHelper.extractFromEntry(InvocableMapHelper.java:289)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$Storage$BinaryEntry.extract(DistributedCache.CDB:27)
         at com.tangosol.util.aggregator.AbstractAggregator.aggregate(AbstractAggregator.java:96)
         at com.tangosol.util.aggregator.GroupAggregator.aggregate(GroupAggregator.java:156)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onAggregateFilterRequest(DistributedCache.CDB:74)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$AggregateFilterRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheRequest.onReceived(DistributedCacheRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onMessage(Service.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onNotify(Service.CDB:122)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
         at java.lang.Thread.run(Thread.java:595)
    Is there a crucial element that we are missing from our aggregator implementation? Any help would be appreciated.
    Regards,
    James

    Hi James,
    AbstractAggregator requires a ValueExtractor in order to obtain the value to be aggregated. This ValueExtractor will be applied to the map entry. You can either pass one into the constructor or override AbstractAggregator.getValueExtractor().
    Note that AbstractAggregator implements ExternalizableLite, so if your aggregator has non transient values that need to be serialized, they need to be read/written out using readExternal(DataInput in) and writeExternal(DataOutput out) using the helper methods in ExternalizableHelper.
    Thanks,
    Patrick Peralta
    Tangosol, Inc.

  • NullPointerException using Map

    Map<String,Integer> m = new HashMap<String,Integer>();
    for(int i=0;i<part_trans.length;i++)
    m.put(part_trans,intValue(part_trans[i],rule_to_hide_l));
    for(int i=0;i<m.size();i++)
    if(m.get(part_trans[i])>max)
    result1 = part_trans[i];
    max = m.get(part_trans[i]);
    // intValue function works fine ......
    So plz help......
    ty

    ezo wrote:
    tsith wrote:
    if this line threw a NPE
    if(m.get(part_trans)>max)
    then either m is null or part_trans[i] is null.
    part_trans[i] being null would not result in a NullPointerException. Ah, true - I was thinking of the Map contract which says (optionally) that Map.get would throw an NPE if given a null. HashMap, however, won't do that - though it might return null leading to your next scenario.
    But another possibility is that the Map does not contain a matching key, so get returns null. The value, being an Integer, is then auto-unboxed so that it can be compared with the primitive max, and that will throw a NullPointerException.

  • NullPointerException using when an Aggregator

    Hi,
    There seems to be a problem with the way my cache is setup and how it handles an aggregator.
    When the aggregator is run from my UT on my local machine, it seems to perform fine; however, when my aggregator is executed on a cache outside of the JVM of my test then the following NullPointerException is thrown.
    It really seems like the external cache may not have the necessary dependencies, that would naturally exist when the cache is started on the same JVM of the test.
    It seems like there may be a simple solution, but at the moment it is beyond me.
    Thank you kindly in advance,
    Mike Menne
    Portable(com.tangosol.util.WrapperException): (Wrapped: Failed request execution for DistributedCache service on Member(Id=1, Timestamp=2011-06-30 10:44:45.942, Address=10.29.9.91:8088, MachineId=7771, Location=site:na.ds.----------.com,machine:na1000-lasch2,process:5628, Role=IntellijRtExecutionAppMain)) null
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:67)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.run(PartitionedCache.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
         at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
         at <process boundary>
         at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
         at com.tangosol.coherence.component.net.extend.message.Response.readExternal(Response.CDB:20)
         at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:47)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: Portable(java.lang.NullPointerException)
         at com.tangosol.util.InvocableMapHelper.extractFromEntry(InvocableMapHelper.java:294)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage$BinaryEntry.extract(PartitionedCache.CDB:32)
         at com.tangosol.util.aggregator.AbstractAggregator.processEntry(AbstractAggregator.java:107)
         at com.tangosol.util.aggregator.AbstractAggregator.aggregate(AbstractAggregator.java:94)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:46)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.run(PartitionedCache.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
         at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
         at <process boundary>
         at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
         at com.tangosol.io.pof.PortableException.readExternal(PortableException.java:150)
         at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:58)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
         at com.tangosol.coherence.component.net.extend.message.Response.readExternal(Response.CDB:20)
         at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:47)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Edited by: 869517 on Jul 6, 2011 10:03 AM

    Hi Mike,
    Hm, that is weird.
    Could you post a simple test case which reproduces it? A unit test source, cache and operation and POF configuration for the source and destination for all JVMs in the test (extend client, proxy node, cache server node if separate).
    Thanks and best regards,
    Robert

  • JSF loadBundle

    Hi All
    I am using JSF1.1 in my application.
    In my application I want to use loadBundle to load messages to my page. But I am not able to use loadBundle, it is giving no Scuh tag loadBundle in library imported with prefix f. I am using prefix f for http://java.sun.com/jsf/html. Kindly help me to resolve at the earliest

    The loadbundle tag is under the tag lib core.
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    Moreover, the tld file is available in the jar file jsf-impl.jar, under path META-INF. The name is jsf_core.tld

  • Error message while loading XML parser into db

    I get the following error message while loading xmlparserv2.jar
    ORA-29534 referenced object SYSTEM.oracle/xml/parser/v2/XMLNOde could not be resolved
    ORA-29545: badly formed class: java.lang.NullPointerException
    using XSU111 package

    I had the same problem. I did a search of the forum looking for the error number (that's how I ran across your question). It seems that the xmlparserv2.jar (v2.0.2.8 or 2.0.2.9) which is included was compiled with java 1.2 which is incompatible with Oracle 8.1.5 (which is what I have and probably what you have). You probably need xmlparser v2.0.2.7.
    Do a search on the error number, the post is from Steve back on June 8. I found the correct version of the xmlparserv2.jar in my copy of the xmlschema stuff (xmlschema_v0_9_0_0.zip). I don't know which version is in the current xmlschema
    (v1.0.0.0) but it is probably the new version.
    Steve will email you the correct version if you ask.
    Eric
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by nrajav ():
    I get the following error message while loading xmlparserv2.jar
    ORA-29534 referenced object SYSTEM.oracle/xml/parser/v2/XMLNOde could not be resolved
    ORA-29545: badly formed class: java.lang.NullPointerException
    using XSU111 package<HR></BLOCKQUOTE>
    null

  • Bug in oracle.xml.jaxp.JXTransformer??

    I get a NullPointerException using a stylesheet which referes to an invalid (non-existant) encoding.
    I tried this with xdk 9.20.40 and 9.20.50, both fail.
    I start the transformation using
    transformer.transform( <xml-streamsource>, <result-stream> ).
    <<<
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding="ISO-8859-xx" method="text"/>
    </xsl:stylesheet>
    >>>
    I can see that exception handling is done by calling JXTransformer.reportXSLException.
    For some reason the implementation extracts a "xmlerror" from the thrown exception.
    <<<
    XMLError xmlerror = xslexception.getXMLError();
    >>>
    Next line of code failes with a NullPointerException, because xmlerror is null and therefore xmlerror.getLocator() must fail!!
    <<<
    DOMLocator domlocator = new DOMLocator(xmlerror.getLocator());
    >>>
    Any suggestions if this is a bug or what´s wrong here??

    What happening here is the following:
    When you run through the browser, the http request invokes the XSQL Servlet, the XSQL page template is found (typically in the cache if it's the 2nd or subsequent time you're asking for the page), and then the result is returned. Everything fine.
    When you run through the XSQLRequest class, you are providing a URL to the "raw" XSQL page of "http://foo/bar.xsql". The XSQL Page processor fetches what it's expecting to be the "raw" template XSQL page by retrieving the resource at the given URL. However, since the URL ends with *.xsql, the request for the *.xsql file does NOT return the raw XSQL page template that the XSQLRequest class is expecting, but instead the server processes the template on the server side and returns the result of processing the bar.xsql page to the XSQLRequest class. Since apparently your XSLT stylesheet if producing HTML, what the XSQLRequest class sees for the "raw" XSQL page template is actually the resulting HTML produced by the web server and since this is not wellformed XML, it gives this error.
    The solution, either provide the URL to the bar.xsql page as a file URL, or change the extension on the template page to any extension other than *.xsql so that the template won't get processed by the web server before its delivered.

Maybe you are looking for