I had quite a hard time trying to run the following code in Eclipse (CollectionUserType implements UserType): Class.forName(“net.sf.hibernate.tap.CollectionUserType”); The problem was: Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/hibernate/UserType at java.lang.ClassLoader.findBootstrapClass(Native Method) at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891) at java.lang.ClassLoader.loadClass(ClassLoader.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) The strange thing was that I could define instances of both UserType and CollectionUserType soContinue reading “Eclipse: Run => NoClassDefFoundError for an interface when loading a class implementing it”
Monthly Archives: April 2006
Redeploy an application (ear/war/…) on JBoss
A) Via JMX-console find jboss.system:service=MainDeployer invoke listDeployed – find something like: org.jboss.deployment.DeploymentInfo@d78e875f { url=file:/C:/jboss-3.2.3/server/default/deploy/tap.ear } copy the url, go back and invoke Redeploy with the url (file:/C:/…) as the parameter. B) From the command line The operations that can be invoked via the JBoss JMX console can also be invoked by the cmd lineContinue reading “Redeploy an application (ear/war/…) on JBoss”
Access EJB on JBoss from outside
How to acces an enterprise java bean (EJB) running on JBoss from a standalone application running outside JBoss? In the code you must, among others: Set properties for a naming context and create one to be able to look the EJB up Authenticate by JBoss by means of JAAS To run the application: Set theContinue reading “Access EJB on JBoss from outside”