History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRA-9701
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Critical Critical
Assignee: Unassigned
Reporter: Sergey Sholokh
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JIRA

Cannot import existing data if Jira running on Jetty

Created: 17/Mar/06 12:27 PM   Updated: 26/Oct/06 12:26 AM
Component/s: Import / Export
Affects Version/s: 3.5.2
Fix Version/s: 3.7

Time Tracking:
Not Specified

File Attachments: 1. Text File atlassian-jira.log (10 kb)
2. Text File jira-jetty_upgrade_errors.txt (45 kb)
3. Text File testing_jetty.txt (30 kb)

Environment:
OS - Debian GNU/Linux Sarge and Etch mixed environment
Jetty 5.1.5rc1
JDK 5.0 update 6
Postgresql 8.1
Issue Links:
Duplicate
 

Participants: Brian Nguyen, Johan Sjöberg, Scott Farquhar [Atlassian] and Sergey Sholokh
Since last comment: 110 weeks, 4 days ago
Resolution Date: 07/Jun/06 03:49 AM
Labels:


 Description  « Hide
I successfully run Jira on Jetty 5. But unfortunately i cannot import our existing data to that installtion. I have been tried several times with some changes in configs with no success.

My entityengine.xml below

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE entity-config PUBLIC "-//OFBiz//DTD Entity Engine Config//EN" "http://www.ofbiz.org/dtds/entity-config.dtd">

<entity-config>
<resource-loader name="maincp" class="org.ofbiz.core.config.ClasspathLoader"/>

<transaction-factory class="org.ofbiz.core.entity.transaction.JotmFactory"/>

<delegator name="default" entity-model-reader="main" entity-group-reader="main">
<group-map group-name="default" datasource-name="defaultDS"/>
</delegator>

<entity-model-reader name="main">
<resource loader="maincp" location="entitydefs/entitymodel.xml"/>
</entity-model-reader>

<entity-group-reader name="main" loader="maincp" location="entitydefs/entitygroup.xml"/>

<field-type name="postgres72" loader="maincp" location="entitydefs/fieldtype-postgres72.xml"/>

<datasource name="defaultDS"
schema-name="public"
helper-class="org.ofbiz.core.entity.GenericHelperDAO"
field-type-name="postgres72"
check-on-start="true"
use-foreign-keys="false"
use-foreign-key-indices="false"
check-fks-on-start="false"
check-fk-indices-on-start="false"
add-missing-on-start="true"
check-indices-on-start="true">
<inline-jdbc
jdbc-driver="org.postgresql.Driver"
jdbc-uri="jdbc:postgresql://127.0.0.1:5432/jira"
jdbc-username="jira"
jdbc-password="jirapsw"/>
</datasource>

</entity-config>

In all cases the same error happened.
Log in attachment.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brian Nguyen - 21/Mar/06 09:48 PM
Hi Sergey,

It looks like the error is more to di with a problem reading the XML file, rather than how the Jira is configured. So could you attach a copy of the XML file? This way we can see exactly what the problem is.

It may also be useful to make sure that the file has valid XML, so can you try running the Linux xml validation tool (xmllint)?

For example, the command below should check if the xml file is valid.

xmllint <file name>

Thanks,
Brian


Johan Sjöberg - 09/May/06 04:47 AM
Hi!

I had the same problem. JIRA is working perfectly under Jetty, but importing data fails. I tried some different combinations of Java versions and Jetty versions, but with the same result; importing the backup fails at some point. To get around the problem I configured a JIRA standalone to use the same database and did the inport from there. Starting JIRA in Jetty afterwards worked perfectly. Currently I run JIRA as well as Confluence under:

  • Debian GNU/Linux Sarge
  • Jetty 5.1.10
    • Started with Java Service Wrapper 3.2.0
    • PostgreSQL 8.1 JDBC driver added under JETTY_HOME/ext
    • log4j added under JETTY_HOME/ext
    • All XML-related JARs moved from JETTY_HOME/ext to JETTY_HOME/lib
  • JDK 5.0 update 5
  • PostgreSQL 7.4.7

Brian Nguyen - 09/May/06 11:31 PM
Hi Johan,

Thanks for the information.

If its only importing that is failing there may be a problem with transactions, but its difficult to tell without the logs. So to help us find the cause of the problem, could you attach a copy of your logs as well as your jetty config files?

Thanks,
Brian


Johan Sjöberg - 01/Jun/06 06:13 AM
Isn't this issue related to http://jira.atlassian.com/browse/JRA-9492, as inline-jdbc is used here?

Brian Nguyen - 02/Jun/06 01:50 AM
Hi Johan,

This could well be the issue, but as I said earlier I cannot be certain unless I can see the error you recieved when importing. So a copy of the logs would be extremely useful in finding out the cause of the problem.

Thanks,
Brian


Johan Sjöberg - 02/Jun/06 04:17 AM
Well, I don't have them anymore. Anyhow, this should be easy to reproduce. Just start a JIRA instance, using a PostgreSQL database. in a local Jetty and try to import an old backup.

I just did that in my local machine and got the errors logged in the attached file. Results differ when Jetty is run under a 1.4.2 version JVM and 1.5. I remember seeing that complaint about the license, but it is possible that I had other issues too.

Again, I don't have the original logs anymore as I played with several systems simultaneously to figure out the best way of running both Confluence and JIRA in the same Jetty instance. Most of the problems were related to Commons-logging and Log4J and as usual, the XML-parsers and tools. The problem with the import was a smaller thing really, especially as you somewhere in the install/upgrade manual recommend upgrading by using the stand-alone version, test the backup there, then point it to the external database and test the backup again... and first after that point the other app-server installation at the new database.

All in all, both JIRA and Confluence work rather well in the same Jetty instance.


Johan Sjöberg - 02/Jun/06 04:38 AM
Affects Version/s could be changed to 3.5.2 (Enterprise) and 3.6 (Enterprise), as the latter is the one I just testsed with. Apart from that my local setup was:
  • Debian GNU/Linux 3.1 (Sarge)
  • Postgres 7.4.7
  • JVM 1.4.2_10 and 1.5.0_06
  • Jetty 5.1.10
    • Started with Java Service Wrapper 3.2.0
    • PostgreSQL 8.1 JDBC driver added under JETTY_HOME/ext
    • log4j added under JETTY_HOME/ext
    • All XML-related JARs moved from JETTY_HOME/ext to JETTY_HOME/lib
      • xercesImpl.jar, xml-apis.jar and xmlParserAPIs.jar

Scott Farquhar [Atlassian] - 03/Jun/06 12:16 AM
I'll see if we can reproduce this locally.

Brian Nguyen - 07/Jun/06 03:42 AM
I have replicated the problem on Jetty 5.1.5 using MySQL and Postgres. The errors are slightly different though. I have attached the errors I saw.

The problem does look to be due to the inline-jdbc issue we have seen earlier.

Thanks,
Brian


Brian Nguyen - 07/Jun/06 03:49 AM
Apologies for the delay in resolving this, but the issue raised at JRA-9492 is the reason why Jira is not able to import properly. Please watch the issue for further updates on resolving the Bug.

Thanks,
Brian


Johan Sjöberg - 07/Jun/06 04:53 AM
Hiya!

Yeah, the error is rather different. Anyhow, thanks for testing. Let's see if the problem I have goes away in a future version of JIRA. At least for me/us it's not such a big problem as the import can be done through JIRA-standalone. Perhaps another solution would be to use a datasource from JETTY. I didn't try that as it would have taken more time than just configuring the standalone version for our PosrgreSQL database.

Cheers,

//
Johan