[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4031) JavassistInstrumentor throws ClassNotFoundException when scanning annotations
by Paul Mooney (JIRA)
JavassistInstrumentor throws ClassNotFoundException when scanning annotations
-----------------------------------------------------------------------------
Key: JBSEAM-4031
URL: https://jira.jboss.org/jira/browse/JBSEAM-4031
Project: Seam
Issue Type: Bug
Components: Wicket
Reporter: Paul Mooney
A ClassNotFoundException is thrown when the javassistInstrumentor encounters annotations that are not in the classpath. This happens when :
-Using the seam-instrument-wicket plugin
-scanAnnotations is true
-Classes that match the 'includes' patterns have a TYPE targetted annotation which is defined in the project, or in an artifact that is not a dependency of the plugin.
This seems to happen because dependencies of the project, and the project's classes are not in the classpath of the seam-instrument-wicket plugin.
Possible Solutions:
1. Somehow put all of the project's dependencies and classes in the plugin's classpath when it runs.
or
2. Replace all calls to 'CtClass.getAnnotations()' inside of JavassistInstrumentor with 'CtClass.getAvailableAnnotations()' which only loads Annotations on the classpath and does not throw a ClassNotFoundException.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4178) Seam 2.1.1GA on Glassfish generates an exception depending on where the end-conversation is placed in a pages.xml
by Arshad Mahmood (JIRA)
Seam 2.1.1GA on Glassfish generates an exception depending on where the end-conversation is placed in a pages.xml
-----------------------------------------------------------------------------------------------------------------
Key: JBSEAM-4178
URL: https://jira.jboss.org/jira/browse/JBSEAM-4178
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Environment: JD 1.6 Seam 2.1.1.GA Glassfish 2.1
Reporter: Arshad Mahmood
I have an application with an edit page named edit.xhtml, it has a form and submit buttion which executes the following action #{currencyAction.save}. The currencyAction is an EJB Stateful session bean. I am coming across a weird error when the action is execute:-
If my pages.xml is as follows, everything works as expected (i.e. the bean is saved and I get redirected to the view page).
<!-- page parameters -->
<param name="currencyId" value="#{currencyAction.currencyId}" />
<!-- join the conversation -->
<begin-conversation join="true" />
<!-- action: persist -->
<navigation from-action="#{currencyAction.save}">
<end-conversation before-redirect="true" />
<rule if-outcome="persisted">
<redirect view-id="/settings/currencies/view.xhtml">
<param name="currencyId" value="#{currencyAction.currencyId}" />
</redirect>
</rule>
</navigation>
** BUT **, if I change the end-conversation to be within the if-outcome then I get an exception. I.e. if the pages,xml is changed to
<!-- action: persist -->
<navigation from-action="#{currencyAction.save}">
<rule if-outcome="persisted">
<end-conversation before-redirect="true" /> *** CHANGE HERE ****
<redirect view-id="/settings/currencies/view.xhtml">
<param name="currencyId" value="#{currencyAction.currencyId}" />
</redirect>
</rule>
</navigation>
The exception is as follows:-
[#|2009-05-15T10:08:58.045+0100|INFO|sun-appserver2.1|javax.enterprise.system.container.ejb|_ThreadID=24;_ThreadName=TP-Processor12;|
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/smartkidsBSEMF
java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/smartkidsBSEMF
at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:245)
at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
at sun.reflect.GeneratedMethodAccessor423.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
The bean values are persisted to the database, but then this exception is raised.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month