NetBeans IDE 5.5 / Enterprise Pack 5.5 Release - javaagent Toplink

Hi

I tried to run the AddressBook Sample and also other stuff I have done myself

It seems the -javaagent:C:/Sun/AppServer/lib/toplink-essentials-agent.jar

jvm switch always blows up - any help greatfully recieved

thanks james

PS - havent figured how duke dollars work yet - but the thought is there

init:

deps-jar:

Compiling 1 source file to D:\ADD\AddressBook\build\classes

compile:

run:

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.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl. java:141)

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.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializerAgent.initializ eFromAgent(JavaSECMPInitializerAgent.java:54)

at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializerAgent.premain(J avaSECMPInitializerAgent.java:47)

... 5 more

Caused by: java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at java.util.Properties.setProperty(Properties.java:128)

at oracle.toplink.essentials.internal.ejb.cmp3.xml.PersistenceContentHandler.start Element(PersistenceContentHandler.java:89)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Abstr actSAXParser.java:533)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyEleme nt(AbstractXMLDocumentParser.java:220)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartEleme nt(XMLNSDocumentScannerImpl.java:322)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragment ContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocu ment(XMLDocumentFragmentScannerImpl.java:368)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config uration.java:834)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config uration.java:764)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXP arser.java:1242)

at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.process PersistenceXML(PersistenceUnitProcessor.java:175)

at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.process Directory(PersistenceUnitProcessor.java:84)

at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.process PersistenceArchive(PersistenceUnitProcessor.java:148)

at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPers istenceUnits(PersistenceUnitProcessor.java:64)

at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenc eUnits(JavaSECMPInitializer.java:278)

at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(Jav aSECMPInitializer.java:301)

at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFrom Agent(JavaSECMPInitializer.java:318)

... 11 more

FATAL ERROR in native method: processing of -javaagent failed

Exception in thread "main"

Java Result: 1

BUILD SUCCESSFUL (total time: 0 seconds)

[4033 byte] By [James_Ferguson] at [2007-11-26 7:07:28]
# 1
Hi,How does your persistence.xml descriptor look like?thanks,-marina
marina at 2007-7-6 15:55:47 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

Marina thanks for the attention

persistence.xml as follows:

Cheers James

<?xml version="1.0" encoding="UTF-8"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence">

<persistence-unit name="persistence" transaction-type="RESOURCE_LOCAL">

<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider </provider>

<class>addressbook.Address</class>

<class>addressbook.Person</class>

<properties>

<property name="jdbc.connection.string" value="jdbc:derby://localhost:1527/sample"/>

<property name="jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>

<property name="jdbc.user" value="app"/>

<property name="jdbc.password"/>

<property name="ddl-generation" value="dropandcreate"/>

</properties>

</persistence-unit>

</persistence>

James_Ferguson at 2007-7-6 15:55:47 > top of Java-index,Application & Integration Servers,Application Servers...
# 3

Hi James,

It looks like you are using a very old (beta?) build of GlassFish or persistence.

Please use b48 of GlassFish or a stand-alone persistence bundle, and change your persistence.xml to include the required version attribute, and changed names and values for TopLink-specific properties.

What JDK version are you using?

thanks,

-marina

marina at 2007-7-6 15:55:47 > top of Java-index,Application & Integration Servers,Application Servers...
# 4

hi again marina

I am using java version 1.5.0_06 according to java -version on command prompt

Netbeans Enterprise Pack 5.5 (Build2006/2/15)

As for GlassFish (?synonymous with the following Application Server?)

Sun Java System Application Server Platform Edition 9 (Downloaded yesterday with above enterprise pack) and the Toplink-essentials-jar and -Toplink-essentials-Agent.jar files were included with that

Apart form that (I am a mechanical engineer - So not a programmer - self-taught since Java 1.4) so I am struggling with the enterprise concepts

(havent figured out ant or csv checkout tools - so I just take "promoted builds"

All of thsi stuff I downloaded yesterday from this URL

http://www.netbeans.info/downloads/download.php?type=5.5

Anyway thanks for your help so far

I may Try and download all the individual bits using only production status (5.5 is a preview whatever that means

Cheers james

James_Ferguson at 2007-7-6 15:55:47 > top of Java-index,Application & Integration Servers,Application Servers...