Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

java.lang.NullPointerException

Avatar

Not applicable
I am facing problem in form manager, when i submit a form in workflow and then take the next action through the outlook, and then if the next person want to take the next action through the form manager [Worklist] after he click [Submit] he get the following error::



=================

HTTP Status 500 -



----------------------------



type Exception report



message



description The server encountered an internal error () that prevented it from fulfilling this request.



exception



java.lang.NullPointerException

com.adobe.fm.workflow.servlet.ProcessFormServlet.doPost(ProcessFormServlet.java:233)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

com.adobe.fm.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:158)

com.adobe.fm.filter.TimeoutFilter.doFilter(TimeoutFilter.java:229)

com.adobe.fm.filter.PortalSSOFilter.doFilter(PortalSSOFilter.java:125)



--------------------------------

please can you help me solving this problem?



Thank you.
1 Reply

Avatar

Not applicable
hi....

I am trying to finish up a program i am developing and am running into the following error. Any help you could offer would be appreciated...Thanks a lot..



Exception in thread "main" java.lang.NullPointerExceptionpackage de.laliluna.example;



ERROR:->

========

[main] INFO TestClient - creating honey

32 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.8

32 [main] INFO net.sf.hibernate.cfg.Environment - hibernate.properties not found

32 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer

47 [main] INFO net.sf.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling

47 [main] INFO net.sf.hibernate.cfg.Configuration - configuring from resource: E:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/JOBS/hibernate.cfg.xml

47 [main] INFO net.sf.hibernate.cfg.Configuration - Configuration resource: E:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/JOBS/hibernate.cfg.xml

47 [main] WARN net.sf.hibernate.cfg.Configuration - E:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/JOBS/hibernate.cfg.xml not found

%%%% Error Creating SessionFactory %%%%

net.sf.hibernate.HibernateException: E:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/JOBS/hibernate.cfg.xml not found

at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:886)

at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:910)

at de.laliluna.example.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:48)

at de.laliluna.example.TestClient.createHoney(TestClient.java:42)

at de.laliluna.example.TestClient.main(TestClient.java:24)

Exception in thread "main" java.lang.NullPointerException

at de.laliluna.example.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)

at de.laliluna.example.TestClient.createHoney(TestClient.java:42)

at de.laliluna.example.TestClient.main(TestClient.java:24)



CODE:->

========================================

import java.util.Iterator;

import java.util.List;



import org.apache.log4j.Logger;



import net.sf.hibernate.HibernateException;

import net.sf.hibernate.Session;

import net.sf.hibernate.Transaction;



public class TestClient {



public static void main(String[] args) {



Integer primaryKey = createHoney();

System.out.println("primary key is " + primaryKey);

updateHoney(primaryKey);

listHoney();

}



private static Integer createHoney() {

Session session = null;

Transaction tx = null;

Logger log = Logger.getLogger("TestClient");



log.info("creating honey");





Integer id = null;



try {



session = HibernateSessionFactory.currentSession();



tx = session.beginTransaction();





Honey honey = new Honey();

honey.setName("Sebastian's favourite honey");

honey.setTaste("sweet");



Hibernate returns your object



id = (Integer) session.save(honey);





tx.commit();



session.close();



} catch (HibernateException e) {



if (tx != null)

try {

tx.rollback();

} catch (HibernateException e1) {

log.warn("rollback not successful");



if (session != null)

try {

session.close();

} catch (HibernateException e2) {

log.warn("session close not successful");

}

}



return id;

}



private static void updateHoney(Integer primaryKey) {

Session session = null;

Transaction tx = null;

Logger log = Logger.getLogger("TestClient");



log.info("updating honey");



try {



session = HibernateSessionFactory.currentSession();





tx = session.beginTransaction();





Honey honey = (Honey) session.get(Honey.class, primaryKey);





if (honey != null) {

honey.setName("Sascha's favourite honey");

honey.setTaste("very sweet");

}

session.flush();



tx.commit();





} catch (HibernateException e) {





if (tx != null)

try {

tx.rollback();

} catch (HibernateException e1) {

log.warn("rollback not successful");



if (session != null)

try {

session.close();

} catch (HibernateException e2) {

log.warn("session close not successful");

}

}



}



private static void listHoney() {

Session session = null;

Transaction tx = null;

Logger log = Logger.getLogger("TestClient");



log.info("listing honey");



try {

session = HibernateSessionFactory.currentSession();





tx = session.beginTransaction();



List honeys = session.find("select from Honey");



for (Iterator iter = honeys.iterator(); iter.hasNext();) {

Honey honey = (Honey) iter.next();

System.out.println("Id " + honey.getId() + " Name "

+ honey.getName());

}





tx.commit();





session.close();



} catch (HibernateException e) {







if (tx != null)

try {

tx.rollback();

} catch (HibernateException e1) {

log.warn("rollback not successful");

}



if (session != null)

try {

session.close();

} catch (HibernateException e2) {

log.warn("session close not successful");

}

}



}