Can't setup PofAnnotationSerializer in pof-config.xml

Hi,
i have class annotated with @Portable and @PortableProperty, and pof-config.xml for setup serializer:
      <user-type>
         <type-id>1001</type-id>
         <class-name>entity.dto.base.EmployeeBaseDTO</class-name>
         <serializer>
            <class-name>com.tangosol.io.pof.PofAnnotationSerializer</class-name>
                <init-params>
                <init-param>
                    <param-type>int</param-type>
                    <param-value>1001</param-value>
                 </init-param>
                 <init-param>
                    <param-type>java.lang.Class</param-type>
                    <param-value>entity.dto.base.EmployeeBaseDTO</param-value>
                 </init-param>
              </init-params>
         </serializer>
      </user-type>
While starting Coherence 3.7.1 cluster, I get error:
Unable to instantiate PofSerializer class: com.tangosol.io.pof.PofAnnotationSerializer (Config=...\pof-config.xml, Type-Id=1001,
Class-Name=entity.dto.base.EmployeeBaseDTO))
java.lang.InstantiationException: Could not find a constructor for com.tangosol.io.pof.PofAnnotationSerializer(java.lang.Integer, com.tangosol.run.xml.SimpleElement)
Why second PofAnnotationSerializer contructor parameter is com.tangosol.run.xml.SimpleElement and not java.lang.Class ?
BTW setup PofAnnotationSerializer programatically works fine:
SimplePofContext pofCtx = new SimplePofContext();
int typeId = 1001;
pofCtx.registerUserType(typeId, EmployeeBaseDTO.class , new PofAnnotationSerializer<EmployeeBaseDTO>(typeId++, EmployeeBaseDTO.class, true));
Thanks,
L.V.

OK, so to enable auto indexing then yes, you need to specify the serializer in the POF configuration, as it says in the documentation 19.3.3 Enabling Automatic Indexing.
So in your case the configuration should look like this
      <user-type>
         <type-id>1001</type-id>
         <class-name>entity.dto.base.EmployeeBaseDTO</class-name>
         <serializer>
            <class-name>com.tangosol.io.pof.PofAnnotationSerializer</class-name>
                <init-params>
                <init-param>
                    <param-type>int</param-type>
                    <param-value>{type-id}</param-value>
                 </init-param>
                 <init-param>
                    <param-type>class</param-type>
                    <param-value>{class}</param-value>
                 </init-param>
                 <init-param>
                    <param-type>boolean</param-type>
                    <param-value>true</param-value>
                 </init-param>
              </init-params>
         </serializer>
      </user-type>
You do not replace the param-values that are inside { } or change the param-type values as these are macros that Coherence will automatically replace with the correct values.
Regarding your error, I'm not sure if that is related to your original question/issue.
JK

Similar Messages

  • Incorrect coherence-rest-pof-config.xml in coherence-rest.jar (Missing PofSerializer configuration)?

    I'm running Coherence 3.7.1.0.0 with REST enabled as per the instruction. I have included coherence-rest-pof-config.xml in my pof config like so:
    <include>coherence-pof-config.xml</include>
    <include>coherence-rest-pof-config.xml</include>
    When I start Coherence, I get the following error:
    Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Missing PofSerializer configuration (Config=custom-types-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
    The config in coherence-rest-pof-config.xml for com.tangosol.coherence.rest.internal.Get is as follows:
    <user-type>
          <type-id>801</type-id>
          <class-name>com.tangosol.coherence.rest.internal.Get</class-name>
        </user-type>
    I had a quick look in the coherence-rest.jar, where com.tangosol.coherence.rest.internal.Get is defined. com.tangosol.coherence.rest.internal.Get implements InvocableMap.EntryProcessor, but not PortableObject.
    Am I missing something? As far as I can see, InvocableMap.EntryProcessor does not implement PortableObject either.
    Is there any way to fix this?
    Thanks

    The jar file coherence-common-1.7.0.16988.jar would have been part of the Coherence Incubator product, and isn't part of the core Coherence product itself.
    You'd probably need to refer to the Coherence Incubator site as there are probably significant changes between the version you are using in 3.5.3 and with what is meant for 12.1.2.

  • Can I use morethen one faces-config.xml

    HI,
    now I am learning jsf, I have a doubt that ,can I use more than on faces-config.xml in one application ? and can we cahange name of faces-config.xml to faces-config-first.xml, and faces-config-second.xml? if it is possible , what should i do?
    Thank&Regards
    satya..

    Why would you want multiple config files? Is it for organization only...
    How would your app. know the when to use a different config file?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                       

  • Where can I find the schema for config.xml file of jax-rpc

    For the xrpcc tool I need to create a config.xml file, does any body know where can I find the schema for it?

    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXRPCxrpcc.html and all your questions will be answered... except maybe why aren't these pages linked from the main index anymore? (they were when 1.0 of the tutorial was released, but then there were no docs for wscompile or wsdeploy. The JAX-RPC release notes fixed the latter, but around 1.0_01 they broke the former.)

  • Office 2013 Setup Logging Template %hostname% Config.xml

    Hello,
    we want to deploy Office 2013 through SCCM with a Log-File which should be stored on a Server. To identify from which Computer the log file is, it should be named like the hostname.
    I have specifed the followig in the config.xml
    <Logging Type="verbose" Path="\\logserver\log\" Template="%hostname%.txt" />
    instead of translating the hostname there is only a %hostname%.txt on the logserver.
    Anyone an idea to solve this?
    Thanks.

    Glad to see you have your problem resolved. And thanks for sharing the workaround here, this should be helpful to other users who encounter the same problem.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Unable to run Cache Factory JVM instance throws Missing POF config xml file

    I have configured three JVM instances in Eclipse using Run Configurations Menu
    - JUnit JVM
    -Default Cache Server JVM
    -Cache Factory JVM
    The configurations of Default Cache Server are
    Main Class : com.tangosol.net.DefaultCacheServer
    Arguments:
    -Dtangosol.coherence.cacheconfig=C:\..\resources\coherence-cache-config.xml
    -Dtangosol.coherence.distributed.localstorage=true
    -Dtangosol.coherence.management=all
    -Dtangosol.coherence.management.remote=true
    The Configurations for CacheFactory are
    Main Class: com.tangosol.net.CacheFactory
    Arguments:
    -Dtangosol.coherence.cacheconfig=C:\..\resources\coherence-cache-config.xml
    -Dtangosol.coherence.distributed.localstorage=false
    First i run Default Cache Server which runs successfully. Then i ran CacheFactory the console messages doesnt say that its refering to coherence-cache-config.xml
    Here is the snippet from console messages
    Oracle Coherence Version 3.5.1/461
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-10-29 09:57:07.028/5.266 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2009-10-29 09:57:07.105/5.343 Oracle Coherence GE 3.5.1/461 <Info> (thread=Cluster, member=n/a): Failed to satisfy the variance: allowed=16, actual=47
    2009-10-29 09:57:07.105/5.343 Oracle Coherence GE 3.5.1/461 <Info> (thread=Cluster, member=n/a): Increasing allowable variance to 19
    2009-10-29 09:57:07.495/5.733 Oracle Coherence GE 3.5.1/461 <Info> (thread=Cluster, member=n/a): This Member(Id=2, Timestamp=2009-10-29 09:57:07.23, Address=165.137.250.122:8089, MachineId=54906, Location=site:cable.comcast.com,machine:PACDCL-CJWWND1b,process:5296, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) joined cluster "cluster:0xD1CB" with senior Member(Id=1, Timestamp=2009-10-29 09:54:18.406, Address=165.137.250.122:8088, MachineId=54906, Location=site:cable.comcast.com,machine:PACDCL-CJWWND1b,process:3236, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1)
    2009-10-29 09:57:07.744/5.982 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=n/a): Member 1 joined Service Management with senior member 1
    2009-10-29 09:57:07.744/5.982 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=n/a): Member 1 joined Service DistributedCache with senior member 1
    2009-10-29 09:57:08.414/6.652 Oracle Coherence GE 3.5.1/461 <D5> (thread=Invocation:Management, member=2): Service Management joined the cluster with senior service member 1
    2009-10-29 09:57:09.582/7.820 Oracle Coherence GE 3.5.1/461 <D5> (thread=TcpRingListener, member=2): TcpRing: connecting to member 1 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/165.137.250.122,port=1383,localport=8089]}
    SafeCluster: Name=cluster:0xD1CBPlease note the following messages are missing from the above console messages which are present in Cache Server but not Cache Factory
    Oracle Coherence Version 3.5.1/461
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-10-29 09:54:17.062/13.141 Oracle Coherence GE 3.5.1/461 <Info> (thread=Main Thread, member=n/a): Loaded cache configuration from "jar:file:/C:/Software/coherence-v3.5.1b461/coherence/lib/coherence.jar!/reports/report-group.xml"
    2009-10-29 09:54:17.234/13.313 Oracle Coherence GE 3.5.1/461 <Info> (thread=Main Thread, member=n/a): Loaded cache configuration from "file:/C:/MyWorkspaces/EnterpriseServicesPlatform/ContractService/ServiceImpl/src/main/resources/coherence-cache-config.xml"

    The CacheFactory will not load the cache configuration until you use a cache related command the first time. For example:
    Map (?): cache test
    2009-10-30 09:18:47.847/8.164 Oracle Coherence GE 3.5/459 <Info> (thread=main, member=1): Loaded cache configuration from file "/Users/rob.misek/temp/new-cache-config.xml"
    <class-scheme>
    <scheme-name>default-backing-map</scheme-name>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    </class-scheme>
    Rob
    :Coherence Team:

  • Declaring "tangosol.pof.enabled=" and "tangosol.pof.config=" in xml config

    Dear all,
    Is there a way to declare "tangosol.pof.enabled=true" and "tangosol.pof.config=my-pof-config.xml" in coherence xml config (e.g. tangosol-coherence-override.xml) ratherthan using the "-Dtangosol.pof.config=" and "-Dtangosol.pof.config=".
    We are looking for this because deploying the same config file on both our application servers and our pure coherence nodes is the easiest way we have to be sure that the configurations are in sync.
    We have lost several hours last week figuring that we forgot to declare these "-Dtangosol.pof..xxx" environment variables in our J2EE servers and we would like to prevent this to reoccur.
    Cyrille

    For versions earlier than 3.6, if you don't want to set POF to be the default with the tangosol.pof.enabled switch, you have to add the full serializer definition to your cache config:
    <serializer>
    <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
    <!-- Optionally override the default value ("pof-config.xml", or the setting of -Dtangosol.pof.config) -->
    <init-params>
    <init-param>
    <param-type>String</param-type>
    <param-value>pof-config.xml</param-value>
    </init-param>
    </init-params>
    </serializer>
    From Coherence 3.6, you can add a <serializer/> element to the scheme in
    the cache config file:
    <distributed-scheme>
    <scheme-name>example-distributed</scheme-name>
    <service-name>DistributedCache</service-name>
    <serializer>pof</serializer>
    You can also define the default serialisation method in the cache
    config file:
    <cache-config>
    <defaults>
    <serializer>pof</serializer>
    </defaults>
    Both of these refer to a set of serializers defined in the operational config file that you can override using an
    operational overrides file. E.g.
    <!-- tangosol-coherence-override.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <coherence>
    <cluster-config>
    <serializers>
    <serializer id="pof">
    <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
    <init-params>
    <init-param>
    <param-type>String</param-type>
    <param-value>my-pof-config.xml</param-value>
    </init-param>
    </init-params>
    </serializer>
    </serializers>
    </cluster-config>
    </coherence>

  • How to modify POF config dynamically?

    we have a application framework developed in C# .NET which includes 5 applications renning under that.
    my application is running under this framework. I am rading my POF Config entry from app.config of main applicacation(framework)
    I can not add seperate app.config my my application. Also i can not modify the main coherence-pof-config.xml.
    Now the problem is, for my application i want to add new user type in my pof-config file dynamically. how to add that?
    Please help...

    Hi Nick,
    you can specify the <serializer> in the distributed-scheme or other similar scheme elements in the cache configuration file, and it can take an init param specifying the locator of the file name.
         <distributed-scheme>
              <scheme-name>loader-scheme</scheme-name>
              <backing-map-scheme>
                   <local-scheme />
              </backing-map-scheme>
              <autostart>true</autostart>
              <serializer>
                   <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                   <init-params>
                        <init-param>
                             <param-type>string</param-type>
                             <param-value>pof-config-other.xml</param-value>
                        </init-param>
                   </init-params>
              </serializer>
         </distributed-scheme>Output:
    ... (thread=main, member=n/a): Loaded cache configuration from resource "file:.../coherence-cache-config-poftest.xml"
    ...(thread=DistributedCache, member=1): Loading POF configuration from resource "file:.../pof-config-other.xml"Best regards,
    Robert

  • Missing LongBasedIdentifier in coherence-common-pof-config

    Hi all,
    com.oracle.coherence.common.identifiers.LongBasedIdentifier is missing from the coherence-common-pof-config.xml
    Just wanted to report this oversight (if it's not an oversight please let me know why).
    Cheers,
    Alberto

    Hi Alberto,
    Thanks for letting us know. I've fixed this in Incubator 10 and will back patch into Incubator 9.
    Regards
    -- Brian
    Brian Oliver | Architect | Oracle Coherence 


  • Send parameters in facec-config.xml

    Hi, help me please!
    Can I do so in faces-config.xml :
    <navigation-rule>
    <from-view-id>/pages/requestDetails.jsp</from-view-id>
    <navigation-case>
    <from-outcome>toCorporateRequestDetailsV</from-outcome>
    <to-view-id>/pages/corporateRequestDetailsV.jsp?p=12</to-view-id>
    </navigation-case>
    </navigation-rule>
    I need the value of p parameter in backing bean

    Surely you can do. You only need to define parametername 'p' as managed-property of the managed bean which is associated with the page.
    Also see the "Passing GET parameters" part of this article: http://balusc.blogspot.com/2006/06/communication-in-jsf.html

  • Maven gar plugin, not generating pof config

    Hello,
    I'm trying to generate the pof-config.xml file using the maven-gar-plugin as described in this documentation -
    Building Coherence Projects with Maven - 12c (12.1.2)
    The plugin does not seem to generate the pof config file as documented. I've POJO's annotated with @Portable and @PortableProperty.
    Thanks-

    Hi,
    It was problem with my pom.xml. Finally I have created OSGI bundle with maven-scr plugin J Now I have the correct folder structure (OSGI-INF folder). Actually I need to have a reference via sling.getService only. I have installed my osgi bundle in Felix console successfully. The status of the bundle is Active. But the component status is “registered” When I check it in component console. And there is no entry in my service console.
    Here is my java class
    package com.adobe.support.examples.com.adobe.support.examples.osgi.service;
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Properties;
    import org.apache.felix.scr.annotations.Service;
    import org.apache.felix.scr.annotations.Property;
    @Component(immediate = true, metatype = true)
    @Service
    public class SampleServiceImpl implements SampleService {
    public String sayHello() {
         return "Hello World!";
    Why component statis is 'registerd' instead of having 'active' Could you please tell me how to fix it?
    Thanks in advance
    Regards,
    Anderson

  • Can create new cache with new cache config xml to existing cache server?

    Hi,
    I have a question regarding coherence cache.
    currently there is coherence cache server running with its own cache config file.
    Can I create another cache with new cache config file?
    If so, do I need add my own cache config file and pof file to the server?
    so during cache server start up, it can load cache config and pof config file?
    Thanks for the help.
    Regards
    Julia

    Yes, when you want to load your own cache configuration you can use something like
    export CLASSPATH=coherence.jar
    java -Xms512m -Xmx512m -Dtangosol.coherence.cacheconfig=my-cache-config.xml com.tangosol.net.DefaultCacheServerby using the system parameter tangosol.coherence.cacheconfig you can add your own cache configuration. Note that
    the POF configuration is loaded when you are referring to it in your cache configuration.

  • Component and renderer can't share the same name in face-config.xml

    Hi All,
    I've noticed that a component and a renderer can't share the same name in <face-config.xml>.
    For instance,
    <component>
    <component-type>tree</component-type>
    <component-class>com.xxx.tree.component.Tree</component-class>
    </component>
    <render-kit>
    <renderer>
    <renderer-type>tree</renderer-type>
    <renderer-class>com.xxx.tree.renderer.Tree</renderer-class>
    </renderer>
    </render-kit>     
    generates a cryptic error message.
    It's not a big deal but would be nice to support it.
    The workaround of course is to use a different name for the component and renderer (tree and treeRenderer for instance)
    Stephane

    i dont know why it doesn't work for you. It works for me alright. Can u elaborate on what error messages you are getting? It maybe some other problem.

  • Can i make more than one faces-config.xml file ?

    Can i make more than one faces-config.xml file under one project or application, if yes than how it will link.

    Just that you know,
    In the second week of july I was taking the Jdeveloper/Jheadstart course at Oracle Netherlands. During that course we were asked to split the faces-config. After splitting it, we were not able to find the navigation rules that were defined in the first faces-config in the web.xml. The Jdeveloper IDE was confused........
    However, we were able to use the navigation rules (type in manualy) and that worked in the application.
    I talked about it with Steven Davelaar and he thought it might be a bug. I don't know if it's reported, and I don't know if it's fixed.
    So, if you get confused.... it works, but Jdeveloper might have some problems with it.
    Luc Bors

  • Faces-config.xml is the only configuration file or we can keep more

    Hi All,
    1) faces-config.xml is the only name specification allowed in JSF for configuration file or can we use another name for this configuration (like as struts) ?
    2) can we have multiple configuration files in JSF like as struts contains multiple configuration files for navigation ?
    Thanks,
    Rajesh Yarlagadda

    http://one-size-doesnt-fit-all.blogspot.fi/2007/01/using-multiple-faces-configxml-files-in.html
    Edited by: Nik on Sep 25, 2012 1:13 AM

Maybe you are looking for