Liferay Thrift Servlet - standard authentication - java

i have an Liferay portal 6.2 ce ga4 jboss bundle up and running with a thrift servlet i wrote for communication between an app and the server. I wanna use Liferay for its User Management only, so i just want to authenticate a User with his credentials through the Liferay api.
I first tried to use the UserLocalServiceUtil, but when i call the Method the Server throws this error :
08:07:13,962 SEVERE [com.liferay.portal.kernel.bean.PortalBeanLocatorUtil] (http--0.0.0.0-8080-1) BeanLocator is null
08:07:13,963 ERROR [stderr] (http--0.0.0.0-8080-1) java.lang.Exception: Stack trace
08:07:13,963 ERROR [stderr] (http--0.0.0.0-8080-1) at java.lang.Thread.dumpStack(Thread.java:1365)
08:07:13,963 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:74)
08:07:13,964 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.service.UserLocalServiceUtil.getService(UserLocalServiceUtil.java:3417)
08:07:13,964 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.service.UserLocalServiceUtil.getBeanIdentifier(UserLocalServiceUtil.java:1004)
08:07:13,964 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.implemented.UserAuthenticationHandler.signIn(UserAuthenticationHandler.java:33)
08:07:13,965 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.generated.UserAuthenticationService$Processor$signIn.getResult(UserAuthenticationService.java:253)
08:07:13,965 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.generated.UserAuthenticationService$Processor$signIn.getResult(UserAuthenticationService.java:1)
08:07:13,966 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
08:07:13,966 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
08:07:13,966 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.server.TServlet.doPost(TServlet.java:83)
08:07:13,967 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
08:07:13,967 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
08:07:13,968 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
08:07:13,968 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
08:07:13,969 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
08:07:13,969 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
08:07:13,970 ERROR [stderr] (http--0.0.0.0-8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
08:07:13,970 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
08:07:13,971 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
08:07:13,971 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
08:07:13,972 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
08:07:13,972 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
08:07:13,972 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
08:07:13,973 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
08:07:13,973 ERROR [stderr] (http--0.0.0.0-8080-1) at java.lang.Thread.run(Thread.java:745)
08:07:13,974 ERROR [stderr] (http--0.0.0.0-8080-1) com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
08:07:13,974 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:82)
08:07:13,974 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.service.UserLocalServiceUtil.getService(UserLocalServiceUtil.java:3417)
08:07:13,975 ERROR [stderr] (http--0.0.0.0-8080-1) at com.liferay.portal.service.UserLocalServiceUtil.getBeanIdentifier(UserLocalServiceUtil.java:1004)
08:07:13,975 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.implemented.UserAuthenticationHandler.signIn(UserAuthenticationHandler.java:33)
08:07:13,975 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.generated.UserAuthenticationService$Processor$signIn.getResult(UserAuthenticationService.java:253)
08:07:13,976 ERROR [stderr] (http--0.0.0.0-8080-1) at com.fsu.unired.alarmapp.thrift.generated.UserAuthenticationService$Processor$signIn.getResult(UserAuthenticationService.java:1)
08:07:13,976 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
08:07:13,976 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
08:07:13,977 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.thrift.server.TServlet.doPost(TServlet.java:83)
08:07:13,977 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
08:07:13,977 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
08:07:13,977 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
08:07:13,978 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
08:07:13,978 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
08:07:13,978 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
08:07:13,979 ERROR [stderr] (http--0.0.0.0-8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
08:07:13,980 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
08:07:13,980 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
08:07:13,980 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
08:07:13,981 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
08:07:13,981 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
08:07:13,981 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
08:07:13,981 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
08:07:13,982 ERROR [stderr] (http--0.0.0.0-8080-1) at java.lang.Thread.run(Thread.java:745)
I really don't come any further. I also looked at com.liferay.portal.security.auth but cannot find any classes. I just want a method that i can call that checks if a user is registered.
Here is my Code that is running on the servlet.
import org.apache.thrift.TException;
import com.fsu.unired.alarmapp.thrift.generated.User;
import com.fsu.unired.alarmapp.thrift.generated.UserAuthenticationService;
import com.liferay.portal.service.UserLocalServiceUtil;
public class UserAuthenticationHandler implements UserAuthenticationService.Iface {
#Override
public User signIn(String forceMail, String password){
System.out.println("signIn called...");
User usr = new User();
System.out.println("returning user:" + usr.toString());
try {
int status = com.liferay.portal.service.UserLocalServiceUtil.authenticateByEmailAddress(0, forceMail, password, null,null, null);
System.out.println("Status : " +status);
switch(status) {
case -1: return null;
case 1: System.out.println("case 1");
com.liferay.portal.model.User liferayUser = UserLocalServiceUtil.getUserByEmailAddress(0, forceMail);
System.out.println(liferayUser.toString());
}
return usr;
}
catch(Exception e) {
e.printStackTrace();
}
return usr;
}
I have the portal-service.jar included. And here is my web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>alarm-thrift-servlet</display-name>
<servlet>
<description></description>
<display-name>ThriftServlet</display-name>
<servlet-name>ThriftServlet</servlet-name>
<servlet-class>com.fsu.unired.alarmapp.servlet.ThriftServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ThriftServlet</servlet-name>
<url-pattern>/ThriftServlet</url-pattern>
</servlet-mapping>
</web-app>

I'm assuming that you're deploying a plain web application - you might want to try a Liferay-web plugin. This is very similar but is aware of Liferay being present and might initialize the infrastructure that Liferay's API needs. Otherwise you'll have to do this initialization yourself.

Related

unlock() never invoked but using try..finally

I'm using a servlets (atmosphere framework and a custom one) which both use the same ReentrantLock to synchronize some operations. I got the confusing behavior, that a single thread enters the lock again and again without ever calling unlock() matching its previous lock().
For debugging purposes I've added a dump of the stacktrace right after the lock() invokation and it always shows the very same output. Doesn't this mean, that my method is invoked again and again but the succeeding try...finally is never executed?
IManagerLock batchLock = _lockManager.getManagerLock(true);
try {
// ...do something - in this case the code won't try to lock() again
}
finally {
batchLock.unlock();
}
The getManagerLock() will aquire the lock and return some wrapper object around the lock which allows me to perform some debugging etc. It will e.g. assign an UUID to the wrapper object which is printed to the log on lock() and unlock().
Here is an example of the wired stacktrace. It is repeated seven times. As you can see, there is only the Locked: xxx but not Unlocked: xxx message.
17:25:18,550 INFO [stdout] (http-/0.0.0.0:8080-13) Locked: 1a59d9ea-841f-4024-9043-67c8e649c342
17:25:18,551 ERROR [stderr] (http-/0.0.0.0:8080-13) java.lang.Exception
17:25:18,551 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$LockManagerBatch.<init>(DefaultLockManager.java:377)
17:25:18,552 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager.getManagerLock(DefaultLockManager.java:246)
17:25:18,553 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$Proxy$_$$_WeldClientProxy.getManagerLock(DefaultLockManager$Proxy$_$$_WeldClientProxy.java)
17:25:18,553 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.channel.LockChannel.onClose(LockChannel.java:128)
17:25:18,554 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:25:18,554 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:25:18,555 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:25:18,556 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.reflect.Method.invoke(Method.java:606)
17:25:18,556 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.util.Utils.invoke(Utils.java:209)
17:25:18,556 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.invoke(ManagedAtmosphereHandler.java:335)
17:25:18,557 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.onStateChange(ManagedAtmosphereHandler.java:209)
17:25:18,557 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:544)
17:25:18,558 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:486)
17:25:18,558 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
17:25:18,558 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:340)
17:25:18,559 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:199)
17:25:18,559 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
17:25:18,560 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.container.JBossWebCometSupport.service(JBossWebCometSupport.java:93)
17:25:18,560 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2281)
17:25:18,560 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:326)
17:25:18,560 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:494)
17:25:18,560 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:399)
17:25:18,561 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
17:25:18,561 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
17:25:18,561 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
17:25:18,561 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
17:25:18,562 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
17:25:18,562 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:25:18,562 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:25:18,562 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
17:25:18,562 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
17:25:18,563 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:634)
17:25:18,563 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
17:25:18,563 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.Thread.run(Thread.java:745)
17:25:18,567 INFO [stdout] (http-/0.0.0.0:8080-13) Locked: 56fe9bc2-6c52-4fe4-8011-858221db4318
17:25:18,568 ERROR [stderr] (http-/0.0.0.0:8080-13) java.lang.Exception
17:25:18,568 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$LockManagerBatch.<init>(DefaultLockManager.java:377)
17:25:18,568 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager.getManagerLock(DefaultLockManager.java:246)
17:25:18,568 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$Proxy$_$$_WeldClientProxy.getManagerLock(DefaultLockManager$Proxy$_$$_WeldClientProxy.java)
17:25:18,568 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.channel.LockChannel.onClose(LockChannel.java:128)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.reflect.Method.invoke(Method.java:606)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.util.Utils.invoke(Utils.java:209)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.invoke(ManagedAtmosphereHandler.java:335)
17:25:18,569 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.onStateChange(ManagedAtmosphereHandler.java:209)
17:25:18,570 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:544)
17:25:18,570 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:486)
17:25:18,570 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
17:25:18,572 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:340)
17:25:18,572 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:199)
17:25:18,572 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
17:25:18,572 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.container.JBossWebCometSupport.service(JBossWebCometSupport.java:93)
17:25:18,575 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2281)
17:25:18,575 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:326)
17:25:18,575 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:494)
17:25:18,575 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:399)
17:25:18,576 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
17:25:18,576 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
17:25:18,576 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
17:25:18,576 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
17:25:18,577 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
17:25:18,577 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:25:18,577 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:25:18,577 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
17:25:18,579 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
17:25:18,579 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:634)
17:25:18,579 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
17:25:18,579 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.Thread.run(Thread.java:745)
17:25:18,584 INFO [stdout] (http-/0.0.0.0:8080-13) Locked: 0f2d436a-7e80-4a56-97e2-42187ac56a8b
17:25:18,584 ERROR [stderr] (http-/0.0.0.0:8080-13) java.lang.Exception
17:25:18,584 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$LockManagerBatch.<init>(DefaultLockManager.java:377)
17:25:18,585 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager.getManagerLock(DefaultLockManager.java:246)
17:25:18,585 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$Proxy$_$$_WeldClientProxy.getManagerLock(DefaultLockManager$Proxy$_$$_WeldClientProxy.java)
17:25:18,585 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.channel.LockChannel.onClose(LockChannel.java:128)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.reflect.Method.invoke(Method.java:606)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.util.Utils.invoke(Utils.java:209)
17:25:18,586 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.invoke(ManagedAtmosphereHandler.java:335)
17:25:18,589 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.config.managed.ManagedAtmosphereHandler.onStateChange(ManagedAtmosphereHandler.java:209)
17:25:18,589 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:544)
17:25:18,589 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:486)
17:25:18,589 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
17:25:18,591 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:340)
17:25:18,591 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:199)
17:25:18,591 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
17:25:18,591 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.container.JBossWebCometSupport.service(JBossWebCometSupport.java:93)
17:25:18,593 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2281)
17:25:18,593 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:326)
17:25:18,593 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:494)
17:25:18,593 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:399)
17:25:18,595 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
17:25:18,595 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
17:25:18,595 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
17:25:18,595 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
17:25:18,596 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
17:25:18,597 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:25:18,597 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:25:18,597 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
17:25:18,598 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
17:25:18,598 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:634)
17:25:18,599 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
17:25:18,599 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.Thread.run(Thread.java:745)
Some seconds later the same thread handles more HTTP requests and all returned successfully, This time with the correct Locked: xxx and Unlocked: xxx messages:
17:25:23,891 INFO [stdout] (http-/0.0.0.0:8080-13) Locked: 351e7416-c74b-4974-b2a6-a2ba0a0ad87d
17:25:23,892 ERROR [stderr] (http-/0.0.0.0:8080-13) java.lang.Exception
17:25:23,893 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$LockManagerBatch.<init>(DefaultLockManager.java:377)
17:25:23,894 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager.getManagerLock(DefaultLockManager.java:246)
17:25:23,896 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.DefaultLockManager$Proxy$_$$_WeldClientProxy.getManagerLock(DefaultLockManager$Proxy$_$$_WeldClientProxy.java)
17:25:23,897 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.command.LockCommand.invoke(LockCommand.java:33)
17:25:23,898 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.PageLockCommandServlet._executeCommand(PageLockCommandServlet.java:90)
17:25:23,899 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.jee.pagelock.PageLockCommandServlet.doPost(PageLockCommandServlet.java:61)
17:25:23,900 ERROR [stderr] (http-/0.0.0.0:8080-13) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
17:25:23,900 ERROR [stderr] (http-/0.0.0.0:8080-13) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
17:25:23,901 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
17:25:23,901 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
17:25:23,901 ERROR [stderr] (http-/0.0.0.0:8080-13) at xxx.webapp.servlet.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:51)
17:25:23,902 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
17:25:23,902 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
17:25:23,903 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
17:25:23,903 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
17:25:23,903 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
17:25:23,904 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
17:25:23,904 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
17:25:23,904 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
17:25:23,905 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
17:25:23,905 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
17:25:23,905 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:25:23,906 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:25:23,906 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
17:25:23,906 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
17:25:23,907 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:634)
17:25:23,907 ERROR [stderr] (http-/0.0.0.0:8080-13) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
17:25:23,907 ERROR [stderr] (http-/0.0.0.0:8080-13) at java.lang.Thread.run(Thread.java:745)
17:25:23,908 INFO [stdout] (http-/0.0.0.0:8080-13) Unlocked: 351e7416-c74b-4974-b2a6-a2ba0a0ad87d
Any idea what is going on? Can you explain to me how the very same thread can be executed again and again without fully executing the function body? Without releasing the lock?
Edit 12.11.2015 19:56: As mentioned in the comments: http-/0.0.0.0:8080-13 is the name of the thread. So I'm sure that it is the same thread that is executed again.
Edit 13.11.2015 09:38: As mentioned in the comments: I'm using JBoss 7.1.3.Final with JBossWeb 7.0.17.Final. The AtmosphereServlet uses asyncSupported=true while the custom one doesn't.
I found the solution for this behavior: A (CDI) bean was involved which couldn't be created for some reason. An exception was thrown after my log messages and before the try-block. But it was not visible in the log as the atmosphere framework caught it. The framework itself will only print it to the log if it is set to debug level (which is not set on the production server).
A really stupid self-caused bug!

Java getPart() throwing null pointer exception

I am getting a null pointer exception when trying to use getPart() and I cannot understand why this is throwing an exception rather than just returning null. Here is my form in jsp:
<form onsubmit="return check()" method="post" enctype="multipart/form-data" action="/TrainingServlet">
<input id="hotel_file" type="file" name="hotel_file" size="30">
</form>
Then in my servlet, I have the following code:
public void doPost(HttpServletRequest req, HttpServletResponse resp) {
try {
Part filePart = req.getPart("hotel_file"); //this line throws null pointer exception
getServletContext().getRequestDispatcher("/import.jsp").forward(req, resp);
} catch(Exception e) {
e.printStackTrace();
}
}
After reading this SO post, I added the #MultipartConfig annotation to the servlet class and I am still get NPE at the req.getPart() line. Also I am running the servlet on JBoss 6. Any insight appreciated!
Here is the stacktrace
16:50:15,227 ERROR [STDERR] java.lang.NullPointerException
16:50:15,228 ERROR [STDERR] at org.apache.catalina.connector.Request.getPart(Request.java:3225)
16:50:15,228 ERROR [STDERR] at org.apache.catalina.connector.RequestFacade.getPart(RequestFacade.java:1102)
16:50:15,229 ERROR [STDERR] at com.lanyon.training.javaproj.servlets.TrainingServlet.doPost(TrainingServlet.java:96)
16:50:15,229 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
16:50:15,230 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
16:50:15,230 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
16:50:15,231 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
16:50:15,231 ERROR [STDERR] at com.lanyon.ghotel.common.pagination.web.PaginationFilter.doFilter(PaginationFilter.java:77)
16:50:15,232 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
16:50:15,232 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
16:50:15,233 ERROR [STDERR] at com.lanyon.common.serverobjects.UTF8EncodingFilter.doFilter(UTF8EncodingFilter.java:33)
16:50:15,233 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
16:50:15,234 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
16:50:15,235 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
16:50:15,235 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
16:50:15,236 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
16:50:15,236 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
16:50:15,236 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
16:50:15,237 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
16:50:15,237 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
16:50:15,238 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
16:50:15,238 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
16:50:15,239 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
16:50:15,239 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
16:50:15,240 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
16:50:15,240 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
16:50:15,241 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
16:50:15,241 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
16:50:15,242 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
multipart gives you a byte stream.
you have to convert it into a file.
you can also use transferTo() method of multipart

application migration from weblogic 10.2.0 to jboss 6.1.0

I am new to Jboss server. I am migrating the J2ee application from Weblogic 10.2 to JBoss EAP 6.1.0. While migrating I am getting the below error message. Kindly assist if anyone knows the solution.
The Application successfully gets deployed on the server but when i try to access the application through localhost, it throws a NullPointerException.
ERROR MESSAGE:
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) java.lang.NullPointerException
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at javax.naming.NameImpl.(NameImpl.java:264)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at javax.naming.CompositeName.(CompositeName.java:214)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.jboss.as.naming.util.NameParser.parse(NameParser.java:49)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.jboss.as.naming.NamingContext.parseName(NamingContext.java:491)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at javax.naming.InitialContext.lookup(InitialContext.java:392)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at com.trifecta.pfizer.dao.UserProfileDAO.populate(UserProfileDAO.java:51)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at com.trifecta.pfizer.servlet.PfizerSiteController.doFilter(PfizerSiteController.java:394)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at com.trifecta.pfizer.servlet.PfizerSiteController.performTask(PfizerSiteController.java:163)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at com.trifecta.pfizer.servlet.PfizerSiteController.doPost(PfizerSiteController.java:546)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
17:34:16,811 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) at java.lang.Thread.run(Thread.java:619)
please help me in resolving the issue?
CODE:
try
{
if(sqlHome == null)
{
/* Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,"jnp://localhost:9990");
jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
*/ // create a context passing these properties
Context ctx = new InitialContext();
System.out.println("check1...");
//Object obj = ctx.lookup("SQLHelperSFOHome");
//java:app/SQLHelperSFO
System.out.println("check2...");
//sqlHome=(SQLHelperSFOHome)PortableRemoteObject.narrow(obj,SQLHelperSFOHome.class);
//System.out.println(PortableRemoteObject.narrow(ctx.lookup("SQLHelperSFOHome"),SQLHelperSFOHome.class).toString()+"2");
sqlHome = (SQLHelperSFOHome)PortableRemoteObject.narrow(ctx.lookup("SQLHelperSFOHome"),SQLHelperSFOHome.class);
}
sqlsfo = sqlHome.create();
sqlsfo.initialize(DATASOURCE_JNDINAME);
}
catch(Exception e)
{
e.printStackTrace();
throw new DataAccessException("UserProfileDAO","populate",e.getMessage());
}
I tried changing the initial context in the following manner:
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,"jnp://localhost:9990");
jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
Context ctx = new InitialContext(jndiProps);
Also, The sysout statements used in this method are not displayed on the console.
Instead of using
ctx.lookup("EJBclassName");
we used :
ctx.lookup("java:global/EARname/EJBprojectName/EJBclassName!AbsoluteNameOfEJBClass");
it worked.

Invalid version or the data in not in 'javabin' format

I am currently integrating from solr 1.4 to solr 3.4. After executing the codes, I got the following error message.
15:56:09,575 ERROR [STDERR] [SolrServerException] QueryResponse SOLRSearchWorker. generateResponse(SolrQuery, SolrServer, SolrRequest.METHOD) message:
15:56:13,150 ERROR [STDERR] org.apache.solr.client.solrj.SolrServerException: java.lang.RuntimeException: Invalid version or the data in not in 'javabin' format
15:56:13,152 ERROR [STDERR] at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:217)
15:56:13,152 ERROR [STDERR] at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
15:56:13,153 ERROR [STDERR] at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:122)
15:56:13,153 ERROR [STDERR] at org.cambridge.ebooks.production.solr.util.SOLRSearchWorker.generateResponse(SOLRSearchWorker.java:153)
15:56:13,154 ERROR [STDERR] at org.cambridge.ebooks.production.solr.util.SOLRSearchWorker.searchCore(SOLRSearchWorker.java:58)
15:56:13,155 ERROR [STDERR] at org.cambridge.ebooks.production.solr.util.EBookSearchWorker.searchBookCore(EBookSearchWorker.java:161)
15:56:13,155 ERROR [STDERR] at org.cambridge.ebooks.production.ebook.EBookWorker.getQuickSearchResult(EBookWorker.java:113)
15:56:13,156 ERROR [STDERR] at org.cambridge.ebooks.production.ebook.EBookManagedBean.doSearch(EBookManagedBean.java:248)
15:56:13,156 ERROR [STDERR] at org.cambridge.ebooks.production.ebook.EBookManagedBean.getInitBooks(EBookManagedBean.java:163)
15:56:13,157 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:56:13,157 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:56:13,158 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:56:13,158 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
15:56:13,159 ERROR [STDERR] at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
15:56:13,159 ERROR [STDERR] at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
15:56:13,160 ERROR [STDERR] at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:71)
15:56:13,160 ERROR [STDERR] at org.apache.el.parser.AstValue.getValue(AstValue.java:118)
15:56:13,161 ERROR [STDERR] at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
15:56:13,161 ERROR [STDERR] at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
15:56:13,162 ERROR [STDERR] at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
15:56:13,162 ERROR [STDERR] at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
15:56:13,163 ERROR [STDERR] at javax.faces.component.UIOutput.getValue(UIOutput.java:164)
15:56:13,163 ERROR [STDERR] at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
15:56:13,164 ERROR [STDERR] at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:351)
15:56:13,164 ERROR [STDERR] at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:160)
15:56:13,165 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:879)
15:56:13,165 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
15:56:13,166 ERROR [STDERR] at javax.faces.render.Renderer.encodeChildren(Renderer.java:164)
15:56:13,166 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)
15:56:13,167 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)
15:56:13,168 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)
15:56:13,168 ERROR [STDERR] at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:427)
15:56:13,169 ERROR [STDERR] at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:229)
15:56:13,169 ERROR [STDERR] at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)
15:56:13,170 ERROR [STDERR] at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)
15:56:13,171 ERROR [STDERR] at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93)
15:56:13,171 ERROR [STDERR] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
15:56:13,172 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
15:56:13,172 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
15:56:13,173 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
15:56:13,173 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
15:56:13,174 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:13,174 ERROR [STDERR] at org.cambridge.ebooks.production.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:62)
15:56:13,175 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:56:13,175 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:13,176 ERROR [STDERR] at org.cambridge.ebooks.production.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:69)
15:56:13,177 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:56:13,177 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:13,178 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
15:56:13,178 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:56:13,179 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:13,180 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
15:56:13,180 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
15:56:13,181 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
15:56:13,181 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
15:56:13,182 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
15:56:13,183 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
15:56:13,183 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
15:56:13,184 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
15:56:13,184 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
15:56:13,185 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
15:56:13,185 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
15:56:13,186 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
15:56:13,186 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
15:56:13,187 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
15:56:13,188 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
15:56:13,189 ERROR [STDERR] Caused by: java.lang.RuntimeException: Invalid version or the data in not in 'javabin' format
15:56:13,189 ERROR [STDERR] at org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:99)
15:56:13,190 ERROR [STDERR] at org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:39)
15:56:13,190 ERROR [STDERR] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:466)
15:56:13,191 ERROR [STDERR] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243)
15:56:13,191 ERROR [STDERR] at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:205)
15:56:13,192 ERROR [STDERR] ... 65 more
Then, I tried to debug and found out that the Query response is returning null because of this java bin format. I need help to fix this code, I tried all the possible solution I found in internet, but no luck. Anyone can help?? this is for my major release of project in my company.
Thanks!
This is usually related to either a version difference in Java itself between the server and the client, but more often it's caused by the server throwing an error and the application container returning an error page instead of the expected javabin formatted response.
Check the server log to see if it's not throwing an exception, and then attempt the same request in your browser (the server should have a log of the query and the parameters included) to see what the server actually responds with.

LiveCycle / JBoss JNDI error : Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory

I have Adobe LiveCycle ES4 Server running on an older version of JBoss on a Windows 7 machine. On another Windows machine within the same network, I set up a client also running on JBoss, but a newer version (7.1.1). Using sample code provided by Adobe, I am trying to test my connection over RMI, but I am running into errors. Here is the stack trace:
09:53:18,369 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-5) HHH000230: Schema export complete
09:53:18,370 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) JBAS016008: Starting weld service for deployment jboss-as-kitchensink-jsp.war
09:53:18,438 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /jboss-as-kitchensink-jsp
09:53:18,528 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018565: Replaced deployment "jboss-as-kitchensink-jsp.war" with deployment "jboss-as-kitchensink-jsp.war"
09:53:26,035 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
09:53:26,036 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:101)
09:53:26,037 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:141)
09:53:26,037 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:69)
09:53:26,038 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
09:53:26,038 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.livecycle.readerextensions.client.ReaderExtensionsServiceClient.invoke(ReaderExtensionsServiceClient.java:58)
09:53:26,039 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.livecycle.readerextensions.client.ReaderExtensionsServiceClient.applyUsageRights(ReaderExtensionsServiceClient.java:105)
09:53:26,040 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.as.quickstarts.kitchensinkjsp.servlet.AdobeServlet.applyUsageRights(AdobeServlet.java:118)
09:53:26,040 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.as.quickstarts.kitchensinkjsp.servlet.AdobeServlet.doPost(AdobeServlet.java:75)
09:53:26,041 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
09:53:26,041 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
09:53:26,042 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
09:53:26,043 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
09:53:26,043 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
09:53:26,044 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
09:53:26,044 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
09:53:26,045 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
09:53:26,046 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
09:53:26,046 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
09:53:26,047 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
09:53:26,047 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
09:53:26,048 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:53:26,048 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:53:26,049 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
09:53:26,049 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
09:53:26,050 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
09:53:26,051 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
09:53:26,051 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at java.lang.Thread.run(Unknown Source)
09:53:26,052 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) Caused by: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.jboss-as-kitchensink-jsp.war:main" from Service Module Loader
09:53:26,053 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)
09:53:26,053 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
09:53:26,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
09:53:26,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.naming.InitialContext.init(Unknown Source)
09:53:26,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at javax.naming.InitialContext.<init>(Unknown Source)
09:53:26,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initJndiContext(EjbMessageDispatcher.java:228)
09:53:26,056 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.getJndiContext(EjbMessageDispatcher.java:241)
09:53:26,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:91)
09:53:26,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) ... 26 more
Here is my code:
protected void applyUsageRights() {
try {
//Set connection properties required to invoke LiveCycle
Properties connectionProps = new Properties();
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://113.252.20.43:1099");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, MY_USER);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, MY_PASSWORD);
//Create a ServiceClientFactory object
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
//Create a ReaderExtensionsServiceClient object
ReaderExtensionsServiceClient reClient = new ReaderExtensionsServiceClient(myFactory);
//Retrieve the PDF document to which to apply usage rights
FileInputStream fileInputStream = new FileInputStream("C:\\sample.pdf");
Document inputPDF = new Document(fileInputStream);
//Create a UsageRight object and specify specific usage rights
UsageRights useRight = new UsageRights();
useRight.setEnabledDynamicFormFields(true);
useRight.setEnabledComments(true);
useRight.setEnabledFormFillIn(true);
useRight.setEnabledDigitalSignatures(true);
//Create a ReaderExtensionsOptions object
ReaderExtensionsOptionSpec reOptions = new ReaderExtensionsOptionSpec();
//Set the usage rights
reOptions.setUsageRights(useRight);
reOptions.setMessage("This is a Rights-Enabled PDF Document");
//Apply usage rights to a PDF document
Document rightsEnabledPDF = reClient.applyUsageRights(
inputPDF,
"RE2",
null,
reOptions);
//Create a new PDF file that represents the rights-enabled PDF document
File resultFile = new File("C:\\Adobe\\LoanUsageRights.pdf");
rightsEnabledPDF.copyToFile(resultFile);
}catch (Exception e) {
e.printStackTrace();
}
}
Does it work using SOAP?
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, "http://113.252.20.43:80");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);
I personally have not had success calling an EJB endpoint on a remote LiveCycle server. Would like to see your solution if you get it worked out.
Hope this helps.
There is ni problem just include jboss-client classes to to your classpath. In jboss 5 vs jboss 4x there are plenty of them. But IT works. My configuration LC es4 on Linux and jboss 5.2, calling remote from jboss 6 with the client classes from jboss 5 using the Java api

Categories