JPA 2.0 in Weblogic
Hi....
I'm developing a webservice in NetBeans 7.0 M2 but when I creating my entities from classes wizard tell me that my server not support JPA 2.0.
So I'm working in WebLogic Server: 10.3.3.0, the question is how to implemente update or deploy libraries from JPA 2.0 in my weblogic?
Thanks
Edmar
Hi....
I'm developing a webservice in NetBeans 7.0 M2 but when I creating my entities from classes wizard tell me that my server not support JPA 2.0.
So I'm working in WebLogic Server: 10.3.3.0, the question is how to implemente update or deploy libraries from JPA 2.0 in my weblogic?
Thanks
Edmar
Similar Messages
-
JPA 2.0 in Weblogic 10.0 MP1
Hi there,
Is there a way to deploy a JPA 2.0 based application in a Weblogic 10.0 server?
We have an application that uses Spring 3.0.4, Hibernate 3.5.0.Final and Hibernate JPA 2.0.
Our customer is a major telecom operator that uses Weblogic 10.0 MP1 server with several applications already.
We tried the solutions for in http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1:_Alternative_3:_Application_Level_Shared_Library_-InUse
All not working for us.
Thank you,
IoanHi everyone,
I'm facing the same problem: Every JPA 2.0 implementation I tried to use doesn't work for me on Weblogic 10.0 and 10.3. It doesn't matter which JAP 2.0 vendor I use (I tried Hibernate and EclipseLink). I've used the tutorial user13348764 has mentioned and I tried to use one the the earfiles distributed here. I always get this error (for Hibernate I get this message with org.hibernate.ejb.HibernatePersistence):
Caused By: weblogic.deployment.EnvironmentException: Error processing persistence unit example of module enterprise: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:344)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:332)
at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:134)
at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:336)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:111)
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1812)
at weblogic.servlet.internal.WebAppModule.getWebClassLoader(WebAppModule.java:1604)
at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:2969)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:438)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:484)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418)
at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:976)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
I hope someone can help me to get it working.
Kind regards
Oliver -
How to upgrade to jpa 2.0 in weblogic 10.3.0.0
We are using weblogic server 10.3.0.0.For fixing a bug,we need to upgrade to JPA 2.0/Eclipse link 2.x.Right now we are using JPA 1.0/Eclipse link 1.0.1
Please advise what are the ways to upgrade.
I came to know that one of the ways is applying patch on server.Is the 9J3A patch should be applied.Will change in version to 2.0 in persistence also be required to upgrade.We are using weblogic server 10.3.0.0.For fixing a bug,we need to upgrade to JPA 2.0/Eclipse link 2.x.Right now we are using JPA 1.0/Eclipse link 1.0.1
Please advise what are the ways to upgrade.
I came to know that one of the ways is applying patch on server.Is the 9J3A patch should be applied.Will change in version to 2.0 in persistence also be required to upgrade. -
Running EJB3.1 and JPA 2.1 in weblogic 10.3.6
Hi,
I have developed an application with EJB3.1 , JPA2.0 with JEE6 level , I have tested this application in weblogic12c with developer license , it is working without any issues.
Now I need deploy it to production, we have license only for Weblogic 10.3.6 , is there any way to run this application in weblogic 10.3.6, which is JEE5 level only.
by copying EJB3.1 JARs in the WEB-INF\lib folder.
your suggestion reply would be appreciated.
Regards
MuthuvelHi,
The --component flag is missing.
Solution
Use the following command for Archiving Logs by File Size:
beectl> modify_property --component CURRENTsite:LoggingProperties name MaxFileSize value <log_file_size>
or
Use the following command for Archiving Logs by Directory Size:
beectl> modify_property --component CURRENTsite:LoggingProperties name MaxLogSize value <log_directory_size>
Regards,
Kal -
WebLogic 10.0 + JPA 2.0 = errors
Hi,
Is there a known way to add support for JPA 2.0 in Weblogic 10.0?
Thanks.See the recent OTN post from 20110115 detailing the latest release of Oracle WebLogic Server and some retesting of the previous issues related to JSR-317 JPA 2.0 support below.
Re: Deploy Hibernate based EAR file on Weblogic 10.3.3?
The latest release of Oracle WebLogic Server has been available on OTN at the following location since 20110115.
http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
This release provides support for JSR-317 JPA 2.0 container managed applications using the QWG8 patch or a manual prepending classpath change.
In 10.3.3.0 you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround as well as the persistence.xml renaming one is now fully deprecated and not required in 10.3.4.0 for both application and container managed persistence contexts.
As of 20110115 the 5 outstanding issues below look to be fixed by applying the http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309 patch for QWG8 or manually prepending to the WebLogic 10.3.4.0 server classpath.
commEnv.cmd: line 67
@rem Set BEA Home
set BEA_HOME=C:\opt\wls1034r20110115
@rem Enable JPA 2.0 functionality on WebLogic Server 10.3.4 with the following patch line for commEnv.cmd:67
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
A JPA 2.0 EE application using EclipseLink as the JPA2 persistence provider on WebLogic is detailed in the analysis section below1) JPA 2.0 XSD parsing - verified
2) New JPA 2.0 schema elements like <shared-cache-mode>NONE</shared-cache-mode> - verified
3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Stateless session bean - verified
4) JPA 2.0 weaving/instrumentation - this will require a more detailed lazy model and more debugging to fully verify
5) Dependency Injection of a container managed JPA 2.0 entityManager on a EJB component like a stateless session bean - verified
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
OTN downloadhttp://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
Patching
http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
Documentationhttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm
Supported Oracle WebLogic Server Versionshttp://download.oracle.com/docs/cd/E15315_06/help/oracle.eclipse.tools.weblogic.doc/html/SupportedServerVersions.html
TopLink JPA 2.0 Specific documentation/patchinghttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
EclipseLink Wiki: JPA 2.0 using EclipseLink on WebLogic analysis (XSD, Weaving, DI of @PersistenceContext)http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
thank you
/Michael O'Brien
http://www.eclipselink.org -
How to lookup a EJB 3.0 session bean which is deployed in WebLogic 10.3
Now Jdeveloper 11.1.1, is giving WebLogic server 10.3.
With internal WebLogic server, when I created a Sample client, it generated code as:
private static Context getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
// WebLogic Server 10.x connection details
env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101");
return new InitialContext( env );
public static void main(String [] args) {
try {
final Context context = getInitialContext();
DefaultSession defaultSession = (DefaultSession)context.lookup("property-DefaultSession#com.vs.property.model.session.DefaultSession");
} catch (Exception ex) {
}How to update the above code to lookup the EJB 3.0 session beans with an external WebLogic server 10.3?
Is there any documentation available on how to install weblogic, troubleshoot, debug, WebLogic server 10.3?
regds
-rajuRaju,
Hi, to start, here is a tutorial on a quickstart web application using an EJB 3.0 stateless session bean that fronts a container managed EclipseLink JPA entity manager on WebLogic 10.3, you will find references there to other general WebLogic documentation.
[http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial]
using @EJB injection on the client instead of a JNDI lookup as below
[http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1417411]
1) in your second env.put I noticed that your t3 port is 7101, I usually use the default 7001 - but It looks like this port is valid for the JDeveloper embedded version of WebLogic server runs - just verify that it matches the port of your server.
2) your name#qualified-name lookup looks ok. Verify that the jndi-name element is set in your weblogic-ejb-jar.xml for non injection clients like the following
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ApplicationService</ejb-name>
<jndi-name>ApplicationService</jndi-name>
3) as a test outside of your application - launch the WebLogic admin console and goto the testing tab of your bean in [Home > Summary of Deployments > "application" > "session bean name"
thank you
/michael : http://www.eclipselink.org -
Problems deploying app using OpenJPA 2.0.0 to WebLogic 10.3.3
I have an app that has been using OpenJPA 1.2.2. It runs fine on both WebLogic 10.3.2 and 10.3.3. I recently tried to upgrade it to OpenJPA 2.0.0. I have no trouble with the build and unit tests, but it fails at deployment.
I've always had a "prefer-application-packages" spec for "org.apache.openjpa.*".
After replacing the "openjpa-1.2.2.jar" with "openjpa-all-2.0.0.jar", deployment fails with the following:
NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;.
The "getValidationMode()" method wasn't present in the JPA 1.0 specification, and was added in 2.0.
After I then added "javax.persistence.*" and "javax.persistence.spi.*" to the "prefer" specs (I imagine the second is redundant), I now get this:
ClassCastException: org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to javax.persistence.spi.PersistenceProvider
I also tried only "preferring" "javax.persistence.spi.*", but that didn't change the result.
Is there some way to get WebLogic to not use it's Kodo implementation at all? This seems to be the crux of this problem.There might be some useful information on the EclipseLink site, where they show various means of modifying the JPA version used by WebLogic Server.
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic
Different JPA vendor, but the situation you are facing is similar.
-steve- -
11g Release 1 Patch Set 3 (WLS 10.3.4)
Hi.
While creating new server in OEPE Helios(11.1.1.6) I found that WLS 10.3.4 is available for selection. However I didnt find any information neither links to download it. Only 10.3.3 is available.
When and where it is\would be available for download?
Thanksfrf,
Hello, as part of the WebLogic 10.3.4 release on friday - we verified JPA 2.0 functionality for enterprise users using JPA as their persistence pattern. The main issues were JPA 2.0 XSD validation and JPA 2.0 container managed persistence unit injection.
The details of the following post outline what happens out of the box and how JPA 2.0 can be officially enabled on JEE5 compliant WebLogic 10.3.4 install +(with or without the QWG8 patch)+
In 10.3.3.0 you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround is now deprecated and not required in 10.3.4.0 for both application and container managed persistence contexts.
Specifically we will start retesting EE applications using a SSB injected @PersistenceContext container managed JTA transactional JPA 2.0 persistence units with/without JPA 2.0 XSD elements.
I verified the server and it is using SVN rev# *8635 from 6 Dec 2010* https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8635
Essentially in order to enable JPA 2.0 functionality on WebLogic 10.3.4 shipped on 14 Jan 2011 - you apply the QWG8 patch below or manually edit your server classpath to put the JPA 2.0 persistence specification API jar and the com.oracle.jpa2support_1.0.0.0_2-0.jar ahead of the other liibraries on the classpath.
commEnv.cmd: line 67
@rem Set BEA Home
set BEA_HOME=C:\opt\wls1034r20110115
@rem Enable JPA 2.0 functionality on WebLogic Server 10.3.4 with the following patch line for commEnv.cmd:67
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jarEverything is shipped with WebLogic 10.3.4 but JPA 1.0 is enabled by default so that this JEE5 capable server is backwards compatible with JEE5/JPA1 out of the box. Without the above patch you will see the following.
<15-Jan-2011 5:58:40 o'clock PM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 >
[EL Info]: 2011-01-15 18:06:38.082--ServerSession(48997950)--Thread(Thread[[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--EclipseLink, version: Eclipse Persistence Services - 2.1.2.v20101206-r8635
[EL Info]: 2011-01-15 18:06:38.082--ServerSession(48997950)--Thread(Thread[[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Server: 10.3.4.0
We have the required bundles in the modules directory...
javax.persistence_1.0.0.0_2-0-0.jar (upgraded from 1-0-2)
org.eclipse.persistence_1.0.0.0_2-1.jar (upgraded from 2-0)
A very quick test of a JPA 2.0 container managed app with the following persistence.xml in the ejb.jar works as detailed below.
There are 3 issues we must check.
1) JPA 2.0 XSD parsing errors: as expected there are no more JPA 2.0 schema parsing issues.
2) New JPA 2.0 schema elements like the *<shared-cache-mode>NONE</shared-cache-mode>* element - this passes validation but we need to verify runtime functionality
3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Statless session bean
4) JPA 2.0 weaving/instrumentation - Again we need to verify something like weaving of Entities contaiing lazy IndirectLists are weaved properly by the container.
Note: All testing in this post is on a WebLogic 10.3.4.0 install out-of-the-box. The only modification I made was in creating a derby 10.5.3.0 JTA global datasource "localJTA" on the server - and drop a container managed JPA 2.0 app as an EAR in the autodeploy directory on the default user domain.
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="example" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <!-- we will default to Kodo without specifying the provider -->
<jta-data-source>localJTA</jta-data-source>
<shared-cache-mode>NONE</shared-cache-mode><!-- shared-cache-mode must come after any class definitions (usually SE only) - the JPA schema is ordered -->
<properties>
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.target-database" value="Derby"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<!-- new for 10.3.4.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
<property name="eclipselink.logging.logger" value="DefaultLogger"/>
<!-- turn off DDL generation after the model is stable -->
<!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="database"/-->
</properties>
</persistence-unit>For 3) we get the following exception out of the box on a servlet if we do not apply the above mentioned patch below - because the container defaults to Java EE 5 functionality - or JPA 1.0
http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
at org.eclipse.persistence.example.jpa.server.weblogic.enterprise.presentation.FrontController.processGliderComm
and(FrontController.java:346)
or 3) The same exception if we try to run JPA 2.0 on the DI entityManager from the SSB in the EJB container classLoader
javax.ejb.EJBException: EJB Exception: : java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
+ at org.eclipse.persistence.example.jpa.server.business.ApplicationService.insertObjects(ApplicationService.java:66)+
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+ at java.lang.reflect.Method.invoke(Method.java:597)+
+ at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)+
+..+
+ at $Proxy74.insertObjects(Unknown Source)+
+ at org.eclipse.persistence.example.jpa.server.business.ApplicationService_5ptwty_ApplicationServiceLocalImpl.__WL_invoke(Unknown Source)+
We also get the Kodo/OpenJPA provider when we attempt to weave.
+<openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error> org.apache.openjpa.util.MetaDataException: "org.eclipse.persistence.example.jpa.server.business.Cell.id" declares generator name "EL_SEQUENCE_CELL", but uses the AUTO generation type. The only valid generator names under AUTO are "uuid-hex" and "uuid-string".+
+ at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getGeneratedValueStrategy(AnnotationPersistenceMetaDataParser.java:1226)+
Therefore there is still a little bit of configuration required.
Enabling JPA2 support
1) install the QWG8 patch, or
2) manually add the com.oracle.jpa2support_1.0.0.0_2-0.jar ahead of the server classpath by following the instructions in the documentation at
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
or doing it manually by modifying the following line
C:\opt\wls10340_pub110115\wlserver_10.3\common\bin\commEnv.cmd
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
Results
The following code
@Local
@Stateless
public class ApplicationService implements ApplicationServiceLocal {
@PersistenceContext(unitName="example", type=PersistenceContextType.TRANSACTION)
private EntityManager entityManager;
public boolean insertObjects(List<Cell> classes) {
try {
for(int i=0; i< classes.size(); i++) {
entityManager.persist(classes.get(i));
System.out.println("JPA 2.0 Metamodel: " + entityManager.getMetamodel()); ...prints out the JPA 2.0 EntityManager dependency injected into the SSB proxy for the life of the transaction in the function
JPA 2.0 Metamodel: MetamodelImpl@34817119 [ 5 Types: , 2 ManagedTypes: , 2 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]+
+[EL Finer]: 2011-01-15 22:36:00.33--UnitOfWork(34913451)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beforeCompletion callback, status=STATUS_ACTIVE+
You can see that when we debug the stateless session bean $Proxy that has our injected EntityManager...
this ApplicationService_5ptwty_Impl (id=11616)
__WL_EJBContext SessionEJBContextImpl (id=11654)
entityManager $Proxy73 (id=11639)
h TransactionalEntityManagerProxyImpl (id=11638)
appName "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR" (id=11513)
closeMethod Method (id=11663)
moduleName "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB.jar" (id=11515)
persistenceUnit PersistenceUnitInfoImpl (id=11665)
persistenceUnitName "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR#org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB.jar#example" (id=11666)
queryMethods HashSet<E> (id=11668)
transactionAccessMethod Method (id=11669)
transactionalMethods HashSet<E> (id=11670)
txHelper TransactionHelperImpl (id=11523)
txRegistry ServerTransactionManagerImpl (id=11524)
unqualifiedPersistenceUnitName "example" (id=11672) ...no longer complains about an unknown getMetamodel() JPA 2.0 method signature
Oracle WebLogic Server 11gR1 PatchSet 3 r20110115 at localhost [Oracle WebLogic Server]
Java HotSpot(TM) Client VM[localhost:8453]
Daemon Thread [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] (Running)
Daemon Thread [[ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] (Suspended)
TransactionalEntityManagerProxyImpl.invoke(Object, Method, Object[]) line: 18
$Proxy59.getMetamodel() line: not available [local variables unavailable]
ApplicationService_5ptwty_Impl(ApplicationService).insertObjects(List<Cell>) line: 60
.. JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 204
$Proxy71.insertObjects(List) line: not available
ApplicationService_5ptwty_ApplicationServiceLocalImpl.__WL_invoke(Object, Object[], int) line: not available
SessionLocalMethodInvoker.invoke(BaseLocalObject, MethodDescriptor, Object[], int, String, Class<?>) line: 39
ApplicationService_5ptwty_ApplicationServiceLocalImpl.insertObjects(List) line: not available
FrontController.generateGlider(PrintWriter) line: 252
.. FrontController(HttpServlet).service(ServletRequest, ServletResponse) line: 820
StubSecurityHelper$ServletServiceAction.run() line: 227
.. ExecuteThread.run() line: 176
arg1 Method (id=11511)
clazz Class<T> (javax.persistence.EntityManager) (id=8312)
name "getMetamodel" (id=11543)
returnType Class<T> (javax.persistence.metamodel.Metamodel) (id=11545) For 4) Weaving is occuring as expected on either the JPA 1.0 or JPA 2.0 entities. We check this by either checking that our Entity is an instanceof org.eclipse.persistence.internal.weaving.PersistenceWeaved interface, or debug into the Entity and look for our bytcode instrumented weaved fields that start with _persistence*. The question is - we need a weaved field or weaved function that was introduced for JPA 2.0
[4] Cell (id=11571)
_persistence_fetchGroup null
_persistence_primaryKey null
_persistence_session null
_persistence_shouldRefreshFetchGroup false
aCellAttribute null
id null
left null
peers HashSet<E> (id=11572)
map HashMap<K,V> (id=11575)
com.oracle.jpa2support_1.0.0.0_2-0.jar forensicsI had a look at the patch jar com.oracle.jpa2support_1.0.0.0_2-0.jar that WebLogic 10.3.4 ships with that allows installers to enable JPA 2.0 (JSR-317) support to superceed the default JPA 1.0 (JSR-220) support. It looks like the container proxy code for container managed EntityManagerFactory and EntityManager $Proxy objects has been updated so that a JPA 2.0 EntityManager $Proxy object get injected with the proper API level object via the InvocationHandlerFactory, FactoryInterceptor. The Query proxy has been updated as well. There is a fix for Kodo(OpenJPA) and OpenJPA related to the recent change and deprecation of certain functions of those providers. The EclipseLink JPA 2.0 provider (as the provider for TopLink) did not need weblogic changes beyond placing the JPA javax.peristence 2.0 specification jar higher on the classpath.
The root EclipseLink tracking bug is 334468
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334468
OTN downloadhttp://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
Patching
http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
Documentationhttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm
Supported Oracle WebLogic Server Versionshttp://download.oracle.com/docs/cd/E15315_06/help/oracle.eclipse.tools.weblogic.doc/html/SupportedServerVersions.html
TopLink JPA 2.0 Specifichttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
see related
JPA 2: Reverify JPA 2.0 XSD support in persistence.xml on AM/CM app on WebLogic 10.3.3.0
http://bugs.eclipse.org/331569
JPA 2.0: Add WebLogic 10.3 configuration process to enable the JPA 2.0 library functionality - updated
http://bugs.eclipse.org/296271
http://en.wikipedia.org/wiki/Oracle_WebLogic_Server - updated
JPA: Add downloadable 60k weblogic.EAR to wiki page (outside of SVN) - reopened
http://bugs.eclipse.org/294745
JPA: support WebLogic 10.3.4.0 introduction of new JPA MBean that changes the default JPA provider
http://bugs.eclipse.org/312824
JPA: Update tutorial wiki for WebLogic 10.3 to match the Oracle WebLogic 11g 10.3.3.0 - assigned
http://bugs.eclipse.org/310849
To be answered
OTN Post: WebLogic 10.0 + JPA 2.0 = errors - updated
Re: WebLogic 10.0 + JPA 2.0 = errors
Deploy Hibernate based EAR file on Weblogic 10.3.3?
OTN Post: Default JPA provider for Weblogic Server 10.3.2 (11g) - updated
Default JPA provider for Weblogic Server 10.3.2 (11g)
OTN Post: Hibernate 3.6 Final (JPA 2.0) + WL 10.3.x :Unable to deploy sample appn - updated
Hibernate 3.6 Final (JPA 2.0) + WL 10.3.x :Unable to deploy sample appn
WebLogic 10.0 + JPA 2.0 = errors
OTN Post: EJB with Hibernate On Weblogic - updated
Re: EJB with Hibernate On Weblogic
OTN Post: OEPE 1.6 - Oracle WebLogic Server 11gR1 PatchSet 3 requres WLS 10.3.4 - answered
OEPE 1.6 - Oracle WebLogic Server 11gR1 PatchSet 3 requres WLS 10.3.4
OTN Post: EJB with Hibernate On Weblogic - updated
Re: EJB with Hibernate On Weblogic
OTN Post: OpenJPA_2.0 NoSuchMethod error (getValidationMode()) - updated
OpenJPA_2.0 NoSuchMethod error (getValidationMode())
JPA 2.0 features used on WebLogic even if they are not available at runtime - notified
http://netbeans.org/bugzilla/show_bug.cgi?id=189205
Option to enable JPA 2.0 for dev WebLogic - notified
http://netbeans.org/bugzilla/show_bug.cgi?id=189348
False-positive error badge on project with JPA targeting WebLogic - notified
http://netbeans.org/bugzilla/show_bug.cgi?id=189626
Giving up on Hibernate (for now), trying EclipseLink...
http://forums.netbeans.org/post-94817.html
http://blogs.sun.com/arungupta/entry/which_java_ee_6_app
Eclipselink 2.0 + WebLogic 10 => No joy (Unable to get Eclipse link 2.0 working with WebLogic 10) - answered
http://www.eclipse.org/forums/index.php?t=msg&goto=644000&S=40e13288641c0af5dc8489343b896348#msg_644000
eclipselink-users Problem of eclipselink upgrade (2.0.2) - WebLogic 10.3.3.0 - answered
http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04631.html
Re: EclipseLink + JPA 2 in Weblogic 10.3.0
http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04375.html - answered below
Re: eclipselink-users Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10,
http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05609.html
[eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10 - answered
http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05639.html
To be Deprecated
JPA 2: Reverify JPA 2.0 XSD support in persistence.xml on AM/CM app on WebLogic 10.3.3.0
http://bugs.eclipse.org/331569
JPA 2.0: Add WebLogic 10.3 configuration process to enable the JPA 2.0 library functionality
http://bugs.eclipse.org/296271
WebLogic 10.3 availability?
/ Michael O'Brien
http://www.eclipselink.org -
How do I discover which version of JPA is being supported by WebLogic
The WebLogic version I have been using is 10.3.6.0. With the purpose to use JPA2 instead of JPA1, I followed the guide which tells to manually set this by adding these lines to commEnv.cmd (Programming Enterprise JavaBeans, Version 3.0, for Oracle WebLogic Server 11g Release 1 10.3.6):
set wls_modules=C:\Oracle\Middleware\modules
set PRE_CLASSPATH=%wls_modules%\javax.persistence_1.0.0.0_1-0-2.jar;%wls_modules%\com.oracle.jpa2support_1.0.0.0_2-1.jar
Then, I changed from Kodo to TopLink on WebLogic console.
Suddenly, I read "Java EE 6 support arrived in WebLogic 10.3.4.0 on 15 Jan 2011" (http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg06874.html).
I am asking myself if WebLogic 10.3.6 is already setted to use JPA2 by default. It would be easily answered if I knew how to see which JPA, JTA, EJB or wherever configuration version are set when the server is started. Where can I look for this information?My understanding is that the situation in WebLogic 10.3.6 is entirely the same as in prior versions - it ships with the JPA 2.0 jars but they are not enabled by default so that it can meet Java EE 5 compatibility requirements. This is mentioned in the docs you may have seen here: http://docs.oracle.com/cd/E23943_01/web.1111/e13852/toc.htm#BGGBIJBI
and the docs from 10.3.5 here:
http://docs.oracle.com/cd/E21764_01/web.1111/e13852/toc.htm#NOTES149
The link you referenced does not say WebLogic 10.3.4 is Java EE 6 compatible. The reference I believe you got this from is stating that the com.oracle.jpa2support_1.0.0.0_2-0.jar is included for future Java EE 6 compatibility, but is not enabled in 11.3.x so that it remains Java EE 5 compatible. It basically ships a preview of Java EE 6 components that are not enabled - Only WebLogic 12c is fully Java 6 EE compatible by default, which includes JPA 2.0.
Best Regards,
Chris -
Duplicate persistence units in JPA weblogic
Hello, I'm cross-posting thsi question from weblogic forum as a suggestion from james.bayer.
I am using weblogic 10.3.
I am trying to deploy a spring web application with severaljars, that contain jpa entities with a persistence.xml. The persistence unit name in all persistence.xml are equal. That is for spring no problem, because i wrote a PersistenceUnitManager, that merges all persistence units into one.
So far so good. But weblogic cant't deploy the war, because while validation of the deployment, wls throws an exception, that there are two persistence unit with the same name.
Does anybody has an idea how to deploy this war?
Can i switch off the validation of the persistence.xml?
The full stack trace is:
weblogic.application.ModuleException: Failed to load webapp: 'sfw-poc-condicao-pagamento-web.war'
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:404)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused By: weblogic.deployment.EnvironmentException: duplicate persistence units with name sfw-persistence-unit in scope sfw-poc-condicao-pagamento-web.war. First PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-class-loader-0.0.1-SNAPSHOT.jar. Second PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-custom-jar-0.0.1-20100622.030351-65.jar
at weblogic.deployment.AbstractPersistenceUnitRegistry.assertNoDuplicate(AbstractPersistenceUnitRegistry.java:313)
at weblogic.deployment.AbstractPersistenceUnitRegistry.processDescriptor(AbstractPersistenceUnitRegistry.java:291)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:192)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:101)
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1812)
at weblogic.servlet.internal.WebAppModule.getWebClassLoader(WebAppModule.java:1604)
at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:2969)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:438)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:487)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418)
at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:976)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Thanks a lotThey need to have different names.
James : http://www.eclipselink.org -
Toplink JPA with Coherence deployment to Weblogic 10.3
Hi,
I have created an EJB application using Toplink JPA and Coherence. I would like to deploy this application to Weblogic 10.3.
During the startup of Weblogic I have specified the Java option as
-Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml.
Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
When I execute the ejb client program, during the method call, I can see that coherence is started but it uses the cache-config from the coherence.jar file instaed of the value I have set during startup. How can I make weblogic use my cache-config.xml? I have included the log file entries from server:
[EL Finest]: 2009.04.17 05:33:48.625--UnitOfWork(1777337)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(coherenceproject.MetadataType)
2009-04-17 05:33:54.547/258.954 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence.xml"
2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
2009-04-17 05:33:54.578/258.985 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
Oracle Coherence Version 3.4.2/411
Grid Edition: Development mode
Copyright (c) 2000-2009 Oracle. All rights reserved.
*2009-04-17 05:33:55.750/260.157 Oracle Coherence GE 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded cache configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/coherence-cache-config.xml"*
2009-04-17 05:34:17.390/281.797 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
2009-04-17 05:34:21.890/286.297 Oracle Coherence GE 3.4.2/411 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0x2FFB" with Member(Id=1, Timestamp=2009-04-17 05:34:09.203, Address=141.144.90.113:8088, MachineId=18289, Location=site:sg.oracle.com,machine:rajerama-sg,process:3816, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) UID=0x8D905A7100000120B0D9DD3347711F98
2009-04-17 05:34:27.000/291.407 Oracle Coherence GE 3.4.2/411 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
[EL Finer]: 2009.04.17 05:34:28.343--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
[EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null
[EL Finer]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
*[EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null*
null
Eventhough the method is called correctly, it does not return the value. Is there any other setup that has to be done?
Regards
RajiHi Raji,
You mentioned:
>
-Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml
>
and
>
Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
>
It appears that these are conflicting; as the system property indicates that the config should be read from a file, whereas the file is actually deployed in a jar.
That being said, I would suggest double checking that the system property is actually being set in the JVM. In my testing, if I specify a cache config that does not exist, an exception will be thrown:
java -Dtangosol.coherence.cacheconfig=foo.xml com.tangosol.net.CacheFactory
Oracle Coherence Version 3.4.2/411p3
Grid Edition: Development mode
Copyright (c) 2000-2009 Oracle. All rights reserved.
Map (?): cache test
2009-04-22 15:33:15.310/6.917 Oracle Coherence GE 3.4.2/411p3 <Error> (thread=main, member=1):
(Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:602)
at com.tangosol.coherence.component.application.console.Coherence.doCache(Coherence.CDB:9)
at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:209)
at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.tangosol.net.CacheFactory.main(CacheFactory.java:1308)
Caused by: (Wrapped: Failed to load configuration resource: foo.xml) java.io.IOException: Configuration is missing: "foo.xml", loader=null
at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfigAsResource(DefaultConfigurableCacheFactory.java:386)
at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:337)
at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:309)
at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:137)
... 15 moreThanks,
Patrick -
Weblogic 9.1 with toplink JPA - Problem creating entityManagerFactory
I am using weblogic 9.1 with toplink jpa provider.
I am getting the error while creating entityManagerFactory.
Exception stack trace
faces.FacesException: #{LogonMB.authenticateLogin}: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
at javax.faces.component.UICommand.broadcast(UICommand.java:332)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
Caused by: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
... 19 more
Caused by: java.lang.ExceptionInInitializerError
at com.arisglobal.cc.service.impl.PreferencesServiceImpl.getEntityManager(PreferencesServiceImpl.java:45)
at com.arisglobal.framework.service.AbstractBusinessService.(AbstractBusinessService.java:24)
at com.arisglobal.cc.service.impl.PreferencesServiceImpl.(PreferencesServiceImpl.java:36)
at com.arisglobal.cc.factory.BusinessServiceFactory.createPreferencesService(BusinessServiceFactory.java:113)
at com.arisglobal.cc.mb.LogonManagedBean.authenticateLogin(LogonManagedBean.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
... 20 more
Caused by: Exception [TOPLINK-34002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.XMLParseException
Exception Description: An exception occurred while processing persistence.xml from URL: file:/D:/ClinicalConnect/4. CODING/web/WEB-INF/classes/META-INF/persistence.xml. A SAXParser instance could not be created.
Internal Exception: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
at oracle.toplink.essentials.exceptions.XMLParseException.getXMLParseException(XMLParseException.java:101)
at oracle.toplink.essentials.exceptions.XMLParseException.exceptionCreatingSAXParser(XMLParseException.java:73)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:315)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchveFromUnconvertableURL(PersistenceUnitProcessor.java:90)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:202)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:77)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:222)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:240)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:277)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:80)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:118)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at com.arisglobal.cc.helper.ResourceManager.(ResourceManager.java:8)hi JavaCrazyLover
u got why u getting the error i ma getting similar error its running fine in 8.1 but in web9.1 it is giving errors in some jsp pages may be due to versions or name spacing ie we write in top of the page DTD schema am not sure but i think , there is no jars to add on as such web 9.1 is upgraded one and it supports all files some where there will be conflicts between versions example JDK 1.5and 1.4 enum is a keyword in 9.1 but in normal in 8.1 if u get the solution for this error please mail me to [email protected]
rgds
Mohammed Mansoor -
Weblogic jpa and oracle xmltype column type
Hi,
i try to use jpa with a table with a column of "xmltype"
i use weblogic 10.3.2.0(eclipselink) and i got this error :
java.lang.NoClassDefFoundError: oracle/xdb/XMLType
Of course the xdb.jar and the xmlparverV2.jar are bundled in the ear with the others library,
and i also put them in the lib directory of the weblogic server.
In my persistence class the filed is declared as a "String".
I try also to use a DescriptorCustomizer with a DirectToXMLTypeMapping
to access to the value of the field as a string.
Thank you for your help.Option-1). If you want the classes to be loaded from inside your Application only then you can use ClassLoader filtering ...
That will be a best option ....Just put your Xdb.jar file inside your applications Lib directory and apply classloader filtering. Like this you need not to edit the Server Classpath....so other applications will not be forced to use the Jar which u want for a specific application.
Classloader filtering example demonstrated here: http://weblogic-wonders.com/weblogic/parsers_issues/
<font color=red>Below Option i think will work 95% in your case.</font><br>
Option-2). add the path of this Jar in *"setDomainEnv.cmd"* (This script is present in <DOMAIN_HOME>\bin directory) in the POST_CLASSPATH variable...
set POST_CLASSPATH=D:\oracle\Middleware\user_projects\domains\base_domain\config\lib\oracle.xdb_11.1.0.jar; -
Config to use JPA 2.0 in eclipse for weblogic portal 10.3.2
Hi,
can anyone help me to config eclipse for WLP 10.3.2 for using JPA 2.0
Thanks!Hi,
The following EclipseLink JPA tutorial for WebLogic 10.3.2 (EclipseLink 1.2 is shipped in the modules directory on WebLogic) is Eclipse IDE based and includes details on getting your EAR deployed and debuggable via the Eclipse 3.4/3.5 EE edition IDE. This is via the WebLogic server plugin or via the OEPE. Source is included for all EAR, EJB and WAR projects as well as the SE DDL generation project to setup your database.
The following tutorial and EclipseLink 2.0 wiki sites are the most current versions
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic
thank you
/michael
http://www.eclipselink.org -
Simple JPA prog weblogic 10.3, struggling with java.lang.NoClassDef s
Hi,
Trying to run a basic JPA program using createEntityManagerFactory, EntityManager and persistence.xml.....Everything compiling fine. I'm running it as a standalone Java application on Weblogic 10.3. First I got this error on running.
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/kernel/KernelLogManager, after that I did some search on the net and created the wlfullclient.jar and included it. After that I'm getting the below error.
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/logging/LogEntryFormatter.
Tried removing wlcommons-logging.jar whenever facing an issue, but it doesnt help, it gives some other error when it is removed.
Can some one help to rectify this error please. Not able to find the jar file that has this class
Thanks,
Vick.For folks who are struggling with this error, I'm posting the solution.
When you face this error java.lang.NoClassDefFoundError: weblogic/kernel/KernelLogManager, first remove the weblogic system libraries, then generate the wlfullclient.jar file(steps are in the net) and add it to classpath.
Ultimately after several inclusion of other jar files which wasnt included, it worked.
All the best.
Maybe you are looking for
-
My i-phone stopped receiving e-mail on a regular basis. Rather, it will sit and spin trying to load and then stop. Usually, sometime in the night, it will all of a sudden load all of my mail, but then will not load new mail again. I have updated
-
Problem when upgrading to 11.1.3.8
I was importing a large file into iTunes (2 hour audio clip called "1001"), when I received the download update dialog. I did this, but after downloading the installation process began and closed iTunes. Everything seemed to upgrade with the progra
-
Is there any way to know when an app is going to be discontinued?
I purchased an app around eight months ago for $13. I forgot about it until I was reloading apps onto my new IPad. When I went to find it, it was no longer in the app store at all. I contacted the support people who told me that since it was "so long
-
Query regarding Replicated Caches that Persist on Disk
I need to build a simple fault tolerant system that will replicate cache entries across a small set of systems. I want the cache to be persistent even if all cluster members are brought down. Is this something that requires writing a custom CacheStor
-
What does '-tef' suffix stand for? Why are we seeing it?
Two questions, one to satisfy an obsession with details, the other a UI issue in iWork/Mountain Lion. 1. What does the suffix "-tef" added to iWork files stored in iCloud (e.g., pages-tef) stand for? Is it an acronym, a word, what? 2. More critical U