users@glassfish.java.net

RE: AppClient/JWS/Derby/Security problems

From: Martin, Ray <armart3_at_tycho.ncsc.mil>
Date: Fri, 8 Sep 2006 11:30:30 -0400

Greetings, Sir,

1) Yes, I have one class in my application, DataAccessImpl, that the
application must use to 'speak' to the database. It is in DataAccessImpl
where the EntityManagerFactory emf is declared - and the annotation should
instantiate. But, since the annotation will not instantiate emf, i do the
line:
emf = Persistence.createEntityManagerFactory();

2) /usr/local/glassfish/glassfish/bin/appclient -client
/usr/local/provision/DrawingAddon/dist/DrawingAddon.jar

I removed the -mainclass as you stated. The main class is set in
manifest.mf

I get exactly the same error as before:
at
oracle.toplink.essentials.exceptions.Validationexception.currentLoaderNotVal
id(ValidationException.java:1865)

this was a quick test so that i could respond since i lost yesterday. i
will test further using your suggestions.

Thank you very much.



-----Original Message-----
From: Sanjeeb.Sahoo_at_Sun.COM [mailto:Sanjeeb.Sahoo_at_Sun.COM]
Sent: Thursday, September 07, 2006 4:20 AM
To: armart3_at_tycho.ncsc.mil
Cc: Tim Quinn; Marina Vatkina; users_at_glassfish.dev.java.net
Subject: AppClient/JWS/Derby/Security problems


Hi Martin,

I have a couple of questions regarding the issue you are facing while
running your application using appclient container.

1. You mentioned that you emf is *null* even when you annotated it with
@PersistenceUnit. Where is this emf defined? It has to be defined in the
main class only.

2. Can you send us the revised appclient command that you run now?

To start with, don't use -mainclass option to appclient. Specify
Main-Class in manifest.mf of the client jar.

Thanks,
Sahoo