goverdata / usemon

Automatically exported from code.google.com/p/usemon
1 stars 0 forks source link

Premain Class Error when Using in Java 1.5 as using javaagent switch. #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I downloaded your application and I am trying to install it for WAS 6.1 
running on Java 1.5 JVM. 

When I used the command as given below I got the following error; 

JVMJ9VM015W Initialization error for library j9jvmti23(-3): JVMJ9VM009E 
J9VMDllMain failed Could not create the Java virtual machine. Failed to 
load Premain-Class manifest attribute from /UseMon????/distribution/usemon-
agent-java-1.0-SNAPSHOT-jar-with-dependencies.jar 

Could you please answer the following questions: 

2) Could you please tell me how to install UseMon on Web Sphere 6.1 using 
Java 1.5

2) If java -javaagent expects a premain class attribute as part of 
manifest file. I dont see that jar or java class as part of your 
distribution jars. Should we have to download different jar or something? 
(I see that the Jdk5Agent.java contains the premain method but that is not 
bundled with the usemon-agent.jar and the META-INF doesn't contain a entry 
for premain class)

Any help on this would be greatly appreciated. 
Thanks

Original issue reported on code.google.com by srkp...@gmail.com on 8 Oct 2008 at 1:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I was able to get this working in Websphere 6.1 by re-packaging your source 
code 
with a new META-INF/MANIFEST.MF with Premain-Class entry. I used your 
JDK5Agent.java 
to do this.

I was able to start the javaagent and the collector and see some objects are 
published in some applications that started fine. But, some problems remain (in 
some 
other applications EAR)

1) a ValueObject used by our application failed with ClassCastException (this 
was an 
external call to a EJB service) so I am guess the instrumented value object 
class 
(by javaagent) and the value object class received (returned as a result of 
this 
call) could have clashed.

So I re-packaged the usemon-agent.jar with usemon-default.properties to ignore 
the 
package that contains the Value Objects. That stopped that error.

2) I got another error when I used -javaagent switch on 
javax.transaction.RollbackException, that prevents the application (EAR) from 
starting.  Your usemon-default properties does have a exclusion for it 'javax' 
packages in the ignore class section, so I am guessing a derivative class which 
is 
causing issue.

FYI, We are running our applications on IBM WAS 6.1, IBM packaged JDK 1.5, J2EE 
(ejb 
2.x) Spring, Hibernate combination.

Any help to resolve these will be greatly appreciated.

Thanks.

Original comment by srkp...@gmail.com on 9 Oct 2008 at 5:56