[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Does OSGI work?

Results

If you run it with Derbry 10.4.x then you just get the osgi prompt.

If you run it with Derby 10.3 then you just get the same error of
driver not found.

With your db... it still does the same.

Maybe you could do the same from scratch as I have and we can figure
out what is different?

-H

On Mon, Aug 18, 2008 at 9:54 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
> What are the results of running the setup project?
>
> -Tom
>
> Hugo Garcia wrote:
>>
>> Yeah... the setup project doesnt generate the promised SQL statements...
>>
>> don't konw why yet
>>
>> -H
>>
>> On Mon, Aug 18, 2008 at 7:47 AM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
>>>
>>> You just need to set up the derby DB first, the database does not
>>> exist yet. I believe it says how to do it on the wiki page, but it's
>>> so odd I just use a copy of derby I have with the DB generated
>>> already, I don't remember how I did it initially.
>>>
>>> ./tch
>>>
>>>
>>>
>>> On Mon, Aug 18, 2008 at 9:36 AM, Hugo Garcia <hgarcia@xxxxxxxxxxxx>
>>> wrote:
>>>>
>>>> On Mon, Aug 11, 2008 at 1:47 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
>>>>>
>>>>> Hi Hugo,
>>>>>
>>>>>  Lets see if we can get the examples working for you.
>>>>>
>>>>>  Your 1st step should work.  After that, there are a few things we
>>>>> should do
>>>>> differently.
>>>>>
>>>>> 2. The osgi branch in our SVN is a proof of concept branch and is
>>>>> therefore
>>>>> deprecated.  We will update our Wiki to be more accurate.  Instead, get
>>>>> the
>>>>> examples from the "examples" folder in either our trunk, or
>>>>> branches/1.0/trunk.  The example projects you want are:
>>>>>
>>>>> org.eclipse.persistence.derby
>>>>> org.eclipse.persistence.example.jpa.comics.model.annotated
>>>>> org.eclipse.persistence.example.jpa.comics.setup
>>>>> org.eclipse.persistence.example.jpa.rcp.comics
>>>>>
>>>>> 3. You are correct to install apache derby, but the
>>>>> org.apache.derby.core
>>>>> bundle is not JPA friendly (it is not well setup for a
>>>>> client-connection to
>>>>> Derby through OSGi).  The org.eclipse.persistence.derby project you
>>>>> imported
>>>>> in the step above can be used to provide Derby access.  See the readme
>>>>> file
>>>>> in that project to understand how to configure it.
>>>>>
>>>>> When you have it configured, you will have to run the
>>>>> startNetworkServer
>>>>> script in your derby installation
>>>>>
>>>>> 4. You should only have one compile error.  It is explained in the
>>>>> readme
>>>>> mentioned above and you should not have to worry about it.
>>>>>
>>>>> 5. Run the ComicsExampleDBSetup launch configuration (from the
>>>>> org.eclipse.persistence.example.jpa.comics.setup project)
>>>>>
>>>>> This is a simple OSGi application that sets up your database.
>>>>>
>>>>> 6. Run the ComicsRCP launch configuration (from the
>>>>> org.eclipse.persistence.example.jpa.rcp.comics project)  You will get a
>>>>> warning about the derby jar.  Click on the button to ignore the
>>>>> warning.
>>>>>
>>>>> You should get a simple RCP app.
>>>>>
>>>>> Let me know how this goes for you and we will ensure the wiki gets
>>>>> updated.
>>>>>
>>>>> -Tom
>>>>>
>>>>>
>>>> Running the 1.0 branch
>>>>
>>>> Step 2 should include the url to svn in tr (you mentioned it in
>>>> another email in this list) and not the old technology svn.
>>>> The wikipage http://wiki.eclipse.org/SVN_Howto has to be updated.
>>>> I know the Equinox group is migrating the source to tr...
>>>>
>>>> Could the DERBY_HOME be obviated by implementing Eclipse-RegisterBuddy
>>>> but then... I guess this would not be OSGi??? Is there and equivalent
>>>> to Eclipse-RegisterBuddy in OSGi??
>>>>
>>>> The run configuration for the RCP has to be reset with the required
>>>> plugins since I am testing on Linux.
>>>>
>>>> I got this error both in Windows and Linux:
>>>>
>>>>
>>>> [EL Config]: The alias name for the entity class [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title] is
>>>> being defaulted to: Title.
>>>> [EL Config]: The table name for entity [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title] is
>>>> being defaulted to: TITLE.
>>>> [EL Config]: The column name for element [private int
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.id]
>>>> is being defaulted to: ID.
>>>> [EL Config]: The column name for element [private java.lang.String
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.name]
>>>> is being defaulted to: NAME.
>>>> [EL Config]: The column name for element [private java.lang.String
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.format]
>>>> is being defaulted to: FORMAT.
>>>> [EL Config]: The alias name for the entity class [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue] is
>>>> being defaulted to: Issue.
>>>> [EL Config]: The table name for entity [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue] is
>>>> being defaulted to: ISSUE.
>>>> [EL Config]: The column name for element [private int
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.id]
>>>> is being defaulted to: ID.
>>>> [EL Config]: The column name for element [private java.lang.String
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.comments]
>>>> is being defaulted to: COMMENTS.
>>>> [EL Config]: The column name for element [private java.lang.String
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.condition]
>>>> is being defaulted to: CONDITION.
>>>> [EL Config]: The column name for element [private int
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.copies]
>>>> is being defaulted to: COPIES.
>>>> [EL Config]: The column name for element [private int
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.issueNum]
>>>> is being defaulted to: ISSUENUM.
>>>> [EL Config]: The column name for element [private double
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.pricePaid]
>>>> is being defaulted to: PRICEPAID.
>>>> [EL Config]: The column name for element [private java.math.BigDecimal
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.value]
>>>> is being defaulted to: VALUE.
>>>> [EL Config]: The alias name for the entity class [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher]
>>>> is being defaulted to: Publisher.
>>>> [EL Config]: The table name for entity [class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher]
>>>> is being defaulted to: PUBLISHER.
>>>> [EL Config]: The column name for element [private int
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher.id]
>>>> is being defaulted to: ID.
>>>> [EL Config]: The column name for element [private java.lang.String
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher.name]
>>>> is being defaulted to: NAME.
>>>> [EL Config]: The target entity (reference) class for the one to many
>>>> mapping element [private java.util.List
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher.titles]
>>>> is being defaulted to: class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.
>>>> [EL Config]: The target entity (reference) class for the many to one
>>>> mapping element [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.publisher]
>>>> is being defaulted to: class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher.
>>>> [EL Config]: The primary key column name for the mapping element
>>>> [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.publisher]
>>>> is being defaulted to: ID.
>>>> [EL Config]: The foreign key column name for the mapping element
>>>> [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher
>>>>
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.publisher]
>>>> is being defaulted to: PUBLISHER_ID.
>>>> [EL Config]: The target entity (reference) class for the many to one
>>>> mapping element [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.title]
>>>> is being defaulted to: class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.
>>>> [EL Config]: The primary key column name for the mapping element
>>>> [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.title]
>>>> is being defaulted to: ID.
>>>> [EL Config]: The foreign key column name for the mapping element
>>>> [private
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.title]
>>>> is being defaulted to: TITLE_ID.
>>>> [EL Config]: The target entity (reference) class for the one to many
>>>> mapping element [private java.util.List
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Title.issues]
>>>> is being defaulted to: class
>>>> org.eclipse.persistence.example.jpa.comics.model.annotated.Issue.
>>>> [EL Info]: EclipseLink, version: Eclipse Persistence Services - 1.0
>>>> (Build 1.0 - 20080707)
>>>> [EL Config]: Connection(17796836)--connecting(DatabaseLogin(
>>>>       platform=>DerbyPlatform
>>>>       user name=> "app"
>>>>       datasource URL=> "jdbc:derby://localhost:1527/comics;create=true"
>>>> ))
>>>> [EL Warning]: java.sql.SQLException: No suitable driver found for
>>>> jdbc:derby://localhost:1527/comics;create=true
>>>> [EL Config]: Connection(12793391)--Connected:
>>>> jdbc:derby://localhost:1527/comics;create=true
>>>>       User: app
>>>>       Database: Apache Derby  Version: 10.4.1.3 - (648739)
>>>>       Driver: Apache Derby Network Client JDBC Driver  Version: 10.4.1.3
>>>> - (648739)
>>>> [EL Config]: Connection(1726320)--connecting(DatabaseLogin(
>>>>       platform=>DerbyPlatform
>>>>       user name=> "app"
>>>>       datasource URL=> "jdbc:derby://localhost:1527/comics;create=true"
>>>> ))
>>>> [EL Warning]: java.sql.SQLException: No suitable driver found for
>>>> jdbc:derby://localhost:1527/comics;create=true
>>>> [EL Config]: Connection(23235469)--Connected:
>>>> jdbc:derby://localhost:1527/comics;create=true
>>>>       User: app
>>>>       Database: Apache Derby  Version: 10.4.1.3 - (648739)
>>>>       Driver: Apache Derby Network Client JDBC Driver  Version: 10.4.1.3
>>>> - (648739)
>>>> [EL Info]: bundleresource://28/-comics login successful
>>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl@6dd8e1
>>>> [EL Fine]: Connection(12793391)--SELECT ID, NAME FROM PUBLISHER ORDER
>>>> BY NAME ASC
>>>> [EL Fine]: VALUES(1)
>>>> [EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence
>>>> Services - 1.0 (Build 1.0 - 20080707)):
>>>> org.eclipse.persistence.exceptions.DatabaseException
>>>> Internal Exception: java.sql.SQLSyntaxErrorException: Table/View
>>>> 'PUBLISHER' does not exist.
>>>> Error Code: -1
>>>> Call: SELECT ID, NAME FROM PUBLISHER ORDER BY NAME ASC
>>>> Query:
>>>> ReadAllQuery(org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher)
>>>> Local Exception Stack:
>>>> Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0
>>>> (Build 1.0 - 20080707)):
>>>> org.eclipse.persistence.exceptions.DatabaseException
>>>> Internal Exception: java.sql.SQLSyntaxErrorException: Table/View
>>>> 'PUBLISHER' does not exist.
>>>> Error Code: -1
>>>> Call: SELECT ID, NAME FROM PUBLISHER ORDER BY NAME ASC
>>>> Query:
>>>> ReadAllQuery(org.eclipse.persistence.example.jpa.comics.model.annotated.Publisher)
>>>>       at
>>>> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:322)
>>>>       at
>>>> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:646)
>>>>       at
>>>> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:500)
>>>>       at
>>>> org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:522)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:204)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:190)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:261)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:594)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2505)
>>>>       at
>>>> org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2463)
>>>>       at
>>>> org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:478)
>>>>       at
>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:883)
>>>>       at
>>>> org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:666)
>>>>       at
>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:844)
>>>>       at
>>>> org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:456)
>>>>       at
>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:906)
>>>>       at
>>>> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2588)
>>>>       at
>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1178)
>>>>       at
>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1162)
>>>>       at
>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1136)
>>>>       at
>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1118)
>>>>       at
>>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:399)
>>>>       at
>>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:517)
>>>>       at
>>>> org.eclipse.persistence.example.jpa.rcp.comics.Model.getPublishers(Model.java:66)
>>>>       at
>>>> org.eclipse.persistence.example.jpa.rcp.comics.ModelAdapter.getChildren(ModelAdapter.java:23)
>>>>       at
>>>> org.eclipse.persistence.example.jpa.rcp.comics.AbstractAdapter.fetchDeferredChildren(AbstractAdapter.java:30)
>>>>       at
>>>> org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
>>>>       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> Caused by: java.sql.SQLSyntaxErrorException: Table/View 'PUBLISHER'
>>>> 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
>>>> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1340)
>>>>       at
>>>> org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:648)
>>>>       at
>>>> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:550)
>>>>       ... 26 more
>>>> Caused by: org.apache.derby.client.am.SqlException: Table/View
>>>> 'PUBLISHER' does not exist.
>>>>       at org.apache.derby.client.am.Statement.completeSqlca(Unknown
>>>> Source)
>>>>       at
>>>> org.apache.derby.client.net.NetStatementReply.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)
>>>>       ... 30 more
>>>> _______________________________________________
>>>> eclipselink-users mailing list
>>>> eclipselink-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>>>
>>> _______________________________________________
>>> eclipselink-users mailing list
>>> eclipselink-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>