免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4436 | 回复: 4

破解Jboss部署war文件中的USB加密狗的方法,可行吗! [复制链接]

论坛徽章:
0
发表于 2006-01-21 03:27 |显示全部楼层
有个基于web的应用,用war打包,Jboss做服务器的软件。这个软件是用USB狗防护,每次安装和正式运行都需要狗,很麻烦。我想去掉它!我的方法如下:
1.停止Jboss服务器。
2.用解压软件(alZip)解压war文件,找到访问加密狗的部分,用JAD反编译,修改后重新编译,编译都没问题。
3.复制JDK/bin/jar.exe到解压的文件夹,用如下的命令生成war文件
  jar   cvf    xxx.war   .(点)      然后用解压软件删除其中多余的jar.exe  
4.将生成的新xxx.war复制到jboss的server/default/deploy下
5.重新启动Jboss服务器,启动过程正常
   可当访问的时候,服务器输出:java.util.zip.ZipExetion :invalid entry size (excepted 404946592 but got 0 bytes)…很多错误信息。
   从错误来看,是文件大小不对了,难道是压缩方法或工具错了?
   朋友们,能告诉我错在哪里,该如何解决这个问题呢?
   这个一旦成功,我想J2EE类型软件的加密就没什么难的了。呵呵

论坛徽章:
0
发表于 2006-01-21 11:49 |显示全部楼层

详细错误信息如下

11:41:58,633 ERROR [Tomcat5] Problem in init
java.util.zip.ZipException: invalid entry size (expected 404946952 but got 0 bytes)
        at java.util.zip.ZipInputStream.readEnd(Unknown Source)
        at java.util.zip.ZipInputStream.read(Unknown Source)
        at java.util.jar.JarInputStream.read(Unknown Source)
        at java.util.zip.ZipInputStream.closeEntry(Unknown Source)
        at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
        at java.util.jar.JarInputStream.<init>(Unknown Source)
        at java.util.jar.JarInputStream.<init>(Unknown Source)
        at org.jboss.util.file.JarUtils.unjar(JarUtils.java:241)
        at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:262)
        at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy8.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:416)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy5.deploy(Unknown Source)
        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
        at org.jboss.Main.boot(Main.java:151)
        at org.jboss.Main$1.run(Main.java:405)
        at java.lang.Thread.run(Unknown Source)
11:41:58,643 ERROR [MainDeployer] Could not initialise deployment: file:/C:/ECP_TRV/server/default/deploy/TeachPlatform_Train.war
org.jboss.deployment.DeploymentException: invalid entry size (expected 404946952 but got 0 bytes); - nested throwable: (java.util.zip.ZipException: invalid entry size (expected 404946952 but got 0 bytes))
        at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:314)
        at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy8.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:416)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at java.util.jar.JarInputStream.<init>(Unknown Source)
        at org.jboss.util.file.JarUtils.unjar(JarUtils.java:241)
        at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:262)
        ... 67 more
11:42:07,015 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@f387b02b { url=file:/C:/ECP_TRV/server/default/deploy/TeachPlatform_Train.war }
  deployer: org.jboss.web.tomcat.tc5.Tomcat5@1d840d9
  status: null
  state: FAILED
  watch: file:/C:/ECP_TRV/server/default/deploy/TeachPlatform_Train.war
  altDD: null
  lastDeployed: 1137814918643
  lastModified: 1137814918623
  mbeans:

论坛徽章:
0
发表于 2006-01-21 17:35 |显示全部楼层
解决了。但新问题又出来了。呵呵。
解决的方法是,不再打包成war,而是将解压的文件夹改为xxx.war。就这么简单

论坛徽章:
0
发表于 2006-01-23 21:38 |显示全部楼层
什么新的问题?

论坛徽章:
0
发表于 2008-04-21 11:38 |显示全部楼层
非常谢谢,我也遇到前面你所说的问题。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP