Sunday, August 07, 2011

vesamenu.c32: Not a COM32R image

This was the error message which came on booting Mint 11 Live CD on a new machine.  The bootable CD was created using Ubuntu 'Startup Disk Creator'. After googling I found the solution was to type live at the prompt

boot: live

Source: http://www.linuxquestions.org/questions/linux-mint-84/trying-to-boot-linux-mint-9-from-usb-flash-drive-vesamenu-c32-not-a-com32r-image-829397/

Thursday, July 14, 2011

javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/xxxx

While adding a new JDBC JNDI lookup in the application, I encountered the following exception on Glassfish 2.1.1.
Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/xxxx
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:856)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 104 more


Solution:
For Glassfish 2.1.1 add the following in the web.xml file



        jdbc/xxx
        javax.sql.DataSource
        Container
        Shareable

Thursday, March 10, 2011

JQuery UI Autocomplete with Stripes

While trying to integrate JQuery UI Autocomplete problem, the autocomplete was working with static JavaScript method but not working with values sent from the server.

Now the new JQueryUI expects JSON instead of the deprecated version which expected Strings separated by new line character. Even when I was sending JSON data, the values were not displayed at all.

The problem was that I was using ' to quote the strings instead of "

Friday, February 04, 2011

attempted to return null from a method with a primitive return type (void).


Problem:
I was encoutering this excpetion while inserting a row in the database using myBatis 3. 

Solution:
I had forgotton to change my mapper file xml tag from <select> to <insert>.

org.apache.ibatis.binding.BindingException: Mapper method 'xxx' (interface in.xx.xxxx..xxxDAO) attempted to return null from a method with a primitive return type (void).
 org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
 $Proxy34.XXXX(Unknown Source)
 xxx.xxx.XXXXServiceImpl.save(XXXServiceImpl.java:94)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:597)
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopP

Friday, January 07, 2011

SEVERE: Could not start SOLR. Check solr/home property



StackTrace
INFO: created /debug/dump: solr.DumpRequestHandler
Jan 8, 2011 10:30:22 AM org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
java.lang.RuntimeException: java.io.IOException: read past EOF
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:579)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)


Cause
I copied the SOLR directory to another machine and when I fired up SOLR received this error.

Solution:
The error message was misleading as even though I started the server with -Dsolr.solr.home option the error was still the same.

The index was somehow corrupted and when I deleted the $SOLR_HOME/solr/data/index directory and restarted SOLR it worked fine. Obviously after that the data had to be reindexed