Solved

upgrading

Posted on 2011-03-23
20
671 Views
Last Modified: 2012-06-21
I am attempting to upgrade from jasper 3.7 to jasper 4.0
I have everything working accept the appservertype recognition

It appears that we have tomcat 5.5.20 installed however when i do the upgrade script it kicks it back as unrecognizable.

suggestions - what additional info do i need to supply to better help
0
Comment
Question by:tagomtech
  • 13
  • 7
20 Comments
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
I'm not claiming to be able to help with this one, but it will help everyone if you say

a. how you're doing this
b. what the *verbatim* error messages are
0
 

Author Comment

by:tagomtech
Comment Utility
lol! okay here goes
JasperServer has an autoupgrade script. To use this you work with the command line.
The steps are:
1. backup jasperserver and db - done
2. delete your webapp/jasperserver directory - done
3. run upgrade script - here is the hitch
I have altered the master.properties file so that the upgrade should be smooth. There are several criteria listed in the xml:
appServerType=tomcat6 (or tomcat5, jboss, glassfish)
appServerDir=c:\\apache-tomcat-6.0.26 (for example)
dbUsername=root
dbPassword=password
dbHost=localhost
(# application server type (default is tomcat6)
# appServerType = tomcat6
# appServerType = tomcat 5.5.20
# appServerType = jboss
# appServerType = glassfish2
# (beta) appServerType = weblogic
# (beta) appServerType = websphere
 appServerType = skipAppServerCheck)

 The only way I can get the script to run is to use the skipAppServerCheck - which then will not deploy the web app - so I am left with an updated database but no webserver app....
I have tried using tomcat 5, tomcat 5,5 tomcat 5.5.20 (which seems to be the actual version) but all give me the following error:
Check that appServerType is properly set in your default_master.properties file


0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
Comment Utility
>>run upgrade script - here is the hitch

Can you please attach this?
0
 

Author Comment

by:tagomtech
Comment Utility
the script or the default properties file
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Well you might as well attach both files
0
 

Author Comment

by:tagomtech
Comment Utility
I am going to attach several files that seem to be related to upgrading this software -
The issue is I can't seem to get the war file to extract creating the directory for the webapp
 build.xml
setup.xml
0
 

Author Comment

by:tagomtech
Comment Utility
these are the files that actually I change and execute

default-master.txt
0
 

Author Comment

by:tagomtech
Comment Utility
I keep forgetting that hitting enter actually posts the message instead of uploading - sorry
The batch file - which it the autoupgrade file can not be uploaded - not sure how to change extensions on it.
0
 

Author Comment

by:tagomtech
Comment Utility
This is what is coded inside of batch file
@ECHO OFF

rem ///
rem /// JasperReports Server CE script that performs upgrade by updating existing database.
rem ///
rem /// Usage: js-upgrade-samedb-ce.bat {option:(<EMPTY>|with-samples|regen-config|test)}
rem ///

CALL "bin/do-js-upgrade.bat" ce inDatabase %*

This is the code inside of the bin/do-js-upgrade.bat

@ECHO OFF

rem ///
rem /// JasperReports Server common upgrade script.
rem ///
rem /// Usage: do-js-upgrade.bat {edition:(ce|pro)} {strategy:(standard|inDatabase)} {option:(<EMPTY>|with-samples|regen-config|test)} {option(for standard upgrade only):import file(<path-to-file-and-filename>)}
rem ///        If <path-to-file-and-filename> contains spaces then need to enclose <path-to-file-and-filename> to double quotes.
rem ///

rem -----------------------------------------------------------------------------

rem
rem Determining argument count.
rem
SET ARGUMENT_COUNT=0
FOR %%X IN (%*) DO SET /A ARGUMENT_COUNT+=1

rem
rem Validating and setting edition.
rem
SET JS_EDITION=%1
IF NOT "%JS_EDITION%"=="ce" IF NOT "%JS_EDITION%"=="pro" (
  CALL :fail "JasperReports Server edition expected as input"
  EXIT /b 1
)

rem
rem Validating and setting upgrade strategy.
rem
SET JS_UPGRADE_STRATEGY=%2
IF NOT "%JS_UPGRADE_STRATEGY%"=="standard" IF NOT "%JS_UPGRADE_STRATEGY%"=="inDatabase" (
  CALL :fail "JasperReports Server upgrade strategy expected as input"
  EXIT /b 1
)

rem
rem Validating argument count.
rem
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  IF %ARGUMENT_COUNT% GTR 5 (
    CALL :fail "Too many arguments"
    EXIT /b 1
  )
  IF %ARGUMENT_COUNT% LSS 3 (
    CALL :fail "Invalid argument count"
    EXIT /b 1
  )
)
IF "%JS_UPGRADE_STRATEGY%"=="inDatabase" IF %ARGUMENT_COUNT% GTR 3 (
  CALL :fail "Too many arguments"
  EXIT /b 1
)

SET JS_OPTION=%~3
SET IMPORT_FILE=%~4
SET IS_INCLUDE_ACCESS_EVENTS=FALSE
IF ""%JS_UPGRADE_STRATEGY%""==""standard"" (
  IF ""%3""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~4
    SET IMPORT_FILE=%~5
  )
  IF ""%4""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~3
    SET IMPORT_FILE=%~5
  )
  IF ""%5""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~3
    SET IMPORT_FILE=%~4
  )
)

SET IS_INVALID_JS_OPTION_VALUE=FALSE
IF NOT ""%JS_OPTION%""==""with-samples"" IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" (
  SET IS_INVALID_JS_OPTION_VALUE=TRUE
)

SET IS_INVALID_PARAM_VALUE=FALSE
IF NOT ""%IMPORT_FILE%""==""with-samples"" IF NOT ""%IMPORT_FILE%""==""regen-config"" IF NOT ""%IMPORT_FILE%""==""test"" IF NOT ""%IMPORT_FILE%""==""help"" (
  SET IS_INVALID_PARAM_VALUE=TRUE
)

SET IMPORT_FILE2=%IMPORT_FILE%
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  IF ""%IMPORT_FILE%""=="""" (
    IF "%IS_INVALID_JS_OPTION_VALUE%"=="TRUE" (
      SET IMPORT_FILE=%JS_OPTION%
      SET JS_OPTION=
    ) ELSE (
      IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" (
        CALL :fail "JasperReports Server import file[path-to-file-and-filename] expected as input"
        EXIT /b 1
      )
    )
  ) ELSE (
    IF "%IS_INVALID_JS_OPTION_VALUE%"=="TRUE" (
      IF "%IS_INVALID_PARAM_VALUE%"=="TRUE" (
        CALL :fail "Invalid option specified"
        EXIT /b 1
      ) ELSE (
        SET IMPORT_FILE=%JS_OPTION%
        SET JS_OPTION=%IMPORT_FILE2%
      )
    )
  )
)

IF ""%JS_UPGRADE_STRATEGY%""==""standard"" IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" IF "%IMPORT_FILE%"=="" (
  CALL :fail "JasperReports Server import file[path-to-file-and-filename] expected as input"
  EXIT /b 1
)

IF ""%JS_OPTION%""=="""" ( GOTO :default )
IF ""%JS_OPTION%""==""with-samples"" ( GOTO :withSamples )
IF ""%JS_OPTION%""==""regen-config"" ( GOTO :regenConfig )
IF ""%JS_OPTION%""==""test"" ( GOTO :test )
IF ""%JS_OPTION%""==""help"" ( GOTO :help )
CALL :fail "Invalid option specified"
EXIT /b 1

:default
SET JS_ANT_TARGET=upgrade-minimal-%JS_EDITION%
SET JS_OPTION=default
GOTO :proceedToSetup

:withSamples
SET JS_ANT_TARGET=upgrade-normal-%JS_EDITION%
GOTO :proceedToSetup

:regenConfig
SET JS_ANT_TARGET=refresh-config
GOTO :proceedToSetup

:test
SET JS_ANT_TARGET=pre-upgrade-test-%JS_EDITION%
GOTO :proceedToSetup

:help
IF "%JS_UPGRADE_STRATEGY%"=="standard" ( TYPE bin\upgrade-newdb.help )
IF "%JS_UPGRADE_STRATEGY%"=="inDatabase" ( TYPE bin\upgrade-samedb.help )
GOTO :end

rem
rem Calling core setup script with determined parameters.
rem
:proceedToSetup
IF "%IMPORT_FILE%"=="" (
  SET JS_ANT_OPTIONS=%JS_UPGRADE_STRATEGY%
) ELSE (
  SET JS_ANT_OPTIONS=%JS_UPGRADE_STRATEGY% "%IMPORT_FILE%"
)
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
IF "%IS_INCLUDE_ACCESS_EVENTS%"=="TRUE" (
  SET JS_ANT_OPTIONS=%JS_ANT_OPTIONS% include-access-events
)
)
CALL "%~dp0"do-js-setup.bat upgrade %JS_EDITION% %JS_OPTION% %JS_ANT_TARGET% %JS_ANT_OPTIONS%
GOTO :end

rem -----------------------------------------------------------------------------

:showUsage
ECHO Please enter one of the following options: 'EMPTY', with-samples, regen-config, test
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  ECHO "Also enter import file option(<path-to-file-and-filename>). If <path-to-file-and-filename> contains spaces then need to enclose <path-to-file-and-filename> to double quotes."
)
GOTO:EOF

:fail
IF NOT "%~1" == "" ( ECHO %~1 )
CALL :showUsage
EXIT /b 1

:end
EXIT /b 0
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
In your case it should probably be
appServerType = tomcat5

Open in new window

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:tagomtech
Comment Utility
I tried that - it gives me an error....that is what is so confusing about this.
0
 

Author Comment

by:tagomtech
Comment Utility
I believe I may have found the issue - we install jasperServer on port 8082- default is 8080. We have glassfish installed on 8080.
0
 

Author Comment

by:tagomtech
Comment Utility
rying to do a work around now :(
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>I have tried using tomcat 5, tomcat 5,5 tomcat 5.5.20

None of those is 'tomcat5' ;)
0
 

Author Comment

by:tagomtech
Comment Utility
right without the spaces....promise I really did try...trying again now....
0
 

Author Comment

by:tagomtech
Comment Utility
woohoo I think I have it - changed it back to ;) let me think ''tomcat5' - however also changed the direction of the \ to / in the directory and when through EACH and every file and changed any ref. to port 8080 to 8082
testing now - cross fingers
0
 

Author Comment

by:tagomtech
Comment Utility
OKAY! one step closer - this did deploy the webapp but to the wrong directory - here is the results....
deploy-webapp:
     [echo]
     [echo] Property values (in install.xml: deploy-webapp):
     [echo]  jsEdition = ce
     [echo]  warFileDistSourceDir = D:\Java\jasperreports-server-cp-4.0.0-bin\jasperreports-server-cp-4.0.0-bin\buildomatic/../jasperserver.war
     [echo]  warTargetDir = D:/Java/jasperserver-ce-3.7.0/webapps/jasperserver
     [echo]  webAppName = jasperserver
     [echo]  webAppNameCE = jasperserver
     [echo]  webAppNamePro = jasperserver-pro
     [echo]  webAppNameSrc = jasperserver
     [echo]  webAppNameDel = jasperserver
     [echo]  warTargetDirDel = D:/Java/jasperserver-ce-3.7.0/webapps/jasperserver
     [echo]
     [copy] Copying 1059 resources to D:\Java\jasperserver-ce-3.7.0\webapps\jasperserver
     [copy] Copying 4 files to D:\Java\jasperserver-ce-3.7.0\webapps\jasperserver

What I need to happen is for the jasperserver to deploy to the D:\Java\jasperserver-ce-3.7.0\apache-tomcat\webapps  directory
any ideas?
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Try

appServerDir = D:\Java\jasperserver-ce-3.7.0\apache-tomcat
0
 

Author Closing Comment

by:tagomtech
Comment Utility
YOU ROCK!
Again thanks for talking through this with me.
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now