Hibernate exception when starting Tomcat (after upgrade to hibernate-3.5.0) - java

I'm getting the following exception when starting a Tomcat instance with my web app after upgrading to Hibernate 3.5.0:
org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836)
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:833)
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748)
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723)
at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518)
at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93)
As this happens on Tomcat startup, I have no idea where to look in my code to prevent that :-(

Putting that error message into google would have shown you any number of explanations, including this JIRA issue:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5098

Related

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already

I study web application with Spring. My development environment is
SpringToolSuite (ver 3.9.6),
Tomcat (8.5)
JDK (1.8)
I write source like in the textbook and run that code, but error message has been shown:
The full message is this.
**java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.**
The source works properly, but after a few seconds, the following error message comes out.
If you know solution, I hope you let me know.
This is because of application servers like tomcat caching your old application.
Try to restart it.
Right button in your Tomcat in Servers, then 'Clean', and try to running again.
As other users replied, the tomcat is caching the old application

Getting Exception while deploying war file in Glassfish 4 or 5

I'm getting exception while deploying war file in Glassfish server 4 and 5. However I didn't have any issues in Glassfish 3.
The exception is "The lifecycle method [finalizeConfig] must not throw a checked exception. Related annotation information: annotation [#javax.annotatikn.Postconstruct()] on anoted element [public void org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.finalizeConfig() throws java.security.generalSecurityException, Java.io.IOException] of type [METHOD].
It seems like conflict between jetty http server and cfx transport.
I googled and found some solutions but nothing works.
Tried by removing transport Jettyhttp in cfx bundle.
Tried by upgrading cfx version.
So looking for some perfect solution.
According to the #PostConstruct annotation, it shouldn't be used with methods that throw checked exceptions. GF 4 and 5 validate this and won't allow deployment. Since the error is raised for a Jetty class which you can't fix,you should remove Jetty and all classes that validate this rule from your application completely. There's no way how to configure GF to ignore this.
See also https://stackoverflow.com/a/35428512/784594 for more details.

RMI, Wildfly 10x, Spring: NoClassDefFoundError: org.omg.CORBA.COMM_FAILURE

I have a Spring-Boot application, which exposes some of its Interfaces to other projects. The basic process of this has been tried and tested within the project structure very often, so this SHOULD not be a "simple" RMI issue like missing serialization or incorrect registry.
This project (coded on java7) and an older project (also java7) are to be deployed in a wildfly 10.x container.
Basically, it is planned that our old application talks to the Spring-Boot application to get specific data sets. When starting the application, the beans are instantiated correctly, and the basic connection seems to be okay. However, when using an entirely valid call, I get this:
ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /servlet/Foo: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/omg/CORBA/COMM_FAILURE
I tried debugging the application, and when using the offending method call, the remote class is being triggered and does its work normally, the return value is as expected and is being returned to the spring context.
The weird thing is this part of the Stack Trace:
java.lang.NoClassDefFoundError: org/omg/CORBA/COMM_FAILURE
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.isCorbaConnectFailure(RmiClientInterceptorUtils.java:229)
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.isConnectFailure(RmiClientInterceptorUtils.java:213)
at org.springframework.remoting.rmi.RmiClientInterceptor.isConnectFailure(RmiClientInterceptor.java:282)
at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:347)
at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259)
because when I try to access RmiClientInterceptorUtils.java:229, Eclipse tells me that 229 is not a valid line number. This would lead me to believe that there is a versioning difference in Spring webMVC between server and client. This persisted, even after changing the version number (now using 3.2.8.RELEASE of spring-webmvc), the errors persisted.
I checked if there might be a dependency problem, but CONN_FAILURE is part of rt.jar and should, as far as I know, be present in every java project. Further testing revealed that:
Checked Exceptions are transferred normally
primitive values (like boolean) are transferred correctly
complex Objects cause the exception to be thrown
I'd appreciate any help with this matter, as I am at a loss to explain or correct this.
Thanks.
NOTE:
The general reason for the raised exception has been found - a class was missing the Serializable interface. This does, however, not answer the question why the COMM_FAILURE raised a NoClassDefFoundError, which is something I still would like to know.

No converter found for 'java.lang.StackTraceElement'

I am working on Spring3.0, Hibernate 3.2 web application deployed on JBOSS 4.3.
It's live product and getting this exception, when 30k users are utilizing it.
Exception : level=ERROR class=org.directwebremoting.dwrp.DefaultConverterManager No converter found for 'java.lang.StackTraceElement'
Its not generating much log as well and not able to find the same exception on internet.Anybody can tell me or any clue about it.
Why it's coming in production only not in local dev environment.
How much impact can be done of this exception on the system ?
Seems the application generates exceptions under load and tries to send back stack traces from them to the client. DWR is then unable to serialize the stack trace elements.
See here and here for possible DWR configurations that could solve the problem.

Getting Exception at console: Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired.

Actually, i Have deployed my web-application on tomcat and when i start the application i am getting the following exception at console:
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired. Parser will use a default
ErrorHandler to print the first 10 errors. Please call
the 'setErrorHandler' method to fix this.
Note:The Same Application runs on WebLogic but Issue is coming in tomcat.
Can anyone tell a solution?
Is there any dependency of the XMLSchema on the application-server?

Categories

Resources