Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gradle Son
java.lang.NullPointerException at installation
January 27, 2013 5:55 AM
Answer

Gradle Son

Rank: New Member

Posts: 2

Join Date: January 27, 2013

Recent Posts

Hi

I am using community edition of Liferay 6.0 GA 4. I repeatedly keep getting the following error on the console when I run startup.bat on Windows 7:
 113:34:32,440 ERROR [BaseDB:292] java.lang.NullPointerException
 2java.lang.NullPointerException
 3        at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1103)
 4        at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1086)
 5        at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1199)
 6        at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165)
 7        at org.apache.velocity.app.Velocity.evaluate(Velocity.java:191)
 8        at com.liferay.portal.velocity.VelocityUtil.evaluate(VelocityUtil.java:60)
 9        at com.liferay.portal.dao.db.BaseDB.evaluateVM(BaseDB.java:683)
10        at com.liferay.portal.dao.db.BaseDB.runSQLTemplateString(BaseDB.java:289)
11        at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.upgradeDB(ServiceComponentLocalServiceImpl.java:190)
12        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
14        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15        at java.lang.reflect.Method.invoke(Method.java:597)
16        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
17        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
18        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
19        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
20        at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
21        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
22        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
23        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
24        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
25        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
26        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
27        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
28        at $Proxy73.upgradeDB(Unknown Source)
29        at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.initServiceComponent(ServiceComponentLocalServiceImpl.java:164)
30        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
31        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
33        at java.lang.reflect.Method.invoke(Method.java:597)
34        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
35        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
36        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
37        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
38        at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
39        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
40        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
41        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
42        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
43        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
44        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
45        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
46        at $Proxy73.initServiceComponent(Unknown Source)
47        at com.liferay.portal.service.ServiceComponentLocalServiceUtil.initServiceComponent(ServiceComponentLocalServiceUtil.java:243)
48        at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initServiceComponent(PluginPackageHotDeployListener.java:306)
49        at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:217)
50        at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:158)
51        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)
52        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)
53        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)
54        at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:99)
55        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
56        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
57        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
58        at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)
59        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
60        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
61        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
62        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
63        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
64        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
65        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
66        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
67        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
68        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
69        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
70        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
71        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
72        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
73        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
74        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
75        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
76        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
77        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
78        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
79        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
80        at java.lang.reflect.Method.invoke(Method.java:597)
81        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
82        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


I do get myself redirected to the Liferay -> Welcome page at http://localhost:8080/ after I see INFO: Server startup in 90257 ms at the console.
Could somebody help me understand why am I getting this error and how to resolve it?

Thanks.
David Ilechukwu
RE: java.lang.NullPointerException at installation
January 27, 2013 3:15 PM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 116

Join Date: June 7, 2010

Recent Posts

Hi Gradle (& welcome on board Liferay).
Seems like your Liferay instance is trying to perform some kind of upgrade on your database, and is having issues doing it.

If this is a fresh installation on your local system, can you try the following:
Delete the current DB and create a new empty one
Delete the folders work & tmp in your Tomcat directory.

Reinstall Liferay again.
Let me know if that works,
Regards
Hitoshi Ozawa
RE: java.lang.NullPointerException at installation
January 28, 2013 4:00 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

If you unzipped using Windows File Explorer, that may be the problem because Windows doesn't properly extract all the files when the path name is long.
Try using something like 7zip (http://www.7-zip.org/) to extract the files.
Gradle Son
RE: java.lang.NullPointerException at installation
January 28, 2013 10:15 AM
Answer

Gradle Son

Rank: New Member

Posts: 2

Join Date: January 27, 2013

Recent Posts

Thanks @David & @Hitoshi for the replies.
I don't really know what exactly happened, but I got no errors on the console when I tried starting the server second time. And I haven't received any errors ever since.

Thanks again emoticon
David Ilechukwu
RE: java.lang.NullPointerException at installation
February 2, 2013 4:21 PM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 116

Join Date: June 7, 2010

Recent Posts

Gradle Son:
Thanks @David & @Hitoshi for the replies.
I don't really know what exactly happened, but I got no errors on the console when I tried starting the server second time. And I haven't received any errors ever since.

Thanks again emoticon

Good to know you are up & running, Gradle!
But you know what - if you can't explain how something stopped - you probably won't be able to explain when or if it's gonna start again.
I would start off with a fresh Liferay bundle - and be sure that it starts clean the first time - if I were you.
Particularly if you plan to move things into production later - that way you wouldn't get any surprises!

Cheers,
David