cancel
Showing results for 
Search instead for 
Did you mean: 

portal service getting "null" after server restart & sometimes randomly

Former Member
0 Kudos

Hi,

We have a portal service running on our portal. It's a simple portal service exposing a few methods.

Everything works fine when i deployed the dc [_DC Type_: Portal application standalone (Packed in SDA) ].

1) But if the server is restarted, and we try to access this portal service, we get NULL exception. It works fine if re-deploy DC again.

2) And sometimes, this occurs even if the server isn't restarted.

I have given startup property in the portalapp.xml

Plz find below the portalapp.xml


<?xml version="1.0" encoding="UTF-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="com.sap.portal.compatibility50.cache"/>
    <property name="startup" value="true"/>
    <property name="PrivateSharingReference" value="com.sap.portal.ivs.connectorservice"/>
  </application-config>
  <components/>
  <services>
    <service name="MyDataService">
      <service-config>
        <property name="className" value="com.pkg1.MyDataService"/>
        <property name="startup" value="true"/>
      </service-config>
...
...
    </service>
  </services>
</application>

It would be great if anyone can help!

Thank you.

SK.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189631
Active Contributor
0 Kudos

SK,

Please make sure that you have given the key under src-api -> I<Myservice> -> Set the Unique Key

Ram

Former Member
0 Kudos

Hi Ramganesan,

Thanks for the reply. I have already done that.

I have given the KEY as <DCNAME>.<MYCLASSNAME> (i.e.) psrvdc1.MyDataService in the IMyDataService class

It doesn't work when the server is restarted... i think the service is not able to load itself (which it should) when the server restarts. Any thoughts on that ???

However, the service works when i redeploy it ..

Best Regards,

SK

Former Member
0 Kudos

HI,

maybe a sample of portalapp.xml of a working service could help:


<?xml version="1.0" encoding="UTF-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="........blahblahblah......"/>
    <property name="startup" value="true"/>
    <property name="releasable" value="false"/>
    <property name="ClassLoadingPolicy" value="CoreAccessInAPI,transitive"/>
    <property name="DeploymentPolicy" value="6.0"/>
  </application-config>
  <components/>

Romano