WebSphere portal 8.5 cluster creation issue - websphere

I am creating a WebSphere portal cluster version 8.5. I am using the configuration wizard for this. In the 'Create a cluster' section, the last section is 'Complete the cluster setup'.While running it , I got 'Failed' in it . On checking the log files for this , I found the following error ----
/home/portal/WebSphere/PortalServer/jcr/wp.content.repository.install/config/includes/jcr.install_cfg.xml:1106: java.lang.ArrayIndexOutOf
BoundsException: Array index out of range: 0
at com.ibm.wplc.deploy.tasks.impl.ResourceEnvProviderCreateImpl.execute(ResourceEnvProviderCreateImpl.java:86)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeBean(AbstractBaseAdminTask.java:541)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeTask(AbstractBaseAdminTask.java:525)
at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(AbstractBaseWsAdminWrapperTask.java:395)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.execute(AbstractBaseAdminTask.java:175)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:133)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at com.ibm.wps.config.ForTask.execute(ForTask.java:103)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:133)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.Main.start(Main.java:150)
at com.ibm.wps.config.ConfigEngine.process(ConfigEngine.java:981)
at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:219)
at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at org.python.pycode._pyx50.f$0(<string>:78)
at org.python.pycode._pyx50.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.Py.exec(Py.java)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
at com.ibm.bsf.engines.jython.JythonEngine$BSFPythonInterpreter.exec(Unknown Source)
at com.ibm.bsf.engines.jython.JythonEngine.exec(Unknown Source)
at com.ibm.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:330)
at com.ibm.bsf.BSFManager.exec(Unknown Source)
at com.ibm.ws.scripting.AbstractShell.executeScript(AbstractShell.java:1214)
at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:2271)
at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:1108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:981)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:380)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:151)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at com.ibm.wplc.deploy.tasks.impl.ResourceEnvProviderCreateImpl.execute(ResourceEnvProviderCreateImpl.java:43)
... 83 more
--- Nested Exception ---
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at com.ibm.wplc.deploy.tasks.impl.ResourceEnvProviderCreateImpl.execute(ResourceEnvProviderCreateImpl.java:43)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeBean(AbstractBaseAdminTask.java:541)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeTask(AbstractBaseAdminTask.java:525)
at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(AbstractBaseWsAdminWrapperTask.java:395)
at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.execute(AbstractBaseAdminTask.java:175)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:133)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at com.ibm.wps.config.ForTask.execute(ForTask.java:103)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:133)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.Main.start(Main.java:150)
at com.ibm.wps.config.ConfigEngine.process(ConfigEngine.java:981)
at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at org.python.pycode._pyx50.f$0(<string>:78)
at org.python.pycode._pyx50.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.Py.exec(Py.java)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
at com.ibm.bsf.engines.jython.JythonEngine$BSFPythonInterpreter.exec(Unknown Source)
at com.ibm.bsf.engines.jython.JythonEngine.exec(Unknown Source)
at com.ibm.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:330)
at com.ibm.bsf.BSFManager.exec(Unknown Source)
at com.ibm.ws.scripting.AbstractShell.executeScript(AbstractShell.java:1214)
at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:2271)
at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:1108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:981)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:380)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:151)
Failed ANT script: /home/portal/WebSphere/PortalServer/jcr/wp.content.repository.install/config/includes/jcr.install_cfg.xml:1106:
Failed target: action-update-cluster-resource-environment-wp.content.repository.install
Failed task: Task name could not be determined. Please check the line number below for target details.
Probable failed component: wp.content.repository.install
------ Target Stack Trace ------
action-update-cluster-resource-environment-wp.content.repository.install
cluster-node-config-cluster-setup
cluster-node-config-dynamic-cluster-setup
------Target Excerpt ------
1056: <condition>
1057: <contains string="${PortalAdminId}" substring="=" casesensitive="false" />
1058: </condition>
1059: <then>
1060: <property name="jcr.admin.uniquename" value="${PortalAdminId}" />
1061: </then>
1062: <else>
1063: <property name="jcr.admin.uniquename" value="${WmmDbUserPrefix}=${PortalAdminId},${WmmDbSuffix}" />
1064: </else>
1065: </if>
1066: <!-- set custom properties common to all db2 platforms -->
1067: <!-- forceScope="true" forces the node scoped REP to be modified, without forceScope then the cluster scoped REP is modified -->
1068: <wplc-create-res-env-custom-property cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" conntype="${wsadminConnType}"
1069: providerName="${jcr.rep.name}">
1070: <resource name="jcr.database.type" value="${jcr.database.type}" required="true"/>
1071: <resource name="jcr.database.schema" value="${jcr.DbSchema}" required="true" />
1072: <resource name="jcr.admin.uniqueName" value="${jcr.admin.uniquename}" required="true" />
1073: <resource name="jcr.binaryValueFileDir" value="${wp.content.repository.binaryValues.dir}" required="true" />
1074: <resource name="jcr.query.collation.db2.enabled" value="false" required="false" />
1075: <resource name="jcr.textsearch.enabled" value="false" required="true" />
1076: <resource name="jcr.textsearch.convertor" value="com.ibm.icm.ts.convertor.WpsConvertor" required="true" />
1077: <resource name="jcr.textsearch.indexdirectory" value="${wp.content.repository.searchIndexes.dir}" required="true" />
1078: <resource name="jcr.textsearch.fullcrawl.cleanup.interval" value="120" required="true" />
1079: <resource name="jcr.textsearch.applicationserver.name" value="${WpsHostName}" required="true" />
1080: <resource name="jcr.textsearch.applicationserver.port" value="${WpsHostPort}" required="true" />
1081: <resource name="jcr.textsearch.PSE.type" value="localhost" required="true" />
1082: <resource name="jcr.textsearch.SOAP.url" value="" required="true" />
1083: <resource name="jcr.textsearch.EJB.IIOP.URL" value="" required="true" />
1084: <resource name="jcr.textsearch.EJB.EJBName" value="" required="true" />
1085: </wplc-create-res-env-custom-property>
1086: <!-- update ZOS specific custom properties -->
1087: <if>
1088: <condition>
1089: <equals arg1="${jcr.database.type}" arg2="db2_zos" trim="true" casesensitive="false" />
1090: </condition>
1091: <then>
1092: <antcall target="create-resource-environment-provider-jcr-zos" />
1093: </then>
1094: </if>
1095: </target>
1096: <target name="action-update-cluster-resource-environment-wp.content.repository.install">
1097: <!-- remove cluster properties that are specific to each node -->
1098: <wplc-remove-res-env-custom-property cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" providerName="${jcr.rep.name}"
1099: name="jcr.binaryValueFileDir" />
1100: <!-- remove node properties that should be only defined at the cluster level -->
1101: <!-- forceScope="true" forces the node scoped REP to be modified, without forceScope then the cluster scoped REP is modified -->
1102: <wplc-remove-resource-env-provider cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" name="${jcr.rep.name}"
1103: forceScope="true" />
1104: <!-- forceScope="true" forces the node scoped REP to be modified, without forceScope then the cluster scoped REP is modified -->
1105: <wplc-create-resource-env-provider cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" conntype="${wsadminConnType}"
1106:**> name="${jcr.rep.name}" description="Provider for JCR" forceScope="true">
1107: </wplc-create-resource-env-provider>
1108: <!-- forceScope="true" forces the node scoped REP to be modified, without forceScope then the cluster scoped REP is modified -->
ied -->
1109: <wplc-create-res-env-custom-property cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" conntype="${wsadminConnType}"
1110: providerName="${jcr.rep.name}" forceScope="true">
1111: <resource name="jcr.binaryValueFileDir" value="${wp.content.repository.binaryValues.dir}" required="true" />
1112: </wplc-create-res-env-custom-property>
1113: </target>
1114: <target name="create-resource-environment-provider-jcr-zos">
1115: <!-- forceScope="true" forces the node scoped REP to be modified, without forceScope then the cluster scoped REP is modified -->
1116: <wplc-create-res-env-custom-property cell="${CellName}" node="${NodeName}" server="${ServerName}" wasuser="${WasUserid}" waspassword="${WasPassword}" conntype="${wsadminConnType}"
1117: providerName="${jcr.rep.name}">
1118: <resource name="jcr.zos.database.stoGroup" value="${jcr.DbStorageGroup}" required="true" />
1119: <resource name="jcr.zos.database.unicode.enabled" value="${jcr.DbUnicode}" required="true" />
1120: <resource name="jcr.zos.database.blob.bufferpool" value="${jcr.blobBufferpool}" required="true" />
1121: <resource name="jcr.zos.database.bp4k.tables" value="${jcr.Db4KBufferPoolName}" required="true" />
1122: <resource name="jcr.zos.database.bp4k.indexes" value="${jcr.DbIndex4KBufferPoolName}" required="true" />
1123: <resource name="jcr.zos.database.bp32k.tables" value="${jcr.Db32KBufferPoolName}" required="true" />
1124: </wplc-create-res-env-custom-property>
1125: </target>
1126: <target name="action-post-cluster-configuration-wp.content.repository.install">
1127: <!-- Disable TS for primary node only -->
1128: <if>
1129: <condition>
1130: <not>
1131: <equals arg1="${isSecondNode}" arg2="true" trim="true" casesensitive="false" />
1132: </not>
1133: </condition>
1134: <then>
1135: <antcall target="action-disable-textsearch" />
1136: </then>
1137: </if>
1138: </target>
------- Properties and values used in the failed target -------
os.arch=amd64
WasUserid=wasadmin
wsadminConnType=SOAP
jcr.rep.name=JCR ConfigService PortalContent
NodeName=Node01
WasPassword=PASSWORD_REMOVED
ConfigEngineSoapTimeout=${ConfigEngineSoapTimeout}
EngineRootDir=/home/portal/WebSphere/ConfigEngine
enableAawsiTrace=${enableAawsiTrace}
EngineInstallLocation=/home/portal/WebSphere/wp_profile/ConfigEngine
WasRemoteHostName=172.16.100.31
WasSoapPort=8879
CellName=dmgrCell01
ServerName=PortalCluster_Node01
Can please somebody let me know what is the issue and help me to solve it ?

So it is failing on this line
1105: name="${jcr.rep.name}" description="Provider for JCR" forceScope="true">
Did you ensure that the cell node and server name are correct? Usually that error means it cannot find the resource provider to actually set it

Related

Liferay 7 Service Builder Error [NoClassDefFoundError]

I'm working on Liferay and Salesforce. I'm new to Liferay and I'm experiencing an issue that I spent too much time on.
I have a portlet that I decided to create a Service Builder (named "newService"). Here is my service.xml :
<service-builder package-path="com.fr.liferay">
<namespace>SSB</namespace>
<entity local-service="true" name="Comp" remote-service="false" uuid="true">
<!--<entity name="Foo" table="foo" uuid="true" local-service="true" remote-service="false" data-source="sampleDataSource" session-factory="sampleSessionFactory" tx-manager="sampleTransactionManager">-->
<!-- PK fields -->
<column name="compId" primary="true" type="long" />
<!-- Group instance -->
<column name="groupId" type="long" />
<!-- Audit fields -->
<column name="companyId" type="long" />
<column name="userId" type="long" />
<column name="userName" type="String" />
<column name="createDate" type="Date" />
<column name="modifiedDate" type="Date" />
<!-- Other fields -->
<column name="compName" type="String" />
<column name="compDesc" type="String" />
<column name="compPath" type="String" />
<!-- Order -->
<!-- References -->
</entity>
</service-builder>
Now, I run the maven command :mvn service-builder:build and it generated the newService-api artifact.
I'm calling the service inside my portlet as follows:
Comp comp = CompLocalServiceUtil.createComp(3);
comp.persist();
I added the newservice-api dependency in the portlet's pom.xml :
<dependency>
<groupId>com.fr.liferay.liferay7-
architecture.portail7.services.newService</groupId>
<artifactId>newService-api</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
On launching my portlet, I get this error :
Caused by: java.lang.NoClassDefFoundError: com/fr/liferay/service/CompLocalServiceUtil
at com.fr.liferay.controllers.TestController.actionTwoMethod(TestController.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:180)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:367)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:354)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleAction(AnnotationMethodHandlerAdapter.java:285)
at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:666)
... 181 more
12:55:57,243 ERROR [http-nio-8080-exec-5][render_portlet_jsp:131] null
java.lang.NoClassDefFoundError: com/fr/liferay/service/CompLocalServiceUtil
at com.fr.liferay.controllers.TestController.actionTwoMethod(TestController.java:151)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
at com.liferay.portlet.CheckboxParametersPortletFilter.doFilter(CheckboxParametersPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:68)
at com.liferay.portlet.CheckboxParametersPortletFilter.doFilter(CheckboxParametersPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:68)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.service(ServletExceptionAdapter.java:68)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.FilterExceptionAdapter.doFilter(FilterExceptionAdapter.java:46)
at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
Any idea how to solve this?
I wanted to write this as comment but it's too long so I can only post it as answer, sorry.
You create your enitity and all persistense/model/etc stuff is done by ServiceBuilder. In Liferay 7 it is represented by two modules: api and service. After maven's "build" and servicebuilder's "build-service" you can use default crud methods such as CompLocalServiceUtil.deleteComp() and others. And you have written that you use CompLocalServiceUtil.createComp(3) which means that you've already overriden that default method in CompLocalServiceImpl.java file. Is it true? If not - it's exactly why you have your error.
If you want to add your own business logic - you should modified (and build-service again) CompLocalServiceImpl, if you want to add you own model - you should modify CompImpl.java
May be I just misunderstand you.

connection reset in spring integration ftp adapter

I am using spring integration's ftp down loader to download the files in the local directory. after sometimes it gives me the below error.
<bean id="ftpSessionFactory"
class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="${ftp.host}" />
<property name="port" value="$ftp.port}" />
<property name="username" value="${ftp.user}" />
<property name="password" value="${ftp.password}" />
<property name="clientMode" value="2" />
<property name="fileType" value="2" />
<property name="bufferSize" value="100000" />
</bean>
<int-ftp:inbound-channel-adapter id="ftpInbound"
channel="nullChannel"
session-factory="ftpSessionFactory"
charset="UTF-8"
delete-remote-files="false"
remote-directory="${ftp.remotedir}"
preserve-timestamp="true"
auto-create-local-directory="true"
local-directory="${ftp.localdir}"
filter="remoteFileListFilter"
temporary-file-suffix=".writing">
<int:poller fixed-rate="1000" />
</int-ftp:inbound-channel-adapter>
</beans>
error is :
ERROR 2015-07-28 01:41:43,426 [task-scheduler-1][] org.springframework.integration.handler.LoggingHandler - org.springframework.messaging.MessagingException: Problem occurred while synchronizing remote to local directory
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:193)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.receive(AbstractInboundFileSynchronizingMessageSource.java:167)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:124)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:190)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:284)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:278)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:311)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:167)
... 20 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at org.apache.commons.net.ftp.FTPFileEntryParserImpl.readNextEntry(FTPFileEntryParserImpl.java:53)
at org.apache.commons.net.ftp.FTPListParseEngine.readStream(FTPListParseEngine.java:128)
at org.apache.commons.net.ftp.FTPListParseEngine.readServerList(FTPListParseEngine.java:104)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3302)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3271)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2930)
at org.springframework.integration.ftp.session.FtpSession.list(FtpSession.java:68)
at org.springframework.integration.ftp.session.FtpSession.list(FtpSession.java:41)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:171)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:167)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:302)
Caused by: java.net.SocketException: Connection reset
It just means the server closed the connection - look at the server logs.

Apache CXF: Kerberos client configuration are not picked up when using JaxWsProxyFactoryBean

Apache CXF Version 2.7.10
WSS4J Version 1.6.14
Spring 4.0.1.RELEASE
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<cxf:bus>
<cxf:features>
<p:policies/>
<cxf:logging/>
</cxf:features>
</cxf:bus>
<http:conduit name="https://myhost.*">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPassword="password">
<sec:keyStore type="JKS" password="password" resource="keystore.jks" />
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="password" resource="keystore.jks"/>
</sec:trustManagers>
<sec:cipherSuitesFilter>
<sec:include>.*_EXPORT_.*</sec:include>
<sec:include>.*_EXPORT1024_.*</sec:include>
<sec:include>.*_WITH_DES_.*</sec:include>
<sec:include>.*_WITH_AES_.*</sec:include>
<sec:include>.*_WITH_NULL_.*</sec:include>
<sec:exclude>.*_DH_anon_.*</sec:exclude>
</sec:cipherSuitesFilter>
</http:tlsClientParameters>
</http:conduit>
<jaxws:client name="{http://my.namespace/}SOAPDelegatorServicePort"
serviceClass="a.b.c.d.SOAPDelegatorService" serviceName="s:SOAPDelegatorService"
endpointName="s:SOAPDelegatorServicePort" xmlns:s="http://my.namespace/"
address="https://myhost:8443/delegator/api/soap" wsdlLocation="wsdl/delegator.wsdl"
createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.kerberos.client">
<bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
<constructor-arg ref="cxf"/>
<property name="contextName" value="JaasContextName"/>
<property name="serviceName" value="HTTP#ServiceName"/>
<property name="callbackHandler">
<bean class="com.sun.security.auth.callback.TextCallbackHandler" />
</property>
</bean>
</entry>
<entry key="mtom-enabled" value="true"/>
<entry key="auth.spnego.useKerberosOid" value="true"/>
</jaxws:properties>
</jaxws:client>
<bean id="soapDelegatorClientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="a.b.c.d.SOAPDelegatorService" />
<property name="address" value="https://myhost:8443/delegator/api/soap" />
</bean>
<bean id="soapDelegatorClient" class="a.b.c.d.SOAPDelegatorService" factory-bean="soapDelegatorClientFactory" factory-method="create" />
I am expecting that Apache CXF will make my kerberos config in jaxws-client be available on my JaxWsProxyFactoryBean. As it turns out, that's not the case. I get the error below:
javax.xml.ws.soap.SOAPFaultException: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}TransportBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens: The received token does not match the supporting token requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}KerberosToken
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
at $Proxy66.executeRequest(Unknown Source)
at a.b.c.d.webServiceClientTest(WebServiceIntegrationTest.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.cxf.binding.soap.SoapFault: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}TransportBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens: The received token does not match the supporting token requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}KerberosToken
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1614)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1504)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 27 more
The http conduit name is not the conduit address, You need to change the http:conduit name just like this
<http:conduit name="*.http-conduit" />

hibernate template find() HibernateObjectRetrievalFailureException

We have some legacy code that works in one environment and not another. The offending block is:
String hql = "from UsrOrgLvlAsgnT where usrAccountT.usrId = ? ";
List<UsrOrgLvlAsgnT> result= getHibernateTemplate().find(hql,usrId);
return result;
the log seems to indicate two SQL calls being run, getting the main record (UsrOrgLvlAsgnT) runs first and I presume succeeds, but then a second call to get a detail record runs, and seems to issue the error.
Problem 1 - This should not be eager fetching. HBM follows:
<hibernate-mapping>
<class name="gov.usdoj.afms.umc.hibernate.model.UsrOrgLvlAsgnT" table="USR_ORG_LVL_ASGN_T" schema="UMC" dynamic-update="true">
<id name="usrAsgnId" type="int">
<column name="USR_ASGN_ID" />
<generator class="identity" />
</id>
<many-to-one name="usrAccountT" class="gov.usdoj.afms.umc.hibernate.model.UsrAccountT" fetch="select" cascade="save-update">
<column name="USR_ID" length="60" not-null="true" />
</many-to-one>
<many-to-one name="structureL" class="gov.usdoj.afms.umc.hibernate.model.StructureL" update="true" insert="true" fetch="select" cascade="save-update">
<column name="STRUCTURE_CD" length="2" not-null="true" />
</many-to-one>
<many-to-one name="orgLvl1L" class="gov.usdoj.afms.umc.hibernate.model.OrgLvl1L" update="false" insert="false" fetch="select" not-found="ignore" not-null="false" cascade="save-update">
<column name="STRUCTURE_CD" length="2" not-null="true" />
<column name="ORG_LVL1_CD" length="5" />
</many-to-one>
<many-to-one name="orgLvl2L" class="gov.usdoj.afms.umc.hibernate.model.OrgLvl2L" update="false" insert="false" fetch="select" not-found="ignore" not-null="false" cascade="save-update">
<column name="STRUCTURE_CD" length="2" not-null="true" />
<column name="ORG_LVL1_CD" length="5" />
<column name="ORG_LVL2_CD" length="6" />
</many-to-one>
<many-to-one name="orgLvl3L" class="gov.usdoj.afms.umc.hibernate.model.OrgLvl3L" update="false" insert="false" fetch="select" not-found="ignore" not-null="false" cascade="save-update">
<column name="STRUCTURE_CD" length="2" not-null="true" />
<column name="ORG_LVL1_CD" length="5" />
<column name="ORG_LVL2_CD" length="6" />
<column name="ORG_LVL3_CD" length="12" />
</many-to-one>
<many-to-one name="orgLvl4L" class="gov.usdoj.afms.umc.hibernate.model.OrgLvl4L" update="false" insert="false" fetch="select" not-found="ignore" not-null="false" cascade="save-update">
<column name="STRUCTURE_CD" length="2" not-null="true" />
<column name="ORG_LVL1_CD" length="5" />
<column name="ORG_LVL2_CD" length="6" />
<column name="ORG_LVL3_CD" length="12" />
<column name="ORG_LVL4_CD" length="6" />
</many-to-one>
<property name="updtTmstmp" type="timestamp" generated="always">
<column name="UPDT_TMSTMP" length="26" not-null="true" />
</property>
<property name="dfltOrgLvl" type="java.lang.Character">
<column name="DFLT_ORG_LVL" length="1" />
</property>
</class>
</hibernate-mapping>
Problem 2 - This FK relationship is a legacy deal and the folks before us used blanks for nulls. I have no idea why. But I can't realistically change it at this time. Is there a way to make hibernate handle this empty relationship without blowing up?
The Exception:
[10/15/13 10:17:12:897 EDT] 0000002e SystemOut O ERROR [WebContainer : 7] (St60Servlet.java:82) - Error in St60. Process will not continue:
java.lang.RuntimeException: org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [gov.usdoj.afms.umc.hibernate.model.OrgLvl2L#gov.usdoj.afms.umc.hibernate.model.OrgLvl2LId#3d4ed6f3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [gov.usdoj.afms.umc.hibernate.model.OrgLvl2L#gov.usdoj.afms.umc.hibernate.model.OrgLvl2LId#3d4ed6f3]
at gov.usdoj.afms.umc.services.St60Service.fetchOU(St60Service.java:373)
at gov.usdoj.afms.umc.services.St60Service.buildOU(St60Service.java:325)
at gov.usdoj.afms.umc.services.St60Service.verifyUserGroups(St60Service.java:178)
at gov.usdoj.afms.umc.services.St60Service.verifyUpdate(St60Service.java:64)
at gov.usdoj.afms.umc.services.St60Service$$FastClassByCGLIB$$7efbe043.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
at gov.usdoj.afms.umc.services.St60Service$$EnhancerByCGLIB$$d08c239.verifyUpdate(<generated>)
at gov.usdoj.afms.umc.St60.St60Servlet.doGet(St60Servlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1536)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1470)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at gov.usdoj.afms.umc.utils.hibernate.DBParameterFilter.doFilter(DBParameterFilter.java:46)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:363)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:858)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:824)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:458)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3742)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:929)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:178)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by:
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [gov.usdoj.afms.umc.hibernate.model.OrgLvl2L#gov.usdoj.afms.umc.hibernate.model.OrgLvl2LId#3d4ed6f3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [gov.usdoj.afms.umc.hibernate.model.OrgLvl2L#gov.usdoj.afms.umc.hibernate.model.OrgLvl2LId#3d4ed6f3]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:663)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:908)
at gov.usdoj.afms.umc.hibernate.dao.HibernateAccountInfoDaoImpl.fetchUsrOrgLvlAsgnById(HibernateAccountInfoDaoImpl.java:144)
at sun.reflect.GeneratedMethodAccessor914.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
at $Proxy70.fetchUsrOrgLvlAsgnById(Unknown Source)
at gov.usdoj.afms.umc.services.St60Service.fetchOU(St60Service.java:360)
... 50 more
Caused by:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [gov.usdoj.afms.umc.hibernate.model.OrgLvl2L#gov.usdoj.afms.umc.hibernate.model.OrgLvl2LId#3d4ed6f3]
at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:447)
at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:320)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:277)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1028)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:623)
at org.hibernate.type.EntityType.resolve(EntityType.java:431)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:140)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:898)
at org.hibernate.loader.Loader.doQuery(Loader.java:773)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:1)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
... 61 more

Import PostgreSQL Database to Solr in Windows 7

I'm trying to import a PostgreSQL database to Solr 4.3.1, so far I added this code to Solrconfig.xml :
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
</lst>
</requestHandler>
and this to the newly created db-data-config.xml
<dataConfig>
<dataSource driver="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/test"
user="postgres"
password="123" />
<document>
<entity name="phonebook" query="SELECT phone, firstname from phonebook">
<field column="phone" name="id" />
<field column="firstname" name="name" />
<entity name="revision" query="select rev_id from revision where rev_page=${phonebook.phone}">
<entity name="pagecontent" query="select old_text from pagecontent where old_id=${revision.rev_id}">
<field column="old_text" name="text" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
all these files are under the collection1 directory, am I doing anything wrong ?
Edit:
when I connect using localhost:435/solr/TEST/dataimport
I get this error
{msg=SolrCore 'collection1' is not available due to init failure: RequestHandler init failure,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: RequestHandler init failure
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1212)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:758)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.handler.dataimport.DataImportHandler'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:464)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 14 more
Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.dataimport.DataImportHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
... 18 more
,code=500}
you need to include DIH jars in your solrconfig.xml.
smth like this:
<lib dir="../../../contrib/dataimporthandler/lib" regex=".*\.jar"/>
<lib dir="../../../dist/" regex="solr-dataimporthandler-\d.*\.jar"/>

Resources