RE: Réf. : Re: using OJB with Struts and Eclipse

2003-03-06 Thread Sylvain.Thevoz
Your repository.dtd file are missing.

Sylvain

-Message d'origine-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Date: mercredi, 5. mars 2003 17:35
À: OJB Users List
Objet: Réf. : Re: using OJB with Struts and Eclipse



thanks for all the answers i got ; now my system finds the repository file.

however, i'm still having difficulties : here's what i get when executing a
call to
PersistenceBrokerFactory.createPersistenceBroker() (or as well to
defaultPersistenceBroker())


[BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class
Could not read repository class descriptor data, using repository:
repository.xml: no protocol: repository.dtd
java.net.MalformedURLException: no protocol: repository.dtd
 at java.net.URL.(URL.java:579)
 at java.net.URL.(URL.java:476)
 at java.net.URL.(URL.java:425)
 at
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
 at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)
 at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)
 at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
 at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
 at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1108)
 at
org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unknown
Source)


seems that it's not able to interpret the DOCTYPE declaration properly

my repository.xml and repository.dtd are in the same directory, and i built
them from examples provided in the distribution
i'm using db-ojb-1.0.rc1, eclipse 2.1 and tomcat 4.1

what i am doing wrong ?

philippe





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Réf. : Re: using OJB with Struts and Eclipse

2003-03-05 Thread Philippe . VOLLE

thanks for all the answers i got ; now my system finds the repository file.

however, i'm still having difficulties : here's what i get when executing a
call to
PersistenceBrokerFactory.createPersistenceBroker() (or as well to
defaultPersistenceBroker())


[BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class
Could not read repository class descriptor data, using repository:
repository.xml: no protocol: repository.dtd
java.net.MalformedURLException: no protocol: repository.dtd
 at java.net.URL.(URL.java:579)
 at java.net.URL.(URL.java:476)
 at java.net.URL.(URL.java:425)
 at
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
 at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)
 at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)
 at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
 at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
 at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1108)
 at
org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unknown
Source)


seems that it's not able to interpret the DOCTYPE declaration properly

my repository.xml and repository.dtd are in the same directory, and i built
them from examples provided in the distribution
i'm using db-ojb-1.0.rc1, eclipse 2.1 and tomcat 4.1

what i am doing wrong ?

philippe





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using OJB with Struts and Eclipse

2003-03-05 Thread David . Corbin

Put your configuration files in a source folder.  Non .java files in source
folders are copied into your classed dir automatically by ecilpse.


|-+--->
| |   [EMAIL PROTECTED]|
| |   siea.fr |
| |   |
| |   03/04/2003 01:37|
| |   PM  |
| |   Please respond  |
| |   to "OJB Users   |
| |   List"   |
| |   |
|-+--->
  
>-|
  |
 |
  |To:  [EMAIL PROTECTED]  
|
  |cc: 
 |
  |Subject: using OJB with Struts and Eclipse  
 |
  |
 |
  
>-|



Hello,

I am currently building a web application based on Tomcat and Struts, using
the Eclipse IDE.

Trying to use OJB as the persistence layer, I have the following problem :

The OJB spec. requires that the config files (OBJ.properties,
repository.xml...) be retrieved from the classpath,
which means, for a Tomcat application, in the WEB-INF/classes directory.
But any files I manually put there are
automatically removed by Eclipse if I rebuild the project, since this
directory is an output folder for class compilation !!

I've tried to work around this by creating another folder in my project
(say "obj-config") and adding it to the classpath as a "lib" folder.
But my application doesn't seem to be able to find repository info there
(although it does if I run the same code as a Java application, i.e.
without Tomcat).

Can anyone help ?

Thanks,

Philippe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using OJB with Struts and Eclipse

2003-03-05 Thread Will Jaynes
Another way to do it is to configure the WEB-INF/classes as a source 
directory (eventhough it is also the target directory) That way it 
doesn't get cleared. This works for me.

Will

[EMAIL PROTECTED] wrote:
Philippe, 

Another solution is:
create a new folder and put the conf files here
configure this folder as a source folder
when you build the project, your conf files will be automatically copied in 
WEB-INF/classes
Regards
Sylvain
-Message d'origine-
De: Christopher C Worley [mailto:[EMAIL PROTECTED]
Date: mardi, 4. mars 2003 19:57
À: OJB Users List
Objet: Re: using OJB with Struts and Eclipse
Philippe,

Change your eclipse build directory from /WEB-INF/classes to /classes.

-chris worley


Hello,

I am currently building a web application based on Tomcat and Struts, using
the Eclipse IDE.
Trying to use OJB as the persistence layer, I have the following problem :

The OJB spec. requires that the config files (OBJ.properties,
repository.xml...) be retrieved from the classpath,
which means, for a Tomcat application, in the WEB-INF/classes directory.
But any files I manually put there are
automatically removed by Eclipse if I rebuild the project, since this
directory is an output folder for class compilation !!
I've tried to work around this by creating another folder in my project
(say "obj-config") and adding it to the classpath as a "lib" folder.
But my application doesn't seem to be able to find repository info there
(although it does if I run the same code as a Java application, i.e.
without Tomcat).
Can anyone help ?

Thanks,

Philippe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: using OJB with Struts and Eclipse

2003-03-05 Thread Joerg Lensing
[EMAIL PROTECTED] schrieb:

Philippe, 

Another solution is:
create a new folder and put the conf files here
configure this folder as a source folder
when you build the project, your conf files will be automatically copied in 
WEB-INF/classes
Regards
Sylvain
 

this solution is not compliant  to the structure of  webApps. (see 
manual ojb). I think the tomcat-container needs
the conf-files in the WEB-INF/classes. To solve your problem, you can 
uncheck the option "allow to clean output folders
for a full build" in /preferences/java/compiler/build path" (This works 
in Eclipse 2.1!!)

joerg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: using OJB with Struts and Eclipse

2003-03-04 Thread Sylvain.Thevoz
Philippe, 

Another solution is:
create a new folder and put the conf files here
configure this folder as a source folder
when you build the project, your conf files will be automatically copied in 
WEB-INF/classes


Regards
Sylvain


-Message d'origine-
De: Christopher C Worley [mailto:[EMAIL PROTECTED]
Date: mardi, 4. mars 2003 19:57
À: OJB Users List
Objet: Re: using OJB with Struts and Eclipse


Philippe,

Change your eclipse build directory from /WEB-INF/classes to /classes.

-chris worley

>Hello,
>
>I am currently building a web application based on Tomcat and Struts, using
>the Eclipse IDE.
>
>Trying to use OJB as the persistence layer, I have the following problem :
>
>The OJB spec. requires that the config files (OBJ.properties,
>repository.xml...) be retrieved from the classpath,
>which means, for a Tomcat application, in the WEB-INF/classes directory.
>But any files I manually put there are
>automatically removed by Eclipse if I rebuild the project, since this
>directory is an output folder for class compilation !!
>
>I've tried to work around this by creating another folder in my project
>(say "obj-config") and adding it to the classpath as a "lib" folder.
>But my application doesn't seem to be able to find repository info there
>(although it does if I run the same code as a Java application, i.e.
>without Tomcat).
>
>Can anyone help ?
>
>Thanks,
>
>Philippe
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using OJB with Struts and Eclipse

2003-03-04 Thread Colin Kilburn
Phillipe,

I keep my repository*.xml files in WEB-INF/src, and eclipse seems to 
copy them over to WEB-INF/classes for me.  I also use the Sysdeo Tomcat 
plugin, which may be what's actually helping me out.

HTH,
Colin
[EMAIL PROTECTED] wrote:

Hello,

I am currently building a web application based on Tomcat and Struts, using
the Eclipse IDE.
Trying to use OJB as the persistence layer, I have the following problem :

The OJB spec. requires that the config files (OBJ.properties,
repository.xml...) be retrieved from the classpath,
which means, for a Tomcat application, in the WEB-INF/classes directory.
But any files I manually put there are
automatically removed by Eclipse if I rebuild the project, since this
directory is an output folder for class compilation !!
I've tried to work around this by creating another folder in my project
(say "obj-config") and adding it to the classpath as a "lib" folder.
But my application doesn't seem to be able to find repository info there
(although it does if I run the same code as a Java application, i.e.
without Tomcat).
Can anyone help ?

Thanks,

Philippe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: using OJB with Struts and Eclipse

2003-03-04 Thread Thomas Mahler
Hi Philippe,

just place OJB.properties into the root of your source folder. it will 
be copied to WEB-INF/classes by eclipse automatically on a complete build.

chers,
Thomas
[EMAIL PROTECTED] wrote:
Hello,

I am currently building a web application based on Tomcat and Struts, using
the Eclipse IDE.
Trying to use OJB as the persistence layer, I have the following problem :

The OJB spec. requires that the config files (OBJ.properties,
repository.xml...) be retrieved from the classpath,
which means, for a Tomcat application, in the WEB-INF/classes directory.
But any files I manually put there are
automatically removed by Eclipse if I rebuild the project, since this
directory is an output folder for class compilation !!
I've tried to work around this by creating another folder in my project
(say "obj-config") and adding it to the classpath as a "lib" folder.
But my application doesn't seem to be able to find repository info there
(although it does if I run the same code as a Java application, i.e.
without Tomcat).
Can anyone help ?

Thanks,

Philippe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: using OJB with Struts and Eclipse

2003-03-04 Thread Christopher C Worley
Philippe,

Change your eclipse build directory from /WEB-INF/classes to /classes.

-chris worley

Hello,

I am currently building a web application based on Tomcat and Struts, using
the Eclipse IDE.
Trying to use OJB as the persistence layer, I have the following problem :

The OJB spec. requires that the config files (OBJ.properties,
repository.xml...) be retrieved from the classpath,
which means, for a Tomcat application, in the WEB-INF/classes directory.
But any files I manually put there are
automatically removed by Eclipse if I rebuild the project, since this
directory is an output folder for class compilation !!
I've tried to work around this by creating another folder in my project
(say "obj-config") and adding it to the classpath as a "lib" folder.
But my application doesn't seem to be able to find repository info there
(although it does if I run the same code as a Java application, i.e.
without Tomcat).
Can anyone help ?

Thanks,

Philippe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]