javaee-samples/javaee7-samples

Test javaee7-samples/jpa/native-sql-resultset-mapping fail in Weblogic 12.1.3

joedayz opened this issue · 3 comments

Hi, I am trying it first test with web logic 12.1.3.

Step 1: My profile was updated like this:

weblogic-remote-arquillian
        <properties>
            <!-- Default username/password that instructions in README.md ask to use 
                when starting up WebLogic for the first time. Note that WebLogic does not 
                have any default username/password of its own. -->
            <weblogicRemoteArquillian_adminUserName>weblogic</weblogicRemoteArquillian_adminUserName>
            <weblogicRemoteArquillian_adminPassword>welcome1</weblogicRemoteArquillian_adminPassword>

            <!-- Default host and port when running WLS locally -->
            <weblogicRemoteArquillian_adminUrl>t3://localhost:7001</weblogicRemoteArquillian_adminUrl>

            <!-- Default target after having installed developer zip distribution for 
                WebLogic -->
            <weblogicRemoteArquillian_target>myserver</weblogicRemoteArquillian_target>
        </properties>

        <dependencies>
            <dependency>
                <groupId>org.jboss.arquillian.container</groupId>
                <artifactId>arquillian-wls-remote-12.1.2</artifactId>
                <version>1.0.0.Alpha3</version>
                <scope>test</scope>
            </dependency>
        </dependencies>

Step 2: Start Weblogic

Step 3: mvn test -Pweblogic-remote-arquillian -DweblogicRemoteArquillian_wlHome=/Users/josediaz/Tools/wl12210

Error Test:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.295 sec <<< FAILURE!
testJpaNativeSqlResultSetMapping(org.javaee7.jpa.nativesql.resultset.mapping.JpaNativeSqlResultSetMappingTest) Time elapsed: 0.329 sec <<< ERROR!
java.lang.NullPointerException
at org.javaee7.jpa.nativesql.resultset.mapping.JpaNativeSqlResultSetMappingTest.testJpaNativeSqlResultSetMapping(JpaNativeSqlResultSetMappingTest.java:67)

Error Weblogic:

INFO: BeanManager not found.
<Feb 26, 2016 2:21:26 PM PET> <2016-02-26 14:21:26.705--ServerSession(664831661)--Failed to find MBean Server: javax.naming.NameNotFoundException: remaining name: comp/env/jmx/runtime>
<Feb 26, 2016 2:21:26 PM PET> <2016-02-26 14:21:26.705--ServerSession(664831661)--Unable to unregister MBean [null] because the MBeanServer is null. Verify that your ServerPlatform is JMX enabled.>
<Feb 26, 2016 2:21:26 PM PET> <2016-02-26 14:21:26.706--ServerSession(664831661)--909fa198-0844-4514-b4f9-3df023d60c83file:/Users/josediaz/Tools/wls12130/user_projects/domains/mydomain/servers/myserver/tmp/_WL_user/909fa198-0844-4514-b4f9-3df023d60c83/mh2r7b/war/WEB-INF/lib/_wl_cls_gen.jar_MyPU logout successful>

Some idea?

Jose

I fixed the problem adding a beans.xml en META-INF

.addAsResource("META-INF/beans.xml");

Thanks for letting us know José!

If I have some time later I'll try to find out if META-INF/beans.xml is actually required by the Java EE spec, or just a WebLogic workaround.

Btw, the title says WebLogic 12.1.3 but your path (/Users/josediaz/Tools/wl12210) seems to hint at WebLogic 12.2.1.

I'm pretty sure that the beans.xml is optional since Java EE 7. Other servers work find without it. Not sure what could be Weblogic problem.