Skip to main content

Posts

No EJB found with interface of type with Jboss annotation @Management in JavaEE6

“JBoss-specific @Management is not supported with Java EE6-specified @Singleton,” as quoted here: https://developer.jboss.org/thread/164844 . A workaround will be to annotate with @Singleton and @Startup. Also, you could expose your bean through JMX with the snippet below: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();          ObjectName name = new ObjectName("com.example:type=Hello");          Hello mbean = new Hello();          mbs.registerMBean(mbean, name); Read More  

Quartz Scheduler ... Caused by: java.lang.IncompatibleClassChangeError: Found interface org.quartz.JobDetail, but class was expected

Remove              <dependency>             <groupId>quartz</groupId>             <artifactId>quartz</artifactId>             <version>1.6.0</version>             <type>jar</type>         </dependency> and replace with                    <dependency>             <groupId>org.quartz-scheduler</groupId>             <artifactId>quartz</artifactId>             <version>2.2.3</version>         </dependency>

Not generating any bean definitions from... because of underlying class loading error: Type .... from Service Module Loader] not found

This error is common with JBoss module dependencies. I fixed this issue by adding jboss-structure.xml to my src project directory and adding the missing module to the dependencies node. An example of the file's content is below: <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure>   <deployment>     <dependencies>         <module name="location.missingdependency.jar" services="export" />     </dependencies>   </deployment> </jboss-deployment-structure> Just to mention that this issue was experienced with the EJB jar. For a normal jar/WAR file, a manifest.ft file will do.

Wildfly EJB Remote Client Exceptions.......

Below are exceptions and the solutions I applied while developing a remote client enterprise application. To start with, enable debug for your application server to see the detail and good luck troubleshooting. Exceptions : Starting with  java.lang.ClassNotFoundException: org.hibernate.collection.internal.Persistent......... Solution : I fixed the exception be adding hibernate Entity Manager Dependencies. Exception: Error javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial Solution : Add JBOSS-CLIENT Dependencies to your project Exception : IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling Solution : Confirm that your EJB module have been deployed. Exception : org.jboss.naming.remote.client.initialcontextfactory wildfly     javax.naming.NamingException: WFLYNAM0027: F...

Java EE CDI Annotation Bean name is ambiguous Error

Got this error while deploying one of my applications. After looking around, it appears that the solution to the error I was experiencing was that there was another bean with same identifier. In simple term, verify that you do not have another bean with the same bean identifier/name somewhere in your project. I will suggest that you should change the bean name for a start.