<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A blog of a java programmer</title>
	<atom:link href="http://javacollassato.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javacollassato.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sat, 19 Feb 2011 17:15:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='javacollassato.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A blog of a java programmer</title>
		<link>http://javacollassato.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://javacollassato.wordpress.com/osd.xml" title="A blog of a java programmer" />
	<atom:link rel='hub' href='http://javacollassato.wordpress.com/?pushpress=hub'/>
		<item>
		<title>how to run multiple enterprise application and JPA in Netbeans 6.1</title>
		<link>http://javacollassato.wordpress.com/2008/06/18/how-to-run-multiple-enterprise-application-and-jpa-in-netbeans-61/</link>
		<comments>http://javacollassato.wordpress.com/2008/06/18/how-to-run-multiple-enterprise-application-and-jpa-in-netbeans-61/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 16:59:29 +0000</pubDate>
		<dc:creator>Mik</dc:creator>
				<category><![CDATA[j2EE]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[connection pool]]></category>
		<category><![CDATA[EJB 3.0]]></category>
		<category><![CDATA[enterprise application]]></category>
		<category><![CDATA[glassfish v2]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[netbeans 6]]></category>

		<guid isPermaLink="false">http://javacollassato.wordpress.com/?p=42</guid>
		<description><![CDATA[In my previous post I wrote about problem that happens when two different enterprise application (or better ejb modules) use different JPAs. problem scope I discovered that this problem happens when two or more JPA access to the same DBMS (I found this problem in postgres, mysql and derby) problem description The problem is related [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javacollassato.wordpress.com&amp;blog=3978251&amp;post=42&amp;subd=javacollassato&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://javacollassato.wordpress.com/2008/06/15/multiple-enterprise-application-and-jpa-does-not-work-in-netbeans-61/">previous post</a> I wrote about problem that happens when two different enterprise application (or better ejb modules) use different JPAs.</p>
<p><em><strong>problem scope</strong></em></p>
<p>I discovered that this problem happens when two or more JPA access to the same DBMS (I found this problem in postgres, mysql and derby)</p>
<p><em><strong>problem description</strong></em></p>
<p>The problem is related to the connection pool used by the persistence unit:</p>
<p>in both  ServerResources/sun-resources.xml  files has been wrote  the same connection pool:</p>
<p>&lt;jdbc-resource enabled=&#8221;true&#8221; jndi-name=&#8221;EA1_dataSource&#8221; object-type=&#8221;user&#8221; pool-name=&#8221;derby_netPool&#8221;/&gt;</p>
<p>&lt;jdbc-resource enabled=&#8221;true&#8221; jndi-name=&#8221;dataSource_EA2&#8243; object-type=&#8221;user&#8221; pool-name=&#8221;derby_netPool&#8221;/&gt;</p>
<p>each time an enterprise application is ran he overwrites the bound database, in this way the EA launched before fails, because she tries to access to a database with another structure than the one expected.</p>
<p><em><strong>how to solve it</strong></em></p>
<p>the screenshot below shown the connection pool shared by the two EA</p>
<p>It&#8217;s easy understand that is related only to VIR database</p>
<p><a href="http://javacollassato.files.wordpress.com/2008/06/0-derbydatapool-existing.jpg"><img class="alignnone size-full wp-image-43" src="http://javacollassato.files.wordpress.com/2008/06/0-derbydatapool-existing.jpg?w=450&#038;h=194" alt="" width="450" height="194" /></a></p>
<p>1) I created a new JDBC connection pool (derby_netPool2) using the same general settings provided by the original one</p>
<p><a href="http://javacollassato.files.wordpress.com/2008/06/1-derbydatapool.jpg"><img class="alignnone size-full wp-image-44" src="http://javacollassato.files.wordpress.com/2008/06/1-derbydatapool.jpg?w=450&#038;h=212" alt="" width="450" height="212" /></a></p>
<p>2) In the second step I inserted the data provided into ServerResources/sun-resources.xml file of the EA related to TRAVEL database</p>
<p><a href="http://javacollassato.files.wordpress.com/2008/06/2-derbydatapool.jpg"><img class="alignnone size-full wp-image-45" src="http://javacollassato.files.wordpress.com/2008/06/2-derbydatapool.jpg?w=450&#038;h=213" alt="" width="450" height="213" /></a></p>
<p>3) I manually substitute derby_netPool2 to derby_netPool in the ServerResources/sun-resources.xml file of the EA related to TRAVEL database</p>
<p>4) clear and build &#8211; run EA1 &#8211; run EA2</p>
<p>all EAs work properly!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javacollassato.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javacollassato.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javacollassato.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javacollassato.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javacollassato.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javacollassato.wordpress.com&amp;blog=3978251&amp;post=42&amp;subd=javacollassato&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javacollassato.wordpress.com/2008/06/18/how-to-run-multiple-enterprise-application-and-jpa-in-netbeans-61/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c4b7288281331a7c272edc55ed9300f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mik</media:title>
		</media:content>

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/0-derbydatapool-existing.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/1-derbydatapool.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/2-derbydatapool.jpg" medium="image" />
	</item>
		<item>
		<title>multiple enterprise application and JPA does not work in Netbeans 6.1</title>
		<link>http://javacollassato.wordpress.com/2008/06/15/multiple-enterprise-application-and-jpa-does-not-work-in-netbeans-61/</link>
		<comments>http://javacollassato.wordpress.com/2008/06/15/multiple-enterprise-application-and-jpa-does-not-work-in-netbeans-61/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 14:54:28 +0000</pubDate>
		<dc:creator>Mik</dc:creator>
				<category><![CDATA[j2EE]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[EJB 3.0]]></category>
		<category><![CDATA[enterprise application]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[netbeans 6]]></category>

		<guid isPermaLink="false">http://javacollassato.wordpress.com/?p=5</guid>
		<description><![CDATA[The last version of Netbeans IDE(6.0-6.1) has significant new features in the managing of JPA and in the entity classes generation. Unfortunately I'm very stressed by the error that I'm going to describe in this post. I created 2 different enterprise application with Netbeans 6.1. Each of them has: - an EJB container with a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javacollassato.wordpress.com&amp;blog=3978251&amp;post=5&amp;subd=javacollassato&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>The last version of Netbeans IDE(6.0-6.1) has significant new features in
the managing of JPA and in the entity classes generation.

Unfortunately I'm very stressed by the error that I'm going to describe in
this post.

I created 2 different enterprise application with Netbeans 6.1.
Each of them has:
- an EJB container with a persistence unit, a db schema, entity classes
generated from database and a session facade bean for one Entity
- a web application with a servlet that access to the session bean and
call a findAll() method
important: each enterprise access to different databases, with different
tables. Application server is Glassfish v2 in bundle with Netbeans

If I start netbeans and I launch one of them all works fine.
The problem begin when I "run" the second one: the latter works fine(as
the first before), but now the first doesn't work.

the error is due to the fact that all the two application launches the
query on the same database(the database of the second  enterprise
application launched)!
Obviously the second app works. The first app throws an Exception due to
the fact that the related table isn't available in the database.

In my example:
EA1: search the table PERSON in database TRAVEL
EA2: search the table EMPLOYEE in database VIR
(app 2 is the last app launched)
EMPLOYEE is retrieved without any error
PERSON launch the following exception

Let me explain all the process:
<strong><strong>
build the first enterprise application</strong></strong>
The first step is to create the first Enterprise application called EA1</pre>
<p><a href="http://javacollassato.files.wordpress.com/2008/06/1-creation-1st-ea1.jpg"><img class="alignnone size-medium wp-image-12" src="http://javacollassato.files.wordpress.com/2008/06/1-creation-1st-ea1.jpg?w=417&#038;h=258" alt="" width="417" height="258" /></a></p>
<pre>and the related:
- EJB container
- WAR container
 <a href="http://javacollassato.files.wordpress.com/2008/06/2-creation-1st-ea.jpg"><img class="alignnone size-medium wp-image-8" src="http://javacollassato.files.wordpress.com/2008/06/2-creation-1st-ea.jpg?w=411&#038;h=253" alt="" width="411" height="253" /></a>
Then I start with the creation of the persistance layer:
before the database schema is created
 <a href="http://javacollassato.files.wordpress.com/2008/06/3-database-schema1.jpg"><img class="alignnone size-medium wp-image-17" src="http://javacollassato.files.wordpress.com/2008/06/3-database-schema1.jpg?w=419&#038;h=287" alt="" width="419" height="287" /></a>
linked to the TRAVEL database provided as example by default in netbeans6.1
<a href="http://javacollassato.files.wordpress.com/2008/06/4-database-schema1.jpg"><img class="alignnone size-medium wp-image-18" src="http://javacollassato.files.wordpress.com/2008/06/4-database-schema1.jpg?w=426&#038;h=293" alt="" width="426" height="293" /></a>
The persistence unit is created subsequently (EA1PU)
<a href="http://javacollassato.files.wordpress.com/2008/06/6-persistence-unit-1.jpg"><img class="alignnone size-medium wp-image-20" src="http://javacollassato.files.wordpress.com/2008/06/6-persistence-unit-1.jpg?w=423&#038;h=242" alt="" width="423" height="242" /></a>
with a new JNDI bound to the same database selected into database
schema (EA1_dataSource)
<a href="http://javacollassato.files.wordpress.com/2008/06/5-jndi1.jpg"><img class="alignnone size-medium wp-image-19" src="http://javacollassato.files.wordpress.com/2008/06/5-jndi1.jpg?w=300&#038;h=114" alt="" width="300" height="114" /></a>
Entity classe of "person" table contained in the bound database
will be generated in package ea1pck
<a href="http://javacollassato.files.wordpress.com/2008/06/7-entity-classes.jpg"><img class="alignnone size-full wp-image-21" src="http://javacollassato.files.wordpress.com/2008/06/7-entity-classes.jpg?w=450&#038;h=304" alt="" width="450" height="304" /></a>
In order to make them available from the WAR application a facade
session bean will be generated from the "person" entity class
<a href="http://javacollassato.files.wordpress.com/2008/06/81-session-bean.jpg"><img class="alignnone size-full wp-image-23" src="http://javacollassato.files.wordpress.com/2008/06/81-session-bean.jpg?w=450&#038;h=249" alt="" width="450" height="249" /></a>
The folloving picture shows the finished EJB container
<a href="http://javacollassato.files.wordpress.com/2008/06/82-ejb-container-final.jpg"><img class="alignnone size-full wp-image-24" src="http://javacollassato.files.wordpress.com/2008/06/82-ejb-container-final.jpg?w=294&#038;h=288" alt="" width="294" height="288" /></a>

now we can complete the WAR application, building a servlet able
to call te method findAll() exposed by the facade bean previously created
the servlet has been called "NewServlet" and below there is the code
calling findAll() and writing on screen the size of the ruturned vector
<a href="http://javacollassato.files.wordpress.com/2008/06/10-servlet-code.jpg"><img class="alignnone size-full wp-image-26" src="http://javacollassato.files.wordpress.com/2008/06/10-servlet-code.jpg?w=449&#038;h=339" alt="" width="449" height="339" /></a>
the application runned returns the right value of rows in the table PERSON
<a href="http://javacollassato.files.wordpress.com/2008/06/11-result.jpg"><img class="alignnone size-full wp-image-27" src="http://javacollassato.files.wordpress.com/2008/06/11-result.jpg?w=450&#038;h=218" alt="" width="450" height="218" /></a>
it's seems correct, but now I'm going to create the second
enterprise application..

<strong>build the second enterprise application
</strong>
the second application called EA2 is built in the same way of the first one,
but database schema, persistence unit, table have different names and
targets of the first ones

Here is the creation of the new database schema (DBSchemaEA2)
<a href="http://javacollassato.files.wordpress.com/2008/06/12-2nd-dbschema.jpg"><img class="alignnone size-full wp-image-28" src="http://javacollassato.files.wordpress.com/2008/06/12-2nd-dbschema.jpg?w=450&#038;h=309" alt="" width="450" height="309" /></a>
the target is the database VIR provided in bundle with Netbeans 6.1
<a href="http://javacollassato.files.wordpress.com/2008/06/13-2nd-dbschema2.jpg"><img class="alignnone size-full wp-image-29" src="http://javacollassato.files.wordpress.com/2008/06/13-2nd-dbschema2.jpg?w=450&#038;h=309" alt="" width="450" height="309" /></a>
Here is the creation of the PU called ejbPUEA2
<a href="http://javacollassato.files.wordpress.com/2008/06/15-pu2.jpg"><img class="alignnone size-full wp-image-31" src="http://javacollassato.files.wordpress.com/2008/06/15-pu2.jpg?w=450&#038;h=258" alt="" width="450" height="258" /></a>
and the new JNDI, tareted on the same database of the database schema
<a href="http://javacollassato.files.wordpress.com/2008/06/14-jndi2.jpg"><img class="alignnone size-full wp-image-30" src="http://javacollassato.files.wordpress.com/2008/06/14-jndi2.jpg?w=450&#038;h=170" alt="" width="450" height="170" /></a>

Executed but not shown, are the creation of the entity class of the
"EMPLOYEE" table and
the creation of the related session facade bean

This is the final of EJB container
<a href="http://javacollassato.files.wordpress.com/2008/06/16-finished-ejb-container.jpg"><img class="alignnone size-full wp-image-32" src="http://javacollassato.files.wordpress.com/2008/06/16-finished-ejb-container.jpg?w=299&#038;h=307" alt="" width="299" height="307" /></a>

In the WAR application is created a servlet executing a request to
the employee facade bean calling findAll() method
<a href="http://javacollassato.files.wordpress.com/2008/06/98-servet-code.jpg"><img class="alignnone size-full wp-image-35" src="http://javacollassato.files.wordpress.com/2008/06/98-servet-code.jpg?w=450&#038;h=347" alt="" width="450" height="347" /></a>

when the servlet is executed the screen output will be the number of
EMPLOYEE available in employee table in VIR database
<a href="http://javacollassato.files.wordpress.com/2008/06/99-srvlet-output.jpg"><img class="alignnone size-full wp-image-36" src="http://javacollassato.files.wordpress.com/2008/06/99-srvlet-output.jpg?w=450&#038;h=102" alt="" width="450" height="102" /></a>
(that's different from the 6 person returned in enterprise
application 1)

all seems running correctly but now if I call again the servlet in
enterprise application 1 it doesn't return anything
<a href="http://javacollassato.files.wordpress.com/2008/06/19-wrong-result-1.jpg"><img class="alignnone size-full wp-image-13" src="http://javacollassato.files.wordpress.com/2008/06/19-wrong-result-1.jpg?w=450&#038;h=155" alt="" width="450" height="155" /></a>

looking at the glassfish log , is displayed the following error:

Internal Exception: java.sql.SQLSyntaxErrorException: Table 'PERSON'
does not exist.
Error Code: -1
Call: SELECT PERSONID, JOBTITLE, FREQUENTFLYER, NAME, LASTUPDATED
FROM PERSON
Query: ReportQuery(ea1pck.Person)
        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:566)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
        at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:285)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:615)
        at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2416)
        at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2382)
        at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:802)
        at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
        at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
        at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
        at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
        at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
        at ea1pck.PersonFacade.findAll(PersonFacade.java:39)
        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 com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
        ... 38 more
Caused by: java.sql.SQLSyntaxErrorException: Table 'PERSON' does not exist.
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
        at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
        at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:475)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1162)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:612)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:485)
        ... 65 more
Caused by: org.apache.derby.client.am.SqlException: Table 'PERSON' does not exist.
        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
        at org.apache.derby.client.net.NetS
tatementReply.parsePrepareError(Unknown Source)
        at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
        at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
        at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
        at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
        at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
        at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
        ... 70 more

the application 1 is now looking for the PERSON table in the database
of the enterprise application 2, obviously he cannot found it and launches
an error. If I launch again EA1 with the run method in netbeans the servlet
of EA1-WAR will run right, but the servlet of EA2-WAR will show an error
such: "Table 'EMPLOYEE' does not exist." because se will looking for the
table in the database of EA1.

can somone help me?
(see my <a href="http://javacollassato.wordpress.com/2008/06/18/how-to-run-multiple-enterprise-application-and-jpa-in-netbeans-61/">next post</a> to see my rough solution.</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javacollassato.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javacollassato.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javacollassato.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javacollassato.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javacollassato.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javacollassato.wordpress.com&amp;blog=3978251&amp;post=5&amp;subd=javacollassato&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javacollassato.wordpress.com/2008/06/15/multiple-enterprise-application-and-jpa-does-not-work-in-netbeans-61/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c4b7288281331a7c272edc55ed9300f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mik</media:title>
		</media:content>

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/1-creation-1st-ea1.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/2-creation-1st-ea.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/3-database-schema1.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/4-database-schema1.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/6-persistence-unit-1.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/5-jndi1.jpg?w=300" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/7-entity-classes.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/81-session-bean.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/82-ejb-container-final.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/10-servlet-code.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/11-result.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/12-2nd-dbschema.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/13-2nd-dbschema2.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/15-pu2.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/14-jndi2.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/16-finished-ejb-container.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/98-servet-code.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/99-srvlet-output.jpg" medium="image" />

		<media:content url="http://javacollassato.files.wordpress.com/2008/06/19-wrong-result-1.jpg" medium="image" />
	</item>
	</channel>
</rss>
