JBPM workflow deployment into alfresco error - jboss

I'm getting the following error when deploying from JBPM eclipse interface to alfresco. This happens when I select 'classes and resources to include in process archive', like 'src/main/java' etc.
Exception happened while deploying
java.lang.NullPointerException
at org.jbpm.gd.jpdl.util.ProcessDeployer.addClassOrResource(Unknown Source)
It was working perfectly, just stopped working suddenly. Any clues?
Thanks.

You should try not selecting anything in the Java Classes and Resources pane. You should be able to deploy your process definition XML file. If you have Java classes specific to your process definition, just have your build script JAR those up alongside your other Alfresco related Java classes you may have and put those in WEB-INF/lib.

Related

Missing .class files in Eclipse O2/Wildfly 10.1.0 war deployment

I am working on a project to manage and orchestrate a legacy Wildfly Java/Maven web application. I know very little about the application itself, and frankly, not much about Wildfly. I am using Eclipse Oxygen and Wildfly 10.1.0 with the JBoss plugin.
I am following sketchy deployment instructions for the app and they're not working. However, this application has deployed for other folks on the project.
When publishing the app (I've tried clean, publish, full publish etc.), the resultant exploded war in standalone/deployment is missing .class files. However, the missing .class files are present in the taget directory and they are in the .WAR file, they're just not in the Widlfly deployment.
This application builds two base 'com' packages. Let's call them com.rrr and com.ttt for anonymity.
When the application builds, there is the expected WEB-INF/classes/com directory structure (in target and the war) with all package directories and all .class files present.
When deployed to Wildfly, all of the package directories are present for both com.rrr and com.ttt, however, there are .class files in the com.ttt packages, but there are NO .class files in the com.rrr packages.
So, when I try and deploy the app using the JBoss/Eclipse plugin, I'm getting:
Caused by: java.lang.ClassNotFoundException: com.rrr.ui.servlet.ActionServlet from [Module "deployment.myapp-18.1.0.0.war:main" from Service Module Loader]
Again, this deployment works for others (who are unavailable at this time) so I don't think it's a project issue. Perhaps I have configured something wrong based on the sketchy instructions?
Any guidance on what to look for or how to solve this would be appreciated.

Hibernate configuration with tomcat and eclipse

I'm creating a webApp in eclipse using tomcat & hibernate (for mysql). Ive unit tested by code and I am able to connect to the db and pull data, but I'm running into issues when trying it from the web app.
From the exception it looks like it isnt able to get to the hibernate.cfg.xml, but I've tried placing the file in the src folder, WEB-INF/lib & WEB-INF/classes but I still get the same error.
The line of code that it's failing on is:
Configuration configuration = new Configuration();
I would really really appreciate any help!
ClassPath References:
Project References:
Stacktrace:
java.lang.ExceptionInInitializerError
org.hibernate.cfg.Configuration.reset(Configuration.java:324)
org.hibernate.cfg.Configuration.<init>(Configuration.java:289)
org.hibernate.cfg.Configuration.<init>(Configuration.java:293)
root cause
java.lang.NullPointerException
org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
org.hibernate.cfg.Environment.<clinit>(Environment.java:221)
org.hibernate.cfg.Configuration.reset(Configuration.java:324)
org.hibernate.cfg.Configuration.<init>(Configuration.java:289)
org.hibernate.cfg.Configuration.<init>(Configuration.java:293)
SOLUTION
Thanks to #Engineer, I was able to solve this by removing the jars from WEF-INF/lib & from the class path of the run configuration. Then I added them back using the "Deployment Assembly" menu in eclipse. I also have my project references here.
From Ranga Reddy:
Problem: Because of adding the jars in user library class path.
Solution: Instead of adding the jar files using User Library add the jars using classpath.

Java EE, GWT, NoClassDefException

I have an app, built on GWT (google web toolkit) and JPA (eclipselink 2.3). it's not using GAE (app engine).
when I finished application, I ran 'google->gwt compile' menu in eclipse and then uploaded /war content to the tomcat directory...
application is running, but when I try to do one specific action in gui, I get an error message and Tomcat log contains this exception: http://paste2.org/p/1879857 (java.lang.NoClassDefFoundError)
during development of the application, I encountered this kind of exception several times, it was always caused by absence of library .jar file in the war/WEB-INF/lib/... anytime it has occurred, I stored .jar to the folder and it worked... but not this time...
this class is located in gwt-dev.jar (yes, it is there - have searched the archive) and it didn't help me to store archive to the lib/ folder...
it is also included in classpath, and compiler had no problem... compilation finished without errors (so compiler can see the class).
do you have any idea, how to make tomcat to see the class?
thanks
gwt-dev.jar shouldn't be in WEB-INF/lib/, it is the GWT compiler, and shouldn't be needed or used at runtime. At the same time, that HashSet (com.google.gwt.dev.util.collect.HashSet, part of dev mode) shouldn't be used outside the compiler - use java.util.HashSet instead.
Change the HashSet import in GroupImpl.java from com.google.gwt.dev.util.collect.HashSet to java.util.HashSet. You shouldn't need gwt-dev.jar to run your application.

Eclipse and Tomcat: Unable to start a War project

My eclipse setup for web project worked before. But all of the sudden it stops working.
Eclipse version Build id: 20100218-1602
It is a very standard setup. I have a servers project setup in eclipse. I have defined an tomcat server in it. I was able to run my web project this way.
Suddenly for some reason today I saw this exception:
org.springframework.beans.factory.CannotLoadBeanClassException:
Error loading class [some.company.persistence.dao.hbm.ProductDaoImpl]
for bean with name 'productDao' defined in class path resource [SomeDB.xml]:
problem with class file or dependent class; nested exception is
java.lang.NoClassDefFoundError: org/springframework/orm/hibernate3/support
/HibernateDaoSupport
Based on the message above, can anyone suggest what may be broken?
Looks like the hibernate library is missing from the project's classpath. Figure out which one of the spring jars contains HibernateDaoSupport and add it to your project's classpath.

JBoss 5.x and Axis2

What libraries are required to run a Web Service Client that has been generated from Axis 2 on JBoss. So far I have not found anything in my searches.
I assume that the following error:
org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
Is due to the fact that I have place every jar file from Axis lib folder into my projects
My Solution
Did it the hard way - added and subtracted jars from my lib directory until I got it to deploy and run with no exceptions
Is what you have pasted the root cause of the stack trace? In case it is not, the problem is that probably your app is deployed with xerces related jar files in it (ex: xercesImpl-x.x.x.jar). JBoss is shipped with the xerces jars in its JBOSS_HOME/lib/endorsed folder. If the same classes are deployed with your web app this may result in class loading issues.
You can try to remove the xerces libs from your app and then test the web service client again.
Cheers!