-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test native-sql-resultset-mapping fail in Weblogic 12.1.3 #342
Comments
Not every sample runs on every server. In general if a sample doesn't run on one server but does run on other ones, it's likely a bug in that server. This is actually the intend of these samples, to point out bugs in servers. If you think there's something specifically faulty in the test it can be looked at of course. |
Yes. The problem was solved adding a META-INF/beans.xml and a DefaultDataSource (I had to create one datasource with similar JNDI name) in persistence.xml. I will continue testing in weblogic. Jose |
Oh, of course. I forgot to mention that WebLogic 12.1.3 is a Java EE 6 server. The samples require Java EE 7 (WebLogic 12.2.1+). Sorry for that. The default data source is a new feature in Java EE 7, so that's indeed not available in Java EE 6. The idea there is that there's already a basic/simple data source available without you having to configure anything. |
In theory, weblogic 12.2.1 has a datasource by default. I downloaded the weblogic 12.2.1 yesterday , I created a new domain with basic wls template and my surprise was that it does not have datasources. This was my first error and when added , the next error was BeanManager null. For this reason, I added beans.xml Maybe exists some domain template that should install for have a default datasource. |
By the spec, a Java EE 7 should provide you with a default datasource. That's why the samples don't create one and just expect it to be there. |
@radcortez This is a really odd omission in the spec. I tried to address it a couple of times but no success yet. That said, the release notes of WebLogic explicitly state support for the default datasource. See |
I was looking for the spec section about Default Datasources and found this:
My understanding of the spec is that both ways should work, by stating explicitly the JNDI name or by omitting it. This works fine with other servers. Apparently by reading https://docs.oracle.com/middleware/1221/wls/JDBCA/default_datasource.htm#JDBCA729, seems that WebLogic only supports the Default Datasource by stating explicitly the JNDI name. I'm inclined to say that it's a bug on the WebLogic side and they should also support injection without the JNDI name. |
Hi, I am trying it first test with web logic 12.1.3.
Step 1: My profile was updated like this:
weblogic-remote-arquillianStep 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>
Jose
The text was updated successfully, but these errors were encountered: