Is there some caching of entity classes?

We are analyzing a bug in our application which seems to be caused by some kind of jpa entity class cache in weblogic (or some other feature causing indirectly the same thing).
The bug can't be reproduced every time, but it is happening very often after following steps:
- Deploy application from Eclipse with OEPE in mode "Virtual application"
- Use Redeploy or Clean feature of OEPE several times
We are doing some jpa queries during initialization of our application and after several redeploys assigning of resulting entities of those queries triggers class cast exception. I have captured some diagnostics that confirmed that class of jpa query result entity has different classloader than current web app classloader. How is it possible and how can we clear that kind of cache that's causing this during redeploy? I'm not writing to OEPE forum because I think it uses standard facilities of Weblogic where this should never ever be possible regardles of what tool is using it. My diagnostic logs are:
Expected class classloader: weblogic.utils.classloaders.ChangeAwareClassLoader@6ef4e946 finder: weblogic.utils.classloaders.CodeGenClassFinder@2e1a3d11 annotation: xxx
Expected class source location (notice that this path is same in both cases): file:/C:/Users/.../FeblApplicationSettingsTuple.class
Expected class protection domain: ProtectionDomain (file:/C:/Users/.../FeblApplicationSettingsTuple.class <no signer certificates>)
weblogic.utils.classloaders.ChangeAwareClassLoader@6ef4e946 finder: weblogic.utils.classloaders.CodeGenClassFinder@2e1a3d11 annotation: xxx
<no principals>
java.security.Permissions@4ce3316a (
("java.net.SocketPermission" "localhost:1024-" "listen,resolve")
("java.lang.RuntimePermission" "stopThread")
("java.util.PropertyPermission" "line.separator" "read")
("java.util.PropertyPermission" "java.vm.version" "read")
("java.util.PropertyPermission" "java.vm.specification.version" "read")
("java.util.PropertyPermission" "java.vm.specification.vendor" "read")
("java.util.PropertyPermission" "java.vendor.url" "read")
("java.util.PropertyPermission" "java.vm.name" "read")
("java.util.PropertyPermission" "os.name" "read")
("java.util.PropertyPermission" "java.vm.vendor" "read")
("java.util.PropertyPermission" "path.separator" "read")
("java.util.PropertyPermission" "java.specification.name" "read")
("java.util.PropertyPermission" "os.version" "read")
("java.util.PropertyPermission" "os.arch" "read")
("java.util.PropertyPermission" "java.class.version" "read")
("java.util.PropertyPermission" "java.version" "read")
("java.util.PropertyPermission" "file.separator" "read")
("java.util.PropertyPermission" "java.vendor" "read")
("java.util.PropertyPermission" "java.vm.specification.name" "read")
("java.util.PropertyPermission" "java.specification.version" "read")
("java.util.PropertyPermission" "java.specification.vendor" "read")
Actual class classloader: weblogic.utils.classloaders.ChangeAwareClassLoader@1b5f0c6 finder: weblogic.utils.classloaders.CodeGenClassFinder@20094d55 annotation: xxx
Actual class source location: file:/C:/Users/.../FeblApplicationSettingsTuple.class
Actual class protection domain: ProtectionDomain (file:/C:/Users/...n/FeblApplicationSettingsTuple.class <no signer certificates>)
weblogic.utils.classloaders.ChangeAwareClassLoader@1b5f0c6 finder: weblogic.utils.classloaders.CodeGenClassFinder@20094d55 annotation: xxx
<no principals>
java.security.Permissions@57c14d95 (
("java.net.SocketPermission" "localhost:1024-" "listen,resolve")
("java.lang.RuntimePermission" "stopThread")
("java.util.PropertyPermission" "line.separator" "read")
("java.util.PropertyPermission" "java.vm.version" "read")
("java.util.PropertyPermission" "java.vm.specification.version" "read")
("java.util.PropertyPermission" "java.vm.specification.vendor" "read")
("java.util.PropertyPermission" "java.vendor.url" "read")
("java.util.PropertyPermission" "java.vm.name" "read")
("java.util.PropertyPermission" "os.name" "read")
("java.util.PropertyPermission" "java.vm.vendor" "read")
("java.util.PropertyPermission" "path.separator" "read")
("java.util.PropertyPermission" "java.specification.name" "read")
("java.util.PropertyPermission" "os.version" "read")
("java.util.PropertyPermission" "os.arch" "read")
("java.util.PropertyPermission" "java.class.version" "read")
("java.util.PropertyPermission" "java.version" "read")
("java.util.PropertyPermission" "file.separator" "read")
("java.util.PropertyPermission" "java.vendor" "read")
("java.util.PropertyPermission" "java.vm.specification.name" "read")
("java.util.PropertyPermission" "java.specification.version" "read")
("java.util.PropertyPermission" "java.specification.vendor" "read")
)

Hello,
Can you post the code that runs into the exception, the exception itself, as well as how you are obtaining your EntityManager and EntityManagerFactory (if applicable)? If you are managing EntityManagerFactories in the application instead of allowing the container to manage them for you via injection, then you must also ensure that the application will close them when undeployed or some point before redeployment occurs. Otherwise, a similar error might occur dependent if garbage collection does not complete before the application next attempts to retrieve a factory.
Best Regards,
Chris

Similar Messages

  • Someone in Australia was using my email address and when I changed email names to reinstall Itunes it only gives me states from Australia.  Is there some cache on my system that should be cleared or removed?

    Someone in Australia was using my email address and when I changed email names to reinstall Itunes it only gives me states from Australia.  Is there some cache on my system that should be cleared or removed?

    Good luck.    I have been trying to report to Apple Support about a Bogus Email I received today, which said I had made a purchase. Naturally, I was to cancel this bogus purchase by giving out personal details etc to them. 
    The real question is: how did they get my email as someone who had purchased from Itunes?. I cannot believe that ti si coincidence.
    HAVE the Australian Apple IDs [where users have supplied their email addresses] been compromised?
      My report about Spam was the same as reported in 2010, when the reply was: Apple knows all about this.  What has been done about that spam from this address:
    http://www.thepeakdistrictholidaycottage.co.uk/blog/wp-admin/au/apple//index.htm l?securitycenterlogin&hc=1&hm=au%601d72f%2Bj2b2vi%3C265securitycenterlogin&hc=1& hm=au%601d72f%2Bj2b2vi%3C265securitycenterlogin&hc=1&hm=au%601d72f%2Bj2b2vi%3C26 5

  • Adf bc jar for base entity classes and extending them existing  project

    Hi,
    I am using jdev 11.1.1.0 and have created a base workspace/project and adf jar for my base entity classes.
    1. I can consume this base adf bc jar in a separate new consuming workspace and create VO based on base bc classes or create new EOs that extend base bc entity classes.
    2. Furthermore, for an existing consuming project that earlier included src/ of base entity (BC components), i can remove the dependency on bc source and bring in this new adf jar and everything including the view controller and the service/datacontrol works fine.
    The issue i am running into is as follows.
    - In the existing project (#2) above i try to create a couple of entities based on entities in my base jar; associations are automatically brought in. Note i am not overriding any attributes. My intent here is to generate .java and implement some code.
    - I then try to make my existing VOs based on the newly extended entity (VO overview->Entity Objects-> Shuttle NewEntity from Available to Selected)
    - I then try to remove the old EO from selected under VO overview->Entity Objects->Shuttle OldEntity from Selected back
    - I get a warning dialog box that says something to the effect that some viewlinks are dependent on these old EOs in this consuming project.
    - I tried to laboriously analyzed dependencies and it this dialog box does not make any sense as I have already extended EOs and the tooling should be able to let me use these
    My questions
    - Why I am not able to remove old entities from VO dependencies
    - Is it ok to leave the old EOs in "Selected" along with the newly extended EO ? What are the implications for this?
    - I also thought about extending base associations, but did not go anywhere.
    In general, I am ok with consuming an ADF BC jar that has entities etc. but not clear about removing dependencies of base EOs on VOs when entities are extended and consumed in a pre-existing project that used base entities.
    I can send a project if any PM is willing to take a look at it.
    Thanks,
    ps:
    I have already gone over the following info
    http://technology.amis.nl/blog/215/organization-of-bc4j-domain-eo-and-business-vo-package
    .. wants to create an enterprise data model in BC4J, reflecting the Enterprise Data Model set up in the RDBMS. All (or at least most) business rules will be implemented in the Middle Tier – to take the load of the database and also allow developers not comfortable with PL/SQL to define and maintain the business rules. It is clear that this means that all applications that need to access – and manipulate – the database, need to go through the BC4J foundation layer. Martijn wants to define the Entity Objects – and their business rules – only once and share that definition between different projects. Each projects can create its own ViewObjects on top of these shared Enterprise Entity Objects.
    http://radio-weblogs.com/0118231/2005/09/29.html
    I am currently working on a project for a partner where we will be using ADF BC as our model layer for a large application. In order to keep the footprint of each application module down to a reasonable size, we are intending to create a number of separate 'root' application modules for each functional area of the application. Within, these 'root' application modules we will then use nested application modules to further partition the application. All of the application modules will be accessing the same datasource and will need access to the same database objects.
    In order to separate our code between the development team and into function areas, our initial thoughts were that we would create an ADF BC model project containing Entity Objects for all of the database tables e.t.c. as these are common amongst all functional areas. We have configured all of the EOs for validation rules, defaulting values and extending doDML() as appropriate. Happy at this stage we then created a simple .jar file to deploy all of the definitions. Upon creating a new ADF BC project for each functional area we added the jar file as a library import into the new project. However when we the tried to create some new View Objects via the JDev Wizard we were unable to see the imported Entity Objects.
    Is the only way to share Entity Object definitions between different ADF BC projects to manually copy the source definition files into the new projects src directory? Since this would mean multiple copies of the same components, it could prove to be a maintenance nightmare.Is there a way of doing it without creating multiple copies of the same object definitions?
    The developer is spot on in their ideas of layering and reuse, and even has created a library for their reusable entities. This last step is not something everyone thinks to do. The missing step is known as "importing" components, so with that one extra bit of knowledge under his belt, he should be able to do exactly what he envisions. My little article called Difference Between Adding and Importing Business Components tries to explain the difference and gives the menu options to choose to perform the importing.
    Difference between adding and importing BC4J
    http://radio-weblogs.com/0118231/stories/2005/08/11/differenceBetweenAddingAndImportingBusinessComponents.html
    Working with Libraries of Reusable Business Components
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen.htm#CHEFECGD

    Hi,
    since you followed the OC4J developer guide I think this question might be better handled there as well
    OC4J
    So in case you don't get an answer here on the forum, try it on the OC4J forum
    Frank

  • Tools for generating Entity Classes

    Hi ,
    I am new to EJB 3.0 Entity Beans .
    I am finding it hard to develop a Entity Class .
    Please let me know if there are there any Tools that will generate an ENtity class depending upon the database table ??

    Hi!
    Most IDEs like Netbeans and Eclipse can generate entities based on existing database schemas, but imho it's much more usefull to write the first few entities by yourself. It's a bit more difficult, but at least this way you will learn what each annotation does, where they can be placed and what attributes you can set on them.
    Once you have a good general foundation you can skip this process by autogenerating these classes. But that's just my opinion.
    Some examples:
    Eclipse
    Netbeans
    Btw. there are no entity beans in EJB 3.0. These are plain old java classes, thus they are called simply entities to avoid confusion with the entity beans used in previous ejb versions.

  • Persistence Unit / Entity class question

    Hi guys.
    I'm trying to get a list of all entity classes in an EJB project. What would be the easiest way of doing this? I think there should be a way to obtain the persistence unit and get a list of entity classes from that, but I can't find a way to do this. The only other way that I can think of is to manually go and read the persistence.xml file, but I'd like to avoid that. Any advice will be much appreciated. Thanks!
    I've discovered the PersistenceUnitInfo interface, which looks like it might be of some use. However, I can't find a way to inject it into a bean. Any ideas? Thanks!

    Are your Entities in a jar in the web-inf/lib of your web app? Do you have a single persistence unit? I looks like either a classloader or wrong persistence unit problem.
    Can you post the full stack?
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Howto find entity-classes in my application?

    I need to get hold of all entity-classes in my application. For now, I only use annotations(@Entity) but I may change to write XML-mapping files. :)
    Does some have a clue how I should get hold of my entities?

    What do you mean by "get hold of"?
    Wouldn't it be sufficient to grep your source code for "@entity" ?

  • Is there a tx to view class corresponds to a BOL object and vice versa???

    Hello experts, is there any transaction or place where I can find the object BOL that corresponds to a CLASS and vice versa,
    For example for object ISUORDERITEM, where I can find this??
    Thanks in advance

    Hello Javier,
    Here is the link :
    SPRO --> IMG --> CRM > CRM Cross-Application Components> Generic Interaction Layer/Object Layer --> Basic Settings.
    How to find out the component set associated with the BSP UI component ??
    Go to the runtime repository of the component which you are working on, In the MODEL, the Component Set should be assigned.
    Once you get the component set, You can find the components associated with the component set.
    For each component there will be a GENIL Class associated in this IMG customizing.
    Eg : For BP , the class is CL_CRM_BUIL.
    You can find some infor at this Link: [Thread|Re: Rough Equivalent of PCUI MAC in CRM 2007 Web GUI.]
    Hope this helps,
    Regards, Vinay

  • ToString() and Comparable T on a JAXB generated entity class

    Hello,
    I'm trying to create a distributed system and therefore I have all my entity classes present in my Java EE app and hosted as a web service. The Swing frontend app autogenerate the entity classes for use in the presentation.
    I'm having some trouble using the Collections.sort() since a generated entity cannot implement an interface, does anyone have a hint to how i can solve this issue?
    Also, I need to override the toString() so that I can put an entity directly in a eg. JCombobox and it is presented with the return of my custom toString() but if I override the toString() in my original entity in my backend app, then this method is not generated in my frontend app.
    Thanks in advance!
    Nicklas

    Hello,
    I'm trying to create a distributed system and therefore I have all my entity classes present in my Java EE app and hosted as a web service. The Swing frontend app autogenerate the entity classes for use in the presentation.
    I'm having some trouble using the Collections.sort() since a generated entity cannot implement an interface, does anyone have a hint to how i can solve this issue?
    Also, I need to override the toString() so that I can put an entity directly in a eg. JCombobox and it is presented with the return of my custom toString() but if I override the toString() in my original entity in my backend app, then this method is not generated in my frontend app.
    Thanks in advance!
    Nicklas

  • JSF Pages from entity class

    I am new to NB5.5. However, when I create a 'web application' project then I get the option to create 'JSF Pages from entity class' in the persistence category but not while creating a 'visual web application' project. Is there a way of getting this option in visual web applications?
    Regards
    Rajeev

    Hi, may I know what you mean by Visual Web Application?
    Creating JSF Pages from Entity Classes is just a way to increase the speed of developing a web application (a database must already be existing, connected to netbeans for you to use this option).

  • Exception Description: Entity class [] has no primary key....

    Received the following error in jdeveloper - some info on how to fix would be greatly appreciated
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar
    C:\Oracle\MiddlewareNew\jdk160_05\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\.adf;C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\SAM_CM_AUTONUM_GEN\classes;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\toplink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\antlr.jar;C:\oracle\MiddlewareNew\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\oracle\MiddlewareNew\modules\javax.persistence_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xmlparserv2.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xml.jar;C:\oracle\MiddlewareNew\modules\javax.jsf_1.2.0.0.jar;C:\oracle\MiddlewareNew\modules\javax.ejb_3.0.1.jar;C:\oracle\MiddlewareNew\modules\javax.enterprise.deploy_1.2.jar;C:\oracle\MiddlewareNew\modules\javax.interceptor_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.jms_1.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.jsp_1.1.0.0_2-1.jar;C:\oracle\MiddlewareNew\modules\javax.jws_2.0.jar;C:\oracle\MiddlewareNew\modules\javax.activation_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.mail_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.soap_1.3.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.xml.rpc_1.2.1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.ws_2.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.management.j2ee_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.resource_1.5.1.jar;C:\oracle\MiddlewareNew\modules\javax.servlet_1.0.0.0_2-5.jar;C:\oracle\MiddlewareNew\modules\javax.transaction_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.stream_1.1.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\wlserver_10.3\server\lib\weblogic.jar -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar SAM.CMAUTONUMGENClient
    java.lang.reflect.InvocationTargetException
         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:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         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:597)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:870)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:101)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:149)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
    FATAL ERROR in native method: processing of -javaagent failed
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:830)
         ... 16 more
    Exception in thread "main" Process exited with exit code 1.

    Hi,
    you may want to try the J2EE forum here on OTN in case you don't get a sufficient answer to the problem.
    Frank

  • Class could not be loaded or is not an entity class

    Hello,
    I am using Berkeley DB JE 3.3.75 in a web application. I have a class which extends a Persistent class.
    @Entity
    public class XMessageInMemoryAdapter extends XMessage implements Serializable {
    private static final long serialVersionUID = 1L;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private int objectStatus;
    @Persistent
    public class XMessage extends YMessage implements Serializable {
    private static final long serialVersionUID = 1L;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private String serviceVariant;
    @Persistent
    public abstract class YMessage implements Serializable {
    private static final long serialVersionUID = 42L;
    @PrimaryKey
    private String messageGroupId;
    But when I try to query the PrimaryKey, an IllegalArgumentException is thrown:
    java.lang.IllegalArgumentException: Class could not be loaded or is not an entity class: com.mycompany.common.model.XMessageInMemoryAdapter
    at com.sleepycat.persist.impl.Store.checkEntityClass(Store.java:1175)
    at com.sleepycat.persist.impl.Store.getPrimaryIndex(Store.java:313)
    at com.sleepycat.persist.EntityStore.getPrimaryIndex(EntityStore.java:257)
    at com.mycompany.common.memorydb.impl.StoreRefImpl.queryPrimaryIndex(StoreRefImpl.java:49)
    at com.mycompany.common.memorydb.dao.MessageDao.init(MessageDao.java:67)
    And here is the MessageDao ve StoreRefImpl ( I deleted irrelevant parts )
    public class MessageDao {
         protected void init() {
              primaryKey = this.store.queryPrimaryIndex(String.class, XMessageInMemoryAdapter.class);
    public class StoreRefImpl {
         public PK queryPrimaryIndex(Class<?> indexClass, Class<?> objectClass) {
              try {
                   PrimaryIndex index = this.store.getPrimaryIndex(indexClass, objectClass); // this is where the exception is thrown
                   return new PKImpl(index);
              } catch (DatabaseException e) {
                   throw new DBException(e);
    Everything working nice in my local machine but when we deploy the application on test server we keep getting this exception.
    Thank you for your help.

    Hi Yusuf,
    This sounds like a classpath problem on your test server. This exception will occur if the class cannot be loaded.
    Please make sure that the je-3.3.75.jar file and your app classes or jar are in the same classpath location, and that there are not multiple copies in different locations. For example, if you're deploying a servlet, be sure to place the JE jar and your app jar in the same lib directory.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is there some comp "JTextAreaWeb"?

    Hi,
    I have to put a HTML file with news of my JDK6 Swing software, in the middle of main JFrame. This HTML has many news and it is configured to roll up to the end and to go to start of page automatically, like a banner of news.
    I find classes like URLConnection, but I didn't find a way to interpret the HTML tags and show it into a JTextArea. Neither a component or class to pass the URL and it displays the HTML file.
    Is there some way to do this?

    google and
    http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JEditorPane.html

  • [svn] 791: ASDocs update (trunk) -- added @productVersion tag and some @ see tags to class descriptions for mx.core.windowClasses. StatusBar and TitleBar.

    Revision: 791
    Author: [email protected]
    Date: 2008-03-12 13:11:30 -0700 (Wed, 12 Mar 2008)
    Log Message:
    ASDocs update (trunk) -- added @productVersion tag and some @see tags to class descriptions for mx.core.windowClasses.StatusBar and TitleBar. These fixes have already been made in the published livedocs source.
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as
    flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as

    solved by myself.
    also if there's port 8084 configured on server properties, jboss start using 8080 (maybe i've done some error while registering jboss, i dunno but i'm a newbye of eclipse). So changing port to 8080 in server properties for jboss solve the problem.

  • Updating the structure of an Entity class

    Hi,
    I'm a newbie to JPA, trying to learn it by writing my own application. I have defined an entity class with 3 fields, and I've used it to create and populate my database.
    Now I wish to add a 4th (optional) field to the original class, but I do not want to lose the data I've already saved in the database. Is there a way of doing this, or a setting somewhere, that will get toplink to do this for me, instead of me having to manually "alter" the database table?
    thanks

    There is currently no support within TopLink to track versions of your entity classes or compare the existing with the expected schema to be able to alter the database. You will need to do this manually or use a database tool that supports this. I believe Oracle's JDeveloper and SQL Developer both support incremental schema changes.
    Doug

  • Abstract Entity classes with Collections

    I trying to figure out a way to have a generics collection in a parent collection that can hold various entity types of the same super-class.
    One thing I've tried was the following:
    @Entity
    public class ParentEnt implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column
        private String parentName;
        @OneToMany(mappedBy="parentEnt")
        private Collection<ChildAbs> children;
        /* Methods removed */
    @Entity
    public abstract class ChildAbs implements java.io.Serializable {
        protected static final long serialVersionUID = 1L;
        @Id
        protected Long id;
        @ManyToOne
        protected ParentEnt parentEnt;
        /* Methods removed */
    @Entity
    public class ChildEnt extends ChildAbs implements Serializable {
        @Column
        protected String childName;
    }but this is the error I get:
    Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
    Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
    Exception Description: predeploy for PersistenceUnit [testPU] failed.
    Internal Exception: Exception [TOPLINK-7250] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: [class test.ParentEnt] uses a non-entity [class test.ChildAbs] as target entity in the relationship attribute [private java.util.Collection test.ParentEnt.children].So, it looks like there is no way to have a generics collection for an abstract entity class. Is there another way to accomplish what I want using a generics collection?
    Additionally, entity ChildEnt generates an error due to the abstract class' id property not carrying forward (see Abstract Entities: http://java.sun.com/javaee/5/docs/tutorial/doc/bnbqa.html#bnbqo)
    Exception Description: Entity class [class testprintservices.ChildEnt] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass.Any input would be appreciated.

    As far as my first question, I was trying to make my collection so it can hold various type of entity classes, but now that I think about it, it was a bad idea. For instance, being able to hold ChildEnt and ChildEnt2 in the same collection. If JPA did allow this, it might be possible to save the entities to the DB, but the reverse wouldn't be possible.
    Ok, regarding my 2nd question: I don't understand why having it as @Entity wouldn't. The links (mine and yours) clearly shows that @Id is carried forward in the example they provide. Anyway, since I can't use the superclass in the collection, this is pointless. I'll use the suggested annotation.
    Thanks.

Maybe you are looking for

  • Hp 7310 printer drivers for Windows NT?

    I have an  hp 7310 all-in-one printer but cannot find drivers for it.  Am using Windows NT operating system. Please advise.  

  • Premiere Pro CC2014.2 update repeated fail

    I have tried to update Premiere to CC2014.2 via the CC updater on my iMac (OSX 10.8.5), which gets to 100% in the progress bar and then says update failed. I have also downloaded the updater from ProDesignTools, which also failed. Please could anyone

  • Sleep to freeze (with OS X on 2nd HDD)

    After initial quality screening, I replaced useless ODD with Intel SSD(X25-M) and installed OS X on it. Everything is extremely fine except sleep function. Command sleep or close the display makes main display OFF and power LED ON but not blinking. A

  • I Haven´t got the activation mail for apple id what can I do?

    I Started a new apple account and I Waited for the activation mail, but i haven´t got it what can i do?

  • Eq settings

    Hi, After getting my first ipod touch I was slightly shocked I could not personalise my eq settings on the ipod. After reading about the equalizer settings within itunes is there anyway to transfer those settings to the ipod? Preset or the so called