LAR import is not working on sun java 7

Description

To reproduce - just try to create new organization in portal:
1. Control Panel -> Users & Organizations
2. Create New Organization
3. Set any unique name
4. Check "Create Site" checkbox
5. Select "Community Site" for public Pages, "Intranet site" for private pages
6. pres OK

Site creation will be failed with error (see below)
Important! After switching to java6 (1.6.31) - everything works - problem reproduced only with java 7

Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null


Debugging information ---- cause-exception : java.lang.NullPointerException
cause-message : null
class : com.liferay.portal.model.impl.LayoutImpl
required-type : org.apache.commons.lang.time.FastDateFormat
path : /com.liferay.portal.model.impl.LayoutImpl/_layoutType/_dateFormat
line number : 90
------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
at com.liferay.portal.lar.PortletDataContextImpl.fromXML(PortletDataContextImpl.java:667)
at com.liferay.portal.lar.PortletDataContextImpl.getZipEntryAsObject(PortletDataContextImpl.java:854)
at com.liferay.portal.lar.LayoutImporter.importLayout(LayoutImporter.java:836)
at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:489)
at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:140)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1369)
... 164 more
Caused by: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:922)
at java.text.DateFormatSymbols.initializeData(DateFormatSymbols.java:654)
at java.text.DateFormatSymbols.<init>(DateFormatSymbols.java:141)
at org.apache.commons.lang.time.FastDateFormat.parsePattern(FastDateFormat.java:578)
at org.apache.commons.lang.time.FastDateFormat.init(FastDateFormat.java:558)
at org.apache.commons.lang.time.FastDateFormat.readObject(FastDateFormat.java:1029)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.instantiateUsingSerialization(PureJavaReflectionProvider.java:112)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:69)
at com.thoughtworks.xstream.converters.reflection.ReflectionProviderWrapper.newInstance(ReflectionProviderWrapper.java:42)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
... 191 more

Environment

ubuntu server 11.10, sun java 1.7.0-b147

Activity

Show:

Michael HanAugust 23, 2012 at 9:03 AM

Jaromir HamalaApril 11, 2012 at 11:16 AM

possible workaround attached here:

Matthew SmithMarch 8, 2012 at 1:42 PM

From http://gate-users-mailing-list-archive-read-only-no-new-topics-or-rep.1053641.n5.nabble.com/Exception-Alignment-tool-Could-not-call-gate-util-SimpleFeatureMapImpl-readObject-Cannot-find-class-td4981706.html

Are you using Java 7? The version of XStream that GATE currently uses
has problems on Java 7 with classes that don't have a no-argument
constructor. It will work on Java 6, and there's a newer version of
XStream (that is compatible with Java 7) that we hope to upgrade to for
the next release of GATE.

Alexey KakuninMarch 2, 2012 at 9:06 AM

Just tested with latest Oracle JDK 1.7.0u3 - same error

Duplicate

Details

Assignee

Reporter

Components

Affects versions

Priority

Zendesk Support

Created March 2, 2012 at 8:06 AM
Updated June 24, 2023 at 3:51 PM
Resolved August 23, 2012 at 9:03 AM
Loading...