Expand my Community achievements bar.

Integrated JRun Environment and compiling Java code

Avatar

Level 2
I am a newby to the Flex development and have a question on
JRun integration environment. Came across the Contact sample (
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00000138.html)
and was able to make the Contact sample application working.
However, I modified the ContactDAO class to get the Contacts static
data instead from the database. I have compiled the Java code with
the JAVA SDK I have installed from Sun and copied the class file to
the JRun classes directory. Now the application is not retrieving
any data. Even if I compile the original ContactDAO.java (without
modifying the code), the grid control is not returning any data.



So, my question is what java compiler was used to compile the
sample classes that were provided with the tools. Please help.

4 Replies

Avatar

Level 2
The following is the Debug Log and looks like I am getting an
SQLException - Don't know why???



java.sql.SQLException: General error:
java.lang.ClassCircularityError: org/hsqldb/MemoryNode

at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown
Source)

at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

at org.hsqldb.jdbcDriver.connect(Unknown Source)

at
java.sql.DriverManager.getConnection(DriverManager.java:539)

at
java.sql.DriverManager.getConnection(DriverManager.java:211)

at
samples.contact.ConnectionHelper.getConnection(ConnectionHelper.java:56)

at
samples.contact.ContactDAO.getContacts(ContactDAO.java:31)

at
samples.contact.ContactAssembler.loadContacts(ContactAssembler.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java(Compiled Code))

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java(Compiled Code))

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))

at java.lang.reflect.Method.invoke(Method.java(Compiled
Code))

at
flex.data.adapters.JavaAdapter.invokeFillOperation(JavaAdapter.java:767)

at
flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:198)

at
flex.messaging.services.MessageService.serviceMessage(MessageService.java:138)

at
flex.data.DataService.serviceMessage(DataService.java:309)

at
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548)

at
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302)

at
flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682)

at
flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665)

at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)

at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)

at java.lang.Thread.run(Thread.java:568)

[Flex] [ERROR] Exception executing assembler operation.
incomingMessage: Flex Message (flex.data.messages.DataMessage)

operation = fill

id = null

clientId = A9E43A23-2305-CD25-B267-70EF633AE923

correlationId =

destination = contact

messageId = 90C53AE4-1DA8-F010-3D7E-70EF634A8181

timestamp = 1157240939526

timeToLive = 0

body =

[



]

hdr(DSEndpoint) = my-rtmp

exception: samples.contact.DAOException:
java.sql.SQLException:

General error: java.lang.ClassCircularityError:
org/hsqldb/MemoryNode

at
samples.contact.ContactDAO.getContacts(ContactDAO.java:52)

at
samples.contact.ContactAssembler.loadContacts(ContactAssembler.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled
Code))

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled
Code))

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))

at java.lang.reflect.Method.invoke(Method.java(Compiled
Code))

at
flex.data.adapters.JavaAdapter.invokeFillOperation(JavaAdapter.java:767)

at
flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:198)

at
flex.messaging.services.MessageService.serviceMessage(MessageService.java:138)

at
flex.data.DataService.serviceMessage(DataService.java:309)

at
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548)

at
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302)

at
flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682)

at
flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665)

at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)

at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)

at java.lang.Thread.run(Thread.java:568)

Caused by: java.sql.SQLException: General error:
java.lang.ClassCircularityError: org/hsqldb/MemoryNode

at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown
Source)

at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

at org.hsqldb.jdbcDriver.connect(Unknown Source)

at
java.sql.DriverManager.getConnection(DriverManager.java:539)

at
java.sql.DriverManager.getConnection(DriverManager.java:211)

at
samples.contact.ConnectionHelper.getConnection(ConnectionHelper.java:56)

at
samples.contact.ContactDAO.getContacts(ContactDAO.java:31)

... 17 more

Avatar

Former Community Member
When you started with your example, did you see the following
comment added by mperterson:
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Pa...

There you have a link to complete code. Not sure this
addresses yoru issue, but give it a try.



-Jorge

Avatar

Former Community Member
You should be using j2sdk1.4.2_06 or above to compile your
classes. Is that the case?

Avatar

Level 2
Thank you matamel. That did the magic. Appreciate the
help