[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3638) SeamTest causing NPE when run in multi-module Maven project on Linux
by Petr Nejedly (JIRA)
SeamTest causing NPE when run in multi-module Maven project on Linux
--------------------------------------------------------------------
Key: JBSEAM-3638
URL: https://jira.jboss.org/jira/browse/JBSEAM-3638
Project: Seam
Issue Type: Patch
Components: Test Harness
Affects Versions: 2.1.0.GA
Environment: Linux, Java 1.5.0_13, Maven 2.0.8, Surefire 2.4.3
Reporter: Petr Nejedly
Fix For: 2.1.0.SP1
Hi,
we have a multi-module Maven setup and running tests in test and integration-test phases. We're using Embedded EJB container for the integration tests. Since migrating to Seam 2.1.0.GA, SeamTest based tests are failing during startSeam(), more precisely createServletContext(). It's trying to instantiate MockServletContext, causing NPE on line:
webappRoot = new File(getClass().getResource("/").toURI());
This is only happening, however, when run on Linux machine from the parent pom file (works on Windows every time and on Linux when run from a sub-project). Basically the NPE is caused by getResource("/") returning null. Seems to be working when replaced by:
webappRoot = new File(getClass().getResource("/.").toURI());
I'm a bit stuck here, since this code is in the default constructor of the MockServletContext class so overwriting it will not help.
--
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3675) SEAM 2.1 ANT-FILE - SQL Generation from EntityBeans
by nimo stephan (JIRA)
SEAM 2.1 ANT-FILE - SQL Generation from EntityBeans
---------------------------------------------------
Key: JBSEAM-3675
URL: https://jira.jboss.org/jira/browse/JBSEAM-3675
Project: Seam
Issue Type: Feature Request
Components: Build
Affects Versions: The future
Environment: SEAM 2.1, JBOSS 4.2.3, JSF, FACELETS, Hibernate, JPA, EJB 3
Reporter: nimo stephan
Integration of an ANT-TASK in SEAMs Ant-File, which produces a DDL-SQL-Script from a set of given Entity-Beans.
It would be an enhancement and abstraction of the well-known sub-task "schemaexport":
<!-- SQL Generation-->
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />
<target name="schemaexport">
...
<hbm2ddl drop="false" create="false" export="false" outputfilename="helloworld-ddl.sql" delimiter=";" format="true"/>
</target>
The abstracted ant-task can be something like:
<task>
<database schema="#{mySQL}" entityBeans="{package.xy}" outputFile ="#{resources.ddl.sql}" relatedLibraries="#{database-drivers}"/>
</task>
with these properties:
schema-attribute: defines the Database, such as DB2, mySQL, SQLServer, etc. (to recognize the database-syntax, such as delimiter=";" )
entityBeans: defines the package, where all the entityBeans lies (subdirectories should also be included)
outputFile: defines the place, where the generated SQL script should be stored
relatedLibraries: defines place of libraries needed for the generation (database-drivers, ...)
It would be really nice, to integrate such a task.
--
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3386) Building with ant 1.7.1 causes NPE in testing/deployed apps
by Marek Novotny (JIRA)
Building with ant 1.7.1 causes NPE in testing/deployed apps
-----------------------------------------------------------
Key: JBSEAM-3386
URL: https://jira.jboss.org/jira/browse/JBSEAM-3386
Project: Seam
Issue Type: Bug
Components: Build
Affects Versions: 2.0.3.CR1
Environment: Linux, Ant 1.7.1, jdk5/jdk6
Reporter: Marek Novotny
Attachments: ant171_build.log
Building with ant 1.7.1 causes NullPointerException in examples NumberGuess, Todo, Drools, DVDStore and in Integration test of BPM.
2 different places with NPE:
[testng] java.lang.NullPointerException
[testng] at org.jboss.seam.navigation.ConversationControl.beginOrEndConversation(ConversationControl.java:79)
[testng] at org.jboss.seam.navigation.Page.preRender(Page.java:242)
[testng] at org.jboss.seam.navigation.Pages.preRender(Pages.java:316)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:560)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:471)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.renderResponsePhase(BaseSeamTest.java:629)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:622)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:184)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:530)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
[testng] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:524)
[testng] at org.jboss.seam.example.numberguess.test.NumberGuessTest.testNumberGuessWin(NumberGuessTest.java:18)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[testng] at java.lang.reflect.Method.invoke(Method.java:585)
[testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:470)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:564)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:830)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
[testng] at org.testng.TestRunner.runWorkers(TestRunner.java:678)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:624)
[testng] at org.testng.TestRunner.run(TestRunner.java:495)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:190)
[testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
[testng] at org.testng.TestNG.run(TestNG.java:699)
[testng] at org.testng.TestNG.privateMain(TestNG.java:824)
[testng] at org.testng.TestNG.main(TestNG.java:802)
or in DVDstore:
[testng] Caused by: java.lang.NullPointerException
[testng] at org.jboss.seam.core.ConversationInterceptor.beginNavigation(ConversationInterceptor.java:243)
[testng] at org.jboss.seam.core.ConversationInterceptor.beginConversation(ConversationInterceptor.java:235)
[testng] at org.jboss.seam.core.ConversationInterceptor.beginConversationIfNecessary(ConversationInterceptor.java:166)
[testng] at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:57)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
[testng] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
[testng] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
[testng] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
--
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3621) Support hot-deployment of instrumented wicket components
by Clint Popetz (JIRA)
Support hot-deployment of instrumented wicket components
--------------------------------------------------------
Key: JBSEAM-3621
URL: https://jira.jboss.org/jira/browse/JBSEAM-3621
Project: Seam
Issue Type: Patch
Reporter: Clint Popetz
Attached is a patch to add support for hot deployment of wicket components that have been instrumented by the wicket instrumentation ant task from JBSEAM-3505. That patch should be applied first to avoid conflicts.
The elements of this patch are:
* I need access to the HotDeploymentStrategy from the wicket classloader, but it's currently only exposed in the event context for the duration of startup. I've changed this to place it in the application context. I don't know if that's correct, but it seemed like a reasonable place to store it. So HotDeploymentStrategy now does this in its constructor.
* Initialization.redeploy now calls ServletLifecycle.beginReinitialization before createHotDeployment so that the app context exists. This puts createHotDeployment in the same contextual surroundings as its other invocation in Initialization.init().
* The WicketFilter needs to be re-initialized upon redeployment. So WicketFilter now delays initialization of the delegate (the @Unwrapped anonymous subclass of wicket's own WicketFilter) until the first actual request, and at each request it checks a stored initTime against Init.getTimestamp(). If they've changed, it re-inits. Also, I place WicketFilter within the HotDeployFilter via @Filter(within), so that all of this can work. This survives the absence of the HotDeployFilter, i.e. if you deploy without jboss-seam-debug.jar, SeamFilter ignores the missing within reference, and the WicketClassLoader just uses the thread's contextClassLoader for the parent of the instrumenting class loader.
* WicketClassLoader uses the HotDeploymentStrategy's classloader as the parent classloader, if it exists. This means that runtime-instrumented wicket components can reference hot-deployed wicket components, but not vice-versa, similar to how hot-deployable seam components can reference normally deployed components, but not vice-versa.
--
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
16 years, 4 months