Liferay with struts spring hibernate - liferay-6

I am using Liferay 6.2.0 and creating a portlet with Struts2 + spring 3.5 and hibernate 3 framework
Nothing to worry for me.
But whenever I deploy my portlet in Liferay at that time Following error occurs.. Its not harmful for me. My portlet working what I like.
But I want to remove following error:
11:51:39,745 ERROR [http-bio-8080-exec-12][GZipFilter:81]
java.lang.ClassCastException: java.math.BigInteger cannot be cast to
java.lang.String java.lang.ClassCastException: java.math.BigInteger
cannot be cast to java.lang.String at
com.liferay.portal.servlet.BrowserSnifferImpl.getUserAgent(BrowserSnifferImpl.java:357)
...............
11:51:39,745 ERROR [http-bio-8080-exec-21][GZipFilter:81]
java.lang.ClassCastException: java.math.BigInteger cannot be cast to
java.lang.String java.lang.ClassCastException: java.math.BigInteger
cannot be cast to java.lang.String at
com.liferay.portal.servlet.BrowserSnifferImpl.getUserAgent(BrowserSnifferImpl.java:357)
at
com.liferay.portal.servlet.BrowserSnifferImpl.isMozilla(BrowserSnifferImpl.java:216)
at
com.liferay.portal.servlet.BrowserSnifferImpl.isFirefox(BrowserSnifferImpl.java:140)
Why This Error Occured ????

Related

how to avoid loading org.eclipse.persistence.jpa.PersistenceProvider in weblogic 14.1.1.0 version

i am using #Valid annotation at MO level to validate the input data, while it works fine with tomcat server, but during weblogic deployment i am getting below error:
Caused by: java.lang.ClassCastException: class org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to class javax.persistence.spi.PersistenceProvider (org.eclipse.persistence.jpa.PersistenceProvider is in unnamed module of loader com.oracle.classloader.weblogic.LaunchClassLoader #3e92efc3; javax.persistence.spi.PersistenceProvider is in unnamed module of loader weblogic.utils.classloaders.ChangeAwareClassLoader #8ae852)
i have tried providing <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> in my persistence as before i was using default persistence unit but still the same problem.
I want to avoid loading of persistence unit from eclipselink.jar which is present at weblogic container, so that it would not get evaluated at the end.
Any help in this would be appreciated.
Hibernate JPA Version: hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final
Hibernate Validator version: hibernate-validator-5.4.0.Final.jar:5.4.0.Final
in our case for use #Valid we deleted the lines below in weblogic.xml:
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>javax.persistence.spi.*</wls:package-name>

ClassCastException SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory

I am trying to deploy an ear on Wildfly that was deployed on Websphere which has some sax parser dependencies. When I employ xml-apis-2.0.2.jar I get this error:
java.lang.ClassCastException: __redirected.__SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
On the other hand, when I employ xercesImpl-2.11.0.SP4.jar, I get this error:
NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
What should I do to remove this error?

Grails - can't evaluate expression debugging in Eclipse inside annotated method

When I set a breakpoint in Eclipse doing grails test-app, evaluating expressions with ctrl-shift-I fails inside an annotated method. The error is complaining about not being able to resolve the annotation class.
The annotation itself is indicating an aspect, handled via AOP.
The method works normally, I just can't debug effectively in Eclipse.
How would I fix this? Is this a bug in Eclipse or in Groovy?
This is the error I get from the Eclipse error logs:
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
____Eval.groovy: 4: unable to resolve class com.mycompany.....
# line 4, column 60.
ebapps....MyClass
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:313)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:1030)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:636)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:585)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator.convertSnippetToScript(GroovyJDIEvaluator.java:349)
at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator.performEvaluate(GroovyJDIEvaluator.java:183)

Spring-data-neo4j and compatibility with Scala

I suspect that Spring-data-neo4j 2.1.0-BUILD-SNAPSHOT isn't really compatible with some versions of Scala.
I use scala 2.10.0 and using a Play! web application based on scala 2.10.0 too.
While running a test involving a Neo4jTemplate autowired by Spring, I obtain this error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'mappingInfrastructure' defined in class
org.springframework.data.neo4j.config.Neo4jConfiguration: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
scala.collection.JavaConverters$.mapAsScalaMapConverter(Ljava/util/Map;)Lscala/collection/JavaConverters$AsScala
Does a fix exist or would be scheduled?

java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()

I am getting this error java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()
at the runtime in eclipse. However, eclipse shows the method on doing intelligence search, but at runtime it fails to identify it.
I am using the latest log4j1.2.16 jar and it is added in the classpath.
Any suggestions?