Some problems may occur:
1. If you are copying a project folder from a source into an elder project, be carefull that some different classes may share the same @Named (value = "shared name"). If you run the project, the server may not been able to start up! The error is
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/OpenWebMaven]]
-----------------------------------------------------------------------------------
2. If you cannot change in project facets from Dynamic Web Module 4.0 to 3.1, you should create a new maven project and copy classes and resources. Note that DynamicWeb Module 4.0 and Java 9 may reject to deploy on Tomcat 9.0 !!! And you can get this error when running:
The selection cannot be run on a server !
-----------------------------------------------------------------------------------
3. If beans are not reachable in a xhtml file. Maybe you have not included the files beans.xml and faces-config.xml file inside /src/main/webapp/WEB-INF folder. The error is
javax.el.PropertyNotFoundException: /index.xhtml @17,44 value="#{user.Name}": Target Unreachable, identifier 'user' resolved to null
-----------------------------------------------------------------------------------
5. Some of the dependencies may get unreachable. Try to google "maven missing_dependency" where missing_dependency is, for instance, JAXBException and locate the jar and download it (from the maven repository) and include it in your BuildPath
-----------------------------------------------------------------------------------
1. If you are copying a project folder from a source into an elder project, be carefull that some different classes may share the same @Named (value = "shared name"). If you run the project, the server may not been able to start up! The error is
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/OpenWebMaven]]
You should go over and see some clue of the error:
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name lang resolves to beans: [Managed Bean [class openadmin.util.lang.LangType] with qualifiers [@Default @Any @Named], Managed Bean [class openadmin.util.lang.LangTypeEdu] with qualifiers [@Default @Any @Named]]
-----------------------------------------------------------------------------------
2. If you cannot change in project facets from Dynamic Web Module 4.0 to 3.1, you should create a new maven project and copy classes and resources. Note that DynamicWeb Module 4.0 and Java 9 may reject to deploy on Tomcat 9.0 !!! And you can get this error when running:
The selection cannot be run on a server !
-----------------------------------------------------------------------------------
javax.el.PropertyNotFoundException: /index.xhtml @17,44 value="#{user.Name}": Target Unreachable, identifier 'user' resolved to null
-----------------------------------------------------------------------------------
5. Some of the dependencies may get unreachable. Try to google "maven missing_dependency" where missing_dependency is, for instance, JAXBException and locate the jar and download it (from the maven repository) and include it in your BuildPath
-----------------------------------------------------------------------------------
6. Postgres reports some strange errors while trying to connect such as :
[PersistenceUnit: control_post] Unable to build Hibernate SessionFactory
......
Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
Cause: You are using a new version of PostgreSQL >= 9.6
Solution: You have to change old jar postgresql-9.4-1201.jdbc41.jar
with the newest one: postgresql-42.2.1.jar
-----------------------------------------------------------------------------------
[PersistenceUnit: control_post] Unable to build Hibernate SessionFactory
......
Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
Cause: You are using a new version of PostgreSQL >= 9.6
Solution: You have to change old jar postgresql-9.4-1201.jdbc41.jar
with the newest one: postgresql-42.2.1.jar
-----------------------------------------------------------------------------------
7. Hibernate cannot find JNDI resources to JDBC
Cause: Maybe the file context.xml is not located in WebContent/META-INF folder.
-----------------------------------------------------------------------------------
and reload the data from ASCII files (and verify all entrances are in the resource bundle)
-----------------------------------------------------------------------------------
SEVERE: Exception loading sessions from persistent storage
java.io.InvalidObjectException: Could not find a SessionFactory [uuid=15bf1712-5aa2-4a8e-99a0-ca505077750c,name=null]
Will Keeling proposes:
Cause: Maybe the file context.xml is not located in WebContent/META-INF folder.
-----------------------------------------------------------------------------------
8. Maybe you can load data tables from ASCII text file. And you get a resource bundle error:
make sure you have NOT this entrance in ViewRoleData.txt:
java.util.MissingResourceException: Can't find resource for
bundle java.util.PropertyResourceBundle,
key openadmin_model_control_atributo_default
java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:544)
java.base/java.util.ResourceBundle.getString(ResourceBundle.java:501)
openadmin.util.lang.LangType.msgGenerals(LangType.java:34)
openadmin.model.control.Atributo
and reload the data from ASCII files (and verify all entrances are in the resource bundle)
-----------------------------------------------------------------------------------
9. When you execute Run as --> Run on Server, an error may occur that cannot load session from persistent storage
SEVERE: Exception loading sessions from persistent storage
java.io.InvalidObjectException: Could not find a SessionFactory [uuid=15bf1712-5aa2-4a8e-99a0-ca505077750c,name=null]
Will Keeling proposes:
This is to do with Tomcat not being able to load previously serialized web sessions that had been saved on an earlier shutdown. This may be because Tomcat didn't shutdown cleanly and so session objects got corrupted during serialization.
One way to make this error go away would be to disable session persistence across restarts. You can do this by editing the file
CATALINA_HOME/conf/context.xml
and setting the pathname
attribute of the <Manager>
to an empty string. This is well documented in the file for Tomcat 7:<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<Manager pathname="" />
You should also delete any old
session.ser
files from the CATALINA_HOME/work/Catalina/localhost/<appName>
folder whilst Tomcat is shutdown.
This may not be acceptable in your case if session persistence across restarts is needed. In which case further debugging of the issue would be necessary.
Comments
Post a Comment