Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Migrating form GlassFish 3 to GlassFish4

rsoikaOct 6 2015 — edited Oct 6 2015

Hi,

I am trying to migrate an existing project form GlassFish3 to GlassFish4 without success.

The same project works perfect on JBoss Wildfly - so I don't think that did thing wrong in general.

The project is an EAR with EJBs, Web and RestService Modules. I figured out how to change the jersey configuration for the rest services. I also tried to update my beans.xml files to a format which was recommended form other users:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"

  version="1.2" bean-discovery-mode="annotated">

</beans>

But GlassFish4 is always complaining :

WELD-001408: Unsatisfied dependencies for type LoginController with qualifiers @Default

  at injection point [BackedAnnotatedField] @Inject protected com.imixs.workflow.office.web.TimesheetController.loginController

  at com.imixs.workflow.office.web.TimesheetController.loginController(TimesheetController.java:0)

....

Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type LoginController with qualifiers

....

Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB

  at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:700)

  at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:246)

  at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:430)

  ... 70 more

Caused by: javax.ejb.CreateException: Could not create stateless EJB

  at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:514)

  at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:97)

  at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:698)

  ... 72 more

....

But at the end I can't figure out what really is the problem. The error messages are looking meaningless to me.

My question is: is there a kind of guideline how to migrate to GlassFish4?  My application uses a lot of things like glassfish-ejb-jar.xml descriptors, principal settings, interceptors, Eclipselink, Timerservices.

I am really frustrated because I know that my implementation is not the problem. The reason seems to be the deployment descriptors.

===

Ralph

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2015
Added on Oct 6 2015
0 comments
1,292 views