I am facing an issue only on live server with atomikos, on my local server it works perfectly.
the issue i am facng on the server is
Error in init(): Log already in use?
complete exception stack trace
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
com.atomikos.icatch.SysException: Error in init(): Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:333)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
... 31 more
Nested exception is:
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
ERROR: the specified log seems to be in use already. Make sure that no other instance is running, or kill any pending process if needed.
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.rollback(UserTransactionImp.java:140)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:80)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
com.atomikos.icatch.SysException: Error in init(): Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:333)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.rollback(UserTransactionImp.java:140)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:80)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
... 31 more
Nested exception is:
while i googling common solution from here
Are these instances running in a single machine? .. like, are those running in an app server, where it is pointed to a single CARBON_HOME? .. if so, the "transaction.properties" file have to be removed from /repository/lib and should be put into each WARs classpath location. And each "transaction.properties" file has to be edited to change the log file location. This error comes when more that one instance is trying to access the same transaction log file of Atomikos, or there's also a chance that the earlier JVM shutdown was not done properly and the lock file wasn't released. In that case, you simply have to remove the log file at /repository/data/tmlog.lck file and restart the server.
i follow this advise .
remove property file from tomcat/common/lib to my war's classpath .
changed directory accordingly above mentioned.
i also check for tmlog file but it does not exist on the server.
but nothing works . still the error occurs.
if you see at atomikos page here
The lock file in question is created to protect the transaction logs against accidental duplicate startups. Otherwise, the logs could get corrupted when two instances of the same transaction manager are recovering on the same data. Normally, it suffices to follow the hints and then delete the lock file manually if needed.
it just states follow the hints , but where is the hint ??
please help me to re solve it.
atomikos is the open source,
i checked the source code and found the below lines which is throwing exception
if ( enableRecovery ) {
//ISSUE 10077: don't complain about lock file if no logging
try {
lockfilestream_ = new FileOutputStream ( lockfile_ );
lock_ = lockfilestream_.getChannel().tryLock();
lockfile_.deleteOnExit();
} catch ( OverlappingFileLockException failedToGetLock ) {
//happens on windows
lock_ = null;
} catch ( IOException failedToGetLock ) {
//happens on windows
lock_ = null;
}
if ( lock_ == null ) {
System.err.println ( "ERROR: the specified log seems to be "
+ "in use already. Make sure that no other instance is "
+ "running, or kill any pending process if needed." );
throw new RuntimeException ( "Log already in use?" );
}
}
i have already set debugging to false in jta.properties
com.atomikos.icatch.enable_logging=false
and restart my server but still the same error.
Update after Guy Padron Answer
#Guy Pardon thanks for this answer.i know you are the owner of the
AtomIkos , i am often get mail from you. the problem is that for your
free open source version you hard coded default properties in the code
, so if any user ties to set it from the property file it is not
overriding. in my case what was the problem , the log file is created
in the current directory by atomikos by its default properties and
hence no problem on the local environment but whenever it is uploaded
to shared hosting where creating is file or directory inside server's
bin folder is not permitted and hence the above error, so i debug the
code , modify it according to my need and got success in Aug,2012.
when i inspect your code i found that your code is throwing wrong
exception in my described situation as well and there are so many
points the code can be improved.
Thank You
Mihir Parekh
When you have more than one project (that uses Atomikos) deployed, this problem occurs due to concurrency on writing atomikos' log files (Error message: 'Log already in use').
To solve this problem you must customize the log file name, setting the property 'com.atomikos.icatch.log_base_name' in atomikos configuration as exemplified below:
<bean id="atomikosUserTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
init-method="init" destroy-method="shutdownForce">
<constructor-arg>
<props>
<prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>
<prop key="com.atomikos.icatch.log_base_name">your_project_name_log</prop>
<prop key="com.atomikos.icatch.output_dir">../standalone/log/</prop>
<prop key="com.atomikos.icatch.log_base_dir">../standalone/log/</prop>
</props>
</constructor-arg>
</bean>
P.S.: Note that I've changed the properties 'com.atomikos.icatch.output_dir' and 'com.atomikos.icatch.log_base_dir' just to keep the things organized, creating atomikos' log files in the same directory of JBoss log files.
there is a lock file that must be removed in order to startup your container again. Its name is tmlog.lck. At Apache 7 it is located at APACHE_HOME/bin/
Good luck.
This is a permission issue. I added this two line in my jta.properties.(confirm the dir is exist).
com.atomikos.icatch.output_dir = /data/logs/XXX/
com.atomikos.icatch.log_base_dir = /data/logs/XXX/
In our case the reason was completely different:
We configured our tomcat8 instance to contain all needed Atomikos .jars.
That was mainly as described here:
Atomikos Tomcat 7 Configuration
In our Spring application configuration we needed to define the J2eeTransactionManager (due to the "transaction suspension not available" problem already described here):
#Bean
public TransactionManager atomikosTransactionManager() {
return new J2eeTransactionManager();
}
#Bean
public PlatformTransactionManager txManager() throws Throwable {
JtaTransactionManager jtaTransactionManager = new JtaTransactionManager();
jtaTransactionManager.setAllowCustomIsolationLevels(true);
jtaTransactionManager.setTransactionManager(atomikosTransactionManager());
UserTransaction ut = userTransaction();
jtaTransactionManager.setUserTransaction(ut);
return jtaTransactionManager;
}
So you need a reference to the pom.xml in your application, but this reference has to have the "provided" scope:
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jta</artifactId>
<version>3.9.3</version>
<scope>provided</scope>
</dependency>
In our case, we omitted the scope and therefore tomcat and our application created it's own instance of the transaction manager and that resulted to the "log already in use" error message.
So deleting the .lock-file helped here, too. After deleting the lock-file the application specific transaction manager could obtain the lock and was running fine; but after a tomcat restart, you would get the same error message again.
Since I found this cause nowhere else, maybe this is helpful to others...
Are you sure there isn't any other JVM running on your production server that could lock the atomikos transaction log ?
A little late maybe, but this typically happens if you have multiple transaction manager instances (JVMs) using the same logs. Just try not to do that :-)
HTH
I also got the same error, but the scenario was different.
Atomikos creates a different java process, and in my case that java process was running in infinite loop in unix box, although I stopped the tomcat container.
So I found out that java process using below command.
ps -ef | grep java | grep -v grep
And killed using this command
kill -9 pid
Started the tomcat again, and it worked fine.
<bean id="atomikosUserTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
init-method="init" destroy-method="shutdownForce">
<constructor-arg>
<props>
<prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>
<prop key="com.atomikos.icatch.log_base_name">your_project_name_log</prop>
<prop key="com.atomikos.icatch.output_dir">../standalone/log/</prop>
<prop key="com.atomikos.icatch.log_base_dir">../standalone/log/</prop>
</props>
</constructor-arg>
This works for me but I don't understand the role of your_project_name_log in this code.
Related
We are getting the below error in Tomcat when trying to access the application. The error details are below.
org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException
at com.ify.sabs.limi.app.servlets.LoginValidate.doPost(LoginValidate.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
The above issue happens when the user tries to login to the webapplication. We are using tomcat 6.0.18.0 and getting the above error.
I have also tried to run this via eclipse and got the below error
Jun 29, 2015 4:45:08 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.AbstractMethodError:org.apache.catalina.authenticator.AuthenticatorBase.authenticate(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;Lorg/apache/catalina/deploy/LoginConfig;)Z
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Thanks all the issue is resolved. The above issue was because the application was unable to connect to the db,because the application was unable to detect the properties file due to space characters in the path to the properties file. Fixed the same and the issue got resolved.
I have configured my solr on centos box and configured my solrconfig.xml to use 'dataimporthandler' plugin.
My solrconfig contains the following configuration:
<lib dir="/path/to/solr/dist" regex="apache-solr-dataimporthandler-.*\.jar" />
...
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>
and the 'data-config.xml' contains the correct db connections.
However when I access the that plugin:
http://localhost:8080/solr_app/dataimport (with or without a command), I get the following errors:
Dec 30, 2011 6:46:03 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.AbstractMethodError: org.apache.solr.handler.RequestHandlerBase.handleRequestBody(Lorg/apache/solr/request/SolrQueryRequest;Lorg/apache/solr/response/SolrQueryResponse;)V
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:636)
The really annoying part is these errors give no clear indication what is wrong. Mind you I was able to set this up on my local desktop with no issues. Running this on an online 'Centos 5.7' box ... errors!
Thanks in advance.
Looks like your solr version running is different from the solr dataimporthandler jar version. Could you check this?
In fact, the solr version of the war running must be the same of the dataimporthandler library you put on the classpath.
I'm trying to convert this portlet https://github.com/tlipski/newsletter-for-liferay which was made to compile with maven, to a Liferay Project (then I can work with it in the Liferay IDE). Everything seems to work fine but I don't know where should I put the hibernate.cfg.xml file in the Liferay Project to make it work. At the moment I have it in the WEB-INF/classes folder and I'm getting this error:
ERROR java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at pl.net.bluesoft.rnd.newsletter.model.HibernateUtil.<clinit>(HibernateUtil.java:28)
at pl.net.bluesoft.rnd.newsletter.portlets.VaadinApplicationPortlet2.handleRequest(VaadinApplicationPortlet2.java:23)
at com.vaadin.terminal.gwt.server.AbstractApplicationPortlet.doDispatch(AbstractApplicationPortlet.java:728)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:101)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:638)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:723)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:425)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Try putting the hibernate.cfg.xml file in the root of your src/ folder. Then edit the liferay-plugin-package.properties file and go to the portal dependency jars. Add the hibernate3.jar to your project. Then it should work on deployment.
I have been provided with a 3rd party wsdl and a deployment descriptor etc for custom encryption for an Axis web service. I used WSDL2Java to generate the java classes and it all works pretty well... up to a point. When I invoke the methods several minutes apart they work correctly and return valid data. but when I invoke them (as I need to) in quick succession I get a plain old Server Error (below).
If I ouptut the axisFault fault codes and details I get the following:-
class org.apache.axis.AxisFault
Fault Code = {http://xml.apache.org/axis/}Server
Fault Reason = Server Error
Fault String = Server Error
Fault Details = [Lorg.w3c.dom.Element;#2d4ba772
[Server Error
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
, 3rdpartyhostname
Can anyone please help? I'm at my wits end.. Could it be a timing / caching issue? Perhaps one of the cache values in the createCall() method that the WSDL2JAVA tool creates?
Here's how I generate an axis client with an ant build script:
<java classname="org.apache.axis.wsdl.WSDL2Java" fork="true" failonerror="true" classpathref="classpath.path">
<arg value="-v"/>
<arg value="-o"/>
<arg file="tmp/src"/>
<arg value="-p"/>
<arg value="com.your.package"/>
<arg value="${server.url}/${servicename}?wsdl"/>
</java>
Maybe you are using a weird combination of parameters? Have your checked on those? The above is for axis 1.4 as far as I remember.
What version are you using 2.0 or 1.4? I know it took me quite some time to get this right for 2.0. Here's how it works with mvn:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<outputDirectory>${project.build.directory}/generated/main/java</outputDirectory>
<urls>
<url>http://yourserver:yourport/YourService?wsdl</url>
</urls>
<packageSpace>com.your.package</packageSpace>
<serverSide>false</serverSide>
<subPackageByFileName>false</subPackageByFileName>
<wrapArrays>false</wrapArrays>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
I hope this helps shed some light or further ideas on the issue.
You might also want to check if the stuff you deployed is working right. This might not be an issue of the client generation at all. After all it says server error. Check the logfiles on the server for stacktraces maybe there is a clue there.
Could someone help me on this.
I have created simple java web service using Java 1.6, tomcat-6.0.20 and axis2-1.4.1.
While deploying the application, it returns following error message:
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 22 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Feb 25, 2010 11:58:37 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
Seems that there is an incompatibility of libraries loaded.
See this post and this
The first post explain the error:
In Tomcat 6, the JSP API classes are found in jsp-api.jar and servlet
API classes are found in servlet-api.jar, with both located in the lib
directory of the Tomcat 6 installation. Any servlet.jar you find
involved with this server would contain out of date classes for this
server.
So... check if you don't have an extra servlet.jar:
Make sure you don't
have a copy of servlet.jar in the WEB-INF/lib of your webapp or
somewhere else involved with the running server, such as in the
lib/ext directory of your JDK or JRE.
I hope it helps you.